From 9386696f4b5377e5a1ffb563a21d99e36e6f6f9e Mon Sep 17 00:00:00 2001 From: rubyowo Date: Mon, 9 Jan 2023 17:02:41 +0400 Subject: [PATCH 001/128] 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 0dcb7bde5..af30fd4ee 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 979fb68953d7f8a9aa8766d25cb7e8184519ef9a Mon Sep 17 00:00:00 2001 From: Ruby Star Date: Sun, 2 Jul 2023 16:22:44 +0400 Subject: [PATCH 002/128] fix: remove debug commands from backend/Dockerfile --- docker/production/backend/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/production/backend/Dockerfile b/docker/production/backend/Dockerfile index 590c44cf1..63da6d1bd 100644 --- a/docker/production/backend/Dockerfile +++ b/docker/production/backend/Dockerfile @@ -4,6 +4,4 @@ USER node COPY --chown=node:node . /zeppelin WORKDIR /zeppelin/backend -RUN ls -lah -RUN pwd RUN npm ci && npm run build From 83ac507ebd0549b7aafbf9cf6143a33783d5ac86 Mon Sep 17 00:00:00 2001 From: Ruby Star Date: Sun, 2 Jul 2023 16:40:18 +0400 Subject: [PATCH 003/128] fix: make the migrate service run after the db --- docker-compose.production.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index b1c36b3ca..672b90440 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -32,6 +32,9 @@ services: retries: 60 migrate: + depends_on: + mysql: + condition: service_healthy build: context: . dockerfile: docker/production/backend/Dockerfile From 062cb053cc3861273445f596d7e3df74468903ad Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 18 Nov 2023 12:55:01 +0200 Subject: [PATCH 004/128] fix: crash on tag round() with >100 decimals --- backend/src/templateFormatter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/templateFormatter.ts b/backend/src/templateFormatter.ts index 11c179251..abe42fe01 100644 --- a/backend/src/templateFormatter.ts +++ b/backend/src/templateFormatter.ts @@ -419,7 +419,7 @@ const baseValues = { }, round(arg, decimals = 0) { if (isNaN(arg)) return 0; - return decimals === 0 ? Math.round(arg) : arg.toFixed(decimals); + return decimals === 0 ? Math.round(arg) : arg.toFixed(Math.max(0, Math.min(decimals, 100))); }, add(...args) { return args.reduce((result, arg) => { From 9fd2bf4edb71d2c21b1e8af256361a9dc69d825a Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 18 Nov 2023 12:57:54 +0200 Subject: [PATCH 005/128] fix: crash on tag round() with non-numeric argument --- backend/src/templateFormatter.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/templateFormatter.ts b/backend/src/templateFormatter.ts index abe42fe01..e51506c44 100644 --- a/backend/src/templateFormatter.ts +++ b/backend/src/templateFormatter.ts @@ -418,7 +418,10 @@ const baseValues = { return Math.round(randValue * (to - from) + from); }, round(arg, decimals = 0) { - if (isNaN(arg)) return 0; + if (typeof arg !== "number") { + arg = parseFloat(arg); + } + if (Number.isNaN(arg)) return 0; return decimals === 0 ? Math.round(arg) : arg.toFixed(Math.max(0, Math.min(decimals, 100))); }, add(...args) { From c82e147ea163fcbf4ced78fe385e83560ccc9a5e Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 25 Nov 2023 12:15:32 +0200 Subject: [PATCH 006/128] feat: more robust tag error handling --- .../src/plugins/Tags/commands/TagEvalCmd.ts | 14 ++++++++++---- .../plugins/Tags/util/renderTagFromString.ts | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/backend/src/plugins/Tags/commands/TagEvalCmd.ts b/backend/src/plugins/Tags/commands/TagEvalCmd.ts index 55659d30c..27cbe4f3c 100644 --- a/backend/src/plugins/Tags/commands/TagEvalCmd.ts +++ b/backend/src/plugins/Tags/commands/TagEvalCmd.ts @@ -5,6 +5,7 @@ import { TemplateParseError } from "../../../templateFormatter"; import { memberToTemplateSafeMember, userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { tagsCmd } from "../types"; import { renderTagBody } from "../util/renderTagBody"; +import { logger } from "../../../logger"; export const TagEvalCmd = tagsCmd({ trigger: "tag eval", @@ -34,12 +35,17 @@ export const TagEvalCmd = tagsCmd({ msg.channel.send(rendered); } catch (e) { - if (e instanceof TemplateParseError) { - sendErrorMessage(pluginData, msg.channel, `Failed to render tag: ${e.message}`); - return; + const errorMessage = e instanceof TemplateParseError + ? e.message + : "Internal error"; + + sendErrorMessage(pluginData, msg.channel, `Failed to render tag: ${errorMessage}`); + + if (! (e instanceof TemplateParseError)) { + logger.warn(`Internal error evaluating tag in ${pluginData.guild.id}: ${e}`); } - throw e; + return; } }, }); diff --git a/backend/src/plugins/Tags/util/renderTagFromString.ts b/backend/src/plugins/Tags/util/renderTagFromString.ts index 55e699fa6..f12658589 100644 --- a/backend/src/plugins/Tags/util/renderTagFromString.ts +++ b/backend/src/plugins/Tags/util/renderTagFromString.ts @@ -7,6 +7,7 @@ import { memberToTemplateSafeMember, userToTemplateSafeUser } from "../../../uti import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TTag, TagsPluginType } from "../types"; import { renderTagBody } from "./renderTagBody"; +import { logger } from "../../../logger"; export async function renderTagFromString( pluginData: GuildPluginData, @@ -34,14 +35,18 @@ export async function renderTagFromString( return validateAndParseMessageContent(rendered); } catch (e) { - if (e instanceof TemplateParseError) { - const logs = pluginData.getPlugin(LogsPlugin); - logs.logBotAlert({ - body: `Failed to render tag \`${prefix}${tagName}\`: ${e.message}`, - }); - return null; + const logs = pluginData.getPlugin(LogsPlugin); + const errorMessage = e instanceof TemplateParseError + ? e.message + : "Internal error"; + logs.logBotAlert({ + body: `Failed to render tag \`${prefix}${tagName}\`: ${errorMessage}`, + }); + + if (! (e instanceof TemplateParseError)) { + logger.warn(`Internal error rendering tag ${tagName} in ${pluginData.guild.id}: ${e}`); } - throw e; + return null; } } From fafaefa1fbafddf9216d2f5ddaad0177cf3fb4bc Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 25 Nov 2023 12:28:28 +0200 Subject: [PATCH 007/128] feat: limit logs timestamp_format length --- backend/src/plugins/Logs/LogsPlugin.ts | 5 +++-- backend/src/plugins/Logs/types.ts | 5 +++-- backend/src/utils/iotsUtils.ts | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 backend/src/utils/iotsUtils.ts diff --git a/backend/src/plugins/Logs/LogsPlugin.ts b/backend/src/plugins/Logs/LogsPlugin.ts index bd9701608..e56ba756e 100644 --- a/backend/src/plugins/Logs/LogsPlugin.ts +++ b/backend/src/plugins/Logs/LogsPlugin.ts @@ -110,6 +110,7 @@ import { logVoiceChannelForceMove } from "./logFunctions/logVoiceChannelForceMov import { logVoiceChannelJoin } from "./logFunctions/logVoiceChannelJoin"; import { logVoiceChannelLeave } from "./logFunctions/logVoiceChannelLeave"; import { logVoiceChannelMove } from "./logFunctions/logVoiceChannelMove"; +import { asBoundedString } from "../../utils/iotsUtils"; // The `any` cast here is to prevent TypeScript from locking up from the circular dependency function getCasesPlugin(): Promise { @@ -120,12 +121,12 @@ const defaultOptions: PluginOptions = { config: { channels: {}, format: { - timestamp: FORMAT_NO_TIMESTAMP, // Legacy/deprecated, use timestamp_format below instead + timestamp: asBoundedString(FORMAT_NO_TIMESTAMP), // Legacy/deprecated, use timestamp_format below instead ...DefaultLogMessages, }, ping_user: true, // Legacy/deprecated, if below is false mentions wont actually ping. In case you really want the old behavior, set below to true allow_user_mentions: false, - timestamp_format: "[]", + timestamp_format: asBoundedString("[]"), include_embed_timestamp: true, }, diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 62008aab9..759f680d2 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -23,6 +23,7 @@ import { TemplateSafeUser, } from "../../utils/templateSafeObjects"; import { TRegex } from "../../validatorUtils"; +import { tBoundedString } from "../../utils/iotsUtils"; export const tLogFormats = t.record(t.string, t.union([t.string, tMessageContent])); export type TLogFormats = t.TypeOf; @@ -53,12 +54,12 @@ export const ConfigSchema = t.type({ format: t.intersection([ tLogFormats, t.type({ - timestamp: t.string, // Legacy/deprecated + timestamp: tBoundedString(0, 64), // Legacy/deprecated }), ]), ping_user: t.boolean, // Legacy/deprecated, if below is false mentions wont actually ping allow_user_mentions: t.boolean, - timestamp_format: t.string, + timestamp_format: tBoundedString(0, 64), include_embed_timestamp: t.boolean, }); export type TConfigSchema = t.TypeOf; diff --git a/backend/src/utils/iotsUtils.ts b/backend/src/utils/iotsUtils.ts new file mode 100644 index 000000000..a3636c840 --- /dev/null +++ b/backend/src/utils/iotsUtils.ts @@ -0,0 +1,17 @@ +import * as t from "io-ts"; + +interface BoundedStringBrand { + readonly BoundedString: unique symbol; +} + +export function asBoundedString(str: string) { + return str as t.Branded; +} + +export function tBoundedString(min: number, max: number) { + return t.brand( + t.string, + (str): str is t.Branded => (str.length >= min && str.length <= max), + "BoundedString", + ); +} From 48d56965522cd4e95d162b161c2957a8ecfd6fb6 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Fri, 22 Dec 2023 20:21:22 +0000 Subject: [PATCH 008/128] add missing "where" Signed-off-by: GitHub --- backend/src/data/GuildCounters.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/data/GuildCounters.ts b/backend/src/data/GuildCounters.ts index 4e69857b3..fc853367c 100644 --- a/backend/src/data/GuildCounters.ts +++ b/backend/src/data/GuildCounters.ts @@ -285,7 +285,11 @@ export class GuildCounters extends BaseGuildRepository { reverse_comparison_value: reverseComparisonValue, }); - return (await entityManager.findOne(CounterTrigger, insertResult.identifiers[0].id))!; + return (await entityManager.findOne(CounterTrigger, { + where: { + id: insertResult.identifiers[0].id + } + }))!; }); } From 94a712832a0e429cb8d96a5034e54eae82079bdb Mon Sep 17 00:00:00 2001 From: Tiago R Date: Wed, 27 Dec 2023 18:20:48 +0000 Subject: [PATCH 009/128] Display available emojis separately from total on server info (#433) * respect .available (almeida-approved code!!) Signed-off-by: GitHub * Update backend/src/plugins/Utility/functions/getServerInfoEmbed.ts Co-authored-by: Almeida --------- Signed-off-by: GitHub Co-authored-by: Almeida --- .../src/plugins/Utility/functions/getServerInfoEmbed.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts index 370506132..d0202db78 100644 --- a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts @@ -205,9 +205,14 @@ export async function getServerInfoEmbed( [GuildPremiumTier.Tier3]: 60, }[restGuild.premiumTier] ?? 0; + const availableEmojis = restGuild.emojis.cache.filter((e) => e.available); otherStats.push( - `Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}${ + `Emojis: **${availableEmojis.size}** / ${maxEmojis * 2}${ roleLockedEmojis ? ` (__${roleLockedEmojis} role-locked__)` : "" + }${ + availableEmojis.size < restGuild.emojis.cache.size + ? ` (__+${restGuild.emojis.cache.size - availableEmojis.size} unavailable__)` + : "" }`, ); otherStats.push(`Stickers: **${restGuild.stickers.cache.size}** / ${maxStickers}`); From cf55eb161f4e2adc7cb5e7c7060b5603b06e96dc Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 27 Dec 2023 18:30:08 +0000 Subject: [PATCH 010/128] fix formatting and globs in package.json (#440) --- backend/src/data/GuildCounters.ts | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/data/GuildCounters.ts b/backend/src/data/GuildCounters.ts index fc853367c..0c8fde5b0 100644 --- a/backend/src/data/GuildCounters.ts +++ b/backend/src/data/GuildCounters.ts @@ -287,8 +287,8 @@ export class GuildCounters extends BaseGuildRepository { return (await entityManager.findOne(CounterTrigger, { where: { - id: insertResult.identifiers[0].id - } + id: insertResult.identifiers[0].id, + }, }))!; }); } diff --git a/package.json b/package.json index 0cec20930..3250124df 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "", "private": true, "scripts": { - "format": "prettier --write './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'", - "lint": "eslint './backend/src/**/*.{js,ts,tsx}' './dashboard/src/**/*.{js,ts,tsx}'", - "codestyle-check": "prettier --check './backend/src/**/*.{css,html,js,json,ts,tsx}' './dashboard/src/**/*.{css,html,js,json,ts,tsx}'" + "format": "prettier --write \"./backend/src/**/*.{css,html,js,json,ts,tsx}\" \"./dashboard/src/**/*.{css,html,js,json,ts,tsx}\"", + "lint": "eslint \"./backend/src/**/*.{js,ts,tsx}\" \"./dashboard/src/**/*.{js,ts,tsx}\"", + "codestyle-check": "prettier --check \"./backend/src/**/*.{css,html,js,json,ts,tsx}\" \"./dashboard/src/**/*.{css,html,js,json,ts,tsx}\"" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.59.5", From e5e574625a2ee7442c01df2e5da1117754b27ed0 Mon Sep 17 00:00:00 2001 From: zay <87788699+zayKenyon@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:33:20 +0000 Subject: [PATCH 011/128] chore(basic-config): rename plugin (#359) --- dashboard/src/components/docs/ConfigurationFormat.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/src/components/docs/ConfigurationFormat.vue b/dashboard/src/components/docs/ConfigurationFormat.vue index 1d790ffac..426563e18 100644 --- a/dashboard/src/components/docs/ConfigurationFormat.vue +++ b/dashboard/src/components/docs/ConfigurationFormat.vue @@ -20,7 +20,7 @@ "172950000412655616": 50 # Example mod plugins: - mod_plugin: + mod_actions: config: kick_message: 'You have been kicked' can_kick: false From f17232e0c142012cf236443b8f03cbcb3cea1e3d Mon Sep 17 00:00:00 2001 From: Tiago R Date: Wed, 27 Dec 2023 18:35:16 +0000 Subject: [PATCH 012/128] dont allow self targeting for set-perms (#434) Signed-off-by: GitHub --- backend/src/api/guilds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/guilds.ts b/backend/src/api/guilds.ts index ba9370931..4fef738f3 100644 --- a/backend/src/api/guilds.ts +++ b/backend/src/api/guilds.ts @@ -126,7 +126,7 @@ export function initGuildsAPI(app: express.Express) { if (type !== ApiPermissionTypes.User) { return clientError(res, "Invalid type"); } - if (!isSnowflake(targetId)) { + if (!isSnowflake(targetId) || targetId === req.user!.userId) { return clientError(res, "Invalid targetId"); } const validPermissions = new Set(Object.values(ApiPermissions)); From 00fb71f26d2772904ef6fb89312161fcd922ef1a Mon Sep 17 00:00:00 2001 From: Tiago R Date: Wed, 27 Dec 2023 18:36:37 +0000 Subject: [PATCH 013/128] compose: Don't expose MySQL through all interfaces (#435) Signed-off-by: GitHub --- docker-compose.production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 672b90440..7dfc145b6 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -21,7 +21,7 @@ services: 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 + - 127.0.0.1:${DOCKER_PROD_MYSQL_PORT:?Missing DOCKER_PROD_MYSQL_PORT}:3306 volumes: - ./docker/production/data/mysql:/var/lib/mysql command: --authentication-policy=mysql_native_password From d162418be5288edcca7483acac089c2ff6da130e Mon Sep 17 00:00:00 2001 From: Tiago R Date: Wed, 27 Dec 2023 18:38:26 +0000 Subject: [PATCH 014/128] Add missing dependency to mutes plugin & fix timeout expiry (#430) * +debug Signed-off-by: GitHub * Revert "+debug" This reverts commit 83daee09d9e63ad0c162f4ec30d42b03ab4bdc7f. * add missing dependency to mutes Signed-off-by: GitHub * lower max timeout duration Signed-off-by: GitHub --------- Signed-off-by: GitHub --- backend/src/data/Mutes.ts | 2 +- backend/src/plugins/Mutes/MutesPlugin.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/data/Mutes.ts b/backend/src/data/Mutes.ts index ec7f11ccd..ad50dcee4 100644 --- a/backend/src/data/Mutes.ts +++ b/backend/src/data/Mutes.ts @@ -8,7 +8,7 @@ import { Mute } from "./entities/Mute"; const OLD_EXPIRED_MUTE_THRESHOLD = 7 * DAYS; -export const MAX_TIMEOUT_DURATION = 28 * DAYS; +export const MAX_TIMEOUT_DURATION = 27 * DAYS; // When a timeout is under this duration but the mute expires later, the timeout will be reset to max duration export const TIMEOUT_RENEWAL_THRESHOLD = 21 * DAYS; diff --git a/backend/src/plugins/Mutes/MutesPlugin.ts b/backend/src/plugins/Mutes/MutesPlugin.ts index 1a205bbea..ddc347ec5 100644 --- a/backend/src/plugins/Mutes/MutesPlugin.ts +++ b/backend/src/plugins/Mutes/MutesPlugin.ts @@ -8,6 +8,7 @@ import { GuildMutes } from "../../data/GuildMutes"; import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; import { CasesPlugin } from "../Cases/CasesPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; +import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin.js"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { ClearBannedMutesCmd } from "./commands/ClearBannedMutesCmd"; import { ClearMutesCmd } from "./commands/ClearMutesCmd"; @@ -68,7 +69,7 @@ export const MutesPlugin = zeppelinGuildPlugin()({ configSchema: ConfigSchema, }, - dependencies: () => [CasesPlugin, LogsPlugin], + dependencies: () => [CasesPlugin, LogsPlugin, RoleManagerPlugin], configParser: makeIoTsConfigParser(ConfigSchema), defaultOptions, From 047ab872df05f986564f6e465f9cc7deca65ca27 Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 27 Dec 2023 18:44:35 +0000 Subject: [PATCH 015/128] fix parsing of file extension in match_attachment_type trigger (#425) --- backend/src/plugins/Automod/triggers/matchAttachmentType.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts index 659be65b1..bb6c06fec 100644 --- a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts +++ b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts @@ -1,5 +1,6 @@ import { escapeInlineCode, Snowflake } from "discord.js"; import * as t from "io-ts"; +import { extname } from "path"; import { asSingleLine, messageSummary, verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; @@ -33,7 +34,7 @@ export const MatchAttachmentTypeTrigger = automodTrigger()({ } for (const attachment of context.message.data.attachments) { - const attachmentType = attachment.url.split(".").pop()!.toLowerCase(); + const attachmentType = extname(new URL(attachment.url).pathname).slice(1).toLowerCase(); const blacklist = trigger.blacklist_enabled ? (trigger.filetype_blacklist || []).map((_t) => _t.toLowerCase()) From c4a2be5ff5b93d012aa021c10f03a997903e4b32 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:11:38 +0000 Subject: [PATCH 016/128] resolveUserId support new usernames Signed-off-by: GitHub --- backend/src/utils.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 1bb4d6ce6..f29d990c3 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1222,11 +1222,25 @@ export function resolveUserId(bot: Client, value: string) { } // A non-mention, full username? - const usernameMatch = value.match(/^@?([^#]+)#(\d{4})$/); + const oldUsernameMatch = value.match(/^@?([^#]+)#(\d{4})$/); + if (oldUsernameMatch) { + const profiler = getProfiler(); + const start = performance.now(); + const user = bot.users.cache.find( + (u) => u.username === oldUsernameMatch[1] && u.discriminator === oldUsernameMatch[2], + ); + profiler?.addDataPoint("utils:resolveUserId:usernameMatch", performance.now() - start); + if (user) { + return user.id; + } + } + + // new usernames system + const usernameMatch = value.match(/^@?([^#]+)$/); if (usernameMatch) { const profiler = getProfiler(); const start = performance.now(); - const user = bot.users.cache.find((u) => u.username === usernameMatch[1] && u.discriminator === usernameMatch[2]); + const user = bot.users.cache.find((u) => u.username === usernameMatch[1]); profiler?.addDataPoint("utils:resolveUserId:usernameMatch", performance.now() - start); if (user) { return user.id; From 43076b3db68bafed52e0963914ebf8a027dcdcba Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:16:44 +0000 Subject: [PATCH 017/128] update djs Signed-off-by: GitHub --- backend/package-lock.json | 293 +++++++----------- backend/package.json | 2 +- .../plugins/Automod/actions/startThread.ts | 13 +- 3 files changed, 124 insertions(+), 184 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index b1d6d1891..4c6eaa144 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -14,7 +14,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.3", "deep-diff": "^1.0.2", - "discord.js": "^14.11.0", + "discord.js": "^14.14.1", "dotenv": "^4.0.0", "emoji-regex": "^8.0.0", "erlpack": "github:discord/erlpack", @@ -265,84 +265,109 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz", - "integrity": "sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==", - "dependencies": { - "@discordjs/formatters": "^0.3.1", - "@discordjs/util": "^0.3.1", - "@sapphire/shapeshift": "^3.8.2", - "discord-api-types": "^0.37.41", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz", + "integrity": "sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==", + "dependencies": { + "@discordjs/formatters": "^0.3.3", + "@discordjs/util": "^1.0.2", + "@sapphire/shapeshift": "^3.9.3", + "discord-api-types": "0.37.61", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.3", - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/collection": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz", - "integrity": "sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/formatters": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz", - "integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz", + "integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==", "dependencies": { - "discord-api-types": "^0.37.41" + "discord-api-types": "0.37.61" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/rest": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz", - "integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz", + "integrity": "sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==", "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/util": "^0.3.0", + "@discordjs/collection": "^2.0.0", + "@discordjs/util": "^1.0.2", "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.4.2", - "discord-api-types": "^0.37.41", - "file-type": "^18.3.0", - "tslib": "^2.5.0", - "undici": "^5.22.0" + "@sapphire/snowflake": "^3.5.1", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.61", + "magic-bytes.js": "^1.5.0", + "tslib": "^2.6.2", + "undici": "5.27.2" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" } }, "node_modules/@discordjs/util": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz", - "integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz", + "integrity": "sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==", "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/ws": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz", - "integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz", + "integrity": "sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==", "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", + "@discordjs/collection": "^2.0.0", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.4", - "@vladfrangu/async_event_emitter": "^2.2.1", - "discord-api-types": "^0.37.41", - "tslib": "^2.5.0", - "ws": "^8.13.0" + "@types/ws": "^8.5.9", + "@vladfrangu/async_event_emitter": "^2.2.2", + "discord-api-types": "0.37.61", + "tslib": "^2.6.2", + "ws": "^8.14.2" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", + "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", + "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", + "engines": { + "node": ">=14" } }, "node_modules/@jest/types": { @@ -416,9 +441,9 @@ } }, "node_modules/@sapphire/shapeshift": { - "version": "3.9.2", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz", - "integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==", + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.3.tgz", + "integrity": "sha512-WzKJSwDYloSkHoBbE8rkRW8UNKJiSRJ/P8NqJ5iVq7U2Yr/kriIBx2hW+wj2Z5e5EnXL1hgYomgaFsdK6b+zqQ==", "dependencies": { "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21" @@ -499,11 +524,6 @@ "yarn": ">= 1.3.2" } }, - "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.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -769,9 +789,9 @@ "integrity": "sha512-LKVgNmBxN0BbljJrVUwkxwRYqzsAEPcZOe6S2T6ZaBDIrFp0qu4FNlpc5sM1tGbXUYFgdVQIoeLk1Y1UoblyEg==" }, "node_modules/@types/ws": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", - "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", + "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", "dependencies": { "@types/node": "*" } @@ -3257,32 +3277,32 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.47", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.47.tgz", - "integrity": "sha512-rNif8IAv6duS2z47BMXq/V9kkrLfkAoiwpFY3sLxxbyKprk065zqf3HLTg4bEoxRSmi+Lhc7yqGDrG8C3j8GFA==" + "version": "0.37.61", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", + "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==" }, "node_modules/discord.js": { - "version": "14.11.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz", - "integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==", - "dependencies": { - "@discordjs/builders": "^1.6.3", - "@discordjs/collection": "^1.5.1", - "@discordjs/formatters": "^0.3.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", - "@discordjs/ws": "^0.8.3", - "@sapphire/snowflake": "^3.4.2", - "@types/ws": "^8.5.4", - "discord-api-types": "^0.37.41", - "fast-deep-equal": "^3.1.3", - "lodash.snakecase": "^4.1.1", - "tslib": "^2.5.0", - "undici": "^5.22.0", - "ws": "^8.13.0" + "version": "14.14.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz", + "integrity": "sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==", + "dependencies": { + "@discordjs/builders": "^1.7.0", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.3.3", + "@discordjs/rest": "^2.1.0", + "@discordjs/util": "^1.0.2", + "@discordjs/ws": "^1.0.2", + "@sapphire/snowflake": "3.5.1", + "@types/ws": "8.5.9", + "discord-api-types": "0.37.61", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "2.6.2", + "undici": "5.27.2", + "ws": "8.14.2" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/distributions": { @@ -3925,22 +3945,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/file-type": { - "version": "18.5.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.5.0.tgz", - "integrity": "sha512-yvpl5U868+V6PqXHMmsESpg6unQ5GfnPssl4dxdJudBrr9qy7Fddt7EVX1VLlddFfe8Gj9N7goCZH22FXuSQXQ==", - "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", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -5769,6 +5773,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/magic-bytes.js": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.5.0.tgz", + "integrity": "sha512-wJkXvutRbNWcc37tt5j1HyOK1nosspdh3dj6LUYYAvF6JYNqs53IfRvK9oEpcwiDA1NdoIi64yAMfdivPeVAyw==" + }, "node_modules/magic-string": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", @@ -7118,18 +7127,6 @@ "node": ">=0.12" } }, - "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/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -7706,34 +7703,6 @@ "safe-buffer": "~5.1.0" } }, - "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", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -8873,22 +8842,6 @@ "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/subarg": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", @@ -9151,22 +9104,6 @@ "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/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -9276,9 +9213,9 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/ttest": { "version": "3.0.0", @@ -9716,11 +9653,11 @@ "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==" }, "node_modules/undici": { - "version": "5.22.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz", - "integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", + "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", "dependencies": { - "busboy": "^1.6.0" + "@fastify/busboy": "^2.0.0" }, "engines": { "node": ">=14.0" @@ -10091,9 +10028,9 @@ } }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, diff --git a/backend/package.json b/backend/package.json index 2ff53482a..44101e517 100644 --- a/backend/package.json +++ b/backend/package.json @@ -35,7 +35,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.3", "deep-diff": "^1.0.2", - "discord.js": "^14.11.0", + "discord.js": "^14.14.1", "dotenv": "^4.0.0", "emoji-regex": "^8.0.0", "erlpack": "github:discord/erlpack", diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 25b840e1b..66d5ec3a1 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -57,7 +57,13 @@ export const StartThreadAction = automodAction({ for (const threadContext of threads) { const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id); - if (!channel || !("threads" in channel) || channel.type === ChannelType.GuildForum) continue; + if ( + !channel || + !("threads" in channel) || + channel.type === ChannelType.GuildForum || + channel.type === ChannelType.GuildMedia + ) + continue; const renderThreadName = async (str: string) => renderTemplate( @@ -90,10 +96,7 @@ export const StartThreadAction = automodAction({ .create({ ...threadOptions, type: actionConfig.private ? ChannelType.PrivateThread : ChannelType.PublicThread, - startMessage: - !actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads) - ? threadContext.message!.id - : undefined, + startMessage: !actionConfig.private ? threadContext.message!.id : undefined, }) .catch(() => undefined); } From f1791fac4452d63205fda3f0130cec1d46b96bdd Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:25:58 +0000 Subject: [PATCH 018/128] redo username check, yeet discrims entirely Signed-off-by: GitHub --- backend/src/utils.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index f29d990c3..af3b5ad88 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1221,26 +1221,12 @@ export function resolveUserId(bot: Client, value: string) { return mentionMatch[1]; } - // A non-mention, full username? - const oldUsernameMatch = value.match(/^@?([^#]+)#(\d{4})$/); - if (oldUsernameMatch) { - const profiler = getProfiler(); - const start = performance.now(); - const user = bot.users.cache.find( - (u) => u.username === oldUsernameMatch[1] && u.discriminator === oldUsernameMatch[2], - ); - profiler?.addDataPoint("utils:resolveUserId:usernameMatch", performance.now() - start); - if (user) { - return user.id; - } - } - - // new usernames system - const usernameMatch = value.match(/^@?([^#]+)$/); + // a username + const usernameMatch = value.match(/^@?(\S{3,})$/); if (usernameMatch) { const profiler = getProfiler(); const start = performance.now(); - const user = bot.users.cache.find((u) => u.username === usernameMatch[1]); + const user = bot.users.cache.find((u) => u.tag === usernameMatch[1]); profiler?.addDataPoint("utils:resolveUserId:usernameMatch", performance.now() - start); if (user) { return user.id; From 4c788bc321795d6d4cfb160945017d9a3475ceed Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:38:42 +0000 Subject: [PATCH 019/128] some transforms Signed-off-by: GitHub --- .../Automod/functions/matchMultipleTextTypesOnMessage.ts | 2 +- .../plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts | 7 +++---- .../src/plugins/Utility/functions/getInviteInfoEmbed.ts | 2 +- .../src/plugins/Utility/functions/getMessageInfoEmbed.ts | 2 +- backend/src/plugins/Utility/functions/getUserInfoEmbed.ts | 7 +++---- backend/src/utils.ts | 7 +++++-- backend/src/utils/templateSafeObjects.ts | 2 ++ 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts index 9e51c4901..f0eee5ec8 100644 --- a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts +++ b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts @@ -42,7 +42,7 @@ export async function* matchMultipleTextTypesOnMessage( } if (trigger.match_visible_names) { - yield ["visiblename", member.nickname || msg.data.author.username]; + yield ["visiblename", member.nickname || member.user.globalName || msg.data.author.username]; } if (trigger.match_usernames) { diff --git a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts index 13a72a871..f7350b5fb 100644 --- a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts +++ b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts @@ -68,10 +68,9 @@ export const ArchiveChannelCmd = channelArchiverCmd({ for (const message of messages.values()) { const ts = moment.utc(message.createdTimestamp).format("YYYY-MM-DD HH:mm:ss"); - let content = `[${ts}] [${message.author.id}] [${renderUsername( - message.author.username, - message.author.discriminator, - )}]: ${message.content || ""}`; + let content = `[${ts}] [${message.author.id}] [${renderUsername(message.author)}]: ${ + message.content || "" + }`; if (message.attachments.size) { if (args["attachment-channel"]) { diff --git a/backend/src/plugins/Utility/functions/getInviteInfoEmbed.ts b/backend/src/plugins/Utility/functions/getInviteInfoEmbed.ts index 12c97a8a7..b844b937d 100644 --- a/backend/src/plugins/Utility/functions/getInviteInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getInviteInfoEmbed.ts @@ -85,7 +85,7 @@ export async function getInviteInfoEmbed( embed.fields.push({ name: preEmbedPadding + "Invite creator", value: trimLines(` - Name: **${renderUsername(invite.inviter.username, invite.inviter.discriminator)}** + Name: **${renderUsername(invite.inviter)}** ID: \`${invite.inviter.id}\` Mention: <@!${invite.inviter.id}> `), diff --git a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts index 1568a3e30..3a49a80d0 100644 --- a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts @@ -71,7 +71,7 @@ export async function getMessageInfoEmbed( embed.fields.push({ name: preEmbedPadding + "Author information", value: trimLines(` - Name: **${renderUsername(message.author.username, message.author.discriminator)}** + Name: **${renderUsername(message.author)}** ID: \`${message.author.id}\` Created: **** ${authorJoinedAtTS ? `Joined: ****` : ""} diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts index ef8d23205..2de8b4db8 100644 --- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts @@ -43,7 +43,7 @@ export async function getUserInfoEmbed( const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); embed.author = { - name: `${user.bot ? "Bot" : "User"}: ${renderUsername(user.username, user.discriminator)}`, + name: `${user.bot ? "Bot" : "User"}: ${renderUsername(user)}`, }; const avatarURL = user.displayAvatarURL(); @@ -72,9 +72,8 @@ export async function getUserInfoEmbed( } const userInfoLines = [`ID: \`${user.id}\``, `Username: **${user.username}**`]; - if (user.discriminator !== "0") { - userInfoLines.push(`Discriminator: **${user.discriminator}**`); - } + if (user.discriminator !== "0") userInfoLines.push(`Discriminator: **${user.discriminator}**`); + if (user.globalName) userInfoLines.push(`Display Name: **${user.globalName}**`); userInfoLines.push(`Created: ****`); userInfoLines.push(`Mention: <@!${user.id}>`); diff --git a/backend/src/utils.ts b/backend/src/utils.ts index af3b5ad88..ee6b556ce 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1603,8 +1603,11 @@ export function isTruthy(value: T): value is Exclude`, tag: user.tag, avatarURL: user.displayAvatarURL?.(), From 1579c3ec25398a5341af0b66a4f68626ddd92f70 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:40:05 +0000 Subject: [PATCH 020/128] disable status-search arg Signed-off-by: GitHub --- backend/src/plugins/Utility/commands/SearchCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Utility/commands/SearchCmd.ts b/backend/src/plugins/Utility/commands/SearchCmd.ts index 777bb890b..fb4d2ad1c 100644 --- a/backend/src/plugins/Utility/commands/SearchCmd.ts +++ b/backend/src/plugins/Utility/commands/SearchCmd.ts @@ -15,7 +15,7 @@ export const searchCmdSignature = { export: ct.switchOption({ def: false, shortcut: "e" }), ids: ct.switchOption(), regex: ct.switchOption({ def: false, shortcut: "re" }), - "status-search": ct.switchOption({ def: false, shortcut: "ss" }), + // "status-search": ct.switchOption({ def: false, shortcut: "ss" }), }; export const SearchCmd = utilityCmd({ From c5704131cefd1b17da76ef179c2da81855c3fb25 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 13:44:42 +0000 Subject: [PATCH 021/128] support media channels Signed-off-by: GitHub --- backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts | 1 + backend/src/plugins/Utility/functions/getServerInfoEmbed.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts index ee006f5f2..d41e3e44a 100644 --- a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts @@ -56,6 +56,7 @@ export async function getChannelInfoEmbed( [ChannelType.AnnouncementThread]: "News Thread channel", [ChannelType.GuildDirectory]: "Hub channel", [ChannelType.GuildForum]: "Forum channel", + [ChannelType.GuildMedia]: "Media channel", }[channel.type] ?? "Channel"; embed.author = { diff --git a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts index d0202db78..afcefb806 100644 --- a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts @@ -149,12 +149,16 @@ export async function getServerInfoEmbed( const textChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildText); const voiceChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildVoice); const forumChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildForum); + const mediaChannels = thisServer.channels.cache.filter((channel) => channel.type === ChannelType.GuildMedia); const threadChannelsText = thisServer.channels.cache.filter( (channel) => channel.isThread() && channel.parent?.type !== ChannelType.GuildForum, ); const threadChannelsForums = thisServer.channels.cache.filter( (channel) => channel.isThread() && channel.parent?.type === ChannelType.GuildForum, ); + const threadChannelsMedia = thisServer.channels.cache.filter( + (channel) => channel.isThread() && channel.parent?.type === ChannelType.GuildMedia, + ); const announcementChannels = thisServer.channels.cache.filter( (channel) => channel.type === ChannelType.GuildAnnouncement, ); @@ -169,6 +173,7 @@ export async function getServerInfoEmbed( Categories: **${categories.size}** Text: **${textChannels.size}** (**${threadChannelsText.size} threads**) Forums: **${forumChannels.size}** (**${threadChannelsForums.size} threads**) + Media: **${mediaChannels.size}** (**${threadChannelsMedia.size} threads**) Announcement: **${announcementChannels.size}** Voice: **${voiceChannels.size}** Stage: **${stageChannels.size}** From 1e66f235b2f447ef07af2d17c1cda1108872a1dc Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 14:06:23 +0000 Subject: [PATCH 022/128] media channel icon Signed-off-by: GitHub --- backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts index d41e3e44a..f601dd5c4 100644 --- a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts @@ -19,6 +19,8 @@ const PRIVATE_THREAD_ICON = const FORUM_CHANNEL_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/1091681253364875294/forum-channel-icon.png"; +const MEDIA_CHANNEL_ICON = "https://cdn.discordapp.com/attachments/876134205229252658/1178335624940490792/media.png"; + export async function getChannelInfoEmbed( pluginData: GuildPluginData, channelId: string, @@ -42,6 +44,7 @@ export async function getChannelInfoEmbed( [ChannelType.PrivateThread]: PRIVATE_THREAD_ICON, [ChannelType.AnnouncementThread]: PUBLIC_THREAD_ICON, [ChannelType.GuildForum]: FORUM_CHANNEL_ICON, + [ChannelType.GuildMedia]: MEDIA_CHANNEL_ICON, }[channel.type] ?? TEXT_CHANNEL_ICON; const channelType = From ba4a2b45b8c73fc1ac201365e7cf9bbf7b9ea8bf Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 14:09:34 +0000 Subject: [PATCH 023/128] remove useless feature check Signed-off-by: GitHub --- backend/src/plugins/Automod/actions/startThread.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 66d5ec3a1..970e9ec85 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -1,10 +1,4 @@ -import { - ChannelType, - GuildFeature, - GuildTextThreadCreateOptions, - ThreadAutoArchiveDuration, - ThreadChannel, -} from "discord.js"; +import { ChannelType, GuildTextThreadCreateOptions, ThreadAutoArchiveDuration, ThreadChannel } from "discord.js"; import * as t from "io-ts"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { MINUTES, convertDelayStringToMS, noop, tDelayString, tNullable } from "../../../utils"; @@ -77,10 +71,7 @@ export const StartThreadAction = automodAction({ const threadOptions: GuildTextThreadCreateOptions = { name: threadName, autoArchiveDuration: autoArchive, - startMessage: - !actionConfig.private && guild.features.includes(GuildFeature.PrivateThreads) - ? threadContext.message!.id - : undefined, + startMessage: !actionConfig.private ? threadContext.message!.id : undefined, }; let thread: ThreadChannel | undefined; From 10bb0b67bc22a3f8dfef1c65809a9035143ba51a Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 14:53:54 +0000 Subject: [PATCH 024/128] some more patches thanks to ruby Signed-off-by: GitHub --- .../plugins/Automod/triggers/threadArchive.ts | 4 ++-- .../plugins/Automod/triggers/threadCreate.ts | 3 ++- .../plugins/Automod/triggers/threadDelete.ts | 3 ++- .../Automod/triggers/threadUnarchive.ts | 4 ++-- .../plugins/BotControl/commands/ServersCmd.ts | 6 +++-- .../src/plugins/Cases/functions/createCase.ts | 8 +++---- .../plugins/Cases/functions/createCaseNote.ts | 4 ++-- .../InternalPoster/functions/sendMessage.ts | 2 +- .../ModActions/commands/CasesModCmd.ts | 12 +++++----- .../ModActions/commands/CasesUserCmd.ts | 22 ++++++++++++++----- .../src/plugins/Post/util/actualPostCmd.ts | 4 ++-- .../util/createStarboardEmbedFromMessage.ts | 6 ++--- .../src/plugins/Utility/commands/AboutCmd.ts | 4 ++-- .../src/plugins/Utility/commands/AvatarCmd.ts | 8 +++---- .../Utility/functions/getUserInfoEmbed.ts | 5 +---- backend/src/plugins/Utility/search.ts | 10 ++++----- backend/src/utils.ts | 9 +++++--- backend/src/utils/templateSafeObjects.ts | 7 +++--- 18 files changed, 69 insertions(+), 52 deletions(-) diff --git a/backend/src/plugins/Automod/triggers/threadArchive.ts b/backend/src/plugins/Automod/triggers/threadArchive.ts index 0e65b10aa..8a692f6d7 100644 --- a/backend/src/plugins/Automod/triggers/threadArchive.ts +++ b/backend/src/plugins/Automod/triggers/threadArchive.ts @@ -1,6 +1,6 @@ import { User, escapeBold, type Snowflake } from "discord.js"; import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import { renderUsername, tNullable } from "../../../utils"; import { automodTrigger } from "../helpers"; interface ThreadArchiveResult { @@ -48,7 +48,7 @@ export const ThreadArchiveTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been archived in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(threadOwner.tag)}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/Automod/triggers/threadCreate.ts b/backend/src/plugins/Automod/triggers/threadCreate.ts index 7b8aca714..dc613068f 100644 --- a/backend/src/plugins/Automod/triggers/threadCreate.ts +++ b/backend/src/plugins/Automod/triggers/threadCreate.ts @@ -1,5 +1,6 @@ import { User, escapeBold, type Snowflake } from "discord.js"; import * as t from "io-ts"; +import { renderUsername } from "../../../utils.js"; import { automodTrigger } from "../helpers"; interface ThreadCreateResult { @@ -40,7 +41,7 @@ export const ThreadCreateTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been created in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(threadOwner.tag)}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/Automod/triggers/threadDelete.ts b/backend/src/plugins/Automod/triggers/threadDelete.ts index 489b5b4ca..f27a1d0bd 100644 --- a/backend/src/plugins/Automod/triggers/threadDelete.ts +++ b/backend/src/plugins/Automod/triggers/threadDelete.ts @@ -1,5 +1,6 @@ import { User, escapeBold, type Snowflake } from "discord.js"; import * as t from "io-ts"; +import { renderUsername } from "../../../utils.js"; import { automodTrigger } from "../helpers"; interface ThreadDeleteResult { @@ -40,7 +41,7 @@ export const ThreadDeleteTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; if (threadOwner) { return `Thread **#${threadName ?? "Unknown"}** (\`${threadId}\`) created by **${escapeBold( - threadOwner.tag, + renderUsername(threadOwner.tag), )}** (\`${threadOwner.id}\`) in the **#${parentName}** (\`${parentId}\`) channel has been deleted`; } return `Thread **#${ diff --git a/backend/src/plugins/Automod/triggers/threadUnarchive.ts b/backend/src/plugins/Automod/triggers/threadUnarchive.ts index f6047f483..94c69ace6 100644 --- a/backend/src/plugins/Automod/triggers/threadUnarchive.ts +++ b/backend/src/plugins/Automod/triggers/threadUnarchive.ts @@ -1,6 +1,6 @@ import { User, escapeBold, type Snowflake } from "discord.js"; import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import { renderUsername, tNullable } from "../../../utils"; import { automodTrigger } from "../helpers"; interface ThreadUnarchiveResult { @@ -48,7 +48,7 @@ export const ThreadUnarchiveTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been unarchived in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(threadOwner.tag)}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/BotControl/commands/ServersCmd.ts b/backend/src/plugins/BotControl/commands/ServersCmd.ts index 23146d21f..5cb62433e 100644 --- a/backend/src/plugins/BotControl/commands/ServersCmd.ts +++ b/backend/src/plugins/BotControl/commands/ServersCmd.ts @@ -1,7 +1,7 @@ import escapeStringRegexp from "escape-string-regexp"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { isStaffPreFilter } from "../../../pluginUtils"; -import { createChunkedMessage, getUser, sorter } from "../../../utils"; +import { createChunkedMessage, getUser, renderUsername, sorter } from "../../../utils"; import { botControlCmd } from "../types"; export const ServersCmd = botControlCmd({ @@ -48,7 +48,9 @@ export const ServersCmd = botControlCmd({ const lines = filteredGuilds.map((g) => { const paddedId = g.id.padEnd(longestId, " "); const owner = getUser(pluginData.client, g.ownerId); - return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${owner.tag}** \`${owner.id}\`)`; + return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${renderUsername(owner.tag)}** \`${ + owner.id + }\`)`; }); createChunkedMessage(msg.channel, lines.join("\n")); } else { diff --git a/backend/src/plugins/Cases/functions/createCase.ts b/backend/src/plugins/Cases/functions/createCase.ts index c16d937bc..70717f514 100644 --- a/backend/src/plugins/Cases/functions/createCase.ts +++ b/backend/src/plugins/Cases/functions/createCase.ts @@ -1,23 +1,23 @@ import type { Snowflake } from "discord.js"; import { GuildPluginData } from "knub"; import { logger } from "../../../logger"; -import { renderUserUsername, resolveUser } from "../../../utils"; +import { renderUsername, resolveUser } from "../../../utils"; import { CaseArgs, CasesPluginType } from "../types"; import { createCaseNote } from "./createCaseNote"; import { postCaseToCaseLogChannel } from "./postToCaseLogChannel"; export async function createCase(pluginData: GuildPluginData, args: CaseArgs) { const user = await resolveUser(pluginData.client, args.userId); - const userName = renderUserUsername(user); + const userName = renderUsername(user.username, user.discriminator); const mod = await resolveUser(pluginData.client, args.modId); - const modName = mod.tag; + const modName = renderUsername(mod.username, mod.discriminator); let ppName: string | null = null; let ppId: Snowflake | null = null; if (args.ppId) { const pp = await resolveUser(pluginData.client, args.ppId); - ppName = pp.tag; + ppName = renderUsername(pp.username, pp.discriminator); ppId = pp.id; } diff --git a/backend/src/plugins/Cases/functions/createCaseNote.ts b/backend/src/plugins/Cases/functions/createCaseNote.ts index 92520b7d4..71b113029 100644 --- a/backend/src/plugins/Cases/functions/createCaseNote.ts +++ b/backend/src/plugins/Cases/functions/createCaseNote.ts @@ -1,6 +1,6 @@ import { GuildPluginData } from "knub"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; -import { UnknownUser, resolveUser } from "../../../utils"; +import { UnknownUser, renderUsername, resolveUser } from "../../../utils"; import { CaseNoteArgs, CasesPluginType } from "../types"; import { postCaseToCaseLogChannel } from "./postToCaseLogChannel"; import { resolveCaseId } from "./resolveCaseId"; @@ -16,7 +16,7 @@ export async function createCaseNote(pluginData: GuildPluginData ({ diff --git a/backend/src/plugins/ModActions/commands/CasesModCmd.ts b/backend/src/plugins/ModActions/commands/CasesModCmd.ts index 5b0e32730..a911091d1 100644 --- a/backend/src/plugins/ModActions/commands/CasesModCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesModCmd.ts @@ -1,7 +1,7 @@ -import { APIEmbed, User } from "discord.js"; +import { APIEmbed, GuildMember, User } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage } from "../../../pluginUtils"; -import { emptyEmbedValue, resolveUser, trimLines } from "../../../utils"; +import { emptyEmbedValue, renderUsername, resolveMember, resolveUser, trimLines } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage"; import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; @@ -28,8 +28,10 @@ export const CasesModCmd = modActionsCmd({ async run({ pluginData, message: msg, args }) { const modId = args.mod || msg.author.id; - const mod = await resolveUser(pluginData.client, modId); - const modName = mod instanceof User ? mod.tag : modId; + const mod = + (await resolveMember(pluginData.client, pluginData.guild, modId)) || + (await resolveUser(pluginData.client, modId)); + const modName = mod instanceof User ? renderUsername(mod) : modId; const casesPlugin = pluginData.getPlugin(CasesPlugin); const totalCases = await casesPlugin.getTotalCasesByMod(modId); @@ -57,7 +59,7 @@ export const CasesModCmd = modActionsCmd({ const embed = { author: { name: title, - icon_url: mod instanceof User ? mod.displayAvatarURL() : undefined, + icon_url: mod instanceof User || mod instanceof GuildMember ? mod.displayAvatarURL() : undefined, }, fields: [ ...getChunkedEmbedFields(emptyEmbedValue, lines.join("\n")), diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 069ad31f4..05ab65eb6 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -1,9 +1,17 @@ -import { APIEmbed, User } from "discord.js"; +import { APIEmbed } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { sendErrorMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; -import { UnknownUser, chunkArray, emptyEmbedValue, renderUserUsername, resolveUser, trimLines } from "../../../utils"; +import { + UnknownUser, + chunkArray, + emptyEmbedValue, + renderUsername, + resolveMember, + resolveUser, + trimLines, +} from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; @@ -35,8 +43,10 @@ export const CasesUserCmd = modActionsCmd({ ], async run({ pluginData, message: msg, args }) { - const user = await resolveUser(pluginData.client, args.user); - if (!user.id) { + const user = + (await resolveMember(pluginData.client, pluginData.guild, args.user)) || + (await resolveUser(pluginData.client, args.user)); + if (!user.id || user instanceof UnknownUser) { sendErrorMessage(pluginData, msg.channel, `User not found`); return; } @@ -62,7 +72,7 @@ export const CasesUserCmd = modActionsCmd({ const hiddenCases = cases.filter((c) => c.is_hidden); const userName = - user instanceof UnknownUser && cases.length ? cases[cases.length - 1].user_name : renderUserUsername(user); + user instanceof UnknownUser && cases.length ? cases[cases.length - 1].user_name : renderUsername(user); if (cases.length === 0) { msg.channel.send(`No cases found for **${userName}**`); @@ -123,7 +133,7 @@ export const CasesUserCmd = modActionsCmd({ lineChunks.length === 1 ? `Cases for ${userName} (${lines.length} total)` : `Cases ${chunkStart}–${chunkEnd} of ${lines.length} for ${userName}`, - icon_url: user instanceof User ? user.displayAvatarURL() : undefined, + icon_url: user.displayAvatarURL(), }, fields: [ ...getChunkedEmbedFields(emptyEmbedValue, linesInChunk.join("\n")), diff --git a/backend/src/plugins/Post/util/actualPostCmd.ts b/backend/src/plugins/Post/util/actualPostCmd.ts index c73a672bc..29c3d5ecb 100644 --- a/backend/src/plugins/Post/util/actualPostCmd.ts +++ b/backend/src/plugins/Post/util/actualPostCmd.ts @@ -4,7 +4,7 @@ import { GuildPluginData } from "knub"; import moment from "moment-timezone"; import { registerUpcomingScheduledPost } from "../../../data/loops/upcomingScheduledPostsLoop"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { DBDateFormat, MINUTES, StrictMessageContent, errorMessage } from "../../../utils"; +import { DBDateFormat, MINUTES, StrictMessageContent, errorMessage, renderUsername } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; import { PostPluginType } from "../types"; @@ -122,7 +122,7 @@ export async function actualPostCmd( const post = await pluginData.state.scheduledPosts.create({ author_id: msg.author.id, - author_name: msg.author.tag, + author_name: renderUsername(msg.author), channel_id: targetChannel.id, content, attachments: [...msg.attachments.values()], diff --git a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts index 5f028c0ae..5126f20fa 100644 --- a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts +++ b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts @@ -1,6 +1,6 @@ import { GuildChannel, Message } from "discord.js"; import path from "path"; -import { EMPTY_CHAR, EmbedWith } from "../../../utils"; +import { EMPTY_CHAR, EmbedWith, renderUsername } from "../../../utils"; const imageAttachmentExtensions = ["jpeg", "jpg", "png", "gif", "webp"]; const audioAttachmentExtensions = ["wav", "mp3", "m4a"]; @@ -18,7 +18,7 @@ export function createStarboardEmbedFromMessage( text: `#${(msg.channel as GuildChannel).name}`, }, author: { - name: msg.author.tag, + name: renderUsername(msg.author), }, fields: [], timestamp: msg.createdAt.toISOString(), @@ -28,7 +28,7 @@ export function createStarboardEmbedFromMessage( embed.color = color; } - embed.author.icon_url = msg.author.displayAvatarURL(); + embed.author.icon_url = (msg.member || msg.author).displayAvatarURL(); // The second condition here checks for messages with only an image link that is then embedded. // The message content in that case is hidden by the Discord client, so we hide it here too. diff --git a/backend/src/plugins/Utility/commands/AboutCmd.ts b/backend/src/plugins/Utility/commands/AboutCmd.ts index 53408d71d..d4188ad70 100644 --- a/backend/src/plugins/Utility/commands/AboutCmd.ts +++ b/backend/src/plugins/Utility/commands/AboutCmd.ts @@ -100,8 +100,8 @@ export const AboutCmd = utilityCmd({ } // Use the bot avatar as the embed image - if (pluginData.client.user!.avatarURL()) { - aboutEmbed.thumbnail = { url: pluginData.client.user!.avatarURL()! }; + if (pluginData.client.user!.displayAvatarURL()) { + aboutEmbed.thumbnail = { url: pluginData.client.user!.displayAvatarURL()! }; } msg.channel.send({ embeds: [aboutEmbed] }); diff --git a/backend/src/plugins/Utility/commands/AvatarCmd.ts b/backend/src/plugins/Utility/commands/AvatarCmd.ts index ef44a2cb6..b1215df6c 100644 --- a/backend/src/plugins/Utility/commands/AvatarCmd.ts +++ b/backend/src/plugins/Utility/commands/AvatarCmd.ts @@ -1,7 +1,7 @@ import { APIEmbed, ImageFormat } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage } from "../../../pluginUtils"; -import { UnknownUser, renderUserUsername } from "../../../utils"; +import { UnknownUser, renderUsername } from "../../../utils"; import { utilityCmd } from "../types"; export const AvatarCmd = utilityCmd({ @@ -10,17 +10,17 @@ export const AvatarCmd = utilityCmd({ permission: "can_avatar", signature: { - user: ct.resolvedUserLoose({ required: false }), + user: ct.resolvedMember({ required: false }) || ct.resolvedUserLoose({ required: false }), }, async run({ message: msg, args, pluginData }) { - const user = args.user || msg.author; + const user = args.user || msg.member || msg.author; if (!(user instanceof UnknownUser)) { const embed: APIEmbed = { image: { url: user.displayAvatarURL({ extension: ImageFormat.PNG, size: 2048 }), }, - title: `Avatar of ${renderUserUsername(user)}:`, + title: `Avatar of ${renderUsername(user)}:`, }; msg.channel.send({ embeds: [embed] }); } else { diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts index 2de8b4db8..58d34d56b 100644 --- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts @@ -13,7 +13,6 @@ import { trimLines, UnknownUser, } from "../../../utils"; -import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; import { UtilityPluginType } from "../types"; const MAX_ROLES_TO_DISPLAY = 15; @@ -40,13 +39,11 @@ export async function getUserInfoEmbed( fields: [], }; - const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); - embed.author = { name: `${user.bot ? "Bot" : "User"}: ${renderUsername(user)}`, }; - const avatarURL = user.displayAvatarURL(); + const avatarURL = (member || user).displayAvatarURL(); embed.author.icon_url = avatarURL; if (compact) { diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts index 19710b581..632a85a77 100644 --- a/backend/src/plugins/Utility/search.ts +++ b/backend/src/plugins/Utility/search.ts @@ -14,7 +14,7 @@ import { ArgsFromSignatureOrArray, GuildPluginData } from "knub"; import moment from "moment-timezone"; import { RegExpRunner, allowTimeout } from "../../RegExpRunner"; import { getBaseUrl, sendErrorMessage } from "../../pluginUtils"; -import { MINUTES, multiSorter, renderUserUsername, sorter, trimLines } from "../../utils"; +import { MINUTES, multiSorter, renderUsername, sorter, trimLines } from "../../utils"; import { asyncFilter } from "../../utils/async"; import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions"; import { InvalidRegexError, inputPatternToRegExp } from "../../validatorUtils"; @@ -381,7 +381,7 @@ async function performMemberSearch( return true; } - const fullUsername = renderUserUsername(member.user); + const fullUsername = renderUsername(member.user); if (await execRegExp(queryRegex, fullUsername).catch(allowTimeout)) return true; return false; @@ -448,7 +448,7 @@ async function performBanSearch( const execRegExp = getOptimizedRegExpRunner(pluginData, isSafeRegex); matchingBans = await asyncFilter(matchingBans, async (user) => { - const fullUsername = renderUserUsername(user); + const fullUsername = renderUsername(user); if (await execRegExp(queryRegex, fullUsername).catch(allowTimeout)) return true; return false; }); @@ -492,10 +492,10 @@ function formatSearchResultList(members: Array): string { const paddedId = member.id.padEnd(longestId, " "); let line; if (member instanceof GuildMember) { - line = `${paddedId} ${renderUserUsername(member.user)}`; + line = `${paddedId} ${renderUsername(member.user)}`; if (member.nickname) line += ` (${member.nickname})`; } else { - line = `${paddedId} ${member.tag}`; + line = `${paddedId} ${renderUsername(member)}`; } return line; }); diff --git a/backend/src/utils.ts b/backend/src/utils.ts index ee6b556ce..5c7950723 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1603,9 +1603,12 @@ export function isTruthy(value: T): value is Exclude) { @@ -261,7 +261,7 @@ export function userToTemplateSafeUser(user: User | UnknownUser): TemplateSafeUs globalName: user.globalName, mention: `<@${user.id}>`, tag: user.tag, - avatarURL: user.displayAvatarURL?.(), + avatarURL: user.displayAvatarURL(), bot: user.bot, createdAt: user.createdTimestamp, renderedUsername: renderUserUsername(user), @@ -287,6 +287,7 @@ export function memberToTemplateSafeMember(member: GuildMember | PartialGuildMem nick: member.nickname ?? "*None*", roles: [...member.roles.cache.mapValues((r) => roleToTemplateSafeRole(r)).values()], joinedAt: member.joinedTimestamp ?? undefined, + guildAvatarURL: member.displayAvatarURL(), guildName: member.guild.name, }); } From 4d0161a49f77e28ef89a819d7124a8239fd1a8c9 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 15:50:01 +0000 Subject: [PATCH 025/128] oh god almeida looked at my code Signed-off-by: GitHub --- backend/src/plugins/Automod/triggers/threadArchive.ts | 2 +- backend/src/plugins/Automod/triggers/threadCreate.ts | 2 +- backend/src/plugins/Automod/triggers/threadDelete.ts | 2 +- backend/src/plugins/Automod/triggers/threadUnarchive.ts | 2 +- backend/src/plugins/BotControl/commands/ServersCmd.ts | 7 ++++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/backend/src/plugins/Automod/triggers/threadArchive.ts b/backend/src/plugins/Automod/triggers/threadArchive.ts index 8a692f6d7..274732f57 100644 --- a/backend/src/plugins/Automod/triggers/threadArchive.ts +++ b/backend/src/plugins/Automod/triggers/threadArchive.ts @@ -48,7 +48,7 @@ export const ThreadArchiveTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been archived in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/Automod/triggers/threadCreate.ts b/backend/src/plugins/Automod/triggers/threadCreate.ts index dc613068f..793708e45 100644 --- a/backend/src/plugins/Automod/triggers/threadCreate.ts +++ b/backend/src/plugins/Automod/triggers/threadCreate.ts @@ -41,7 +41,7 @@ export const ThreadCreateTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been created in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/Automod/triggers/threadDelete.ts b/backend/src/plugins/Automod/triggers/threadDelete.ts index f27a1d0bd..3c108bb05 100644 --- a/backend/src/plugins/Automod/triggers/threadDelete.ts +++ b/backend/src/plugins/Automod/triggers/threadDelete.ts @@ -41,7 +41,7 @@ export const ThreadDeleteTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; if (threadOwner) { return `Thread **#${threadName ?? "Unknown"}** (\`${threadId}\`) created by **${escapeBold( - renderUsername(threadOwner.tag), + renderUsername(threadOwner), )}** (\`${threadOwner.id}\`) in the **#${parentName}** (\`${parentId}\`) channel has been deleted`; } return `Thread **#${ diff --git a/backend/src/plugins/Automod/triggers/threadUnarchive.ts b/backend/src/plugins/Automod/triggers/threadUnarchive.ts index 94c69ace6..0a081c2bd 100644 --- a/backend/src/plugins/Automod/triggers/threadUnarchive.ts +++ b/backend/src/plugins/Automod/triggers/threadUnarchive.ts @@ -48,7 +48,7 @@ export const ThreadUnarchiveTrigger = automodTrigger()({ const parentName = matchResult.extra.matchedThreadParentName; const base = `Thread **#${threadName}** (\`${threadId}\`) has been unarchived in the **#${parentName}** (\`${parentId}\`) channel`; if (threadOwner) { - return `${base} by **${escapeBold(renderUsername(threadOwner.tag))}** (\`${threadOwner.id}\`)`; + return `${base} by **${escapeBold(renderUsername(threadOwner))}** (\`${threadOwner.id}\`)`; } return base; }, diff --git a/backend/src/plugins/BotControl/commands/ServersCmd.ts b/backend/src/plugins/BotControl/commands/ServersCmd.ts index 5cb62433e..3658a36c2 100644 --- a/backend/src/plugins/BotControl/commands/ServersCmd.ts +++ b/backend/src/plugins/BotControl/commands/ServersCmd.ts @@ -48,9 +48,10 @@ export const ServersCmd = botControlCmd({ const lines = filteredGuilds.map((g) => { const paddedId = g.id.padEnd(longestId, " "); const owner = getUser(pluginData.client, g.ownerId); - return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${renderUsername(owner.tag)}** \`${ - owner.id - }\`)`; + return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${renderUsername( + owner.username, + owner.discriminator, + )}** \`${owner.id}\`)`; }); createChunkedMessage(msg.channel, lines.join("\n")); } else { From bfc90093dc83d0c891d7ea542852835f1337e2d0 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 15:57:23 +0000 Subject: [PATCH 026/128] yeet renderUserUsername Signed-off-by: GitHub --- backend/src/plugins/Automod/triggers/roleAdded.ts | 4 ++-- backend/src/plugins/Automod/triggers/roleRemoved.ts | 4 ++-- .../BotControl/commands/AddDashboardUserCmd.ts | 4 ++-- .../BotControl/commands/ListDashboardPermsCmd.ts | 6 +++--- .../BotControl/commands/ListDashboardUsersCmd.ts | 4 ++-- .../BotControl/commands/RemoveDashboardUserCmd.ts | 4 ++-- .../src/plugins/ModActions/commands/AddCaseCmd.ts | 4 ++-- backend/src/plugins/ModActions/commands/BanCmd.ts | 4 ++-- backend/src/plugins/ModActions/commands/NoteCmd.ts | 4 ++-- backend/src/plugins/ModActions/commands/WarnCmd.ts | 4 ++-- .../ModActions/events/PostAlertOnMemberJoinEvt.ts | 4 ++-- .../ModActions/functions/actualKickMemberCmd.ts | 4 ++-- .../ModActions/functions/actualMuteUserCmd.ts | 10 +++++----- .../ModActions/functions/actualUnmuteUserCmd.ts | 6 +++--- backend/src/plugins/Mutes/commands/MutesCmd.ts | 6 +++--- backend/src/plugins/NameHistory/commands/NamesCmd.ts | 4 ++-- .../ReactionRoles/util/addMemberPendingRoleChange.ts | 6 ++---- .../plugins/Slowmode/commands/SlowmodeClearCmd.ts | 8 ++++---- backend/src/plugins/UsernameSaver/updateUsername.ts | 4 ++-- backend/src/plugins/Utility/commands/LevelCmd.ts | 4 ++-- .../src/plugins/Utility/commands/VcdisconnectCmd.ts | 4 ++-- backend/src/plugins/Utility/commands/VcmoveCmd.ts | 12 ++++-------- backend/src/utils.ts | 8 ++------ backend/src/utils/templateSafeObjects.ts | 6 +++--- 24 files changed, 59 insertions(+), 69 deletions(-) diff --git a/backend/src/plugins/Automod/triggers/roleAdded.ts b/backend/src/plugins/Automod/triggers/roleAdded.ts index dc62f1630..754be1b3b 100644 --- a/backend/src/plugins/Automod/triggers/roleAdded.ts +++ b/backend/src/plugins/Automod/triggers/roleAdded.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; import * as t from "io-ts"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; @@ -38,7 +38,7 @@ export const RoleAddedTrigger = automodTrigger()({ const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId as Snowflake); const roleName = role?.name || "Unknown"; const member = contexts[0].member!; - const memberName = `**${renderUserUsername(member.user)}** (\`${member.id}\`)`; + const memberName = `**${renderUsername(member.user)}** (\`${member.id}\`)`; return `Role ${roleName} (\`${matchResult.extra.matchedRoleId}\`) was added to ${memberName}`; }, }); diff --git a/backend/src/plugins/Automod/triggers/roleRemoved.ts b/backend/src/plugins/Automod/triggers/roleRemoved.ts index 65624827c..fc5d5ae31 100644 --- a/backend/src/plugins/Automod/triggers/roleRemoved.ts +++ b/backend/src/plugins/Automod/triggers/roleRemoved.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; import * as t from "io-ts"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; @@ -38,7 +38,7 @@ export const RoleRemovedTrigger = automodTrigger()({ const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId as Snowflake); const roleName = role?.name || "Unknown"; const member = contexts[0].member!; - const memberName = `**${renderUserUsername(member.user)}** (\`${member.id}\`)`; + const memberName = `**${renderUsername(member.user)}** (\`${member.id}\`)`; return `Role ${roleName} (\`${matchResult.extra.matchedRoleId}\`) was removed from ${memberName}`; }, }); diff --git a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts index c12595946..0cb87f952 100644 --- a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts +++ b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts @@ -1,7 +1,7 @@ import { ApiPermissions } from "@shared/apiPermissions"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { botControlCmd } from "../types"; export const AddDashboardUserCmd = botControlCmd({ @@ -35,7 +35,7 @@ export const AddDashboardUserCmd = botControlCmd({ await pluginData.state.apiPermissionAssignments.addUser(args.guildId, user.id, [ApiPermissions.EditConfig]); } - const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUserUsername(user)}**, \`${user.id}\`)`); + const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUsername(user)}**, \`${user.id}\`)`); sendSuccessMessage( pluginData, msg.channel, diff --git a/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts b/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts index 18c7d0d70..7c6d2aa52 100644 --- a/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts +++ b/backend/src/plugins/BotControl/commands/ListDashboardPermsCmd.ts @@ -2,7 +2,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { AllowedGuild } from "../../../data/entities/AllowedGuild"; import { ApiPermissionAssignment } from "../../../data/entities/ApiPermissionAssignment"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername, resolveUser } from "../../../utils"; +import { renderUsername, resolveUser } from "../../../utils"; import { botControlCmd } from "../types"; export const ListDashboardPermsCmd = botControlCmd({ @@ -42,7 +42,7 @@ export const ListDashboardPermsCmd = botControlCmd({ // If we have user, always display which guilds they have permissions in (or only specified guild permissions) if (args.user) { - const userInfo = `**${renderUserUsername(args.user)}** (\`${args.user.id}\`)`; + const userInfo = `**${renderUsername(args.user)}** (\`${args.user.id}\`)`; for (const assignment of existingUserAssignment!) { if (guild != null && assignment.guild_id !== args.guildId) continue; @@ -74,7 +74,7 @@ export const ListDashboardPermsCmd = botControlCmd({ finalMessage += `The server ${guildInfo} has the following assigned permissions:\n`; // Double \n for consistency with AddDashboardUserCmd for (const assignment of existingGuildAssignment) { const user = await resolveUser(pluginData.client, assignment.target_id); - finalMessage += `\n**${renderUserUsername(user)}**, \`${assignment.target_id}\`: ${assignment.permissions.join( + finalMessage += `\n**${renderUsername(user)}**, \`${assignment.target_id}\`: ${assignment.permissions.join( ", ", )}`; } diff --git a/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts b/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts index 36f1432f6..1d3c1ffec 100644 --- a/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts +++ b/backend/src/plugins/BotControl/commands/ListDashboardUsersCmd.ts @@ -1,6 +1,6 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername, resolveUser } from "../../../utils"; +import { renderUsername, resolveUser } from "../../../utils"; import { botControlCmd } from "../types"; export const ListDashboardUsersCmd = botControlCmd({ @@ -27,7 +27,7 @@ export const ListDashboardUsersCmd = botControlCmd({ ); const userNameList = users.map( ({ user, permission }) => - `<@!${user.id}> (**${renderUserUsername(user)}**, \`${user.id}\`): ${permission.permissions.join(", ")}`, + `<@!${user.id}> (**${renderUsername(user)}**, \`${user.id}\`): ${permission.permissions.join(", ")}`, ); sendSuccessMessage( diff --git a/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts index 3a90683c9..c3d1ec991 100644 --- a/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts +++ b/backend/src/plugins/BotControl/commands/RemoveDashboardUserCmd.ts @@ -1,6 +1,6 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { botControlCmd } from "../types"; export const RemoveDashboardUserCmd = botControlCmd({ @@ -34,7 +34,7 @@ export const RemoveDashboardUserCmd = botControlCmd({ await pluginData.state.apiPermissionAssignments.removeUser(args.guildId, user.id); } - const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUserUsername(user)}**, \`${user.id}\`)`); + const userNameList = args.users.map((user) => `<@!${user.id}> (**${renderUsername(user)}**, \`${user.id}\`)`); sendSuccessMessage( pluginData, msg.channel, diff --git a/backend/src/plugins/ModActions/commands/AddCaseCmd.ts b/backend/src/plugins/ModActions/commands/AddCaseCmd.ts index 43575463a..3f8b9dfc5 100644 --- a/backend/src/plugins/ModActions/commands/AddCaseCmd.ts +++ b/backend/src/plugins/ModActions/commands/AddCaseCmd.ts @@ -3,7 +3,7 @@ import { CaseTypes } from "../../../data/CaseTypes"; import { Case } from "../../../data/entities/Case"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername, resolveMember, resolveUser } from "../../../utils"; +import { renderUsername, resolveMember, resolveUser } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; import { modActionsCmd } from "../types"; @@ -75,7 +75,7 @@ export const AddCaseCmd = modActionsCmd({ sendSuccessMessage( pluginData, msg.channel, - `Case #${theCase.case_number} created for **${renderUserUsername(user)}**`, + `Case #${theCase.case_number} created for **${renderUsername(user)}**`, ); } else { sendSuccessMessage(pluginData, msg.channel, `Case #${theCase.case_number} created`); diff --git a/backend/src/plugins/ModActions/commands/BanCmd.ts b/backend/src/plugins/ModActions/commands/BanCmd.ts index 9d32cd101..3e66e8a20 100644 --- a/backend/src/plugins/ModActions/commands/BanCmd.ts +++ b/backend/src/plugins/ModActions/commands/BanCmd.ts @@ -5,7 +5,7 @@ import { CaseTypes } from "../../../data/CaseTypes"; import { clearExpiringTempban, registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop"; import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; -import { renderUserUsername, resolveMember, resolveUser } from "../../../utils"; +import { renderUsername, resolveMember, resolveUser } from "../../../utils"; import { banLock } from "../../../utils/lockNameHelpers"; import { waitForButtonConfirm } from "../../../utils/waitForInteraction"; import { LogsPlugin } from "../../Logs/LogsPlugin"; @@ -207,7 +207,7 @@ export const BanCmd = modActionsCmd({ // Confirm the action to the moderator let response = ""; if (!forceban) { - response = `Banned **${renderUserUsername(user)}** ${forTime}(Case #${banResult.case.case_number})`; + response = `Banned **${renderUsername(user)}** ${forTime}(Case #${banResult.case.case_number})`; if (banResult.notifyResult.text) response += ` (${banResult.notifyResult.text})`; } else { response = `Member forcebanned ${forTime}(Case #${banResult.case.case_number})`; diff --git a/backend/src/plugins/ModActions/commands/NoteCmd.ts b/backend/src/plugins/ModActions/commands/NoteCmd.ts index b13ed4981..edb2202dc 100644 --- a/backend/src/plugins/ModActions/commands/NoteCmd.ts +++ b/backend/src/plugins/ModActions/commands/NoteCmd.ts @@ -1,7 +1,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername, resolveUser } from "../../../utils"; +import { renderUsername, resolveUser } from "../../../utils"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; @@ -29,7 +29,7 @@ export const NoteCmd = modActionsCmd({ return; } - const userName = renderUserUsername(user); + const userName = renderUsername(user); const reason = formatReasonWithAttachments(args.note, [...msg.attachments.values()]); const casesPlugin = pluginData.getPlugin(CasesPlugin); diff --git a/backend/src/plugins/ModActions/commands/WarnCmd.ts b/backend/src/plugins/ModActions/commands/WarnCmd.ts index c81920153..f917c55e0 100644 --- a/backend/src/plugins/ModActions/commands/WarnCmd.ts +++ b/backend/src/plugins/ModActions/commands/WarnCmd.ts @@ -1,7 +1,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { errorMessage, renderUserUsername, resolveMember, resolveUser } from "../../../utils"; +import { errorMessage, renderUsername, resolveMember, resolveUser } from "../../../utils"; import { waitForButtonConfirm } from "../../../utils/waitForInteraction"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; @@ -106,7 +106,7 @@ export const WarnCmd = modActionsCmd({ sendSuccessMessage( pluginData, msg.channel, - `Warned **${renderUserUsername(memberToWarn.user)}** (Case #${warnResult.case.case_number})${messageResultText}`, + `Warned **${renderUsername(memberToWarn.user)}** (Case #${warnResult.case.case_number})${messageResultText}`, ); }, }); diff --git a/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts b/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts index 677fb6031..7874c2417 100644 --- a/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts +++ b/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts @@ -1,5 +1,5 @@ import { PermissionsBitField, Snowflake, TextChannel } from "discord.js"; -import { renderUserUsername, resolveMember } from "../../../utils"; +import { renderUsername, resolveMember } from "../../../utils"; import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { modActionsEvt } from "../types"; @@ -46,7 +46,7 @@ export const PostAlertOnMemberJoinEvt = modActionsEvt({ } await alertChannel.send( - `<@!${member.id}> (${renderUserUsername(member.user)} \`${member.id}\`) joined with ${ + `<@!${member.id}> (${renderUsername(member.user)} \`${member.id}\`) joined with ${ actions.length } prior record(s)`, ); diff --git a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts index 73a1e2d93..fac3f9065 100644 --- a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts +++ b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts @@ -3,7 +3,7 @@ import { GuildPluginData } from "knub"; import { hasPermission } from "knub/helpers"; import { LogType } from "../../../data/LogType"; import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { DAYS, SECONDS, errorMessage, renderUserUsername, resolveMember, resolveUser } from "../../../utils"; +import { DAYS, SECONDS, errorMessage, renderUsername, resolveMember, resolveUser } from "../../../utils"; import { IgnoredEventType, ModActionsPluginType } from "../types"; import { formatReasonWithAttachments } from "./formatReasonWithAttachments"; import { ignoreEvent } from "./ignoreEvent"; @@ -103,7 +103,7 @@ export async function actualKickMemberCmd( } // Confirm the action to the moderator - let response = `Kicked **${renderUserUsername(memberToKick.user)}** (Case #${kickResult.case.case_number})`; + let response = `Kicked **${renderUsername(memberToKick.user)}** (Case #${kickResult.case.case_number})`; if (kickResult.notifyResult.text) response += ` (${kickResult.notifyResult.text})`; sendSuccessMessage(pluginData, msg.channel, response); diff --git a/backend/src/plugins/ModActions/functions/actualMuteUserCmd.ts b/backend/src/plugins/ModActions/functions/actualMuteUserCmd.ts index 5c628c4ee..2f1084107 100644 --- a/backend/src/plugins/ModActions/functions/actualMuteUserCmd.ts +++ b/backend/src/plugins/ModActions/functions/actualMuteUserCmd.ts @@ -4,7 +4,7 @@ import { GuildPluginData } from "knub"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; import { logger } from "../../../logger"; import { hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { UnknownUser, asSingleLine, isDiscordAPIError, renderUserUsername } from "../../../utils"; +import { UnknownUser, asSingleLine, isDiscordAPIError, renderUsername } from "../../../utils"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; import { MuteResult } from "../../Mutes/types"; import { ModActionsPluginType } from "../types"; @@ -86,24 +86,24 @@ export async function actualMuteUserCmd( if (args.time) { if (muteResult.updatedExistingMute) { response = asSingleLine(` - Updated **${renderUserUsername(user)}**'s + Updated **${renderUsername(user)}**'s mute to ${timeUntilUnmute} (Case #${muteResult.case.case_number}) `); } else { response = asSingleLine(` - Muted **${renderUserUsername(user)}** + Muted **${renderUsername(user)}** for ${timeUntilUnmute} (Case #${muteResult.case.case_number}) `); } } else { if (muteResult.updatedExistingMute) { response = asSingleLine(` - Updated **${renderUserUsername(user)}**'s + Updated **${renderUsername(user)}**'s mute to indefinite (Case #${muteResult.case.case_number}) `); } else { response = asSingleLine(` - Muted **${renderUserUsername(user)}** + Muted **${renderUsername(user)}** indefinitely (Case #${muteResult.case.case_number}) `); } diff --git a/backend/src/plugins/ModActions/functions/actualUnmuteUserCmd.ts b/backend/src/plugins/ModActions/functions/actualUnmuteUserCmd.ts index d70a219c1..5b28aee75 100644 --- a/backend/src/plugins/ModActions/functions/actualUnmuteUserCmd.ts +++ b/backend/src/plugins/ModActions/functions/actualUnmuteUserCmd.ts @@ -3,7 +3,7 @@ import humanizeDuration from "humanize-duration"; import { GuildPluginData } from "knub"; import { hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin"; -import { UnknownUser, asSingleLine, renderUserUsername } from "../../../utils"; +import { UnknownUser, asSingleLine, renderUsername } from "../../../utils"; import { ModActionsPluginType } from "../types"; import { formatReasonWithAttachments } from "./formatReasonWithAttachments"; @@ -48,7 +48,7 @@ export async function actualUnmuteCmd( pluginData, msg.channel, asSingleLine(` - Unmuting **${renderUserUsername(user)}** + Unmuting **${renderUsername(user)}** in ${timeUntilUnmute} (Case #${result.case.case_number}) `), ); @@ -57,7 +57,7 @@ export async function actualUnmuteCmd( pluginData, msg.channel, asSingleLine(` - Unmuted **${renderUserUsername(user)}** + Unmuted **${renderUsername(user)}** (Case #${result.case.case_number}) `), ); diff --git a/backend/src/plugins/Mutes/commands/MutesCmd.ts b/backend/src/plugins/Mutes/commands/MutesCmd.ts index 179d1a658..22cd74c51 100644 --- a/backend/src/plugins/Mutes/commands/MutesCmd.ts +++ b/backend/src/plugins/Mutes/commands/MutesCmd.ts @@ -10,7 +10,7 @@ import moment from "moment-timezone"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { humanizeDurationShort } from "../../../humanizeDurationShort"; import { getBaseUrl } from "../../../pluginUtils"; -import { DBDateFormat, MINUTES, renderUserUsername, resolveMember } from "../../../utils"; +import { DBDateFormat, MINUTES, renderUsername, resolveMember } from "../../../utils"; import { IMuteWithDetails, mutesCmd } from "../types"; export const MutesCmd = mutesCmd({ @@ -74,7 +74,7 @@ export const MutesCmd = mutesCmd({ totalMutes = manuallyMutedMembers.length; lines = manuallyMutedMembers.map((member) => { - return `<@!${member.id}> (**${renderUserUsername(member.user)}**, \`${member.id}\`) 🔧 Manual mute`; + return `<@!${member.id}> (**${renderUsername(member.user)}**, \`${member.id}\`) 🔧 Manual mute`; }); } else { // Show filtered active mutes (but not manual mutes) @@ -123,7 +123,7 @@ export const MutesCmd = mutesCmd({ lines = filteredMutes.map((mute) => { const user = pluginData.client.users.resolve(mute.user_id as Snowflake); - const username = user ? renderUserUsername(user) : "Unknown#0000"; + const username = user ? renderUsername(user) : "Unknown#0000"; const theCase = muteCasesById.get(mute.case_id); const caseName = theCase ? `Case #${theCase.case_number}` : "No case"; diff --git a/backend/src/plugins/NameHistory/commands/NamesCmd.ts b/backend/src/plugins/NameHistory/commands/NamesCmd.ts index 373f1671c..da8ba48ab 100644 --- a/backend/src/plugins/NameHistory/commands/NamesCmd.ts +++ b/backend/src/plugins/NameHistory/commands/NamesCmd.ts @@ -5,7 +5,7 @@ import { MAX_NICKNAME_ENTRIES_PER_USER } from "../../../data/GuildNicknameHistor import { MAX_USERNAME_ENTRIES_PER_USER } from "../../../data/UsernameHistory"; import { NICKNAME_RETENTION_PERIOD } from "../../../data/cleanup/nicknames"; import { sendErrorMessage } from "../../../pluginUtils"; -import { DAYS, renderUserUsername } from "../../../utils"; +import { DAYS, renderUsername } from "../../../utils"; import { nameHistoryCmd } from "../types"; export const NamesCmd = nameHistoryCmd({ @@ -31,7 +31,7 @@ export const NamesCmd = nameHistoryCmd({ const usernameRows = usernames.map((r) => `\`[${r.timestamp}]\` **${disableCodeBlocks(r.username)}**`); const user = await pluginData.client.users.fetch(args.userId as Snowflake).catch(() => null); - const currentUsername = user ? renderUserUsername(user) : args.userId; + const currentUsername = user ? renderUsername(user) : args.userId; const nicknameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS); const usernameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS); diff --git a/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts b/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts index a2a82fe9b..dda8a6bcf 100644 --- a/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts +++ b/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts @@ -1,7 +1,7 @@ import { Snowflake } from "discord.js"; import { GuildPluginData } from "knub"; import { logger } from "../../../logger"; -import { renderUserUsername, resolveMember } from "../../../utils"; +import { renderUsername, resolveMember } from "../../../utils"; import { memberRolesLock } from "../../../utils/lockNameHelpers"; import { PendingMemberRoleChanges, ReactionRolesPluginType, RoleChangeMode } from "../types"; @@ -33,9 +33,7 @@ export async function addMemberPendingRoleChange( try { await member.roles.set(Array.from(newRoleIds.values()), "Reaction roles"); } catch (e) { - logger.warn( - `Failed to apply role changes to ${renderUserUsername(member.user)} (${member.id}): ${e.message}`, - ); + logger.warn(`Failed to apply role changes to ${renderUsername(member.user)} (${member.id}): ${e.message}`); } } lock.unlock(); diff --git a/backend/src/plugins/Slowmode/commands/SlowmodeClearCmd.ts b/backend/src/plugins/Slowmode/commands/SlowmodeClearCmd.ts index 246a048ea..fd133c3a6 100644 --- a/backend/src/plugins/Slowmode/commands/SlowmodeClearCmd.ts +++ b/backend/src/plugins/Slowmode/commands/SlowmodeClearCmd.ts @@ -1,7 +1,7 @@ import { ChannelType, escapeInlineCode } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { asSingleLine, renderUserUsername } from "../../../utils"; +import { asSingleLine, renderUsername } from "../../../utils"; import { getMissingChannelPermissions } from "../../../utils/getMissingChannelPermissions"; import { missingPermissionError } from "../../../utils/missingPermissionError"; import { BOT_SLOWMODE_CLEAR_PERMISSIONS } from "../requiredPermissions"; @@ -45,7 +45,7 @@ export const SlowmodeClearCmd = slowmodeCmd({ pluginData, msg.channel, asSingleLine(` - Failed to clear slowmode from **${renderUserUsername(args.user)}** in <#${args.channel.id}>: + Failed to clear slowmode from **${renderUsername(args.user)}** in <#${args.channel.id}>: Threads cannot have Bot Slowmode `), ); @@ -56,7 +56,7 @@ export const SlowmodeClearCmd = slowmodeCmd({ pluginData, msg.channel, asSingleLine(` - Failed to clear slowmode from **${renderUserUsername(args.user)}** in <#${args.channel.id}>: + Failed to clear slowmode from **${renderUsername(args.user)}** in <#${args.channel.id}>: \`${escapeInlineCode(e.message)}\` `), ); @@ -66,7 +66,7 @@ export const SlowmodeClearCmd = slowmodeCmd({ sendSuccessMessage( pluginData, msg.channel, - `Slowmode cleared from **${renderUserUsername(args.user)}** in <#${args.channel.id}>`, + `Slowmode cleared from **${renderUsername(args.user)}** in <#${args.channel.id}>`, ); }, }); diff --git a/backend/src/plugins/UsernameSaver/updateUsername.ts b/backend/src/plugins/UsernameSaver/updateUsername.ts index 163a4aae5..ed0fb73fe 100644 --- a/backend/src/plugins/UsernameSaver/updateUsername.ts +++ b/backend/src/plugins/UsernameSaver/updateUsername.ts @@ -1,11 +1,11 @@ import { User } from "discord.js"; import { GuildPluginData } from "knub"; -import { renderUserUsername } from "../../utils"; +import { renderUsername } from "../../utils"; import { UsernameSaverPluginType } from "./types"; export async function updateUsername(pluginData: GuildPluginData, user: User) { if (!user) return; - const newUsername = renderUserUsername(user); + const newUsername = renderUsername(user); const latestEntry = await pluginData.state.usernameHistory.getLastEntry(user.id); if (!latestEntry || newUsername !== latestEntry.username) { await pluginData.state.usernameHistory.addEntry(user.id, newUsername); diff --git a/backend/src/plugins/Utility/commands/LevelCmd.ts b/backend/src/plugins/Utility/commands/LevelCmd.ts index 306a1d207..df4d93259 100644 --- a/backend/src/plugins/Utility/commands/LevelCmd.ts +++ b/backend/src/plugins/Utility/commands/LevelCmd.ts @@ -1,6 +1,6 @@ import { helpers } from "knub"; import { commandTypeHelpers as ct } from "../../../commandTypes"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { utilityCmd } from "../types"; const { getMemberLevel } = helpers; @@ -18,6 +18,6 @@ export const LevelCmd = utilityCmd({ run({ message, args, pluginData }) { const member = args.member || message.member; const level = getMemberLevel(pluginData, member); - message.channel.send(`The permission level of ${renderUserUsername(member.user)} is **${level}**`); + message.channel.send(`The permission level of ${renderUsername(member.user)} is **${level}**`); }, }); diff --git a/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts b/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts index 0f82458a5..240c763f1 100644 --- a/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts +++ b/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts @@ -1,7 +1,7 @@ import { VoiceChannel } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { renderUserUsername } from "../../../utils"; +import { renderUsername } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { utilityCmd } from "../types"; @@ -43,7 +43,7 @@ export const VcdisconnectCmd = utilityCmd({ sendSuccessMessage( pluginData, msg.channel, - `**${renderUserUsername(args.member.user)}** disconnected from **${channel.name}**`, + `**${renderUsername(args.member.user)}** disconnected from **${channel.name}**`, ); }, }); diff --git a/backend/src/plugins/Utility/commands/VcmoveCmd.ts b/backend/src/plugins/Utility/commands/VcmoveCmd.ts index db00161e0..6ffe85883 100644 --- a/backend/src/plugins/Utility/commands/VcmoveCmd.ts +++ b/backend/src/plugins/Utility/commands/VcmoveCmd.ts @@ -1,7 +1,7 @@ import { ChannelType, Snowflake, VoiceChannel } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { channelMentionRegex, isSnowflake, renderUserUsername, simpleClosestStringMatch } from "../../../utils"; +import { channelMentionRegex, isSnowflake, renderUsername, simpleClosestStringMatch } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { utilityCmd } from "../types"; @@ -80,11 +80,7 @@ export const VcmoveCmd = utilityCmd({ newChannel: channel, }); - sendSuccessMessage( - pluginData, - msg.channel, - `**${renderUserUsername(args.member.user)}** moved to **${channel.name}**`, - ); + sendSuccessMessage(pluginData, msg.channel, `**${renderUsername(args.member.user)}** moved to **${channel.name}**`); }, }); @@ -157,7 +153,7 @@ export const VcmoveAllCmd = utilityCmd({ sendErrorMessage( pluginData, msg.channel, - `Failed to move ${renderUserUsername(currMember.user)} (${currMember.id}): You cannot act on this member`, + `Failed to move ${renderUsername(currMember.user)} (${currMember.id}): You cannot act on this member`, ); errAmt++; continue; @@ -175,7 +171,7 @@ export const VcmoveAllCmd = utilityCmd({ sendErrorMessage( pluginData, msg.channel, - `Failed to move ${renderUserUsername(currMember.user)} (${currMember.id})`, + `Failed to move ${renderUsername(currMember.user)} (${currMember.id})`, ); errAmt++; continue; diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 5c7950723..990c1f7ed 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1607,15 +1607,11 @@ export const DBDateFormat = "YYYY-MM-DD HH:mm:ss"; //export function renderUsername(username: GuildMember): string; //export function renderUsername(username: User): string; //export function renderUsername(username: string, discriminator?: string): string; -export function renderUsername(username: string | User | GuildMember, discriminator?: string): string { +export function renderUsername(username: string | User | GuildMember | UnknownUser, discriminator?: string): string { if (username instanceof GuildMember) return username.user.tag; - if (username instanceof User) return username.tag; + if (username instanceof User || username instanceof UnknownUser) return username.tag; if (discriminator === "0" || discriminator === "0000") { return username; } return `${username}#${discriminator}`; } - -export function renderUserUsername(user: User | UnknownUser): string { - return renderUsername(user.username, user.discriminator); -} diff --git a/backend/src/utils/templateSafeObjects.ts b/backend/src/utils/templateSafeObjects.ts index 33e36971a..d6a0dfd60 100644 --- a/backend/src/utils/templateSafeObjects.ts +++ b/backend/src/utils/templateSafeObjects.ts @@ -13,7 +13,7 @@ import { User, } from "discord.js"; import { GuildPluginData } from "knub"; -import { UnknownUser, renderUserUsername } from "src/utils"; +import { UnknownUser, renderUsername } from "src/utils"; import { Case } from "../data/entities/Case"; import { ISavedMessageAttachmentData, @@ -250,7 +250,7 @@ export function userToTemplateSafeUser(user: User | UnknownUser): TemplateSafeUs discriminator: "0000", mention: `<@${user.id}>`, tag: "Unknown#0000", - renderedUsername: renderUserUsername(user), + renderedUsername: renderUsername(user), }); } @@ -264,7 +264,7 @@ export function userToTemplateSafeUser(user: User | UnknownUser): TemplateSafeUs avatarURL: user.displayAvatarURL(), bot: user.bot, createdAt: user.createdTimestamp, - renderedUsername: renderUserUsername(user), + renderedUsername: renderUsername(user), }); } From 2e0598194f36ed9d2d12ca063cb37837b1f61556 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 16:02:15 +0000 Subject: [PATCH 027/128] fix renderUsername overloads Signed-off-by: GitHub --- backend/src/utils.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 990c1f7ed..72f203f26 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1603,14 +1603,12 @@ export function isTruthy(value: T): value is Exclude Date: Sun, 26 Nov 2023 16:10:10 +0000 Subject: [PATCH 028/128] lint Signed-off-by: GitHub --- backend/src/index.ts | 2 +- backend/src/plugins/Automod/actions/startThread.ts | 1 - backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts | 2 +- backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts | 5 +---- backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts | 2 +- backend/src/plugins/Utility/functions/getServerInfoEmbed.ts | 2 +- .../src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts | 2 +- backend/src/plugins/Utility/functions/getUserInfoEmbed.ts | 2 +- 8 files changed, 7 insertions(+), 11 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 2fe16c115..6dad14b14 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -203,7 +203,7 @@ if (env.DEBUG) { } logger.info("Connecting to database"); -connect().then(async (connection) => { +connect().then(async () => { const client = new Client({ partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction], diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 970e9ec85..b5864389b 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -41,7 +41,6 @@ export const StartThreadAction = automodAction({ return true; }); - const guild = pluginData.guild; const archiveSet = actionConfig.auto_archive ? Math.ceil(Math.max(convertDelayStringToMS(actionConfig.auto_archive) ?? 0, 0) / MINUTES) : ThreadAutoArchiveDuration.OneDay; diff --git a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts index f601dd5c4..c05bd2c10 100644 --- a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts @@ -24,7 +24,7 @@ const MEDIA_CHANNEL_ICON = "https://cdn.discordapp.com/attachments/8761342052292 export async function getChannelInfoEmbed( pluginData: GuildPluginData, channelId: string, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const channel = pluginData.guild.channels.cache.get(channelId as Snowflake); if (!channel) { diff --git a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts index 3a49a80d0..e272b9049 100644 --- a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts @@ -9,7 +9,6 @@ import { trimEmptyLines, trimLines, } from "../../../utils"; -import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; import { UtilityPluginType } from "../types"; const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png"; @@ -18,7 +17,7 @@ export async function getMessageInfoEmbed( pluginData: GuildPluginData, channelId: string, messageId: string, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const message = await (pluginData.guild.channels.resolve(channelId as Snowflake) as TextChannel).messages .fetch(messageId as Snowflake) @@ -27,8 +26,6 @@ export async function getMessageInfoEmbed( return null; } - const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); - const embed: EmbedWith<"fields" | "author"> = { fields: [], author: { diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts index fa3188ec5..c4d685d2f 100644 --- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts @@ -9,7 +9,7 @@ const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/ export async function getRoleInfoEmbed( pluginData: GuildPluginData, role: Role, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const embed: EmbedWith<"fields" | "author" | "color"> = { fields: [], diff --git a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts index afcefb806..8a2ebfc74 100644 --- a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts @@ -25,7 +25,7 @@ const prettifyFeature = (feature: string): string => export async function getServerInfoEmbed( pluginData: GuildPluginData, serverId: string, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const thisServer = serverId === pluginData.guild.id ? pluginData.guild : null; const [restGuild, guildPreview] = await Promise.all([ diff --git a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts index ef676fd17..ba7c33747 100644 --- a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts @@ -10,7 +10,7 @@ export async function getSnowflakeInfoEmbed( pluginData: GuildPluginData, snowflake: string, showUnknownWarning = false, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const embed: EmbedWith<"fields" | "author"> = { fields: [], diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts index 58d34d56b..d8ccc8332 100644 --- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts @@ -26,7 +26,7 @@ export async function getUserInfoEmbed( pluginData: GuildPluginData, userId: string, compact = false, - requestMemberId?: string, + // requestMemberId?: string, ): Promise { const user = await resolveUser(pluginData.client, userId); if (!user || user instanceof UnknownUser) { From 89d6e8aeecabea2ecc6c788f7ded6c447a870028 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 16:11:12 +0000 Subject: [PATCH 029/128] missed one Signed-off-by: GitHub --- backend/src/plugins/ModActions/commands/DeleteCaseCmd.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/DeleteCaseCmd.ts b/backend/src/plugins/ModActions/commands/DeleteCaseCmd.ts index 823bc7263..c107791df 100644 --- a/backend/src/plugins/ModActions/commands/DeleteCaseCmd.ts +++ b/backend/src/plugins/ModActions/commands/DeleteCaseCmd.ts @@ -2,7 +2,7 @@ import { helpers } from "knub"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { Case } from "../../../data/entities/Case"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; -import { SECONDS, trimLines } from "../../../utils"; +import { SECONDS, renderUsername, trimLines } from "../../../utils"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; @@ -60,7 +60,7 @@ export const DeleteCaseCmd = modActionsCmd({ } } - const deletedByName = message.author.tag; + const deletedByName = renderUsername(message.author); const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); const deletedAt = timeAndDate.inGuildTz().format(timeAndDate.getDateFormat("pretty_datetime")); From e0637a206f0e9c7bae14ec61c3508b92a83136c1 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 16:12:57 +0000 Subject: [PATCH 030/128] better startThread if checks (almeida is happy) Signed-off-by: GitHub --- backend/src/plugins/Automod/actions/startThread.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index b5864389b..4930ebe52 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -50,13 +50,7 @@ export const StartThreadAction = automodAction({ for (const threadContext of threads) { const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id); - if ( - !channel || - !("threads" in channel) || - channel.type === ChannelType.GuildForum || - channel.type === ChannelType.GuildMedia - ) - continue; + if (!channel || !("threads" in channel) || channel.isThreadOnly()) continue; const renderThreadName = async (str: string) => renderTemplate( From 2b5a5e636a230212383ff84af58bb20b97e9777f Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 17:02:54 +0000 Subject: [PATCH 031/128] almeida review.mp4 Signed-off-by: GitHub --- .../functions/matchMultipleTextTypesOnMessage.ts | 2 +- backend/src/plugins/Automod/triggers/roleAdded.ts | 2 +- backend/src/plugins/Automod/triggers/roleRemoved.ts | 2 +- backend/src/plugins/BotControl/commands/ServersCmd.ts | 7 +++---- backend/src/plugins/Cases/functions/createCase.ts | 8 ++++---- backend/src/plugins/ModActions/commands/CasesModCmd.ts | 8 ++++---- .../src/plugins/ModActions/commands/CasesUserCmd.ts | 2 +- backend/src/plugins/ModActions/commands/WarnCmd.ts | 2 +- .../ModActions/events/PostAlertOnMemberJoinEvt.ts | 4 +--- .../ModActions/functions/actualKickMemberCmd.ts | 2 +- backend/src/plugins/Mutes/commands/MutesCmd.ts | 2 +- .../Starboard/util/createStarboardEmbedFromMessage.ts | 2 +- backend/src/plugins/Utility/commands/AvatarCmd.ts | 2 +- backend/src/plugins/Utility/commands/LevelCmd.ts | 2 +- .../src/plugins/Utility/commands/VcdisconnectCmd.ts | 2 +- backend/src/plugins/Utility/commands/VcmoveCmd.ts | 10 +++------- .../src/plugins/Utility/functions/getUserInfoEmbed.ts | 2 +- backend/src/plugins/Utility/search.ts | 4 ++-- 18 files changed, 29 insertions(+), 36 deletions(-) diff --git a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts index f0eee5ec8..a82c526ef 100644 --- a/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts +++ b/backend/src/plugins/Automod/functions/matchMultipleTextTypesOnMessage.ts @@ -42,7 +42,7 @@ export async function* matchMultipleTextTypesOnMessage( } if (trigger.match_visible_names) { - yield ["visiblename", member.nickname || member.user.globalName || msg.data.author.username]; + yield ["visiblename", member.displayName || msg.data.author.username]; } if (trigger.match_usernames) { diff --git a/backend/src/plugins/Automod/triggers/roleAdded.ts b/backend/src/plugins/Automod/triggers/roleAdded.ts index 754be1b3b..5d18de99d 100644 --- a/backend/src/plugins/Automod/triggers/roleAdded.ts +++ b/backend/src/plugins/Automod/triggers/roleAdded.ts @@ -38,7 +38,7 @@ export const RoleAddedTrigger = automodTrigger()({ const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId as Snowflake); const roleName = role?.name || "Unknown"; const member = contexts[0].member!; - const memberName = `**${renderUsername(member.user)}** (\`${member.id}\`)`; + const memberName = `**${renderUsername(member)}** (\`${member.id}\`)`; return `Role ${roleName} (\`${matchResult.extra.matchedRoleId}\`) was added to ${memberName}`; }, }); diff --git a/backend/src/plugins/Automod/triggers/roleRemoved.ts b/backend/src/plugins/Automod/triggers/roleRemoved.ts index fc5d5ae31..9452bdda2 100644 --- a/backend/src/plugins/Automod/triggers/roleRemoved.ts +++ b/backend/src/plugins/Automod/triggers/roleRemoved.ts @@ -38,7 +38,7 @@ export const RoleRemovedTrigger = automodTrigger()({ const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId as Snowflake); const roleName = role?.name || "Unknown"; const member = contexts[0].member!; - const memberName = `**${renderUsername(member.user)}** (\`${member.id}\`)`; + const memberName = `**${renderUsername(member)}** (\`${member.id}\`)`; return `Role ${roleName} (\`${matchResult.extra.matchedRoleId}\`) was removed from ${memberName}`; }, }); diff --git a/backend/src/plugins/BotControl/commands/ServersCmd.ts b/backend/src/plugins/BotControl/commands/ServersCmd.ts index 3658a36c2..5b2cf9c76 100644 --- a/backend/src/plugins/BotControl/commands/ServersCmd.ts +++ b/backend/src/plugins/BotControl/commands/ServersCmd.ts @@ -48,10 +48,9 @@ export const ServersCmd = botControlCmd({ const lines = filteredGuilds.map((g) => { const paddedId = g.id.padEnd(longestId, " "); const owner = getUser(pluginData.client, g.ownerId); - return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${renderUsername( - owner.username, - owner.discriminator, - )}** \`${owner.id}\`)`; + return `\`${paddedId}\` **${g.name}** (${g.memberCount} members) (owner **${renderUsername(owner)}** \`${ + owner.id + }\`)`; }); createChunkedMessage(msg.channel, lines.join("\n")); } else { diff --git a/backend/src/plugins/Cases/functions/createCase.ts b/backend/src/plugins/Cases/functions/createCase.ts index 70717f514..c68b899ff 100644 --- a/backend/src/plugins/Cases/functions/createCase.ts +++ b/backend/src/plugins/Cases/functions/createCase.ts @@ -8,16 +8,16 @@ import { postCaseToCaseLogChannel } from "./postToCaseLogChannel"; export async function createCase(pluginData: GuildPluginData, args: CaseArgs) { const user = await resolveUser(pluginData.client, args.userId); - const userName = renderUsername(user.username, user.discriminator); + const name = renderUsername(user); const mod = await resolveUser(pluginData.client, args.modId); - const modName = renderUsername(mod.username, mod.discriminator); + const modName = renderUsername(mod); let ppName: string | null = null; let ppId: Snowflake | null = null; if (args.ppId) { const pp = await resolveUser(pluginData.client, args.ppId); - ppName = renderUsername(pp.username, pp.discriminator); + ppName = renderUsername(pp); ppId = pp.id; } @@ -32,7 +32,7 @@ export async function createCase(pluginData: GuildPluginData, a const createdCase = await pluginData.state.cases.create({ type: args.type, user_id: user.id, - user_name: userName, + user_name: name, mod_id: mod.id, mod_name: modName, audit_log_id: args.auditLogId, diff --git a/backend/src/plugins/ModActions/commands/CasesModCmd.ts b/backend/src/plugins/ModActions/commands/CasesModCmd.ts index a911091d1..12b6c05cf 100644 --- a/backend/src/plugins/ModActions/commands/CasesModCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesModCmd.ts @@ -1,7 +1,7 @@ -import { APIEmbed, GuildMember, User } from "discord.js"; +import { APIEmbed } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage } from "../../../pluginUtils"; -import { emptyEmbedValue, renderUsername, resolveMember, resolveUser, trimLines } from "../../../utils"; +import { UnknownUser, emptyEmbedValue, renderUsername, resolveMember, resolveUser, trimLines } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage"; import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; @@ -31,7 +31,7 @@ export const CasesModCmd = modActionsCmd({ const mod = (await resolveMember(pluginData.client, pluginData.guild, modId)) || (await resolveUser(pluginData.client, modId)); - const modName = mod instanceof User ? renderUsername(mod) : modId; + const modName = mod instanceof UnknownUser ? modId : renderUsername(mod); const casesPlugin = pluginData.getPlugin(CasesPlugin); const totalCases = await casesPlugin.getTotalCasesByMod(modId); @@ -59,7 +59,7 @@ export const CasesModCmd = modActionsCmd({ const embed = { author: { name: title, - icon_url: mod instanceof User || mod instanceof GuildMember ? mod.displayAvatarURL() : undefined, + icon_url: mod instanceof UnknownUser ? undefined : mod.displayAvatarURL(), }, fields: [ ...getChunkedEmbedFields(emptyEmbedValue, lines.join("\n")), diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 05ab65eb6..7b3714b6a 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -46,7 +46,7 @@ export const CasesUserCmd = modActionsCmd({ const user = (await resolveMember(pluginData.client, pluginData.guild, args.user)) || (await resolveUser(pluginData.client, args.user)); - if (!user.id || user instanceof UnknownUser) { + if (user instanceof UnknownUser) { sendErrorMessage(pluginData, msg.channel, `User not found`); return; } diff --git a/backend/src/plugins/ModActions/commands/WarnCmd.ts b/backend/src/plugins/ModActions/commands/WarnCmd.ts index f917c55e0..218eeaf3e 100644 --- a/backend/src/plugins/ModActions/commands/WarnCmd.ts +++ b/backend/src/plugins/ModActions/commands/WarnCmd.ts @@ -106,7 +106,7 @@ export const WarnCmd = modActionsCmd({ sendSuccessMessage( pluginData, msg.channel, - `Warned **${renderUsername(memberToWarn.user)}** (Case #${warnResult.case.case_number})${messageResultText}`, + `Warned **${renderUsername(memberToWarn)}** (Case #${warnResult.case.case_number})${messageResultText}`, ); }, }); diff --git a/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts b/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts index 7874c2417..82e395474 100644 --- a/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts +++ b/backend/src/plugins/ModActions/events/PostAlertOnMemberJoinEvt.ts @@ -46,9 +46,7 @@ export const PostAlertOnMemberJoinEvt = modActionsEvt({ } await alertChannel.send( - `<@!${member.id}> (${renderUsername(member.user)} \`${member.id}\`) joined with ${ - actions.length - } prior record(s)`, + `<@!${member.id}> (${renderUsername(member)} \`${member.id}\`) joined with ${actions.length} prior record(s)`, ); } }, diff --git a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts index fac3f9065..a755ee08d 100644 --- a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts +++ b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts @@ -103,7 +103,7 @@ export async function actualKickMemberCmd( } // Confirm the action to the moderator - let response = `Kicked **${renderUsername(memberToKick.user)}** (Case #${kickResult.case.case_number})`; + let response = `Kicked **${renderUsername(memberToKick)}** (Case #${kickResult.case.case_number})`; if (kickResult.notifyResult.text) response += ` (${kickResult.notifyResult.text})`; sendSuccessMessage(pluginData, msg.channel, response); diff --git a/backend/src/plugins/Mutes/commands/MutesCmd.ts b/backend/src/plugins/Mutes/commands/MutesCmd.ts index 22cd74c51..5000218c4 100644 --- a/backend/src/plugins/Mutes/commands/MutesCmd.ts +++ b/backend/src/plugins/Mutes/commands/MutesCmd.ts @@ -74,7 +74,7 @@ export const MutesCmd = mutesCmd({ totalMutes = manuallyMutedMembers.length; lines = manuallyMutedMembers.map((member) => { - return `<@!${member.id}> (**${renderUsername(member.user)}**, \`${member.id}\`) 🔧 Manual mute`; + return `<@!${member.id}> (**${renderUsername(member)}**, \`${member.id}\`) 🔧 Manual mute`; }); } else { // Show filtered active mutes (but not manual mutes) diff --git a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts index 5126f20fa..93ba4dfd4 100644 --- a/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts +++ b/backend/src/plugins/Starboard/util/createStarboardEmbedFromMessage.ts @@ -28,7 +28,7 @@ export function createStarboardEmbedFromMessage( embed.color = color; } - embed.author.icon_url = (msg.member || msg.author).displayAvatarURL(); + embed.author.icon_url = (msg.member ?? msg.author).displayAvatarURL(); // The second condition here checks for messages with only an image link that is then embedded. // The message content in that case is hidden by the Discord client, so we hide it here too. diff --git a/backend/src/plugins/Utility/commands/AvatarCmd.ts b/backend/src/plugins/Utility/commands/AvatarCmd.ts index b1215df6c..e4ba07d57 100644 --- a/backend/src/plugins/Utility/commands/AvatarCmd.ts +++ b/backend/src/plugins/Utility/commands/AvatarCmd.ts @@ -14,7 +14,7 @@ export const AvatarCmd = utilityCmd({ }, async run({ message: msg, args, pluginData }) { - const user = args.user || msg.member || msg.author; + const user = args.user ?? msg.member ?? msg.author; if (!(user instanceof UnknownUser)) { const embed: APIEmbed = { image: { diff --git a/backend/src/plugins/Utility/commands/LevelCmd.ts b/backend/src/plugins/Utility/commands/LevelCmd.ts index df4d93259..5830f66a8 100644 --- a/backend/src/plugins/Utility/commands/LevelCmd.ts +++ b/backend/src/plugins/Utility/commands/LevelCmd.ts @@ -18,6 +18,6 @@ export const LevelCmd = utilityCmd({ run({ message, args, pluginData }) { const member = args.member || message.member; const level = getMemberLevel(pluginData, member); - message.channel.send(`The permission level of ${renderUsername(member.user)} is **${level}**`); + message.channel.send(`The permission level of ${renderUsername(member)} is **${level}**`); }, }); diff --git a/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts b/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts index 240c763f1..b6863599b 100644 --- a/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts +++ b/backend/src/plugins/Utility/commands/VcdisconnectCmd.ts @@ -43,7 +43,7 @@ export const VcdisconnectCmd = utilityCmd({ sendSuccessMessage( pluginData, msg.channel, - `**${renderUsername(args.member.user)}** disconnected from **${channel.name}**`, + `**${renderUsername(args.member)}** disconnected from **${channel.name}**`, ); }, }); diff --git a/backend/src/plugins/Utility/commands/VcmoveCmd.ts b/backend/src/plugins/Utility/commands/VcmoveCmd.ts index 6ffe85883..259c60b5a 100644 --- a/backend/src/plugins/Utility/commands/VcmoveCmd.ts +++ b/backend/src/plugins/Utility/commands/VcmoveCmd.ts @@ -80,7 +80,7 @@ export const VcmoveCmd = utilityCmd({ newChannel: channel, }); - sendSuccessMessage(pluginData, msg.channel, `**${renderUsername(args.member.user)}** moved to **${channel.name}**`); + sendSuccessMessage(pluginData, msg.channel, `**${renderUsername(args.member)}** moved to **${channel.name}**`); }, }); @@ -153,7 +153,7 @@ export const VcmoveAllCmd = utilityCmd({ sendErrorMessage( pluginData, msg.channel, - `Failed to move ${renderUsername(currMember.user)} (${currMember.id}): You cannot act on this member`, + `Failed to move ${renderUsername(currMember)} (${currMember.id}): You cannot act on this member`, ); errAmt++; continue; @@ -168,11 +168,7 @@ export const VcmoveAllCmd = utilityCmd({ sendErrorMessage(pluginData, msg.channel, "Unknown error when trying to move members"); return; } - sendErrorMessage( - pluginData, - msg.channel, - `Failed to move ${renderUsername(currMember.user)} (${currMember.id})`, - ); + sendErrorMessage(pluginData, msg.channel, `Failed to move ${renderUsername(currMember)} (${currMember.id})`); errAmt++; continue; } diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts index d8ccc8332..88e4aba08 100644 --- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts @@ -43,7 +43,7 @@ export async function getUserInfoEmbed( name: `${user.bot ? "Bot" : "User"}: ${renderUsername(user)}`, }; - const avatarURL = (member || user).displayAvatarURL(); + const avatarURL = (member ?? user).displayAvatarURL(); embed.author.icon_url = avatarURL; if (compact) { diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts index 632a85a77..76c5af9c0 100644 --- a/backend/src/plugins/Utility/search.ts +++ b/backend/src/plugins/Utility/search.ts @@ -381,7 +381,7 @@ async function performMemberSearch( return true; } - const fullUsername = renderUsername(member.user); + const fullUsername = renderUsername(member); if (await execRegExp(queryRegex, fullUsername).catch(allowTimeout)) return true; return false; @@ -492,7 +492,7 @@ function formatSearchResultList(members: Array): string { const paddedId = member.id.padEnd(longestId, " "); let line; if (member instanceof GuildMember) { - line = `${paddedId} ${renderUsername(member.user)}`; + line = `${paddedId} ${renderUsername(member)}`; if (member.nickname) line += ` (${member.nickname})`; } else { line = `${paddedId} ${renderUsername(member)}`; From 2ac7ae85ce5db8c1551aa5cb9d18e2797a55ef4b Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 17:05:04 +0000 Subject: [PATCH 032/128] missed one Signed-off-by: GitHub --- .../plugins/ReactionRoles/util/addMemberPendingRoleChange.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts b/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts index dda8a6bcf..8f25a0ae7 100644 --- a/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts +++ b/backend/src/plugins/ReactionRoles/util/addMemberPendingRoleChange.ts @@ -33,7 +33,7 @@ export async function addMemberPendingRoleChange( try { await member.roles.set(Array.from(newRoleIds.values()), "Reaction roles"); } catch (e) { - logger.warn(`Failed to apply role changes to ${renderUsername(member.user)} (${member.id}): ${e.message}`); + logger.warn(`Failed to apply role changes to ${renderUsername(member)} (${member.id}): ${e.message}`); } } lock.unlock(); From ae651c8a705fa82379d3b687e7fe46c2de474d56 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 10:55:47 +0000 Subject: [PATCH 033/128] paginated user cases Signed-off-by: GitHub --- .../ModActions/commands/CasesUserCmd.ts | 93 +++++++++++-------- 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 069ad31f4..6e5aaf881 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -5,6 +5,7 @@ import { sendErrorMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { UnknownUser, chunkArray, emptyEmbedValue, renderUserUsername, resolveUser, trimLines } from "../../../utils"; import { asyncMap } from "../../../utils/async"; +import { createPaginatedMessage } from "../../../utils/createPaginatedMessage.js"; import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; import { modActionsCmd } from "../types"; @@ -21,6 +22,8 @@ const opts = { unbans: ct.switchOption({ def: false, shortcut: "ub" }), }; +const casesPerPage = 10; + export const CasesUserCmd = modActionsCmd({ trigger: ["cases", "modlogs"], permission: "can_view", @@ -90,49 +93,57 @@ export const CasesUserCmd = modActionsCmd({ } else { // Compact view (= regular message with a preview of each case) const casesPlugin = pluginData.getPlugin(CasesPlugin); - const lines = await asyncMap(casesToDisplay, (c) => casesPlugin.getCaseSummary(c, true, msg.author.id)); + const totalPages = Math.max(Math.ceil(cases.length / casesPerPage), 1); const prefix = getGuildPrefix(pluginData); - const linesPerChunk = 10; - const lineChunks = chunkArray(lines, linesPerChunk); - - const footerField = { - name: emptyEmbedValue, - value: trimLines(` - Use \`${prefix}case \` to see more information about an individual case - `), - }; - - for (const [i, linesInChunk] of lineChunks.entries()) { - const isLastChunk = i === lineChunks.length - 1; - - if (isLastChunk && !args.hidden && hiddenCases.length) { - if (hiddenCases.length === 1) { - linesInChunk.push(`*+${hiddenCases.length} hidden case, use "-hidden" to show it*`); - } else { - linesInChunk.push(`*+${hiddenCases.length} hidden cases, use "-hidden" to show them*`); - } - } - - const chunkStart = i * linesPerChunk + 1; - const chunkEnd = Math.min((i + 1) * linesPerChunk, lines.length); - - const embed = { - author: { - name: - lineChunks.length === 1 - ? `Cases for ${userName} (${lines.length} total)` - : `Cases ${chunkStart}–${chunkEnd} of ${lines.length} for ${userName}`, - icon_url: user instanceof User ? user.displayAvatarURL() : undefined, - }, - fields: [ - ...getChunkedEmbedFields(emptyEmbedValue, linesInChunk.join("\n")), - ...(isLastChunk ? [footerField] : []), - ], - } satisfies APIEmbed; - - msg.channel.send({ embeds: [embed] }); - } + + createPaginatedMessage( + pluginData.client, + msg.channel, + totalPages, + async (page) => { + const chunkedCases = chunkArray(cases, casesPerPage)[page - 1]; + const lines = await asyncMap(chunkedCases, (c) => casesPlugin.getCaseSummary(c, true, msg.author.id)); + + const isLastPage = page === totalPages; + const firstCaseNum = (page - 1) * casesPerPage + 1; + const lastCaseNum = page * casesPerPage; + const title = + totalPages === 1 + ? `Cases for ${userName} (${lines.length} total)` + : `Most recent cases ${firstCaseNum}-${lastCaseNum} of ${cases.length} for ${userName}`; + + const embed = { + author: { + name: title, + icon_url: user instanceof User ? user.displayAvatarURL() : undefined, + }, + fields: [ + ...getChunkedEmbedFields(emptyEmbedValue, lines.join("\n")), + { + name: emptyEmbedValue, + value: trimLines(` + Use \`${prefix}case \` to see more information about an individual case + `), + }, + ], + } satisfies APIEmbed; + + if (isLastPage && !args.hidden && hiddenCases.length) + embed.fields.push({ + name: emptyEmbedValue, + value: + hiddenCases.length === 1 + ? `*+${hiddenCases.length} hidden case, use "-hidden" to show it*` + : `*+${hiddenCases.length} hidden cases, use "-hidden" to show them*`, + }); + + return { embeds: [embed] }; + }, + { + limitToUserId: msg.author.id, + }, + ); } } }, From bb4fdf653095002a916b93e4daf8cceaea511022 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 11:49:33 +0000 Subject: [PATCH 034/128] move embed fields to embed description Signed-off-by: GitHub --- backend/src/plugins/ModActions/commands/CasesModCmd.ts | 8 ++++---- backend/src/plugins/ModActions/commands/CasesUserCmd.ts | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/CasesModCmd.ts b/backend/src/plugins/ModActions/commands/CasesModCmd.ts index 5b0e32730..d520eede6 100644 --- a/backend/src/plugins/ModActions/commands/CasesModCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesModCmd.ts @@ -4,7 +4,6 @@ import { sendErrorMessage } from "../../../pluginUtils"; import { emptyEmbedValue, resolveUser, trimLines } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage"; -import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { modActionsCmd } from "../types"; @@ -13,7 +12,7 @@ const opts = { mod: ct.userId({ option: true }), }; -const casesPerPage = 5; +const casesPerPage = 10; export const CasesModCmd = modActionsCmd({ trigger: ["cases", "modlogs", "infractions"], @@ -50,8 +49,9 @@ export const CasesModCmd = modActionsCmd({ const cases = await casesPlugin.getRecentCasesByMod(modId, casesPerPage, (page - 1) * casesPerPage); const lines = await asyncMap(cases, (c) => casesPlugin.getCaseSummary(c, true, msg.author.id)); + const isLastPage = page === totalPages; const firstCaseNum = (page - 1) * casesPerPage + 1; - const lastCaseNum = page * casesPerPage; + const lastCaseNum = isLastPage ? totalCases : page * casesPerPage; const title = `Most recent cases ${firstCaseNum}-${lastCaseNum} of ${totalCases} by ${modName}`; const embed = { @@ -59,8 +59,8 @@ export const CasesModCmd = modActionsCmd({ name: title, icon_url: mod instanceof User ? mod.displayAvatarURL() : undefined, }, + description: lines.join("\n"), fields: [ - ...getChunkedEmbedFields(emptyEmbedValue, lines.join("\n")), { name: emptyEmbedValue, value: trimLines(` diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 6e5aaf881..15f42cf68 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -6,7 +6,6 @@ import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { UnknownUser, chunkArray, emptyEmbedValue, renderUserUsername, resolveUser, trimLines } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage.js"; -import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; import { modActionsCmd } from "../types"; @@ -107,7 +106,7 @@ export const CasesUserCmd = modActionsCmd({ const isLastPage = page === totalPages; const firstCaseNum = (page - 1) * casesPerPage + 1; - const lastCaseNum = page * casesPerPage; + const lastCaseNum = isLastPage ? cases.length : page * casesPerPage; const title = totalPages === 1 ? `Cases for ${userName} (${lines.length} total)` @@ -118,13 +117,11 @@ export const CasesUserCmd = modActionsCmd({ name: title, icon_url: user instanceof User ? user.displayAvatarURL() : undefined, }, + description: lines.join("\n"), fields: [ - ...getChunkedEmbedFields(emptyEmbedValue, lines.join("\n")), { name: emptyEmbedValue, - value: trimLines(` - Use \`${prefix}case \` to see more information about an individual case - `), + value: trimLines(`Use \`${prefix}case \` to see more information about an individual case`), }, ], } satisfies APIEmbed; From 8860d4fb22e175a543332c6b880427508e09411f Mon Sep 17 00:00:00 2001 From: Tiago R Date: Thu, 28 Dec 2023 14:41:32 +0000 Subject: [PATCH 035/128] Timeouts: better validations (#438) * better timeout validations Signed-off-by: GitHub * almeida reviews Signed-off-by: GitHub * better error handling Signed-off-by: GitHub * add missing catch noops Signed-off-by: GitHub --------- Signed-off-by: GitHub --- backend/src/RecoverablePluginError.ts | 4 ++++ .../events/ReapplyActiveMuteOnJoinEvt.ts | 12 ++++++++-- .../src/plugins/Mutes/functions/muteUser.ts | 22 +++++++++++++++++-- .../Mutes/functions/renewTimeoutMute.ts | 12 ++++++++-- .../src/plugins/Mutes/functions/unmuteUser.ts | 8 ++++--- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/backend/src/RecoverablePluginError.ts b/backend/src/RecoverablePluginError.ts index b621fd414..46a86ae55 100644 --- a/backend/src/RecoverablePluginError.ts +++ b/backend/src/RecoverablePluginError.ts @@ -9,6 +9,8 @@ export enum ERRORS { INVALID_USER, INVALID_MUTE_ROLE_ID, MUTE_ROLE_ABOVE_ZEP, + USER_ABOVE_ZEP, + USER_NOT_MODERATABLE, } export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = { @@ -20,6 +22,8 @@ export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = { [ERRORS.INVALID_USER]: "Invalid user", [ERRORS.INVALID_MUTE_ROLE_ID]: "Specified mute role is not valid", [ERRORS.MUTE_ROLE_ABOVE_ZEP]: "Specified mute role is above Zeppelin in the role hierarchy", + [ERRORS.USER_ABOVE_ZEP]: "Cannot mute user, specified user is above Zeppelin in the role hierarchy", + [ERRORS.USER_NOT_MODERATABLE]: "Cannot mute user, specified user is not moderatable", }; export class RecoverablePluginError extends Error { diff --git a/backend/src/plugins/Mutes/events/ReapplyActiveMuteOnJoinEvt.ts b/backend/src/plugins/Mutes/events/ReapplyActiveMuteOnJoinEvt.ts index a859f7adb..6db4f27ca 100644 --- a/backend/src/plugins/Mutes/events/ReapplyActiveMuteOnJoinEvt.ts +++ b/backend/src/plugins/Mutes/events/ReapplyActiveMuteOnJoinEvt.ts @@ -1,5 +1,6 @@ import moment from "moment-timezone"; import { MuteTypes } from "../../../data/MuteTypes"; +import { noop } from "../../../utils.js"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin"; import { getTimeoutExpiryTime } from "../functions/getTimeoutExpiryTime"; @@ -12,6 +13,7 @@ export const ReapplyActiveMuteOnJoinEvt = mutesEvt({ event: "guildMemberAdd", async listener({ pluginData, args: { member } }) { const mute = await pluginData.state.mutes.findExistingMuteForUserId(member.id); + const logs = pluginData.getPlugin(LogsPlugin); if (!mute) { return; } @@ -25,11 +27,17 @@ export const ReapplyActiveMuteOnJoinEvt = mutesEvt({ if (!member.isCommunicationDisabled()) { const expiresAt = mute.expires_at ? moment.utc(mute.expires_at).valueOf() : null; const timeoutExpiresAt = getTimeoutExpiryTime(expiresAt); - await member.disableCommunicationUntil(timeoutExpiresAt); + if (member.moderatable) { + await member.disableCommunicationUntil(timeoutExpiresAt).catch(noop); + } else { + logs.logBotAlert({ + body: `Cannot mute user, specified user is not moderatable`, + }); + } } } - pluginData.getPlugin(LogsPlugin).logMemberMuteRejoin({ + logs.logMemberMuteRejoin({ member, }); }, diff --git a/backend/src/plugins/Mutes/functions/muteUser.ts b/backend/src/plugins/Mutes/functions/muteUser.ts index fc864ada8..575f96fb8 100644 --- a/backend/src/plugins/Mutes/functions/muteUser.ts +++ b/backend/src/plugins/Mutes/functions/muteUser.ts @@ -13,6 +13,7 @@ import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFor import { UserNotificationMethod, UserNotificationResult, + noop, notifyUser, resolveMember, resolveUser, @@ -108,7 +109,7 @@ export async function muteUser( if (zepRoles.size === 0 || !zepRoles.some((zepRole) => zepRole.position > actualMuteRole.position)) { lock.unlock(); logs.logBotAlert({ - body: `Cannot mute users, specified mute role is above Zeppelin in the role hierarchy`, + body: `Cannot mute user, specified mute role is above Zeppelin in the role hierarchy`, }); throw new RecoverablePluginError(ERRORS.MUTE_ROLE_ABOVE_ZEP, pluginData.guild); } @@ -117,7 +118,24 @@ export async function muteUser( pluginData.getPlugin(RoleManagerPlugin).addPriorityRole(member.id, muteRole!); } } else { - await member.disableCommunicationUntil(timeoutUntil); + if (!member.manageable) { + lock.unlock(); + logs.logBotAlert({ + body: `Cannot mute user, specified user is above Zeppelin in the role hierarchy`, + }); + throw new RecoverablePluginError(ERRORS.USER_ABOVE_ZEP, pluginData.guild); + } + + if (!member.moderatable) { + // redundant safety, since canActOn already checks this + lock.unlock(); + logs.logBotAlert({ + body: `Cannot mute user, specified user is not moderatable`, + }); + throw new RecoverablePluginError(ERRORS.USER_NOT_MODERATABLE, pluginData.guild); + } + + await member.disableCommunicationUntil(timeoutUntil).catch(noop); } // If enabled, move the user to the mute voice channel (e.g. afk - just to apply the voice perms from the mute role) diff --git a/backend/src/plugins/Mutes/functions/renewTimeoutMute.ts b/backend/src/plugins/Mutes/functions/renewTimeoutMute.ts index 57def0802..8363cf9f4 100644 --- a/backend/src/plugins/Mutes/functions/renewTimeoutMute.ts +++ b/backend/src/plugins/Mutes/functions/renewTimeoutMute.ts @@ -3,7 +3,8 @@ import { GuildPluginData } from "knub"; import moment from "moment-timezone"; import { MAX_TIMEOUT_DURATION } from "../../../data/Mutes"; import { Mute } from "../../../data/entities/Mute"; -import { DBDateFormat, resolveMember } from "../../../utils"; +import { DBDateFormat, noop, resolveMember } from "../../../utils"; +import { LogsPlugin } from "../../Logs/LogsPlugin.js"; import { MutesPluginType } from "../types"; export async function renewTimeoutMute(pluginData: GuildPluginData, mute: Mute) { @@ -24,6 +25,13 @@ export async function renewTimeoutMute(pluginData: GuildPluginData Date: Thu, 28 Dec 2023 20:14:26 +0000 Subject: [PATCH 036/128] Reworked automod "set_slowmode" action (#441) * initial * fixes Signed-off-by: GitHub --------- Signed-off-by: GitHub Co-authored-by: Almeida --- .../src/plugins/Automod/actions/setSlowmode.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/backend/src/plugins/Automod/actions/setSlowmode.ts b/backend/src/plugins/Automod/actions/setSlowmode.ts index 7b527f10d..abd27f8ac 100644 --- a/backend/src/plugins/Automod/actions/setSlowmode.ts +++ b/backend/src/plugins/Automod/actions/setSlowmode.ts @@ -6,7 +6,7 @@ import { automodAction } from "../helpers"; export const SetSlowmodeAction = automodAction({ configType: t.type({ - channels: t.array(t.string), + channels: tNullable(t.array(t.string)), duration: tNullable(tDelayString), }), @@ -14,14 +14,17 @@ export const SetSlowmodeAction = automodAction({ duration: "10s", }, - async apply({ pluginData, actionConfig }) { + async apply({ pluginData, actionConfig, contexts }) { const slowmodeMs = Math.max(actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : 0, 0); - - for (const channelId of actionConfig.channels) { + const channels: Snowflake[] = actionConfig.channels ?? []; + if (channels.length === 0) { + channels.push(...contexts.filter((c) => c.message?.channel_id).map((c) => c.message!.channel_id)); + } + for (const channelId of channels) { const channel = pluginData.guild.channels.cache.get(channelId as Snowflake); - // Only text channels and text channels within categories support slowmodes - if (!channel || (!channel.isTextBased() && channel.type !== ChannelType.GuildCategory)) { + + if (!channel?.isTextBased() && channel?.type !== ChannelType.GuildCategory) { continue; } From b8812456409cc2328f4c00ede1b38fcbdf07365d Mon Sep 17 00:00:00 2001 From: rubyowo Date: Thu, 28 Dec 2023 20:36:56 +0000 Subject: [PATCH 037/128] feat: make update script exit if one of the commands fail (#415) * feat: make update script fail if merge conflict * stop on first error with bash command --------- Co-authored-by: Almeida --- update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/update.sh b/update.sh index 676f1449a..1769c3c92 100755 --- a/update.sh +++ b/update.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e echo Updating Zeppelin... From d09e0566b3461dbe92a533fbf0c2b8e62fe092b9 Mon Sep 17 00:00:00 2001 From: BanTheNons Date: Thu, 28 Dec 2023 23:43:46 +0300 Subject: [PATCH 038/128] fix: reactions in the channel archiver command (#308) Co-authored-by: Almeida --- .../src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts index 13a72a871..3fc1b72bb 100644 --- a/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts +++ b/backend/src/plugins/ChannelArchiver/commands/ArchiveChannelCmd.ts @@ -82,9 +82,9 @@ export const ArchiveChannelCmd = channelArchiverCmd({ } } - if (message.reactions && Object.keys(message.reactions).length > 0) { + if (message.reactions.cache.size > 0) { const reactionCounts: string[] = []; - for (const [emoji, info] of Object.entries(message.reactions)) { + for (const [emoji, info] of message.reactions.cache) { reactionCounts.push(`${info.count}x ${emoji}`); } content += `\n-- Reactions: ${reactionCounts.join(", ")}`; From 7c946949d6fca80a24deaf14cd613c055a597881 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Fri, 29 Dec 2023 11:43:36 +0000 Subject: [PATCH 039/128] automod match_link fixes (#432) * remove trailing dot from FQDN for TLD check Signed-off-by: GitHub * yeet all trailing characters from TLDs Signed-off-by: GitHub * oops Signed-off-by: GitHub * move dumb loop to regex replace Signed-off-by: GitHub --------- Signed-off-by: GitHub Co-authored-by: Almeida --- backend/src/utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 1bb4d6ce6..c6c705db6 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -647,7 +647,13 @@ export function getUrlsInString(str: string, onlyUnique = false): MatchedURL[] { return urls; } - const hostnameParts = matchUrl.hostname.split("."); + let hostname = matchUrl.hostname.toLowerCase(); + + if (hostname.length > 3) { + hostname = hostname.replace(/[^a-z]+$/, ""); + } + + const hostnameParts = hostname.split("."); const tld = hostnameParts[hostnameParts.length - 1]; if (tlds.includes(tld)) { urls.push(matchUrl); From b2fc4d69e3205ed6e0690f3d2307f8944a43b7c0 Mon Sep 17 00:00:00 2001 From: Miikka <2606411+Dragory@users.noreply.github.com> Date: Fri, 29 Dec 2023 14:21:58 +0200 Subject: [PATCH 040/128] chore: update .clabot --- .clabot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.clabot b/.clabot index 381bf5993..0dcbf7f3c 100644 --- a/.clabot +++ b/.clabot @@ -23,7 +23,11 @@ "iamshoXy", "Scraayp", "app/dependabot", - "zayKenyon" + "zayKenyon", + "rukogit", + "Obliie", + "brawaru", + "Benricheson101" ], "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 e7eacb330b4d21962ecbf8d4eff6905e86b0365e Mon Sep 17 00:00:00 2001 From: Miikka <2606411+Dragory@users.noreply.github.com> Date: Fri, 29 Dec 2023 14:26:20 +0200 Subject: [PATCH 041/128] chore: update .clabot --- .clabot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.clabot b/.clabot index 0dcbf7f3c..43dcfc5f1 100644 --- a/.clabot +++ b/.clabot @@ -27,7 +27,8 @@ "rukogit", "Obliie", "brawaru", - "Benricheson101" + "Benricheson101", + "hawkeye7662" ], "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 1cb8431a02476d88f90d21105e46d53a178b65c6 Mon Sep 17 00:00:00 2001 From: hawkeye7662 <82515230+hawkeye7662@users.noreply.github.com> Date: Fri, 29 Dec 2023 17:59:28 +0530 Subject: [PATCH 042/128] Fix loose matching for automod (#428) Added a missing closing bracket for the regex to work. Co-authored-by: Almeida --- backend/src/plugins/Automod/triggers/matchWords.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/triggers/matchWords.ts b/backend/src/plugins/Automod/triggers/matchWords.ts index c5ca79fce..1deb64e5b 100644 --- a/backend/src/plugins/Automod/triggers/matchWords.ts +++ b/backend/src/plugins/Automod/triggers/matchWords.ts @@ -54,7 +54,7 @@ export const MatchWordsTrigger = automodTrigger()({ const looseMatchingThreshold = Math.min(Math.max(trigger.loose_matching_threshold, 1), 64); const patterns = trigger.words.map((word) => { let pattern = trigger.loose_matching - ? [...word].map((c) => escapeStringRegexp(c)).join(`(?:\\s*|.{0,${looseMatchingThreshold})`) + ? [...word].map((c) => escapeStringRegexp(c)).join(`(?:\\s*|.{0,${looseMatchingThreshold}})`) : escapeStringRegexp(word); if (trigger.only_full_words) { From d51461ee3af2a1229578817c2169bdfd2f4ec243 Mon Sep 17 00:00:00 2001 From: hawkeye7662 <82515230+hawkeye7662@users.noreply.github.com> Date: Fri, 29 Dec 2023 18:02:48 +0530 Subject: [PATCH 043/128] Catch Too Many Reactions error (#326) Catches Maximum number of reactions reached (20) error by checking for error code 30010 Co-authored-by: Almeida --- .../util/applyReactionRoleReactionsToMessage.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts b/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts index 94de86312..5d1b3a37f 100644 --- a/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts +++ b/backend/src/plugins/ReactionRoles/util/applyReactionRoleReactionsToMessage.ts @@ -86,6 +86,12 @@ export async function applyReactionRoleReactionsToMessage( body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`, }); break; + } else if (e.code === 30010) { + errors.push(`Maximum number of reactions reached (20)`); + logs.logBotAlert({ + body: `Error ${e.code} while applying reaction role reactions to ${channelId}/${messageId}: ${e.message}`, + }); + break; } } From 8a4a2d36478036e31f9b547e23d5bf5a31acff59 Mon Sep 17 00:00:00 2001 From: Ben Richeson <36977340+Benricheson101@users.noreply.github.com> Date: Fri, 29 Dec 2023 07:52:43 -0500 Subject: [PATCH 044/128] feat: option to trigger antiraid_level only on change (#424) Co-authored-by: Almeida --- .../plugins/Automod/events/runAutomodOnAntiraidLevel.ts | 6 ++++-- .../src/plugins/Automod/functions/setAntiraidLevel.ts | 3 ++- backend/src/plugins/Automod/triggers/antiraidLevel.ts | 9 +++++++++ backend/src/plugins/Automod/types.ts | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/backend/src/plugins/Automod/events/runAutomodOnAntiraidLevel.ts b/backend/src/plugins/Automod/events/runAutomodOnAntiraidLevel.ts index 2dfc4bacd..05dbb6f3e 100644 --- a/backend/src/plugins/Automod/events/runAutomodOnAntiraidLevel.ts +++ b/backend/src/plugins/Automod/events/runAutomodOnAntiraidLevel.ts @@ -5,13 +5,15 @@ import { AutomodContext, AutomodPluginType } from "../types"; export async function runAutomodOnAntiraidLevel( pluginData: GuildPluginData, - level: string | null, + newLevel: string | null, + oldLevel: string | null, user?: User, ) { const context: AutomodContext = { timestamp: Date.now(), antiraid: { - level, + level: newLevel, + oldLevel, }, user, }; diff --git a/backend/src/plugins/Automod/functions/setAntiraidLevel.ts b/backend/src/plugins/Automod/functions/setAntiraidLevel.ts index a21d58b08..c76555c22 100644 --- a/backend/src/plugins/Automod/functions/setAntiraidLevel.ts +++ b/backend/src/plugins/Automod/functions/setAntiraidLevel.ts @@ -9,10 +9,11 @@ export async function setAntiraidLevel( newLevel: string | null, user?: User, ) { + const oldLevel = pluginData.state.cachedAntiraidLevel; pluginData.state.cachedAntiraidLevel = newLevel; await pluginData.state.antiraidLevels.set(newLevel); - runAutomodOnAntiraidLevel(pluginData, newLevel, user); + runAutomodOnAntiraidLevel(pluginData, newLevel, oldLevel, user); const logs = pluginData.getPlugin(LogsPlugin); diff --git a/backend/src/plugins/Automod/triggers/antiraidLevel.ts b/backend/src/plugins/Automod/triggers/antiraidLevel.ts index 7c6d17afd..f5caa3f0b 100644 --- a/backend/src/plugins/Automod/triggers/antiraidLevel.ts +++ b/backend/src/plugins/Automod/triggers/antiraidLevel.ts @@ -7,6 +7,7 @@ interface AntiraidLevelTriggerResult {} export const AntiraidLevelTrigger = automodTrigger()({ configType: t.type({ level: tNullable(t.string), + only_on_change: tNullable(t.boolean), }), defaultConfig: {}, @@ -20,6 +21,14 @@ export const AntiraidLevelTrigger = automodTrigger() return; } + if ( + triggerConfig.only_on_change && + context.antiraid.oldLevel !== undefined && + context.antiraid.level === context.antiraid.oldLevel + ) { + return; + } + return { extra: {}, }; diff --git a/backend/src/plugins/Automod/types.ts b/backend/src/plugins/Automod/types.ts index bd3f05ee6..b9900089d 100644 --- a/backend/src/plugins/Automod/types.ts +++ b/backend/src/plugins/Automod/types.ts @@ -130,6 +130,7 @@ export interface AutomodContext { }; antiraid?: { level: string | null; + oldLevel?: string | null; }; threadChange?: { created?: ThreadChannel; From 3217f350178104a813a25ac9b488ae3e59ba9187 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Fri, 29 Dec 2023 14:30:40 +0000 Subject: [PATCH 045/128] implement MEMBER_MUTE_EXPIRED (#437) Signed-off-by: GitHub --- backend/src/plugins/Mutes/functions/clearMute.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Mutes/functions/clearMute.ts b/backend/src/plugins/Mutes/functions/clearMute.ts index 0bef1881f..f96068c75 100644 --- a/backend/src/plugins/Mutes/functions/clearMute.ts +++ b/backend/src/plugins/Mutes/functions/clearMute.ts @@ -57,9 +57,10 @@ export async function clearMute( await member.timeout(null); } } + pluginData.getPlugin(LogsPlugin).logMemberMuteExpired({ member }); } catch { pluginData.getPlugin(LogsPlugin).logBotAlert({ - body: `Failed to remove mute role from ${verboseUserMention(member.user)}`, + body: `Failed to clear mute from ${verboseUserMention(member.user)}`, }); } finally { lock.unlock(); From c53bfaa2332e4fc948ba338b1188625103f5528e Mon Sep 17 00:00:00 2001 From: Tiago R Date: Fri, 29 Dec 2023 17:03:45 +0000 Subject: [PATCH 046/128] remove trimLines Signed-off-by: GitHub --- backend/src/plugins/ModActions/commands/CasesUserCmd.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 15f42cf68..e8ce50adc 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -3,7 +3,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { sendErrorMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; -import { UnknownUser, chunkArray, emptyEmbedValue, renderUserUsername, resolveUser, trimLines } from "../../../utils"; +import { UnknownUser, chunkArray, emptyEmbedValue, renderUserUsername, resolveUser } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage.js"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; @@ -121,7 +121,7 @@ export const CasesUserCmd = modActionsCmd({ fields: [ { name: emptyEmbedValue, - value: trimLines(`Use \`${prefix}case \` to see more information about an individual case`), + value: `Use \`${prefix}case \` to see more information about an individual case`, }, ], } satisfies APIEmbed; From 3912523c920bff1772a5c58380d0525973239661 Mon Sep 17 00:00:00 2001 From: zay <87788699+zayKenyon@users.noreply.github.com> Date: Sat, 30 Dec 2023 22:09:37 +0000 Subject: [PATCH 047/128] Moderation Guide (#356) * create Moderation Guide * code review * fix: enable mod_actions plugin * Apply suggestions from code review Co-authored-by: Almeida * style: code review Suggestions that were not automatically resolvable. --------- Co-authored-by: Almeida --- dashboard/src/components/docs/Moderation.vue | 156 +++++++++++++++++++ dashboard/src/routes.ts | 2 +- 2 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 dashboard/src/components/docs/Moderation.vue diff --git a/dashboard/src/components/docs/Moderation.vue b/dashboard/src/components/docs/Moderation.vue new file mode 100644 index 000000000..ff2151e69 --- /dev/null +++ b/dashboard/src/components/docs/Moderation.vue @@ -0,0 +1,156 @@ + + + diff --git a/dashboard/src/routes.ts b/dashboard/src/routes.ts index 15ac3d96b..b70c38db4 100644 --- a/dashboard/src/routes.ts +++ b/dashboard/src/routes.ts @@ -51,7 +51,7 @@ export const router = new VueRouter({ }, { path: "setup-guides/moderation", - component: () => import("./components/docs/WorkInProgress.vue"), + component: () => import("./components/docs/Moderation.vue"), }, { path: "setup-guides/counters", From 094e94f0f4226d9173aa9f344ae06494e31adabf Mon Sep 17 00:00:00 2001 From: Ben Richeson <36977340+Benricheson101@users.noreply.github.com> Date: Thu, 4 Jan 2024 20:41:12 -0500 Subject: [PATCH 048/128] Add `pause_invites` automod action (#423) * feat(AutomodPlugin): toggle invite action * feat: rename and change config shape * refactor: rename disable_invites to pause_invites * fix: make options an object, else setting an action to `false` ignores it --- .../plugins/Automod/actions/availableActions.ts | 3 +++ .../src/plugins/Automod/actions/pauseInvites.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 backend/src/plugins/Automod/actions/pauseInvites.ts diff --git a/backend/src/plugins/Automod/actions/availableActions.ts b/backend/src/plugins/Automod/actions/availableActions.ts index 3f253bc05..b77f39421 100644 --- a/backend/src/plugins/Automod/actions/availableActions.ts +++ b/backend/src/plugins/Automod/actions/availableActions.ts @@ -11,6 +11,7 @@ import { CleanAction } from "./clean"; import { KickAction } from "./kick"; import { LogAction } from "./log"; import { MuteAction } from "./mute"; +import { PauseInvitesAction } from "./pauseInvites"; import { RemoveRolesAction } from "./removeRoles"; import { ReplyAction } from "./reply"; import { SetAntiraidLevelAction } from "./setAntiraidLevel"; @@ -38,6 +39,7 @@ export const availableActions: Record> = { start_thread: StartThreadAction, archive_thread: ArchiveThreadAction, change_perms: ChangePermsAction, + pause_invites: PauseInvitesAction, }; export const AvailableActions = t.type({ @@ -59,4 +61,5 @@ export const AvailableActions = t.type({ start_thread: StartThreadAction.configType, archive_thread: ArchiveThreadAction.configType, change_perms: ChangePermsAction.configType, + pause_invites: PauseInvitesAction.configType, }); diff --git a/backend/src/plugins/Automod/actions/pauseInvites.ts b/backend/src/plugins/Automod/actions/pauseInvites.ts new file mode 100644 index 000000000..1bbea34fa --- /dev/null +++ b/backend/src/plugins/Automod/actions/pauseInvites.ts @@ -0,0 +1,14 @@ +import * as t from "io-ts"; +import { automodAction } from "../helpers"; + +export const PauseInvitesAction = automodAction({ + configType: t.type({ + paused: t.boolean, + }), + + defaultConfig: {}, + + async apply({ pluginData, actionConfig }) { + await pluginData.guild.disableInvites(actionConfig.paused); + }, +}); From f58e7f5eb71a329d2b8e9dd08a79e17cc4d0717d Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 7 Jan 2024 21:12:50 +0000 Subject: [PATCH 049/128] Fix automod cooldown logic (#442) * fix automod cooldowns Signed-off-by: GitHub * almeida fixes Signed-off-by: GitHub * https://shr2.i0.tf/82e683c8/bd310b9c-7492-44f0-aed5-af6a22a3c196.png Signed-off-by: GitHub --------- Signed-off-by: GitHub --- .../Automod/functions/applyCooldown.ts | 10 ++++++++ .../functions/checkAndUpdateCooldown.ts | 24 ------------------- .../Automod/functions/checkCooldown.ts | 8 +++++++ .../plugins/Automod/functions/runAutomod.ts | 7 ++++-- 4 files changed, 23 insertions(+), 26 deletions(-) create mode 100644 backend/src/plugins/Automod/functions/applyCooldown.ts delete mode 100644 backend/src/plugins/Automod/functions/checkAndUpdateCooldown.ts create mode 100644 backend/src/plugins/Automod/functions/checkCooldown.ts diff --git a/backend/src/plugins/Automod/functions/applyCooldown.ts b/backend/src/plugins/Automod/functions/applyCooldown.ts new file mode 100644 index 000000000..387ac448c --- /dev/null +++ b/backend/src/plugins/Automod/functions/applyCooldown.ts @@ -0,0 +1,10 @@ +import { GuildPluginData } from "knub"; +import { convertDelayStringToMS } from "../../../utils"; +import { AutomodContext, AutomodPluginType, TRule } from "../types"; + +export function applyCooldown(pluginData: GuildPluginData, rule: TRule, context: AutomodContext) { + const cooldownKey = `${rule.name}-${context.user?.id}`; + + const cooldownTime = convertDelayStringToMS(rule.cooldown, "s"); + if (cooldownTime) pluginData.state.cooldownManager.setCooldown(cooldownKey, cooldownTime); +} diff --git a/backend/src/plugins/Automod/functions/checkAndUpdateCooldown.ts b/backend/src/plugins/Automod/functions/checkAndUpdateCooldown.ts deleted file mode 100644 index 6338d6986..000000000 --- a/backend/src/plugins/Automod/functions/checkAndUpdateCooldown.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { GuildPluginData } from "knub"; -import { convertDelayStringToMS } from "../../../utils"; -import { AutomodContext, AutomodPluginType, TRule } from "../types"; - -export function checkAndUpdateCooldown( - pluginData: GuildPluginData, - rule: TRule, - context: AutomodContext, -) { - const cooldownKey = `${rule.name}-${context.user?.id}`; - - if (cooldownKey) { - if (pluginData.state.cooldownManager.isOnCooldown(cooldownKey)) { - return true; - } - - const cooldownTime = convertDelayStringToMS(rule.cooldown, "s"); - if (cooldownTime) { - pluginData.state.cooldownManager.setCooldown(cooldownKey, cooldownTime); - } - } - - return false; -} diff --git a/backend/src/plugins/Automod/functions/checkCooldown.ts b/backend/src/plugins/Automod/functions/checkCooldown.ts new file mode 100644 index 000000000..3640c142f --- /dev/null +++ b/backend/src/plugins/Automod/functions/checkCooldown.ts @@ -0,0 +1,8 @@ +import { GuildPluginData } from "knub"; +import { AutomodContext, AutomodPluginType, TRule } from "../types"; + +export function checkCooldown(pluginData: GuildPluginData, rule: TRule, context: AutomodContext) { + const cooldownKey = `${rule.name}-${context.user?.id}`; + + return pluginData.state.cooldownManager.isOnCooldown(cooldownKey); +} diff --git a/backend/src/plugins/Automod/functions/runAutomod.ts b/backend/src/plugins/Automod/functions/runAutomod.ts index e9c2e3a74..4ccc38dee 100644 --- a/backend/src/plugins/Automod/functions/runAutomod.ts +++ b/backend/src/plugins/Automod/functions/runAutomod.ts @@ -7,7 +7,8 @@ import { CleanAction } from "../actions/clean"; import { AutomodTriggerMatchResult } from "../helpers"; import { availableTriggers } from "../triggers/availableTriggers"; import { AutomodContext, AutomodPluginType } from "../types"; -import { checkAndUpdateCooldown } from "./checkAndUpdateCooldown"; +import { applyCooldown } from "./applyCooldown"; +import { checkCooldown } from "./checkCooldown"; export async function runAutomod(pluginData: GuildPluginData, context: AutomodContext) { const userId = context.user?.id || context.member?.id || context.message?.user_id; @@ -46,7 +47,7 @@ export async function runAutomod(pluginData: GuildPluginData, } if (!rule.affects_self && userId && userId === pluginData.client.user?.id) continue; - if (rule.cooldown && checkAndUpdateCooldown(pluginData, rule, context)) { + if (rule.cooldown && checkCooldown(pluginData, rule, context)) { continue; } @@ -84,6 +85,8 @@ export async function runAutomod(pluginData: GuildPluginData, } if (matchResult) { + if (rule.cooldown) applyCooldown(pluginData, rule, context); + contexts = [context, ...(matchResult.extraContexts || [])]; for (const _context of contexts) { From 47ad8fa4d3329e0009d1a369d40740a7e6ae503e Mon Sep 17 00:00:00 2001 From: Almeida Date: Mon, 8 Jan 2024 11:15:57 +0000 Subject: [PATCH 050/128] only call `disableInvites()` if value has changed (#443) --- backend/src/plugins/Automod/actions/pauseInvites.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/actions/pauseInvites.ts b/backend/src/plugins/Automod/actions/pauseInvites.ts index 1bbea34fa..262b69125 100644 --- a/backend/src/plugins/Automod/actions/pauseInvites.ts +++ b/backend/src/plugins/Automod/actions/pauseInvites.ts @@ -1,3 +1,4 @@ +import { GuildFeature } from "discord.js"; import * as t from "io-ts"; import { automodAction } from "../helpers"; @@ -9,6 +10,10 @@ export const PauseInvitesAction = automodAction({ defaultConfig: {}, async apply({ pluginData, actionConfig }) { - await pluginData.guild.disableInvites(actionConfig.paused); + const hasInvitesDisabled = pluginData.guild.features.includes(GuildFeature.InvitesDisabled); + + if (actionConfig.paused !== hasInvitesDisabled) { + await pluginData.guild.disableInvites(actionConfig.paused); + } }, }); From c07e4321a72cbb58a6d9e05dc07e0bb5d9dd3e68 Mon Sep 17 00:00:00 2001 From: Almeida Date: Mon, 8 Jan 2024 15:35:55 +0000 Subject: [PATCH 051/128] remove erlpack (#444) --- backend/package-lock.json | 24 ------------------------ backend/package.json | 1 - 2 files changed, 25 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index b1d6d1891..2949ed98b 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -17,7 +17,6 @@ "discord.js": "^14.11.0", "dotenv": "^4.0.0", "emoji-regex": "^8.0.0", - "erlpack": "github:discord/erlpack", "escape-string-regexp": "^1.0.5", "express": "^4.17.0", "fp-ts": "^2.0.1", @@ -1553,14 +1552,6 @@ "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==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/bit-twiddle": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bit-twiddle/-/bit-twiddle-1.0.2.tgz", @@ -3467,16 +3458,6 @@ "resolved": "https://registry.npmjs.org/env-string/-/env-string-1.0.1.tgz", "integrity": "sha512-/DhCJDf5DSFK32joQiWRpWrT0h7p3hVQfMKxiBb7Nt8C8IF8BYyPtclDnuGGLOoj16d/8udKeiE7JbkotDmorQ==" }, - "node_modules/erlpack": { - "version": "0.1.3", - "resolved": "git+ssh://git@github.com/discord/erlpack.git#cbe76be04c2210fc9cb6ff95910f0937c1011d04", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.15.0" - } - }, "node_modules/es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -3941,11 +3922,6 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, - "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==" - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", diff --git a/backend/package.json b/backend/package.json index 2ff53482a..cf120ca57 100644 --- a/backend/package.json +++ b/backend/package.json @@ -38,7 +38,6 @@ "discord.js": "^14.11.0", "dotenv": "^4.0.0", "emoji-regex": "^8.0.0", - "erlpack": "github:discord/erlpack", "escape-string-regexp": "^1.0.5", "express": "^4.17.0", "fp-ts": "^2.0.1", From 28692962bcd437659e05489f55a86fa5269e0681 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 14 Jan 2024 14:25:42 +0000 Subject: [PATCH 052/128] refactor: replace io-ts with zod --- backend/package-lock.json | 9 - backend/package.json | 1 - backend/src/commandTypes.ts | 2 +- backend/src/configValidator.ts | 16 +- backend/src/pluginUtils.ts | 48 +-- .../plugins/AutoDelete/AutoDeletePlugin.ts | 7 +- backend/src/plugins/AutoDelete/types.ts | 13 +- .../AutoReactions/AutoReactionsPlugin.ts | 7 +- backend/src/plugins/AutoReactions/types.ts | 9 +- backend/src/plugins/Automod/AutomodPlugin.ts | 132 +------- .../src/plugins/Automod/actions/addRoles.ts | 9 +- .../plugins/Automod/actions/addToCounter.ts | 15 +- backend/src/plugins/Automod/actions/alert.ts | 22 +- .../plugins/Automod/actions/archiveThread.ts | 7 +- .../Automod/actions/availableActions.ts | 26 +- backend/src/plugins/Automod/actions/ban.ts | 30 +- .../plugins/Automod/actions/changeNickname.ts | 14 +- .../plugins/Automod/actions/changePerms.ts | 22 +- backend/src/plugins/Automod/actions/clean.ts | 5 +- .../plugins/Automod/actions/exampleAction.ts | 9 +- backend/src/plugins/Automod/actions/kick.ts | 22 +- backend/src/plugins/Automod/actions/log.ts | 5 +- backend/src/plugins/Automod/actions/mute.ts | 28 +- .../plugins/Automod/actions/removeRoles.ts | 8 +- backend/src/plugins/Automod/actions/reply.ts | 22 +- .../Automod/actions/setAntiraidLevel.ts | 6 +- .../src/plugins/Automod/actions/setCounter.ts | 11 +- .../plugins/Automod/actions/setSlowmode.ts | 14 +- .../plugins/Automod/actions/startThread.ts | 20 +- backend/src/plugins/Automod/actions/warn.ts | 22 +- .../functions/createMessageSpamTrigger.ts | 19 +- backend/src/plugins/Automod/helpers.ts | 38 +-- backend/src/plugins/Automod/info.ts | 4 +- .../plugins/Automod/triggers/antiraidLevel.ts | 13 +- .../plugins/Automod/triggers/anyMessage.ts | 8 +- .../Automod/triggers/availableTriggers.ts | 45 +-- backend/src/plugins/Automod/triggers/ban.ts | 17 +- .../Automod/triggers/counterTrigger.ts | 17 +- .../Automod/triggers/exampleTrigger.ts | 14 +- backend/src/plugins/Automod/triggers/kick.ts | 17 +- .../Automod/triggers/matchAttachmentType.ts | 39 ++- .../plugins/Automod/triggers/matchInvites.ts | 42 +-- .../plugins/Automod/triggers/matchLinks.ts | 60 ++-- .../plugins/Automod/triggers/matchMimeType.ts | 39 ++- .../plugins/Automod/triggers/matchRegex.ts | 42 +-- .../plugins/Automod/triggers/matchWords.ts | 49 ++- .../plugins/Automod/triggers/memberJoin.ts | 19 +- .../Automod/triggers/memberJoinSpam.ts | 16 +- .../plugins/Automod/triggers/memberLeave.ts | 8 +- backend/src/plugins/Automod/triggers/mute.ts | 17 +- backend/src/plugins/Automod/triggers/note.ts | 7 +- .../src/plugins/Automod/triggers/roleAdded.ts | 13 +- .../plugins/Automod/triggers/roleRemoved.ts | 13 +- .../plugins/Automod/triggers/threadArchive.ts | 13 +- .../plugins/Automod/triggers/threadCreate.ts | 7 +- .../Automod/triggers/threadCreateSpam.ts | 16 +- .../plugins/Automod/triggers/threadDelete.ts | 7 +- .../Automod/triggers/threadUnarchive.ts | 13 +- backend/src/plugins/Automod/triggers/unban.ts | 7 +- .../src/plugins/Automod/triggers/unmute.ts | 7 +- backend/src/plugins/Automod/triggers/warn.ts | 17 +- backend/src/plugins/Automod/types.ts | 88 +++-- .../plugins/BotControl/BotControlPlugin.ts | 6 +- backend/src/plugins/BotControl/types.ts | 21 +- backend/src/plugins/Cases/CasesPlugin.ts | 8 +- backend/src/plugins/Cases/types.ts | 26 +- backend/src/plugins/Censor/CensorPlugin.ts | 7 +- backend/src/plugins/Censor/types.ts | 36 +-- .../ChannelArchiver/ChannelArchiverPlugin.ts | 7 +- .../CompanionChannelsPlugin.ts | 7 +- .../src/plugins/CompanionChannels/types.ts | 29 +- .../plugins/ContextMenus/ContextMenuPlugin.ts | 5 +- .../src/plugins/ContextMenus/actions/mute.ts | 4 +- backend/src/plugins/ContextMenus/types.ts | 24 +- .../src/plugins/Counters/CountersPlugin.ts | 64 +--- .../getPrettyNameForCounterTrigger.ts | 4 +- backend/src/plugins/Counters/types.ts | 119 +++++-- .../CustomEvents/CustomEventsPlugin.ts | 5 +- .../CustomEvents/actions/addRoleAction.ts | 14 +- .../CustomEvents/actions/createCaseAction.ts | 19 +- .../actions/makeRoleMentionableAction.ts | 14 +- .../actions/makeRoleUnmentionableAction.ts | 11 +- .../CustomEvents/actions/messageAction.ts | 13 +- .../actions/moveToVoiceChannelAction.ts | 14 +- .../actions/setChannelPermissionOverrides.ts | 25 +- backend/src/plugins/CustomEvents/types.ts | 67 ++-- .../GuildAccessMonitorPlugin.ts | 5 +- .../GuildConfigReloaderPlugin.ts | 5 +- .../GuildInfoSaver/GuildInfoSaverPlugin.ts | 5 +- .../GuildMemberCachePlugin.ts | 6 +- .../InternalPoster/InternalPosterPlugin.ts | 7 +- backend/src/plugins/InternalPoster/types.ts | 6 - .../plugins/LocateUser/LocateUserPlugin.ts | 7 +- backend/src/plugins/LocateUser/types.ts | 11 +- backend/src/plugins/Logs/LogsPlugin.ts | 18 +- .../Logs/logFunctions/logMessageDelete.ts | 2 +- backend/src/plugins/Logs/types.ts | 90 +++--- .../MessageSaver/MessageSaverPlugin.ts | 5 +- backend/src/plugins/MessageSaver/types.ts | 9 +- .../plugins/ModActions/ModActionsPlugin.ts | 8 +- backend/src/plugins/ModActions/types.ts | 73 +++-- backend/src/plugins/Mutes/MutesPlugin.ts | 8 +- backend/src/plugins/Mutes/types.ts | 39 ++- .../plugins/NameHistory/NameHistoryPlugin.ts | 5 +- backend/src/plugins/NameHistory/types.ts | 9 +- backend/src/plugins/Persist/PersistPlugin.ts | 7 +- backend/src/plugins/Persist/types.ts | 14 +- .../plugins/Phisherman/PhishermanPlugin.ts | 6 +- backend/src/plugins/Phisherman/info.ts | 4 +- backend/src/plugins/Phisherman/types.ts | 10 +- .../PingableRoles/PingableRolesPlugin.ts | 7 +- backend/src/plugins/PingableRoles/types.ts | 9 +- backend/src/plugins/Post/PostPlugin.ts | 7 +- backend/src/plugins/Post/types.ts | 9 +- .../ReactionRoles/ReactionRolesPlugin.ts | 7 +- backend/src/plugins/ReactionRoles/types.ts | 24 +- .../src/plugins/Reminders/RemindersPlugin.ts | 7 +- backend/src/plugins/Reminders/types.ts | 9 +- .../plugins/RoleButtons/RoleButtonsPlugin.ts | 41 +-- backend/src/plugins/RoleButtons/info.ts | 4 +- backend/src/plugins/RoleButtons/types.ts | 126 +++++--- .../plugins/RoleManager/RoleManagerPlugin.ts | 6 +- backend/src/plugins/RoleManager/types.ts | 7 +- backend/src/plugins/Roles/RolesPlugin.ts | 9 +- backend/src/plugins/Roles/types.ts | 13 +- .../SelfGrantableRolesPlugin.ts | 22 +- .../src/plugins/SelfGrantableRoles/types.ts | 38 ++- .../src/plugins/Slowmode/SlowmodePlugin.ts | 7 +- backend/src/plugins/Slowmode/types.ts | 15 +- backend/src/plugins/Spam/SpamPlugin.ts | 7 +- backend/src/plugins/Spam/types.ts | 53 +-- .../src/plugins/Starboard/StarboardPlugin.ts | 16 +- backend/src/plugins/Starboard/types.ts | 50 ++- .../Starboard/util/preprocessStaticConfig.ts | 12 - backend/src/plugins/Tags/TagsPlugin.ts | 28 +- backend/src/plugins/Tags/types.ts | 77 +++-- .../src/plugins/Tags/util/findTagByName.ts | 5 +- .../src/plugins/Tags/util/onMessageCreate.ts | 9 +- .../plugins/TimeAndDate/TimeAndDatePlugin.ts | 8 +- backend/src/plugins/TimeAndDate/types.ts | 20 +- .../UsernameSaver/UsernameSaverPlugin.ts | 6 +- backend/src/plugins/UsernameSaver/types.ts | 4 + backend/src/plugins/Utility/UtilityPlugin.ts | 8 +- backend/src/plugins/Utility/search.ts | 3 +- backend/src/plugins/Utility/types.ts | 61 ++-- .../WelcomeMessage/WelcomeMessagePlugin.ts | 7 +- backend/src/plugins/WelcomeMessage/types.ts | 14 +- .../src/plugins/ZeppelinPluginBlueprint.ts | 4 +- backend/src/types.ts | 31 +- backend/src/utils.test.ts | 6 +- backend/src/utils.ts | 302 ++++++------------ backend/src/utils/iotsUtils.ts | 17 - backend/src/utils/tColor.ts | 16 - backend/src/utils/tValidTimezone.ts | 13 - backend/src/utils/typeUtils.ts | 8 + backend/src/utils/zColor.ts | 15 + backend/src/utils/zValidTimezone.ts | 8 + backend/src/validation.test.ts | 40 --- backend/src/validatorUtils.ts | 140 -------- package-lock.json | 7 + package.json | 1 + 161 files changed, 1454 insertions(+), 2109 deletions(-) delete mode 100644 backend/src/plugins/Starboard/util/preprocessStaticConfig.ts delete mode 100644 backend/src/utils/iotsUtils.ts delete mode 100644 backend/src/utils/tColor.ts delete mode 100644 backend/src/utils/tValidTimezone.ts create mode 100644 backend/src/utils/zColor.ts create mode 100644 backend/src/utils/zValidTimezone.ts delete mode 100644 backend/src/validation.test.ts delete mode 100644 backend/src/validatorUtils.ts diff --git a/backend/package-lock.json b/backend/package-lock.json index b1d6d1891..1f2f5992e 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -22,7 +22,6 @@ "express": "^4.17.0", "fp-ts": "^2.0.1", "humanize-duration": "^3.15.0", - "io-ts": "^2.0.0", "js-yaml": "^3.13.1", "knub": "^32.0.0-next.16", "knub-command-manager": "^9.1.0", @@ -4975,14 +4974,6 @@ "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==" }, - "node_modules/io-ts": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.20.tgz", - "integrity": "sha512-Rq2BsYmtwS5vVttie4rqrOCIfHCS9TgpRLFpKQCM1wZBBRY9nWVGmEvm2FnDbSE2un1UE39DvFpTR5UL47YDcA==", - "peerDependencies": { - "fp-ts": "^2.5.0" - } - }, "node_modules/iota-array": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", diff --git a/backend/package.json b/backend/package.json index 2ff53482a..fbbe2ddcb 100644 --- a/backend/package.json +++ b/backend/package.json @@ -43,7 +43,6 @@ "express": "^4.17.0", "fp-ts": "^2.0.1", "humanize-duration": "^3.15.0", - "io-ts": "^2.0.0", "js-yaml": "^3.13.1", "knub": "^32.0.0-next.16", "knub-command-manager": "^9.1.0", diff --git a/backend/src/commandTypes.ts b/backend/src/commandTypes.ts index 47ad04055..9ace53128 100644 --- a/backend/src/commandTypes.ts +++ b/backend/src/commandTypes.ts @@ -17,6 +17,7 @@ import { createTypeHelper } from "knub-command-manager"; import { channelMentionRegex, convertDelayStringToMS, + inputPatternToRegExp, isValidSnowflake, resolveMember, resolveUser, @@ -26,7 +27,6 @@ import { } from "./utils"; import { isValidTimezone } from "./utils/isValidTimezone"; import { MessageTarget, resolveMessageTarget } from "./utils/resolveMessageTarget"; -import { inputPatternToRegExp } from "./validatorUtils"; export const commandTypes = { ...messageCommandBaseTypeConverters, diff --git a/backend/src/configValidator.ts b/backend/src/configValidator.ts index 3bb602a45..96e08ba3c 100644 --- a/backend/src/configValidator.ts +++ b/backend/src/configValidator.ts @@ -1,9 +1,9 @@ -import { ConfigValidationError, PluginConfigManager } from "knub"; +import { PluginConfigManager } from "knub"; import moment from "moment-timezone"; +import { ZodError } from "zod"; import { ZeppelinPlugin } from "./plugins/ZeppelinPlugin"; import { guildPlugins } from "./plugins/availablePlugins"; -import { PartialZeppelinGuildConfigSchema, ZeppelinGuildConfig } from "./types"; -import { StrictValidationError, decodeAndValidateStrict } from "./validatorUtils"; +import { ZeppelinGuildConfig, zZeppelinGuildConfig } from "./types"; const pluginNameToPlugin = new Map(); for (const plugin of guildPlugins) { @@ -11,8 +11,10 @@ for (const plugin of guildPlugins) { } export async function validateGuildConfig(config: any): Promise { - const validationResult = decodeAndValidateStrict(PartialZeppelinGuildConfigSchema, config); - if (validationResult instanceof StrictValidationError) return validationResult.getErrors(); + const validationResult = zZeppelinGuildConfig.safeParse(config); + if (!validationResult.success) { + return validationResult.error.issues.join("\n"); + } const guildConfig = config as ZeppelinGuildConfig; @@ -41,8 +43,8 @@ export async function validateGuildConfig(config: any): Promise { try { await configManager.init(); } catch (err) { - if (err instanceof ConfigValidationError || err instanceof StrictValidationError) { - return `${pluginName}: ${err.message}`; + if (err instanceof ZodError) { + return `${pluginName}: ${err.issues.join("\n")}`; } throw err; diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts index 8e6c6da2c..a2f744d93 100644 --- a/backend/src/pluginUtils.ts +++ b/backend/src/pluginUtils.ts @@ -10,22 +10,18 @@ import { PermissionsBitField, TextBasedChannel, } from "discord.js"; -import * as t from "io-ts"; import { AnyPluginData, CommandContext, - ConfigValidationError, ExtendedMatchParams, GuildPluginData, - PluginOverrideCriteria, - helpers, + helpers } from "knub"; import { logger } from "./logger"; import { isStaff } from "./staff"; import { TZeppelinKnub } from "./types"; -import { errorMessage, successMessage, tNullable } from "./utils"; +import { errorMessage, successMessage } from "./utils"; import { Tail } from "./utils/typeUtils"; -import { StrictValidationError, parseIoTsSchema } from "./validatorUtils"; const { getMemberLevel } = helpers; @@ -59,46 +55,6 @@ export async function hasPermission( return helpers.hasPermission(config, permission); } -const PluginOverrideCriteriaType: t.Type> = t.recursion( - "PluginOverrideCriteriaType", - () => - t.partial({ - channel: tNullable(t.union([t.string, t.array(t.string)])), - category: tNullable(t.union([t.string, t.array(t.string)])), - level: tNullable(t.union([t.string, t.array(t.string)])), - user: tNullable(t.union([t.string, t.array(t.string)])), - role: tNullable(t.union([t.string, t.array(t.string)])), - - all: tNullable(t.array(PluginOverrideCriteriaType)), - any: tNullable(t.array(PluginOverrideCriteriaType)), - not: tNullable(PluginOverrideCriteriaType), - - extra: t.unknown, - }), -); - -export function strictValidationErrorToConfigValidationError(err: StrictValidationError) { - return new ConfigValidationError( - err - .getErrors() - .map((e) => e.toString()) - .join("\n"), - ); -} - -export function makeIoTsConfigParser>(schema: Schema): (input: unknown) => t.TypeOf { - return (input: unknown) => { - try { - return parseIoTsSchema(schema, input); - } catch (err) { - if (err instanceof StrictValidationError) { - throw strictValidationErrorToConfigValidationError(err); - } - throw err; - } - }; -} - export async function sendSuccessMessage( pluginData: AnyPluginData, channel: TextBasedChannel, diff --git a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts index 0a8e0438f..d12735779 100644 --- a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts +++ b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts @@ -1,11 +1,10 @@ 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"; -import { AutoDeletePluginType, ConfigSchema } from "./types"; +import { AutoDeletePluginType, zAutoDeleteConfig } from "./types"; import { onMessageCreate } from "./util/onMessageCreate"; import { onMessageDelete } from "./util/onMessageDelete"; import { onMessageDeleteBulk } from "./util/onMessageDeleteBulk"; @@ -24,11 +23,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, + configSchema: zAutoDeleteConfig, }, dependencies: () => [TimeAndDatePlugin, LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zAutoDeleteConfig.parse(input), defaultOptions, beforeLoad(pluginData) { diff --git a/backend/src/plugins/AutoDelete/types.ts b/backend/src/plugins/AutoDelete/types.ts index 24389860f..691004380 100644 --- a/backend/src/plugins/AutoDelete/types.ts +++ b/backend/src/plugins/AutoDelete/types.ts @@ -1,10 +1,10 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { SavedMessage } from "../../data/entities/SavedMessage"; -import { MINUTES, tDelayString } from "../../utils"; +import { MINUTES, zDelayString } from "../../utils"; import Timeout = NodeJS.Timeout; +import z from "zod"; export const MAX_DELAY = 5 * MINUTES; @@ -13,14 +13,13 @@ export interface IDeletionQueueItem { message: SavedMessage; } -export const ConfigSchema = t.type({ - enabled: t.boolean, - delay: tDelayString, +export const zAutoDeleteConfig = z.strictObject({ + enabled: z.boolean(), + delay: zDelayString, }); -export type TConfigSchema = t.TypeOf; export interface AutoDeletePluginType extends BasePluginType { - config: TConfigSchema; + config: z.output; state: { guildSavedMessages: GuildSavedMessages; guildLogs: GuildLogs; diff --git a/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts b/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts index 8ec1ecd78..9b01d5384 100644 --- a/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts +++ b/backend/src/plugins/AutoReactions/AutoReactionsPlugin.ts @@ -1,14 +1,13 @@ 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"; import { DisableAutoReactionsCmd } from "./commands/DisableAutoReactionsCmd"; import { NewAutoReactionsCmd } from "./commands/NewAutoReactionsCmd"; import { AddReactionsEvt } from "./events/AddReactionsEvt"; -import { AutoReactionsPluginType, ConfigSchema } from "./types"; +import { AutoReactionsPluginType, zAutoReactionsConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -32,7 +31,7 @@ export const AutoReactionsPlugin = zeppelinGuildPlugin( description: trimPluginDescription(` Allows setting up automatic reactions to all new messages on a channel `), - configSchema: ConfigSchema, + configSchema: zAutoReactionsConfig, }, // prettier-ignore @@ -40,7 +39,7 @@ export const AutoReactionsPlugin = zeppelinGuildPlugin( LogsPlugin, ], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zAutoReactionsConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/AutoReactions/types.ts b/backend/src/plugins/AutoReactions/types.ts index a02c3c263..996fba8d2 100644 --- a/backend/src/plugins/AutoReactions/types.ts +++ b/backend/src/plugins/AutoReactions/types.ts @@ -1,17 +1,16 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; 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, +export const zAutoReactionsConfig = z.strictObject({ + can_manage: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface AutoReactionsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.output; state: { logs: GuildLogs; savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts index ff4f01fda..9634c25db 100644 --- a/backend/src/plugins/Automod/AutomodPlugin.ts +++ b/backend/src/plugins/Automod/AutomodPlugin.ts @@ -1,4 +1,4 @@ -import { configUtils, CooldownManager } from "knub"; +import { CooldownManager } from "knub"; import { GuildAntiraidLevels } from "../../data/GuildAntiraidLevels"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; @@ -8,7 +8,6 @@ import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners"; import { MINUTES, SECONDS } from "../../utils"; import { registerEventListenersFromMap } from "../../utils/registerEventListenersFromMap"; import { unregisterEventListenersFromMap } from "../../utils/unregisterEventListenersFromMap"; -import { parseIoTsSchema, StrictValidationError } from "../../validatorUtils"; import { CountersPlugin } from "../Counters/CountersPlugin"; import { InternalPosterPlugin } from "../InternalPoster/InternalPosterPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; @@ -17,7 +16,6 @@ import { MutesPlugin } from "../Mutes/MutesPlugin"; import { PhishermanPlugin } from "../Phisherman/PhishermanPlugin"; import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; -import { availableActions } from "./actions/availableActions"; import { AntiraidClearCmd } from "./commands/AntiraidClearCmd"; import { SetAntiraidCmd } from "./commands/SetAntiraidCmd"; import { ViewAntiraidCmd } from "./commands/ViewAntiraidCmd"; @@ -35,8 +33,7 @@ import { clearOldRecentNicknameChanges } from "./functions/clearOldNicknameChang import { clearOldRecentActions } from "./functions/clearOldRecentActions"; import { clearOldRecentSpam } from "./functions/clearOldRecentSpam"; import { pluginInfo } from "./info"; -import { availableTriggers } from "./triggers/availableTriggers"; -import { AutomodPluginType, ConfigSchema } from "./types"; +import { AutomodPluginType, zAutomodConfig } from "./types"; const defaultOptions = { config: { @@ -61,129 +58,6 @@ const defaultOptions = { ], }; -/** - * Config preprocessor to set default values for triggers and perform extra validation - * TODO: Separate input and output types - */ -const configParser = (input: unknown) => { - const rules = (input as any).rules; - if (rules) { - // Loop through each rule - for (const [name, rule] of Object.entries(rules)) { - if (rule == null) { - delete rules[name]; - continue; - } - - rule["name"] = name; - - // If the rule doesn't have an explicitly set "enabled" property, set it to true - if (rule["enabled"] == null) { - rule["enabled"] = true; - } - - if (rule["allow_further_rules"] == null) { - rule["allow_further_rules"] = false; - } - - if (rule["affects_bots"] == null) { - rule["affects_bots"] = false; - } - - if (rule["affects_self"] == null) { - rule["affects_self"] = false; - } - - // Loop through the rule's triggers - if (rule["triggers"]) { - for (const triggerObj of rule["triggers"]) { - for (const triggerName in triggerObj) { - if (!availableTriggers[triggerName]) { - throw new StrictValidationError([`Unknown trigger '${triggerName}' in rule '${rule["name"]}'`]); - } - - const triggerBlueprint = availableTriggers[triggerName]; - - if (typeof triggerBlueprint.defaultConfig === "object" && triggerBlueprint.defaultConfig != null) { - triggerObj[triggerName] = configUtils.mergeConfig( - triggerBlueprint.defaultConfig, - triggerObj[triggerName] || {}, - ); - } else { - triggerObj[triggerName] = triggerObj[triggerName] || triggerBlueprint.defaultConfig; - } - - if (triggerObj[triggerName].match_attachment_type) { - const white = triggerObj[triggerName].match_attachment_type.whitelist_enabled; - const black = triggerObj[triggerName].match_attachment_type.blacklist_enabled; - - if (white && black) { - throw new StrictValidationError([ - `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>`, - ]); - } - } - - if (triggerObj[triggerName].match_mime_type) { - const white = triggerObj[triggerName].match_mime_type.whitelist_enabled; - const black = triggerObj[triggerName].match_mime_type.blacklist_enabled; - - if (white && black) { - throw new StrictValidationError([ - `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>`, - ]); - } - } - } - } - } - - if (rule["actions"]) { - for (const actionName in rule["actions"]) { - if (!availableActions[actionName]) { - throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule["name"]}'`]); - } - - const actionBlueprint = availableActions[actionName]; - const actionConfig = rule["actions"][actionName]; - - if (typeof actionConfig !== "object" || Array.isArray(actionConfig) || actionConfig == null) { - rule["actions"][actionName] = actionConfig; - } else { - rule["actions"][actionName] = configUtils.mergeConfig(actionBlueprint.defaultConfig, actionConfig); - } - } - } - - // Enable logging of automod actions by default - if (rule["actions"]) { - for (const actionName in rule["actions"]) { - if (!availableActions[actionName]) { - throw new StrictValidationError([`Unknown action '${actionName}' in rule '${rule["name"]}'`]); - } - } - - if (rule["actions"]["log"] == null) { - 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"]}'`]); - } - } - } - } - - return parseIoTsSchema(ConfigSchema, input); -}; - export const AutomodPlugin = zeppelinGuildPlugin()({ name: "automod", showInDocs: true, @@ -201,7 +75,7 @@ export const AutomodPlugin = zeppelinGuildPlugin()({ ], defaultOptions, - configParser, + configParser: (input) => zAutomodConfig.parse(input), customOverrideCriteriaFunctions: { antiraid_level: (pluginData, matchParams, value) => { diff --git a/backend/src/plugins/Automod/actions/addRoles.ts b/backend/src/plugins/Automod/actions/addRoles.ts index 53b00005a..892947280 100644 --- a/backend/src/plugins/Automod/actions/addRoles.ts +++ b/backend/src/plugins/Automod/actions/addRoles.ts @@ -1,6 +1,6 @@ import { PermissionFlagsBits, Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { nonNullish, unique } from "../../../utils"; +import z from "zod"; +import { nonNullish, unique, zSnowflake } from "../../../utils"; import { canAssignRole } from "../../../utils/canAssignRole"; import { getMissingPermissions } from "../../../utils/getMissingPermissions"; import { missingPermissionError } from "../../../utils/missingPermissionError"; @@ -11,9 +11,10 @@ import { automodAction } from "../helpers"; const p = PermissionFlagsBits; +const configSchema = z.array(zSnowflake); + export const AddRolesAction = automodAction({ - configType: t.array(t.string), - defaultConfig: [], + configSchema, async apply({ pluginData, contexts, actionConfig, ruleName }) { const members = unique(contexts.map((c) => c.member).filter(nonNullish)); diff --git a/backend/src/plugins/Automod/actions/addToCounter.ts b/backend/src/plugins/Automod/actions/addToCounter.ts index c3a72dae6..30ffe8faf 100644 --- a/backend/src/plugins/Automod/actions/addToCounter.ts +++ b/backend/src/plugins/Automod/actions/addToCounter.ts @@ -1,15 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; +import { zBoundedCharacters } from "../../../utils"; import { CountersPlugin } from "../../Counters/CountersPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; -export const AddToCounterAction = automodAction({ - configType: t.type({ - counter: t.string, - amount: t.number, - }), +const configSchema = z.object({ + counter: zBoundedCharacters(0, 100), + amount: z.number(), +}); - defaultConfig: {}, +export const AddToCounterAction = automodAction({ + configSchema, async apply({ pluginData, contexts, actionConfig, ruleName }) { const countersPlugin = pluginData.getPlugin(CountersPlugin); diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts index eb6f33483..1a767a0e5 100644 --- a/backend/src/plugins/Automod/actions/alert.ts +++ b/backend/src/plugins/Automod/actions/alert.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions"; +import z from "zod"; import { LogType } from "../../../data/LogType"; import { createTypedTemplateSafeValueContainer, @@ -12,10 +12,12 @@ import { chunkMessageLines, isTruthy, messageLink, - tAllowedMentions, - tNormalizedNullOptional, validateAndParseMessageContent, verboseChannelMention, + zAllowedMentions, + zBoundedCharacters, + zNullishToUndefined, + zSnowflake } from "../../../utils"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; @@ -23,14 +25,14 @@ import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin" import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; -export const AlertAction = automodAction({ - configType: t.type({ - channel: t.string, - text: t.string, - allowed_mentions: tNormalizedNullOptional(tAllowedMentions), - }), +const configSchema = z.object({ + channel: zSnowflake, + text: zBoundedCharacters(1, 4000), + allowed_mentions: zNullishToUndefined(zAllowedMentions.nullable().default(null)), +}); - defaultConfig: {}, +export const AlertAction = automodAction({ + configSchema, async apply({ pluginData, contexts, actionConfig, ruleName, matchResult }) { const channel = pluginData.guild.channels.cache.get(actionConfig.channel as Snowflake); diff --git a/backend/src/plugins/Automod/actions/archiveThread.ts b/backend/src/plugins/Automod/actions/archiveThread.ts index d94afdf7a..e73cb3dde 100644 --- a/backend/src/plugins/Automod/actions/archiveThread.ts +++ b/backend/src/plugins/Automod/actions/archiveThread.ts @@ -1,11 +1,12 @@ import { AnyThreadChannel } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { noop } from "../../../utils"; import { automodAction } from "../helpers"; +const configSchema = z.strictObject({}); + export const ArchiveThreadAction = automodAction({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async apply({ pluginData, contexts }) { const threads = contexts diff --git a/backend/src/plugins/Automod/actions/availableActions.ts b/backend/src/plugins/Automod/actions/availableActions.ts index 3f253bc05..dd148ca7a 100644 --- a/backend/src/plugins/Automod/actions/availableActions.ts +++ b/backend/src/plugins/Automod/actions/availableActions.ts @@ -1,4 +1,3 @@ -import * as t from "io-ts"; import { AutomodActionBlueprint } from "../helpers"; import { AddRolesAction } from "./addRoles"; import { AddToCounterAction } from "./addToCounter"; @@ -19,7 +18,7 @@ import { SetSlowmodeAction } from "./setSlowmode"; import { StartThreadAction } from "./startThread"; import { WarnAction } from "./warn"; -export const availableActions: Record> = { +export const availableActions = { clean: CleanAction, warn: WarnAction, mute: MuteAction, @@ -38,25 +37,4 @@ export const availableActions: Record> = { start_thread: StartThreadAction, archive_thread: ArchiveThreadAction, change_perms: ChangePermsAction, -}; - -export const AvailableActions = t.type({ - clean: CleanAction.configType, - warn: WarnAction.configType, - mute: MuteAction.configType, - kick: KickAction.configType, - ban: BanAction.configType, - alert: AlertAction.configType, - change_nickname: ChangeNicknameAction.configType, - log: LogAction.configType, - add_roles: AddRolesAction.configType, - remove_roles: RemoveRolesAction.configType, - set_antiraid_level: SetAntiraidLevelAction.configType, - reply: ReplyAction.configType, - add_to_counter: AddToCounterAction.configType, - set_counter: SetCounterAction.configType, - set_slowmode: SetSlowmodeAction.configType, - start_thread: StartThreadAction.configType, - archive_thread: ArchiveThreadAction.configType, - change_perms: ChangePermsAction.configType, -}); +} satisfies Record>; diff --git a/backend/src/plugins/Automod/actions/ban.ts b/backend/src/plugins/Automod/actions/ban.ts index 9cd0fd863..dcc9563f2 100644 --- a/backend/src/plugins/Automod/actions/ban.ts +++ b/backend/src/plugins/Automod/actions/ban.ts @@ -1,25 +1,23 @@ -import * as t from "io-ts"; -import { convertDelayStringToMS, nonNullish, tDelayString, tNullable, unique } from "../../../utils"; +import z from "zod"; +import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; +import { zNotify } from "../types"; -export const BanAction = automodAction({ - configType: t.type({ - reason: tNullable(t.string), - duration: tNullable(tDelayString), - notify: tNullable(t.string), - notifyChannel: tNullable(t.string), - deleteMessageDays: tNullable(t.number), - postInCaseLog: tNullable(t.boolean), - hide_case: tNullable(t.boolean), - }), +const configSchema = z.strictObject({ + reason: zBoundedCharacters(0, 4000).nullable().default(null), + duration: zDelayString.nullable().default(null), + notify: zNotify.nullable().default(null), + notifyChannel: zSnowflake.nullable().default(null), + deleteMessageDays: z.number().nullable().default(null), + postInCaseLog: z.boolean().nullable().default(null), + hide_case: z.boolean().nullable().default(false), +}); - defaultConfig: { - notify: null, // Use defaults from ModActions - hide_case: false, - }, +export const BanAction = automodAction({ + configSchema, async apply({ pluginData, contexts, actionConfig, matchResult }) { const reason = actionConfig.reason || "Kicked automatically"; diff --git a/backend/src/plugins/Automod/actions/changeNickname.ts b/backend/src/plugins/Automod/actions/changeNickname.ts index d63a3b60f..ce7c610ef 100644 --- a/backend/src/plugins/Automod/actions/changeNickname.ts +++ b/backend/src/plugins/Automod/actions/changeNickname.ts @@ -1,18 +1,16 @@ -import * as t from "io-ts"; -import { nonNullish, unique } from "../../../utils"; +import z from "zod"; +import { nonNullish, unique, zBoundedCharacters } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; export const ChangeNicknameAction = automodAction({ - configType: t.union([ - t.string, - t.type({ - name: t.string, + configSchema: z.union([ + zBoundedCharacters(0, 32), + z.strictObject({ + name: zBoundedCharacters(0, 32), }), ]), - defaultConfig: {}, - async apply({ pluginData, contexts, actionConfig }) { const members = unique(contexts.map((c) => c.member).filter(nonNullish)); diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 1eaa6dd5b..b5bc96867 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -1,7 +1,8 @@ import { PermissionsBitField, PermissionsString } from "discord.js"; -import * as t from "io-ts"; +import { U } from "ts-toolbelt"; +import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; -import { isValidSnowflake, noop, tNullable, tPartialDictionary } from "../../../utils"; +import { isValidSnowflake, keys, noop, zSnowflake } from "../../../utils"; import { guildToTemplateSafeGuild, savedMessageToTemplateSafeSavedMessage, @@ -59,16 +60,19 @@ const realToLegacyMap = Object.entries(legacyPermMap).reduce((map, pair) => { return map; }, {}) as Record; +const permissionNames = keys(PermissionsBitField.Flags) as U.ListOf; +const legacyPermissionNames = keys(legacyPermMap) as U.ListOf; +const allPermissionNames = [...permissionNames, ...legacyPermissionNames] as const; + export const ChangePermsAction = automodAction({ - configType: t.type({ - target: t.string, - channel: tNullable(t.string), - perms: tPartialDictionary( - t.union([t.keyof(PermissionsBitField.Flags), t.keyof(legacyPermMap)]), - tNullable(t.boolean), + configSchema: z.strictObject({ + target: zSnowflake, + channel: zSnowflake.nullable().default(null), + perms: z.record( + z.enum(allPermissionNames), + z.boolean().nullable(), ), }), - defaultConfig: {}, async apply({ pluginData, contexts, actionConfig }) { const user = contexts.find((c) => c.user)?.user; diff --git a/backend/src/plugins/Automod/actions/clean.ts b/backend/src/plugins/Automod/actions/clean.ts index 91bf37acf..5c66d370f 100644 --- a/backend/src/plugins/Automod/actions/clean.ts +++ b/backend/src/plugins/Automod/actions/clean.ts @@ -1,12 +1,11 @@ import { GuildTextBasedChannel, Snowflake } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { LogType } from "../../../data/LogType"; import { noop } from "../../../utils"; import { automodAction } from "../helpers"; export const CleanAction = automodAction({ - configType: t.boolean, - defaultConfig: false, + configSchema: z.boolean().default(false), async apply({ pluginData, contexts, ruleName }) { const messageIdsToDeleteByChannelId: Map = new Map(); diff --git a/backend/src/plugins/Automod/actions/exampleAction.ts b/backend/src/plugins/Automod/actions/exampleAction.ts index 05bea0de6..a43fc6768 100644 --- a/backend/src/plugins/Automod/actions/exampleAction.ts +++ b/backend/src/plugins/Automod/actions/exampleAction.ts @@ -1,13 +1,12 @@ -import * as t from "io-ts"; +import z from "zod"; +import { zBoundedCharacters } from "../../../utils"; import { automodAction } from "../helpers"; export const ExampleAction = automodAction({ - configType: t.type({ - someValue: t.string, + configSchema: z.strictObject({ + someValue: zBoundedCharacters(0, 1000), }), - defaultConfig: {}, - // eslint-disable-next-line @typescript-eslint/no-unused-vars async apply({ pluginData, contexts, actionConfig }) { // TODO: Everything diff --git a/backend/src/plugins/Automod/actions/kick.ts b/backend/src/plugins/Automod/actions/kick.ts index 9e6a792d6..5afba467a 100644 --- a/backend/src/plugins/Automod/actions/kick.ts +++ b/backend/src/plugins/Automod/actions/kick.ts @@ -1,24 +1,20 @@ -import * as t from "io-ts"; -import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils"; +import z from "zod"; +import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; +import { zNotify } from "../types"; export const KickAction = automodAction({ - configType: t.type({ - reason: tNullable(t.string), - notify: tNullable(t.string), - notifyChannel: tNullable(t.string), - postInCaseLog: tNullable(t.boolean), - hide_case: tNullable(t.boolean), + configSchema: z.strictObject({ + reason: zBoundedCharacters(0, 4000).nullable().default(null), + notify: zNotify.nullable().default(null), + notifyChannel: zSnowflake.nullable().default(null), + postInCaseLog: z.boolean().nullable().default(null), + hide_case: z.boolean().nullable().default(false), }), - defaultConfig: { - notify: null, // Use defaults from ModActions - hide_case: false, - }, - async apply({ pluginData, contexts, actionConfig, matchResult }) { const reason = actionConfig.reason || "Kicked automatically"; const contactMethods = actionConfig.notify ? resolveActionContactMethods(pluginData, actionConfig) : undefined; diff --git a/backend/src/plugins/Automod/actions/log.ts b/backend/src/plugins/Automod/actions/log.ts index 82075a2ec..dace25f12 100644 --- a/backend/src/plugins/Automod/actions/log.ts +++ b/backend/src/plugins/Automod/actions/log.ts @@ -1,11 +1,10 @@ -import * as t from "io-ts"; +import z from "zod"; import { isTruthy, unique } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; export const LogAction = automodAction({ - configType: t.boolean, - defaultConfig: true, + configSchema: z.boolean().default(true), async apply({ pluginData, contexts, ruleName, matchResult }) { const users = unique(contexts.map((c) => c.user)).filter(isTruthy); diff --git a/backend/src/plugins/Automod/actions/mute.ts b/backend/src/plugins/Automod/actions/mute.ts index 3219c712e..4a2a42ad3 100644 --- a/backend/src/plugins/Automod/actions/mute.ts +++ b/backend/src/plugins/Automod/actions/mute.ts @@ -1,29 +1,25 @@ -import * as t from "io-ts"; +import z from "zod"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; -import { convertDelayStringToMS, nonNullish, tDelayString, tNullable, unique } from "../../../utils"; +import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; +import { zNotify } from "../types"; export const MuteAction = automodAction({ - configType: t.type({ - reason: tNullable(t.string), - duration: tNullable(tDelayString), - notify: tNullable(t.string), - notifyChannel: tNullable(t.string), - remove_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])), - restore_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])), - postInCaseLog: tNullable(t.boolean), - hide_case: tNullable(t.boolean), + configSchema: z.strictObject({ + reason: zBoundedCharacters(0, 4000).nullable().default(null), + duration: zDelayString.nullable().default(null), + notify: zNotify.nullable().default(null), + notifyChannel: zSnowflake.nullable().default(null), + remove_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null), + restore_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null), + postInCaseLog: z.boolean().nullable().default(null), + hide_case: z.boolean().nullable().default(false), }), - defaultConfig: { - notify: null, // Use defaults from ModActions - hide_case: false, - }, - async apply({ pluginData, contexts, actionConfig, ruleName, matchResult }) { const duration = actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : undefined; const reason = actionConfig.reason || "Muted automatically"; diff --git a/backend/src/plugins/Automod/actions/removeRoles.ts b/backend/src/plugins/Automod/actions/removeRoles.ts index a46d8262c..8b065702c 100644 --- a/backend/src/plugins/Automod/actions/removeRoles.ts +++ b/backend/src/plugins/Automod/actions/removeRoles.ts @@ -1,6 +1,6 @@ import { PermissionFlagsBits, Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { nonNullish, unique } from "../../../utils"; +import z from "zod"; +import { nonNullish, unique, zSnowflake } from "../../../utils"; import { canAssignRole } from "../../../utils/canAssignRole"; import { getMissingPermissions } from "../../../utils/getMissingPermissions"; import { memberRolesLock } from "../../../utils/lockNameHelpers"; @@ -12,9 +12,7 @@ import { automodAction } from "../helpers"; const p = PermissionFlagsBits; export const RemoveRolesAction = automodAction({ - configType: t.array(t.string), - - defaultConfig: [], + configSchema: z.array(zSnowflake).default([]), async apply({ pluginData, contexts, actionConfig, ruleName }) { const members = unique(contexts.map((c) => c.member).filter(nonNullish)); diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts index 6239cee89..02ff95452 100644 --- a/backend/src/plugins/Automod/actions/reply.ts +++ b/backend/src/plugins/Automod/actions/reply.ts @@ -1,16 +1,16 @@ import { GuildTextBasedChannel, MessageCreateOptions, PermissionsBitField, Snowflake, User } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { convertDelayStringToMS, noop, renderRecursively, - tDelayString, - tMessageContent, - tNullable, unique, validateAndParseMessageContent, verboseChannelMention, + zBoundedCharacters, + zDelayString, + zMessageContent } from "../../../utils"; import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; @@ -20,17 +20,15 @@ import { automodAction } from "../helpers"; import { AutomodContext } from "../types"; export const ReplyAction = automodAction({ - configType: t.union([ - t.string, - t.type({ - text: tMessageContent, - auto_delete: tNullable(t.union([tDelayString, t.number])), - inline: tNullable(t.boolean), + configSchema: z.union([ + zBoundedCharacters(0, 4000), + z.strictObject({ + text: zMessageContent, + auto_delete: z.union([zDelayString, z.number()]).nullable().default(null), + inline: z.boolean().default(false), }), ]), - defaultConfig: {}, - async apply({ pluginData, contexts, actionConfig, ruleName }) { const contextsWithTextChannels = contexts .filter((c) => c.message?.channel_id) diff --git a/backend/src/plugins/Automod/actions/setAntiraidLevel.ts b/backend/src/plugins/Automod/actions/setAntiraidLevel.ts index ecddabd95..db2a6bef0 100644 --- a/backend/src/plugins/Automod/actions/setAntiraidLevel.ts +++ b/backend/src/plugins/Automod/actions/setAntiraidLevel.ts @@ -1,11 +1,9 @@ -import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import { zBoundedCharacters } from "../../../utils"; import { setAntiraidLevel } from "../functions/setAntiraidLevel"; import { automodAction } from "../helpers"; export const SetAntiraidLevelAction = automodAction({ - configType: tNullable(t.string), - defaultConfig: "", + configSchema: zBoundedCharacters(0, 100).nullable(), async apply({ pluginData, actionConfig }) { setAntiraidLevel(pluginData, actionConfig ?? null); diff --git a/backend/src/plugins/Automod/actions/setCounter.ts b/backend/src/plugins/Automod/actions/setCounter.ts index 3286fb4b8..dea4bdd64 100644 --- a/backend/src/plugins/Automod/actions/setCounter.ts +++ b/backend/src/plugins/Automod/actions/setCounter.ts @@ -1,16 +1,15 @@ -import * as t from "io-ts"; +import z from "zod"; +import { zBoundedCharacters } from "../../../utils"; import { CountersPlugin } from "../../Counters/CountersPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; export const SetCounterAction = automodAction({ - configType: t.type({ - counter: t.string, - value: t.number, + configSchema: z.strictObject({ + counter: zBoundedCharacters(0, 100), + value: z.number(), }), - defaultConfig: {}, - async apply({ pluginData, contexts, actionConfig, ruleName }) { const countersPlugin = pluginData.getPlugin(CountersPlugin); if (!countersPlugin.counterExists(actionConfig.counter)) { diff --git a/backend/src/plugins/Automod/actions/setSlowmode.ts b/backend/src/plugins/Automod/actions/setSlowmode.ts index 7b527f10d..ecac0f214 100644 --- a/backend/src/plugins/Automod/actions/setSlowmode.ts +++ b/backend/src/plugins/Automod/actions/setSlowmode.ts @@ -1,19 +1,15 @@ import { ChannelType, GuildTextBasedChannel, Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { convertDelayStringToMS, isDiscordAPIError, tDelayString, tNullable } from "../../../utils"; +import z from "zod"; +import { convertDelayStringToMS, isDiscordAPIError, zDelayString, zSnowflake } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; export const SetSlowmodeAction = automodAction({ - configType: t.type({ - channels: t.array(t.string), - duration: tNullable(tDelayString), + configSchema: z.strictObject({ + channels: z.array(zSnowflake), + duration: zDelayString.nullable().default("10s"), }), - defaultConfig: { - duration: "10s", - }, - async apply({ pluginData, actionConfig }) { const slowmodeMs = Math.max(actionConfig.duration ? convertDelayStringToMS(actionConfig.duration)! : 0, 0); diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 25b840e1b..e0bc11a40 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -5,9 +5,9 @@ import { ThreadAutoArchiveDuration, ThreadChannel, } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; -import { MINUTES, convertDelayStringToMS, noop, tDelayString, tNullable } from "../../../utils"; +import { MINUTES, convertDelayStringToMS, noop, zBoundedCharacters, zDelayString } from "../../../utils"; import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { automodAction } from "../helpers"; @@ -19,18 +19,14 @@ const validThreadAutoArchiveDurations: ThreadAutoArchiveDuration[] = [ ]; export const StartThreadAction = automodAction({ - configType: t.type({ - name: tNullable(t.string), - auto_archive: tDelayString, - private: tNullable(t.boolean), - slowmode: tNullable(tDelayString), - limit_per_channel: tNullable(t.number), + configSchema: z.strictObject({ + name: zBoundedCharacters(1, 100).nullable(), + auto_archive: zDelayString, + private: z.boolean().default(false), + slowmode: zDelayString.nullable().default(null), + limit_per_channel: z.number().nullable().default(5), }), - defaultConfig: { - limit_per_channel: 5, - }, - async apply({ pluginData, contexts, actionConfig }) { // check if the message still exists, we don't want to create threads for deleted messages const threads = contexts.filter((c) => { diff --git a/backend/src/plugins/Automod/actions/warn.ts b/backend/src/plugins/Automod/actions/warn.ts index 59135cb2c..e8c63340c 100644 --- a/backend/src/plugins/Automod/actions/warn.ts +++ b/backend/src/plugins/Automod/actions/warn.ts @@ -1,24 +1,20 @@ -import * as t from "io-ts"; -import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils"; +import z from "zod"; +import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; +import { zNotify } from "../types"; export const WarnAction = automodAction({ - configType: t.type({ - reason: tNullable(t.string), - notify: tNullable(t.string), - notifyChannel: tNullable(t.string), - postInCaseLog: tNullable(t.boolean), - hide_case: tNullable(t.boolean), + configSchema: z.strictObject({ + reason: zBoundedCharacters(0, 4000).nullable().default(null), + notify: zNotify.nullable().default(null), + notifyChannel: zSnowflake.nullable().default(null), + postInCaseLog: z.boolean().nullable().default(null), + hide_case: z.boolean().nullable().default(false), }), - defaultConfig: { - notify: null, // Use defaults from ModActions - hide_case: false, - }, - async apply({ pluginData, contexts, actionConfig, matchResult }) { const reason = actionConfig.reason || "Warned automatically"; const contactMethods = actionConfig.notify ? resolveActionContactMethods(pluginData, actionConfig) : undefined; diff --git a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts index a1858d371..19364eee6 100644 --- a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts +++ b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts @@ -1,28 +1,27 @@ -import * as t from "io-ts"; import { SavedMessage } from "../../../data/entities/SavedMessage"; import { humanizeDurationShort } from "../../../humanizeDurationShort"; import { getBaseUrl } from "../../../pluginUtils"; -import { convertDelayStringToMS, sorter, tDelayString, tNullable } from "../../../utils"; +import { convertDelayStringToMS, sorter, zDelayString } from "../../../utils"; import { RecentActionType } from "../constants"; import { automodTrigger } from "../helpers"; import { findRecentSpam } from "./findRecentSpam"; import { getMatchingMessageRecentActions } from "./getMatchingMessageRecentActions"; import { getMessageSpamIdentifier } from "./getSpamIdentifier"; - -const MessageSpamTriggerConfig = t.type({ - amount: t.number, - within: tDelayString, - per_channel: tNullable(t.boolean), -}); +import z from "zod"; interface TMessageSpamMatchResultType { archiveId: string; } +const configSchema = z.strictObject({ + amount: z.number().int(), + within: zDelayString, + per_channel: z.boolean().optional(), +}); + export function createMessageSpamTrigger(spamType: RecentActionType, prettyName: string) { return automodTrigger()({ - configType: MessageSpamTriggerConfig, - defaultConfig: {}, + configSchema, async match({ pluginData, context, triggerConfig }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/helpers.ts b/backend/src/plugins/Automod/helpers.ts index 5c5f55c75..d1c04d61c 100644 --- a/backend/src/plugins/Automod/helpers.ts +++ b/backend/src/plugins/Automod/helpers.ts @@ -1,7 +1,7 @@ -import * as t from "io-ts"; import { GuildPluginData } from "knub"; import { Awaitable } from "../../utils/typeUtils"; import { AutomodContext, AutomodPluginType } from "./types"; +import z, { ZodTypeAny } from "zod"; interface BaseAutomodTriggerMatchResult { extraContexts?: AutomodContext[]; @@ -31,21 +31,19 @@ type AutomodTriggerRenderMatchInformationFn = (m matchResult: AutomodTriggerMatchResult; }) => Awaitable; -export interface AutomodTriggerBlueprint { - configType: TConfigType; - defaultConfig: Partial>; - - match: AutomodTriggerMatchFn, TMatchResultExtra>; - renderMatchInformation: AutomodTriggerRenderMatchInformationFn, TMatchResultExtra>; +export interface AutomodTriggerBlueprint { + configSchema: TConfigSchema; + match: AutomodTriggerMatchFn, TMatchResultExtra>; + renderMatchInformation: AutomodTriggerRenderMatchInformationFn, TMatchResultExtra>; } -export function automodTrigger(): ( - blueprint: AutomodTriggerBlueprint, -) => AutomodTriggerBlueprint; +export function automodTrigger(): ( + blueprint: AutomodTriggerBlueprint, +) => AutomodTriggerBlueprint; -export function automodTrigger( - blueprint: AutomodTriggerBlueprint, -): AutomodTriggerBlueprint; +export function automodTrigger( + blueprint: AutomodTriggerBlueprint, +): AutomodTriggerBlueprint; export function automodTrigger(...args) { if (args.length) { @@ -63,15 +61,13 @@ type AutomodActionApplyFn = (meta: { matchResult: AutomodTriggerMatchResult; }) => Awaitable; -export interface AutomodActionBlueprint { - configType: TConfigType; - defaultConfig: Partial>; - - apply: AutomodActionApplyFn>; +export interface AutomodActionBlueprint { + configSchema: TConfigSchema; + apply: AutomodActionApplyFn>; } -export function automodAction( - blueprint: AutomodActionBlueprint, -): AutomodActionBlueprint { +export function automodAction( + blueprint: AutomodActionBlueprint, +): AutomodActionBlueprint { return blueprint; } diff --git a/backend/src/plugins/Automod/info.ts b/backend/src/plugins/Automod/info.ts index e0102459d..a2071e219 100644 --- a/backend/src/plugins/Automod/info.ts +++ b/backend/src/plugins/Automod/info.ts @@ -1,6 +1,6 @@ import { trimPluginDescription } from "../../utils"; import { ZeppelinGuildPluginBlueprint } from "../ZeppelinPluginBlueprint"; -import { ConfigSchema } from "./types"; +import { zAutomodConfig } from "./types"; export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { prettyName: "Automod", @@ -100,5 +100,5 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { {matchSummary} ~~~ `), - configSchema: ConfigSchema, + configSchema: zAutomodConfig, }; diff --git a/backend/src/plugins/Automod/triggers/antiraidLevel.ts b/backend/src/plugins/Automod/triggers/antiraidLevel.ts index 7c6d17afd..c879455f3 100644 --- a/backend/src/plugins/Automod/triggers/antiraidLevel.ts +++ b/backend/src/plugins/Automod/triggers/antiraidLevel.ts @@ -1,15 +1,14 @@ -import * as t from "io-ts"; -import { tNullable } from "../../../utils"; import { automodTrigger } from "../helpers"; +import z from "zod"; interface AntiraidLevelTriggerResult {} -export const AntiraidLevelTrigger = automodTrigger()({ - configType: t.type({ - level: tNullable(t.string), - }), +const configSchema = z.strictObject({ + level: z.nullable(z.string().max(100)), +}); - defaultConfig: {}, +export const AntiraidLevelTrigger = automodTrigger()({ + configSchema, async match({ triggerConfig, context }) { if (!context.antiraid) { diff --git a/backend/src/plugins/Automod/triggers/anyMessage.ts b/backend/src/plugins/Automod/triggers/anyMessage.ts index 5b611334e..93ce0abcf 100644 --- a/backend/src/plugins/Automod/triggers/anyMessage.ts +++ b/backend/src/plugins/Automod/triggers/anyMessage.ts @@ -1,14 +1,14 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; import { verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; +import z from "zod"; interface AnyMessageResultType {} -export const AnyMessageTrigger = automodTrigger()({ - configType: t.type({}), +const configSchema = z.strictObject({}); - defaultConfig: {}, +export const AnyMessageTrigger = automodTrigger()({ + configSchema, async match({ context }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/availableTriggers.ts b/backend/src/plugins/Automod/triggers/availableTriggers.ts index 822e44ff7..a2ac60fba 100644 --- a/backend/src/plugins/Automod/triggers/availableTriggers.ts +++ b/backend/src/plugins/Automod/triggers/availableTriggers.ts @@ -1,4 +1,3 @@ -import * as t from "io-ts"; import { AutomodTriggerBlueprint } from "../helpers"; import { AntiraidLevelTrigger } from "./antiraidLevel"; import { AnyMessageTrigger } from "./anyMessage"; @@ -45,6 +44,7 @@ export const availableTriggers: Record match_attachment_type: MatchAttachmentTypeTrigger, match_mime_type: MatchMimeTypeTrigger, member_join: MemberJoinTrigger, + member_leave: MemberLeaveTrigger, role_added: RoleAddedTrigger, role_removed: RoleRemovedTrigger, @@ -76,46 +76,3 @@ export const availableTriggers: Record thread_archive: ThreadArchiveTrigger, thread_unarchive: ThreadUnarchiveTrigger, }; - -export const AvailableTriggers = t.type({ - any_message: AnyMessageTrigger.configType, - - match_words: MatchWordsTrigger.configType, - match_regex: MatchRegexTrigger.configType, - match_invites: MatchInvitesTrigger.configType, - match_links: MatchLinksTrigger.configType, - match_attachment_type: MatchAttachmentTypeTrigger.configType, - match_mime_type: MatchMimeTypeTrigger.configType, - member_join: MemberJoinTrigger.configType, - member_leave: MemberLeaveTrigger.configType, - role_added: RoleAddedTrigger.configType, - role_removed: RoleRemovedTrigger.configType, - - message_spam: MessageSpamTrigger.configType, - mention_spam: MentionSpamTrigger.configType, - link_spam: LinkSpamTrigger.configType, - attachment_spam: AttachmentSpamTrigger.configType, - emoji_spam: EmojiSpamTrigger.configType, - line_spam: LineSpamTrigger.configType, - character_spam: CharacterSpamTrigger.configType, - member_join_spam: MemberJoinSpamTrigger.configType, - sticker_spam: StickerSpamTrigger.configType, - thread_create_spam: ThreadCreateSpamTrigger.configType, - - counter_trigger: CounterTrigger.configType, - - note: NoteTrigger.configType, - warn: WarnTrigger.configType, - mute: MuteTrigger.configType, - unmute: UnmuteTrigger.configType, - kick: KickTrigger.configType, - ban: BanTrigger.configType, - unban: UnbanTrigger.configType, - - antiraid_level: AntiraidLevelTrigger.configType, - - thread_create: ThreadCreateTrigger.configType, - thread_delete: ThreadDeleteTrigger.configType, - thread_archive: ThreadArchiveTrigger.configType, - thread_unarchive: ThreadUnarchiveTrigger.configType, -}); diff --git a/backend/src/plugins/Automod/triggers/ban.ts b/backend/src/plugins/Automod/triggers/ban.ts index f8a4730b9..f6df0fd68 100644 --- a/backend/src/plugins/Automod/triggers/ban.ts +++ b/backend/src/plugins/Automod/triggers/ban.ts @@ -1,19 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface BanTriggerResultType {} -export const BanTrigger = automodTrigger()({ - configType: t.type({ - manual: t.boolean, - automatic: t.boolean, - }), +const configSchema = z.strictObject({ + manual: z.boolean().default(true), + automatic: z.boolean().default(true), +}); - defaultConfig: { - manual: true, - automatic: true, - }, +export const BanTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (context.modAction?.type !== "ban") { diff --git a/backend/src/plugins/Automod/triggers/counterTrigger.ts b/backend/src/plugins/Automod/triggers/counterTrigger.ts index 58f21402a..22de3df1d 100644 --- a/backend/src/plugins/Automod/triggers/counterTrigger.ts +++ b/backend/src/plugins/Automod/triggers/counterTrigger.ts @@ -1,18 +1,17 @@ -import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line interface CounterTriggerResult {} -export const CounterTrigger = automodTrigger()({ - configType: t.type({ - counter: t.string, - trigger: t.string, - reverse: tNullable(t.boolean), - }), +const configSchema = z.strictObject({ + counter: z.string().max(100), + trigger: z.string().max(100), + reverse: z.boolean().optional(), +}); - defaultConfig: {}, +export const CounterTrigger = automodTrigger()({ + configSchema, async match({ triggerConfig, context }) { if (!context.counterTrigger) { diff --git a/backend/src/plugins/Automod/triggers/exampleTrigger.ts b/backend/src/plugins/Automod/triggers/exampleTrigger.ts index bf0880a99..e6005e072 100644 --- a/backend/src/plugins/Automod/triggers/exampleTrigger.ts +++ b/backend/src/plugins/Automod/triggers/exampleTrigger.ts @@ -1,18 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; interface ExampleMatchResultType { isBanana: boolean; } -export const ExampleTrigger = automodTrigger()({ - configType: t.type({ - allowedFruits: t.array(t.string), - }), +const configSchema = z.strictObject({ + allowedFruits: z.array(z.string().max(100)).max(50).default(["peach", "banana"]), +}); - defaultConfig: { - allowedFruits: ["peach", "banana"], - }, +export const ExampleTrigger = automodTrigger()({ + configSchema, async match({ triggerConfig, context }) { const foundFruit = triggerConfig.allowedFruits.find((fruit) => context.message?.data.content === fruit); diff --git a/backend/src/plugins/Automod/triggers/kick.ts b/backend/src/plugins/Automod/triggers/kick.ts index 163d6bf3f..add6803e0 100644 --- a/backend/src/plugins/Automod/triggers/kick.ts +++ b/backend/src/plugins/Automod/triggers/kick.ts @@ -1,19 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface KickTriggerResultType {} -export const KickTrigger = automodTrigger()({ - configType: t.type({ - manual: t.boolean, - automatic: t.boolean, - }), +const configSchema = z.strictObject({ + manual: z.boolean().default(true), + automatic: z.boolean().default(true), +}); - defaultConfig: { - manual: true, - automatic: true, - }, +export const KickTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (context.modAction?.type !== "kick") { diff --git a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts index 659be65b1..45f7ede7a 100644 --- a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts +++ b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts @@ -1,5 +1,5 @@ import { escapeInlineCode, Snowflake } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { asSingleLine, messageSummary, verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; @@ -8,20 +8,31 @@ interface MatchResultType { mode: "blacklist" | "whitelist"; } -export const MatchAttachmentTypeTrigger = automodTrigger()({ - configType: t.type({ - filetype_blacklist: t.array(t.string), - blacklist_enabled: t.boolean, - filetype_whitelist: t.array(t.string), - whitelist_enabled: t.boolean, - }), +const configSchema = z.strictObject({ + filetype_blacklist: z.array(z.string().max(32)).max(255).default([]), + blacklist_enabled: z.boolean().default(false), + filetype_whitelist: z.array(z.string().max(32)).max(255).default([]), + whitelist_enabled: z.boolean().default(false), +}).transform((parsed, ctx) => { + if (parsed.blacklist_enabled && parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Cannot have both blacklist and whitelist enabled", + }); + return z.NEVER; + } + if (! parsed.blacklist_enabled && ! parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Must have either blacklist or whitelist enabled", + }); + return z.NEVER; + } + return parsed; +}); - defaultConfig: { - filetype_blacklist: [], - blacklist_enabled: false, - filetype_whitelist: [], - whitelist_enabled: false, - }, +export const MatchAttachmentTypeTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig: trigger }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/matchInvites.ts b/backend/src/plugins/Automod/triggers/matchInvites.ts index 9e0b0c4e8..4ea7c3cd6 100644 --- a/backend/src/plugins/Automod/triggers/matchInvites.ts +++ b/backend/src/plugins/Automod/triggers/matchInvites.ts @@ -1,5 +1,5 @@ -import * as t from "io-ts"; -import { getInviteCodesInString, GuildInvite, isGuildInvite, resolveInvite, tNullable } from "../../../utils"; +import z from "zod"; +import { getInviteCodesInString, GuildInvite, isGuildInvite, resolveInvite, zSnowflake } from "../../../utils"; import { getTextMatchPartialSummary } from "../functions/getTextMatchPartialSummary"; import { MatchableTextType, matchMultipleTextTypesOnMessage } from "../functions/matchMultipleTextTypesOnMessage"; import { automodTrigger } from "../helpers"; @@ -10,30 +10,22 @@ interface MatchResultType { invite?: GuildInvite; } -export const MatchInvitesTrigger = automodTrigger()({ - configType: t.type({ - include_guilds: tNullable(t.array(t.string)), - exclude_guilds: tNullable(t.array(t.string)), - include_invite_codes: tNullable(t.array(t.string)), - exclude_invite_codes: tNullable(t.array(t.string)), - allow_group_dm_invites: t.boolean, - match_messages: t.boolean, - match_embeds: t.boolean, - match_visible_names: t.boolean, - match_usernames: t.boolean, - match_nicknames: t.boolean, - match_custom_status: t.boolean, - }), +const configSchema = z.strictObject({ + include_guilds: z.array(zSnowflake).max(255).optional(), + exclude_guilds: z.array(zSnowflake).max(255).optional(), + include_invite_codes: z.array(z.string().max(32)).max(255).optional(), + exclude_invite_codes: z.array(z.string().max(32)).max(255).optional(), + allow_group_dm_invites: z.boolean().default(false), + match_messages: z.boolean().default(true), + match_embeds: z.boolean().default(false), + match_visible_names: z.boolean().default(false), + match_usernames: z.boolean().default(false), + match_nicknames: z.boolean().default(false), + match_custom_status: z.boolean().default(false), +}); - defaultConfig: { - allow_group_dm_invites: false, - match_messages: true, - match_embeds: false, - match_visible_names: false, - match_usernames: false, - match_nicknames: false, - match_custom_status: false, - }, +export const MatchInvitesTrigger = automodTrigger()({ + configSchema, async match({ pluginData, context, triggerConfig: trigger }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/matchLinks.ts b/backend/src/plugins/Automod/triggers/matchLinks.ts index 5a8de7dea..128b3cd14 100644 --- a/backend/src/plugins/Automod/triggers/matchLinks.ts +++ b/backend/src/plugins/Automod/triggers/matchLinks.ts @@ -1,11 +1,10 @@ import { escapeInlineCode } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { allowTimeout } from "../../../RegExpRunner"; import { phishermanDomainIsSafe } from "../../../data/Phisherman"; -import { getUrlsInString, tNullable } from "../../../utils"; +import { getUrlsInString, zRegex } from "../../../utils"; import { mergeRegexes } from "../../../utils/mergeRegexes"; import { mergeWordsIntoRegex } from "../../../utils/mergeWordsIntoRegex"; -import { TRegex } from "../../../validatorUtils"; import { PhishermanPlugin } from "../../Phisherman/PhishermanPlugin"; import { getTextMatchPartialSummary } from "../functions/getTextMatchPartialSummary"; import { MatchableTextType, matchMultipleTextTypesOnMessage } from "../functions/matchMultipleTextTypesOnMessage"; @@ -21,40 +20,29 @@ const regexCache = new WeakMap(); const quickLinkCheck = /^https?:\/\//i; +const configSchema = z.strictObject({ + include_domains: z.array(z.string().max(255)).max(255).optional(), + exclude_domains: z.array(z.string().max(255)).max(255).optional(), + include_subdomains: z.boolean().default(true), + include_words: z.array(z.string().max(2000)).max(512).optional(), + exclude_words: z.array(z.string().max(2000)).max(512).optional(), + include_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), + exclude_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), + phisherman: z.strictObject({ + include_suspected: z.boolean().optional(), + include_verified: z.boolean().optional(), + }).optional(), + only_real_links: z.boolean(), + match_messages: z.boolean().default(true), + match_embeds: z.boolean().default(true), + match_visible_names: z.boolean().default(false), + match_usernames: z.boolean().default(false), + match_nicknames: z.boolean().default(false), + match_custom_status: z.boolean().default(false), +}); + export const MatchLinksTrigger = automodTrigger()({ - configType: t.type({ - include_domains: tNullable(t.array(t.string)), - exclude_domains: tNullable(t.array(t.string)), - include_subdomains: t.boolean, - include_words: tNullable(t.array(t.string)), - exclude_words: tNullable(t.array(t.string)), - include_regex: tNullable(t.array(TRegex)), - exclude_regex: tNullable(t.array(TRegex)), - phisherman: tNullable( - t.type({ - include_suspected: tNullable(t.boolean), - include_verified: tNullable(t.boolean), - }), - ), - only_real_links: t.boolean, - match_messages: t.boolean, - match_embeds: t.boolean, - match_visible_names: t.boolean, - match_usernames: t.boolean, - match_nicknames: t.boolean, - match_custom_status: t.boolean, - }), - - defaultConfig: { - include_subdomains: true, - match_messages: true, - match_embeds: false, - match_visible_names: false, - match_usernames: false, - match_nicknames: false, - match_custom_status: false, - only_real_links: true, - }, + configSchema, async match({ pluginData, context, triggerConfig: trigger }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/matchMimeType.ts b/backend/src/plugins/Automod/triggers/matchMimeType.ts index 1af124711..8da9b2e36 100644 --- a/backend/src/plugins/Automod/triggers/matchMimeType.ts +++ b/backend/src/plugins/Automod/triggers/matchMimeType.ts @@ -1,5 +1,5 @@ import { escapeInlineCode } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { asSingleLine, messageSummary, verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; @@ -8,20 +8,31 @@ interface MatchResultType { mode: "blacklist" | "whitelist"; } -export const MatchMimeTypeTrigger = automodTrigger()({ - configType: t.type({ - mime_type_blacklist: t.array(t.string), - blacklist_enabled: t.boolean, - mime_type_whitelist: t.array(t.string), - whitelist_enabled: t.boolean, - }), +const configSchema = z.strictObject({ + mime_type_blacklist: z.array(z.string().max(255)).max(255).default([]), + blacklist_enabled: z.boolean().default(false), + mime_type_whitelist: z.array(z.string().max(255)).max(255).default([]), + whitelist_enabled: z.boolean().default(false), +}).transform((parsed, ctx) => { + if (parsed.blacklist_enabled && parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Cannot have both blacklist and whitelist enabled", + }); + return z.NEVER; + } + if (! parsed.blacklist_enabled && ! parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Must have either blacklist or whitelist enabled", + }); + return z.NEVER; + } + return parsed; +}); - defaultConfig: { - mime_type_blacklist: [], - blacklist_enabled: false, - mime_type_whitelist: [], - whitelist_enabled: false, - }, +export const MatchMimeTypeTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig: trigger }) { if (!context.message) return; diff --git a/backend/src/plugins/Automod/triggers/matchRegex.ts b/backend/src/plugins/Automod/triggers/matchRegex.ts index 7d011891f..41df0396b 100644 --- a/backend/src/plugins/Automod/triggers/matchRegex.ts +++ b/backend/src/plugins/Automod/triggers/matchRegex.ts @@ -1,9 +1,9 @@ -import * as t from "io-ts"; +import z from "zod"; import { allowTimeout } from "../../../RegExpRunner"; +import { zRegex } from "../../../utils"; import { mergeRegexes } from "../../../utils/mergeRegexes"; import { normalizeText } from "../../../utils/normalizeText"; import { stripMarkdown } from "../../../utils/stripMarkdown"; -import { TRegex } from "../../../validatorUtils"; import { getTextMatchPartialSummary } from "../functions/getTextMatchPartialSummary"; import { MatchableTextType, matchMultipleTextTypesOnMessage } from "../functions/matchMultipleTextTypesOnMessage"; import { automodTrigger } from "../helpers"; @@ -13,33 +13,23 @@ interface MatchResultType { type: MatchableTextType; } +const configSchema = z.strictObject({ + patterns: z.array(zRegex(z.string().max(2000))).max(512), + case_sensitive: z.boolean().default(false), + normalize: z.boolean().default(false), + strip_markdown: z.boolean().default(false), + match_messages: z.boolean().default(true), + match_embeds: z.boolean().default(false), + match_visible_names: z.boolean().default(false), + match_usernames: z.boolean().default(false), + match_nicknames: z.boolean().default(false), + match_custom_status: z.boolean().default(false), +}); + const regexCache = new WeakMap(); export const MatchRegexTrigger = automodTrigger()({ - configType: t.type({ - patterns: t.array(TRegex), - case_sensitive: t.boolean, - normalize: t.boolean, - strip_markdown: t.boolean, - match_messages: t.boolean, - match_embeds: t.boolean, - match_visible_names: t.boolean, - match_usernames: t.boolean, - match_nicknames: t.boolean, - match_custom_status: t.boolean, - }), - - defaultConfig: { - case_sensitive: false, - normalize: false, - strip_markdown: false, - match_messages: true, - match_embeds: false, - match_visible_names: false, - match_usernames: false, - match_nicknames: false, - match_custom_status: false, - }, + configSchema, async match({ pluginData, context, triggerConfig: trigger }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/matchWords.ts b/backend/src/plugins/Automod/triggers/matchWords.ts index c5ca79fce..e8c275e13 100644 --- a/backend/src/plugins/Automod/triggers/matchWords.ts +++ b/backend/src/plugins/Automod/triggers/matchWords.ts @@ -1,5 +1,5 @@ import escapeStringRegexp from "escape-string-regexp"; -import * as t from "io-ts"; +import z from "zod"; import { normalizeText } from "../../../utils/normalizeText"; import { stripMarkdown } from "../../../utils/stripMarkdown"; import { getTextMatchPartialSummary } from "../functions/getTextMatchPartialSummary"; @@ -13,37 +13,24 @@ interface MatchResultType { const regexCache = new WeakMap(); -export const MatchWordsTrigger = automodTrigger()({ - configType: t.type({ - words: t.array(t.string), - case_sensitive: t.boolean, - only_full_words: t.boolean, - normalize: t.boolean, - loose_matching: t.boolean, - loose_matching_threshold: t.number, - strip_markdown: t.boolean, - match_messages: t.boolean, - match_embeds: t.boolean, - match_visible_names: t.boolean, - match_usernames: t.boolean, - match_nicknames: t.boolean, - match_custom_status: t.boolean, - }), +const configSchema = z.strictObject({ + words: z.array(z.string().max(2000)).max(512), + case_sensitive: z.boolean().default(false), + only_full_words: z.boolean().default(true), + normalize: z.boolean().default(false), + loose_matching: z.boolean().default(false), + loose_matching_threshold: z.number().int().default(4), + strip_markdown: z.boolean().default(false), + match_messages: z.boolean().default(true), + match_embeds: z.boolean().default(false), + match_visible_names: z.boolean().default(false), + match_usernames: z.boolean().default(false), + match_nicknames: z.boolean().default(false), + match_custom_status: z.boolean().default(false), +}); - defaultConfig: { - case_sensitive: false, - only_full_words: true, - normalize: false, - loose_matching: false, - loose_matching_threshold: 4, - strip_markdown: false, - match_messages: true, - match_embeds: false, - match_visible_names: false, - match_usernames: false, - match_nicknames: false, - match_custom_status: false, - }, +export const MatchWordsTrigger = automodTrigger()({ + configSchema, async match({ pluginData, context, triggerConfig: trigger }) { if (!context.message) { diff --git a/backend/src/plugins/Automod/triggers/memberJoin.ts b/backend/src/plugins/Automod/triggers/memberJoin.ts index f62d87aab..af9a1fae5 100644 --- a/backend/src/plugins/Automod/triggers/memberJoin.ts +++ b/backend/src/plugins/Automod/triggers/memberJoin.ts @@ -1,17 +1,14 @@ -import * as t from "io-ts"; -import { convertDelayStringToMS, tDelayString } from "../../../utils"; +import z from "zod"; +import { convertDelayStringToMS, zDelayString } from "../../../utils"; import { automodTrigger } from "../helpers"; -export const MemberJoinTrigger = automodTrigger()({ - configType: t.type({ - only_new: t.boolean, - new_threshold: tDelayString, - }), +const configSchema = z.strictObject({ + only_new: z.boolean().default(false), + new_threshold: zDelayString.default("1h"), +}); - defaultConfig: { - only_new: false, - new_threshold: "1h", - }, +export const MemberJoinTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (!context.joined || !context.member) { diff --git a/backend/src/plugins/Automod/triggers/memberJoinSpam.ts b/backend/src/plugins/Automod/triggers/memberJoinSpam.ts index c55c88959..e346a8d34 100644 --- a/backend/src/plugins/Automod/triggers/memberJoinSpam.ts +++ b/backend/src/plugins/Automod/triggers/memberJoinSpam.ts @@ -1,18 +1,18 @@ -import * as t from "io-ts"; -import { convertDelayStringToMS, tDelayString } from "../../../utils"; +import z from "zod"; +import { convertDelayStringToMS, zDelayString } from "../../../utils"; import { RecentActionType } from "../constants"; import { findRecentSpam } from "../functions/findRecentSpam"; import { getMatchingRecentActions } from "../functions/getMatchingRecentActions"; import { sumRecentActionCounts } from "../functions/sumRecentActionCounts"; import { automodTrigger } from "../helpers"; -export const MemberJoinSpamTrigger = automodTrigger()({ - configType: t.type({ - amount: t.number, - within: tDelayString, - }), +const configSchema = z.strictObject({ + amount: z.number().int(), + within: zDelayString, +}); - defaultConfig: {}, +export const MemberJoinSpamTrigger = automodTrigger()({ + configSchema, async match({ pluginData, context, triggerConfig }) { if (!context.joined || !context.member) { diff --git a/backend/src/plugins/Automod/triggers/memberLeave.ts b/backend/src/plugins/Automod/triggers/memberLeave.ts index c5a25033c..fa9f37a8b 100644 --- a/backend/src/plugins/Automod/triggers/memberLeave.ts +++ b/backend/src/plugins/Automod/triggers/memberLeave.ts @@ -1,10 +1,10 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; -export const MemberLeaveTrigger = automodTrigger()({ - configType: t.type({}), +const configSchema = z.strictObject({}); - defaultConfig: {}, +export const MemberLeaveTrigger = automodTrigger()({ + configSchema, async match({ context }) { if (!context.joined || !context.member) { diff --git a/backend/src/plugins/Automod/triggers/mute.ts b/backend/src/plugins/Automod/triggers/mute.ts index 144c30f22..dcaf96c52 100644 --- a/backend/src/plugins/Automod/triggers/mute.ts +++ b/backend/src/plugins/Automod/triggers/mute.ts @@ -1,19 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface MuteTriggerResultType {} -export const MuteTrigger = automodTrigger()({ - configType: t.type({ - manual: t.boolean, - automatic: t.boolean, - }), +const configSchema = z.strictObject({ + manual: z.boolean().default(true), + automatic: z.boolean().default(true), +}); - defaultConfig: { - manual: true, - automatic: true, - }, +export const MuteTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (context.modAction?.type !== "mute") { diff --git a/backend/src/plugins/Automod/triggers/note.ts b/backend/src/plugins/Automod/triggers/note.ts index c6d11be7d..eeaa2c27d 100644 --- a/backend/src/plugins/Automod/triggers/note.ts +++ b/backend/src/plugins/Automod/triggers/note.ts @@ -1,12 +1,13 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface NoteTriggerResultType {} +const configSchema = z.strictObject({}); + export const NoteTrigger = automodTrigger()({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async match({ context }) { if (context.modAction?.type !== "note") { diff --git a/backend/src/plugins/Automod/triggers/roleAdded.ts b/backend/src/plugins/Automod/triggers/roleAdded.ts index dc62f1630..47027b6bc 100644 --- a/backend/src/plugins/Automod/triggers/roleAdded.ts +++ b/backend/src/plugins/Automod/triggers/roleAdded.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { renderUserUsername } from "../../../utils"; +import z from "zod"; +import { renderUserUsername, zSnowflake } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; @@ -8,10 +8,13 @@ interface RoleAddedMatchResult { matchedRoleId: string; } -export const RoleAddedTrigger = automodTrigger()({ - configType: t.union([t.string, t.array(t.string)]), +const configSchema = z.union([ + zSnowflake, + z.array(zSnowflake).max(255), +]).default([]); - defaultConfig: "", +export const RoleAddedTrigger = automodTrigger()({ + configSchema, async match({ triggerConfig, context, pluginData }) { if (!context.member || !context.rolesChanged || context.rolesChanged.added!.length === 0) { diff --git a/backend/src/plugins/Automod/triggers/roleRemoved.ts b/backend/src/plugins/Automod/triggers/roleRemoved.ts index 65624827c..26caf227d 100644 --- a/backend/src/plugins/Automod/triggers/roleRemoved.ts +++ b/backend/src/plugins/Automod/triggers/roleRemoved.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { renderUserUsername } from "../../../utils"; +import z from "zod"; +import { renderUserUsername, zSnowflake } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; @@ -8,10 +8,13 @@ interface RoleAddedMatchResult { matchedRoleId: string; } -export const RoleRemovedTrigger = automodTrigger()({ - configType: t.union([t.string, t.array(t.string)]), +const configSchema = z.union([ + zSnowflake, + z.array(zSnowflake).max(255), +]).default([]); - defaultConfig: "", +export const RoleRemovedTrigger = automodTrigger()({ + configSchema, async match({ triggerConfig, context, pluginData }) { if (!context.member || !context.rolesChanged || context.rolesChanged.removed!.length === 0) { diff --git a/backend/src/plugins/Automod/triggers/threadArchive.ts b/backend/src/plugins/Automod/triggers/threadArchive.ts index 0e65b10aa..87cc1b2a5 100644 --- a/backend/src/plugins/Automod/triggers/threadArchive.ts +++ b/backend/src/plugins/Automod/triggers/threadArchive.ts @@ -1,6 +1,5 @@ import { User, escapeBold, type Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import z from "zod"; import { automodTrigger } from "../helpers"; interface ThreadArchiveResult { @@ -11,12 +10,12 @@ interface ThreadArchiveResult { matchedThreadOwner: User | undefined; } -export const ThreadArchiveTrigger = automodTrigger()({ - configType: t.type({ - locked: tNullable(t.boolean), - }), +const configSchema = z.strictObject({ + locked: z.boolean().optional(), +}); - defaultConfig: {}, +export const ThreadArchiveTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (!context.threadChange?.archived) { diff --git a/backend/src/plugins/Automod/triggers/threadCreate.ts b/backend/src/plugins/Automod/triggers/threadCreate.ts index 7b8aca714..ba5553de0 100644 --- a/backend/src/plugins/Automod/triggers/threadCreate.ts +++ b/backend/src/plugins/Automod/triggers/threadCreate.ts @@ -1,5 +1,5 @@ import { User, escapeBold, type Snowflake } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; interface ThreadCreateResult { @@ -10,9 +10,10 @@ interface ThreadCreateResult { matchedThreadOwner: User | undefined; } +const configSchema = z.strictObject({}); + export const ThreadCreateTrigger = automodTrigger()({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async match({ context }) { if (!context.threadChange?.created) { diff --git a/backend/src/plugins/Automod/triggers/threadCreateSpam.ts b/backend/src/plugins/Automod/triggers/threadCreateSpam.ts index b1d02f476..a4352c118 100644 --- a/backend/src/plugins/Automod/triggers/threadCreateSpam.ts +++ b/backend/src/plugins/Automod/triggers/threadCreateSpam.ts @@ -1,18 +1,18 @@ -import * as t from "io-ts"; -import { convertDelayStringToMS, tDelayString } from "../../../utils"; +import z from "zod"; +import { convertDelayStringToMS, zDelayString } from "../../../utils"; import { RecentActionType } from "../constants"; import { findRecentSpam } from "../functions/findRecentSpam"; import { getMatchingRecentActions } from "../functions/getMatchingRecentActions"; import { sumRecentActionCounts } from "../functions/sumRecentActionCounts"; import { automodTrigger } from "../helpers"; -export const ThreadCreateSpamTrigger = automodTrigger()({ - configType: t.type({ - amount: t.number, - within: tDelayString, - }), +const configSchema = z.strictObject({ + amount: z.number().int(), + within: zDelayString, +}); - defaultConfig: {}, +export const ThreadCreateSpamTrigger = automodTrigger()({ + configSchema, async match({ pluginData, context, triggerConfig }) { if (!context.threadChange?.created) { diff --git a/backend/src/plugins/Automod/triggers/threadDelete.ts b/backend/src/plugins/Automod/triggers/threadDelete.ts index 489b5b4ca..fc538cf8d 100644 --- a/backend/src/plugins/Automod/triggers/threadDelete.ts +++ b/backend/src/plugins/Automod/triggers/threadDelete.ts @@ -1,5 +1,5 @@ import { User, escapeBold, type Snowflake } from "discord.js"; -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; interface ThreadDeleteResult { @@ -10,9 +10,10 @@ interface ThreadDeleteResult { matchedThreadOwner: User | undefined; } +const configSchema = z.strictObject({}); + export const ThreadDeleteTrigger = automodTrigger()({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async match({ context }) { if (!context.threadChange?.deleted) { diff --git a/backend/src/plugins/Automod/triggers/threadUnarchive.ts b/backend/src/plugins/Automod/triggers/threadUnarchive.ts index f6047f483..3d4a3cdf8 100644 --- a/backend/src/plugins/Automod/triggers/threadUnarchive.ts +++ b/backend/src/plugins/Automod/triggers/threadUnarchive.ts @@ -1,6 +1,5 @@ import { User, escapeBold, type Snowflake } from "discord.js"; -import * as t from "io-ts"; -import { tNullable } from "../../../utils"; +import z from "zod"; import { automodTrigger } from "../helpers"; interface ThreadUnarchiveResult { @@ -11,12 +10,12 @@ interface ThreadUnarchiveResult { matchedThreadOwner: User | undefined; } -export const ThreadUnarchiveTrigger = automodTrigger()({ - configType: t.type({ - locked: tNullable(t.boolean), - }), +const configSchema = z.strictObject({ + locked: z.boolean().optional(), +}); - defaultConfig: {}, +export const ThreadUnarchiveTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (!context.threadChange?.unarchived) { diff --git a/backend/src/plugins/Automod/triggers/unban.ts b/backend/src/plugins/Automod/triggers/unban.ts index c653f6159..25f24ec95 100644 --- a/backend/src/plugins/Automod/triggers/unban.ts +++ b/backend/src/plugins/Automod/triggers/unban.ts @@ -1,12 +1,13 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface UnbanTriggerResultType {} +const configSchema = z.strictObject({}); + export const UnbanTrigger = automodTrigger()({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async match({ context }) { if (context.modAction?.type !== "unban") { diff --git a/backend/src/plugins/Automod/triggers/unmute.ts b/backend/src/plugins/Automod/triggers/unmute.ts index fbd946c6f..f9695ef00 100644 --- a/backend/src/plugins/Automod/triggers/unmute.ts +++ b/backend/src/plugins/Automod/triggers/unmute.ts @@ -1,12 +1,13 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface UnmuteTriggerResultType {} +const configSchema = z.strictObject({}); + export const UnmuteTrigger = automodTrigger()({ - configType: t.type({}), - defaultConfig: {}, + configSchema, async match({ context }) { if (context.modAction?.type !== "unmute") { diff --git a/backend/src/plugins/Automod/triggers/warn.ts b/backend/src/plugins/Automod/triggers/warn.ts index 5c350dad8..3586e82dc 100644 --- a/backend/src/plugins/Automod/triggers/warn.ts +++ b/backend/src/plugins/Automod/triggers/warn.ts @@ -1,19 +1,16 @@ -import * as t from "io-ts"; +import z from "zod"; import { automodTrigger } from "../helpers"; // tslint:disable-next-line:no-empty-interface interface WarnTriggerResultType {} -export const WarnTrigger = automodTrigger()({ - configType: t.type({ - manual: t.boolean, - automatic: t.boolean, - }), +const configSchema = z.strictObject({ + manual: z.boolean().default(true), + automatic: z.boolean().default(true), +}); - defaultConfig: { - manual: true, - automatic: true, - }, +export const WarnTrigger = automodTrigger()({ + configSchema, async match({ context, triggerConfig }) { if (context.modAction?.type !== "warn") { diff --git a/backend/src/plugins/Automod/types.ts b/backend/src/plugins/Automod/types.ts index bd3f05ee6..59a09a331 100644 --- a/backend/src/plugins/Automod/types.ts +++ b/backend/src/plugins/Automod/types.ts @@ -1,6 +1,6 @@ import { GuildMember, GuildTextBasedChannel, PartialGuildMember, ThreadChannel, User } from "discord.js"; -import * as t from "io-ts"; import { BasePluginType, CooldownManager } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { RegExpRunner } from "../../RegExpRunner"; import { GuildAntiraidLevels } from "../../data/GuildAntiraidLevels"; @@ -8,39 +8,81 @@ import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { SavedMessage } from "../../data/entities/SavedMessage"; -import { tNullable } from "../../utils"; +import { entries, zBoundedRecord, zDelayString } from "../../utils"; import { CounterEvents } from "../Counters/types"; import { ModActionType, ModActionsEvents } from "../ModActions/types"; import { MutesEvents } from "../Mutes/types"; -import { AvailableActions } from "./actions/availableActions"; +import { availableActions } from "./actions/availableActions"; import { RecentActionType } from "./constants"; -import { AvailableTriggers } from "./triggers/availableTriggers"; +import { availableTriggers } from "./triggers/availableTriggers"; import Timeout = NodeJS.Timeout; -export const Rule = t.type({ - enabled: t.boolean, - name: t.string, - presets: tNullable(t.array(t.string)), - affects_bots: t.boolean, - affects_self: t.boolean, - triggers: t.array(t.partial(AvailableTriggers.props)), - actions: t.partial(AvailableActions.props), - cooldown: tNullable(t.string), - allow_further_rules: t.boolean, +export type ZTriggersMapHelper = { + [TriggerName in keyof typeof availableTriggers]: typeof availableTriggers[TriggerName]["configSchema"]; +}; +const zTriggersMap = z.strictObject(entries(availableTriggers).reduce((map, [triggerName, trigger]) => { + map[triggerName] = trigger.configSchema; + return map; +}, {} as ZTriggersMapHelper)).partial(); + +type ZActionsMapHelper = { + [ActionName in keyof typeof availableActions]: typeof availableActions[ActionName]["configSchema"]; +}; +const zActionsMap = z.strictObject(entries(availableActions).reduce((map, [actionName, action]) => { + // @ts-expect-error TS can't infer this properly but it works fine thanks to our helper + map[actionName] = action.configSchema; + return map; +}, {} as ZActionsMapHelper)).partial(); + +const zRule = z.strictObject({ + enabled: z.boolean().default(true), + // Typed as "never" because you are not expected to supply this directly. + // The transform instead picks it up from the property key and the output type is a string. + name: z.never().optional().transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (! ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Automod rules must have names", + }); + return z.NEVER; + } + return ruleName; + }), + presets: z.array(z.string().max(100)).max(25).default([]), + affects_bots: z.boolean().default(false), + affects_self: z.boolean().default(false), + cooldown: zDelayString.nullable().default(null), + allow_further_rules: z.boolean().default(false), + triggers: z.array(zTriggersMap), + actions: zActionsMap.refine( + (v) => ! (v.clean && v.start_thread), + { + message: "Cannot have both clean and start_thread active at the same time", + } + ), }); -export type TRule = t.TypeOf; - -export const ConfigSchema = t.type({ - rules: t.record(t.string, Rule), - antiraid_levels: t.array(t.string), - can_set_antiraid: t.boolean, - can_view_antiraid: t.boolean, +export type TRule = z.infer; + +export const zNotify = z.union([ + z.literal("dm"), + z.literal("channel"), +]); + +export const zAutomodConfig = z.strictObject({ + rules: zBoundedRecord( + z.record(z.string().max(100), zRule), + 0, + 100, + ), + antiraid_levels: z.array(z.string().max(100)).max(10), + can_set_antiraid: z.boolean(), + can_view_antiraid: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface AutomodPluginType extends BasePluginType { - config: TConfigSchema; + config: z.output; customOverrideCriteria: { antiraid_level?: string; diff --git a/backend/src/plugins/BotControl/BotControlPlugin.ts b/backend/src/plugins/BotControl/BotControlPlugin.ts index 76478ca26..653e8deff 100644 --- a/backend/src/plugins/BotControl/BotControlPlugin.ts +++ b/backend/src/plugins/BotControl/BotControlPlugin.ts @@ -3,7 +3,7 @@ import { AllowedGuilds } from "../../data/AllowedGuilds"; import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments"; import { Configs } from "../../data/Configs"; import { GuildArchives } from "../../data/GuildArchives"; -import { makeIoTsConfigParser, sendSuccessMessage } from "../../pluginUtils"; +import { sendSuccessMessage } from "../../pluginUtils"; import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint"; import { getActiveReload, resetActiveReload } from "./activeReload"; import { AddDashboardUserCmd } from "./commands/AddDashboardUserCmd"; @@ -22,7 +22,7 @@ import { ReloadServerCmd } from "./commands/ReloadServerCmd"; import { RemoveDashboardUserCmd } from "./commands/RemoveDashboardUserCmd"; import { RestPerformanceCmd } from "./commands/RestPerformanceCmd"; import { ServersCmd } from "./commands/ServersCmd"; -import { BotControlPluginType, ConfigSchema } from "./types"; +import { BotControlPluginType, zBotControlConfig } from "./types"; const defaultOptions = { config: { @@ -37,7 +37,7 @@ const defaultOptions = { export const BotControlPlugin = zeppelinGlobalPlugin()({ name: "bot_control", - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zBotControlConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/BotControl/types.ts b/backend/src/plugins/BotControl/types.ts index 6f4139f8a..1c1ccea64 100644 --- a/backend/src/plugins/BotControl/types.ts +++ b/backend/src/plugins/BotControl/types.ts @@ -1,23 +1,22 @@ -import * as t from "io-ts"; import { BasePluginType, globalPluginEventListener, globalPluginMessageCommand } from "knub"; +import z from "zod"; import { AllowedGuilds } from "../../data/AllowedGuilds"; import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments"; import { Configs } from "../../data/Configs"; import { GuildArchives } from "../../data/GuildArchives"; -import { tNullable } from "../../utils"; +import { zBoundedCharacters } from "../../utils"; -export const ConfigSchema = t.type({ - can_use: t.boolean, - can_eligible: t.boolean, - can_performance: t.boolean, - can_add_server_from_invite: t.boolean, - can_list_dashboard_perms: t.boolean, - update_cmd: tNullable(t.string), +export const zBotControlConfig = z.strictObject({ + can_use: z.boolean(), + can_eligible: z.boolean(), + can_performance: z.boolean(), + can_add_server_from_invite: z.boolean(), + can_list_dashboard_perms: z.boolean(), + update_cmd: zBoundedCharacters(0, 2000).nullable(), }); -export type TConfigSchema = t.TypeOf; export interface BotControlPluginType extends BasePluginType { - config: TConfigSchema; + config: z.output; state: { archives: GuildArchives; allowedGuilds: AllowedGuilds; diff --git a/backend/src/plugins/Cases/CasesPlugin.ts b/backend/src/plugins/Cases/CasesPlugin.ts index 45f63c79d..9e6df53a7 100644 --- a/backend/src/plugins/Cases/CasesPlugin.ts +++ b/backend/src/plugins/Cases/CasesPlugin.ts @@ -3,7 +3,7 @@ import { Case } from "../../data/entities/Case"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { InternalPosterPlugin } from "../InternalPoster/InternalPosterPlugin"; import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin"; @@ -16,7 +16,7 @@ import { getCaseTypeAmountForUserId } from "./functions/getCaseTypeAmountForUser import { getRecentCasesByMod } from "./functions/getRecentCasesByMod"; import { getTotalCasesByMod } from "./functions/getTotalCasesByMod"; import { postCaseToCaseLogChannel } from "./functions/postToCaseLogChannel"; -import { CaseArgs, CaseNoteArgs, CasesPluginType, ConfigSchema } from "./types"; +import { CaseArgs, CaseNoteArgs, CasesPluginType, zCasesConfig } from "./types"; // The `any` cast here is to prevent TypeScript from locking up from the circular dependency function getLogsPlugin(): Promise { @@ -42,11 +42,11 @@ export const CasesPlugin = zeppelinGuildPlugin()({ description: trimPluginDescription(` This plugin contains basic configuration for cases created by other plugins `), - configSchema: ConfigSchema, + configSchema: zCasesConfig, }, dependencies: async () => [TimeAndDatePlugin, InternalPosterPlugin, (await getLogsPlugin()).LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zCasesConfig.parse(input), defaultOptions, public: { diff --git a/backend/src/plugins/Cases/types.ts b/backend/src/plugins/Cases/types.ts index 9ec1a3713..e25b7ed0c 100644 --- a/backend/src/plugins/Cases/types.ts +++ b/backend/src/plugins/Cases/types.ts @@ -1,24 +1,26 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; +import { U } from "ts-toolbelt"; +import z from "zod"; import { CaseNameToType, CaseTypes } from "../../data/CaseTypes"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; -import { tDelayString, tNullable, tPartialDictionary } from "../../utils"; -import { tColor } from "../../utils/tColor"; +import { keys, zBoundedCharacters, zDelayString, zSnowflake } from "../../utils"; +import { zColor } from "../../utils/zColor"; -export const ConfigSchema = t.type({ - log_automatic_actions: t.boolean, - case_log_channel: tNullable(t.string), - show_relative_times: t.boolean, - relative_time_cutoff: tDelayString, - case_colors: tNullable(tPartialDictionary(t.keyof(CaseNameToType), tColor)), - case_icons: tNullable(tPartialDictionary(t.keyof(CaseNameToType), t.string)), +const caseKeys = keys(CaseNameToType) as U.ListOf; + +export const zCasesConfig = z.strictObject({ + log_automatic_actions: z.boolean(), + case_log_channel: zSnowflake.nullable(), + show_relative_times: z.boolean(), + relative_time_cutoff: zDelayString.default("1w"), + case_colors: z.record(z.enum(caseKeys), zColor).nullable(), + case_icons: z.record(z.enum(caseKeys), zBoundedCharacters(0, 32)).nullable(), }); -export type TConfigSchema = t.TypeOf; export interface CasesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { logs: GuildLogs; cases: GuildCases; diff --git a/backend/src/plugins/Censor/CensorPlugin.ts b/backend/src/plugins/Censor/CensorPlugin.ts index 61991e12c..5764d396e 100644 --- a/backend/src/plugins/Censor/CensorPlugin.ts +++ b/backend/src/plugins/Censor/CensorPlugin.ts @@ -1,12 +1,11 @@ import { PluginOptions } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners"; import { trimPluginDescription } from "../../utils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; -import { CensorPluginType, ConfigSchema } from "./types"; +import { CensorPluginType, zCensorConfig } from "./types"; import { onMessageCreate } from "./util/onMessageCreate"; import { onMessageUpdate } from "./util/onMessageUpdate"; @@ -54,11 +53,11 @@ export const CensorPlugin = zeppelinGuildPlugin()({ For more advanced filtering, check out the Automod plugin! `), legacy: true, - configSchema: ConfigSchema, + configSchema: zCensorConfig, }, dependencies: () => [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zCensorConfig.parse(input), defaultOptions, beforeLoad(pluginData) { diff --git a/backend/src/plugins/Censor/types.ts b/backend/src/plugins/Censor/types.ts index 5a1984cee..c1fcd8df6 100644 --- a/backend/src/plugins/Censor/types.ts +++ b/backend/src/plugins/Censor/types.ts @@ -1,30 +1,28 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; +import z from "zod"; import { RegExpRunner } from "../../RegExpRunner"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { tNullable } from "../../utils"; -import { TRegex } from "../../validatorUtils"; +import { zBoundedCharacters, zRegex, zSnowflake } from "../../utils"; -export const ConfigSchema = t.type({ - filter_zalgo: t.boolean, - filter_invites: t.boolean, - invite_guild_whitelist: tNullable(t.array(t.string)), - invite_guild_blacklist: tNullable(t.array(t.string)), - invite_code_whitelist: tNullable(t.array(t.string)), - invite_code_blacklist: tNullable(t.array(t.string)), - allow_group_dm_invites: t.boolean, - filter_domains: t.boolean, - domain_whitelist: tNullable(t.array(t.string)), - domain_blacklist: tNullable(t.array(t.string)), - blocked_tokens: tNullable(t.array(t.string)), - blocked_words: tNullable(t.array(t.string)), - blocked_regex: tNullable(t.array(TRegex)), +export const zCensorConfig = z.strictObject({ + filter_zalgo: z.boolean(), + filter_invites: z.boolean(), + invite_guild_whitelist: z.array(zSnowflake).nullable(), + invite_guild_blacklist: z.array(zSnowflake).nullable(), + invite_code_whitelist: z.array(zBoundedCharacters(0, 16)).nullable(), + invite_code_blacklist: z.array(zBoundedCharacters(0, 16)).nullable(), + allow_group_dm_invites: z.boolean(), + filter_domains: z.boolean(), + domain_whitelist: z.array(zBoundedCharacters(0, 255)).nullable(), + domain_blacklist: z.array(zBoundedCharacters(0, 255)).nullable(), + blocked_tokens: z.array(zBoundedCharacters(0, 2000)).nullable(), + blocked_words: z.array(zBoundedCharacters(0, 2000)).nullable(), + blocked_regex: z.array(zRegex(z.string().max(1000))).nullable(), }); -export type TConfigSchema = t.TypeOf; export interface CensorPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { serverLogs: GuildLogs; savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/ChannelArchiver/ChannelArchiverPlugin.ts b/backend/src/plugins/ChannelArchiver/ChannelArchiverPlugin.ts index b44678192..615d3467d 100644 --- a/backend/src/plugins/ChannelArchiver/ChannelArchiverPlugin.ts +++ b/backend/src/plugins/ChannelArchiver/ChannelArchiverPlugin.ts @@ -1,18 +1,15 @@ -import * as t from "io-ts"; -import { makeIoTsConfigParser } from "../../pluginUtils"; +import z from "zod"; import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { ArchiveChannelCmd } from "./commands/ArchiveChannelCmd"; import { ChannelArchiverPluginType } from "./types"; -const ConfigSchema = t.type({}); - export const ChannelArchiverPlugin = zeppelinGuildPlugin()({ name: "channel_archiver", showInDocs: false, dependencies: () => [TimeAndDatePlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => z.strictObject({}).parse(input), // prettier-ignore messageCommands: [ diff --git a/backend/src/plugins/CompanionChannels/CompanionChannelsPlugin.ts b/backend/src/plugins/CompanionChannels/CompanionChannelsPlugin.ts index bd05d8009..4e7987a72 100644 --- a/backend/src/plugins/CompanionChannels/CompanionChannelsPlugin.ts +++ b/backend/src/plugins/CompanionChannels/CompanionChannelsPlugin.ts @@ -1,11 +1,10 @@ import { CooldownManager } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { VoiceStateUpdateEvt } from "./events/VoiceStateUpdateEvt"; -import { CompanionChannelsPluginType, ConfigSchema } from "./types"; +import { CompanionChannelsPluginType, zCompanionChannelsConfig } from "./types"; const defaultOptions = { config: { @@ -23,11 +22,11 @@ export const CompanionChannelsPlugin = zeppelinGuildPlugin [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zCompanionChannelsConfig.parse(input), defaultOptions, events: [VoiceStateUpdateEvt], diff --git a/backend/src/plugins/CompanionChannels/types.ts b/backend/src/plugins/CompanionChannels/types.ts index 46a8a45f8..7cee4b3ad 100644 --- a/backend/src/plugins/CompanionChannels/types.ts +++ b/backend/src/plugins/CompanionChannels/types.ts @@ -1,28 +1,23 @@ -import * as t from "io-ts"; import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; -import { tNullable } from "../../utils"; +import { zBoundedCharacters, zSnowflake } from "../../utils"; -// Permissions using these numbers: https://abal.moe/Eris/docs/reference (add all allowed/denied ones up) -export const CompanionChannelOpts = t.type({ - voice_channel_ids: t.array(t.string), - text_channel_ids: t.array(t.string), - permissions: t.number, - enabled: tNullable(t.boolean), +export const zCompanionChannelOpts = z.strictObject({ + voice_channel_ids: z.array(zSnowflake), + text_channel_ids: z.array(zSnowflake), + // See https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags + permissions: z.number(), + enabled: z.boolean().nullable().default(true), }); -export type TCompanionChannelOpts = t.TypeOf; +export type TCompanionChannelOpts = z.infer; -export const ConfigSchema = t.type({ - entries: t.record(t.string, CompanionChannelOpts), +export const zCompanionChannelsConfig = z.strictObject({ + entries: z.record(zBoundedCharacters(0, 100), zCompanionChannelOpts), }); -export type TConfigSchema = t.TypeOf; - -export interface ICompanionChannelMap { - [channelId: string]: TCompanionChannelOpts; -} export interface CompanionChannelsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { errorCooldownManager: CooldownManager; serverLogs: GuildLogs; diff --git a/backend/src/plugins/ContextMenus/ContextMenuPlugin.ts b/backend/src/plugins/ContextMenus/ContextMenuPlugin.ts index c41e8c09c..57d1a7631 100644 --- a/backend/src/plugins/ContextMenus/ContextMenuPlugin.ts +++ b/backend/src/plugins/ContextMenus/ContextMenuPlugin.ts @@ -1,12 +1,11 @@ import { PluginOptions } from "knub"; import { GuildContextMenuLinks } from "../../data/GuildContextMenuLinks"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { MutesPlugin } from "../Mutes/MutesPlugin"; import { UtilityPlugin } from "../Utility/UtilityPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { ContextClickedEvt } from "./events/ContextClickedEvt"; -import { ConfigSchema, ContextMenuPluginType } from "./types"; +import { ContextMenuPluginType, zContextMenusConfig } from "./types"; import { loadAllCommands } from "./utils/loadAllCommands"; const defaultOptions: PluginOptions = { @@ -37,7 +36,7 @@ export const ContextMenuPlugin = zeppelinGuildPlugin()({ showInDocs: false, dependencies: () => [MutesPlugin, LogsPlugin, UtilityPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zContextMenusConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/ContextMenus/actions/mute.ts b/backend/src/plugins/ContextMenus/actions/mute.ts index 7fe2f5d59..556ee248c 100644 --- a/backend/src/plugins/ContextMenus/actions/mute.ts +++ b/backend/src/plugins/ContextMenus/actions/mute.ts @@ -45,9 +45,9 @@ export async function muteAction( try { const result = await mutes.muteUser(userId, durationMs, "Context Menu Action", { caseArgs }); - const muteMessage = `Muted **${result.case.user_name}** ${ + const muteMessage = `Muted **${result.case!.user_name}** ${ durationMs ? `for ${humanizeDuration(durationMs)}` : "indefinitely" - } (Case #${result.case.case_number}) (user notified via ${ + } (Case #${result.case!.case_number}) (user notified via ${ result.notifyResult.method ?? "dm" })\nPlease update the new case with the \`update\` command`; diff --git a/backend/src/plugins/ContextMenus/types.ts b/backend/src/plugins/ContextMenus/types.ts index 02c4a29c3..5dbcd9ce7 100644 --- a/backend/src/plugins/ContextMenus/types.ts +++ b/backend/src/plugins/ContextMenus/types.ts @@ -1,22 +1,20 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener } from "knub"; +import z from "zod"; import { GuildContextMenuLinks } from "../../data/GuildContextMenuLinks"; -export const ConfigSchema = t.type({ - can_use: t.boolean, - - user_muteindef: t.boolean, - user_mute1d: t.boolean, - user_mute1h: t.boolean, - user_info: t.boolean, - message_clean10: t.boolean, - message_clean25: t.boolean, - message_clean50: t.boolean, +export const zContextMenusConfig = z.strictObject({ + can_use: z.boolean(), + user_muteindef: z.boolean(), + user_mute1d: z.boolean(), + user_mute1h: z.boolean(), + user_info: z.boolean(), + message_clean10: z.boolean(), + message_clean25: z.boolean(), + message_clean50: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface ContextMenuPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { contextMenuLinks: GuildContextMenuLinks; }; diff --git a/backend/src/plugins/Counters/CountersPlugin.ts b/backend/src/plugins/Counters/CountersPlugin.ts index 14e3432eb..85be2cf53 100644 --- a/backend/src/plugins/Counters/CountersPlugin.ts +++ b/backend/src/plugins/Counters/CountersPlugin.ts @@ -1,15 +1,12 @@ import { EventEmitter } from "events"; import { PluginOptions } from "knub"; +import { GuildCounters } from "../../data/GuildCounters"; import { - buildCounterConditionString, CounterTrigger, - getReverseCounterComparisonOp, - parseCounterConditionString, + parseCounterConditionString } from "../../data/entities/CounterTrigger"; -import { GuildCounters } from "../../data/GuildCounters"; import { mapToPublicFn } from "../../pluginUtils"; -import { convertDelayStringToMS, MINUTES } from "../../utils"; -import { parseIoTsSchema, StrictValidationError } from "../../validatorUtils"; +import { MINUTES, convertDelayStringToMS, values } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { AddCounterCmd } from "./commands/AddCounterCmd"; import { CountersListCmd } from "./commands/CountersListCmd"; @@ -25,10 +22,8 @@ import { getPrettyNameForCounterTrigger } from "./functions/getPrettyNameForCoun import { offCounterEvent } from "./functions/offCounterEvent"; import { onCounterEvent } from "./functions/onCounterEvent"; import { setCounterValue } from "./functions/setCounterValue"; -import { ConfigSchema, CountersPluginType, TTrigger } from "./types"; +import { CountersPluginType, zCountersConfig } from "./types"; -const MAX_COUNTERS = 5; -const MAX_TRIGGERS_PER_COUNTER = 5; const DECAY_APPLY_INTERVAL = 5 * MINUTES; const defaultOptions: PluginOptions = { @@ -72,50 +67,12 @@ export const CountersPlugin = zeppelinGuildPlugin()({ description: "Keep track of per-user, per-channel, or global numbers and trigger specific actions based on this number", configurationGuide: "See Counters setup guide", - configSchema: ConfigSchema, + configSchema: zCountersConfig, }, defaultOptions, // TODO: Separate input and output types - configParser: (input) => { - for (const [counterName, counter] of Object.entries((input as any).counters || {})) { - counter.name = counterName; - counter.per_user = counter.per_user ?? false; - counter.per_channel = counter.per_channel ?? false; - counter.initial_value = counter.initial_value ?? 0; - counter.triggers = counter.triggers || {}; - - if (Object.values(counter.triggers).length > MAX_TRIGGERS_PER_COUNTER) { - throw new StrictValidationError([`You can only have at most ${MAX_TRIGGERS_PER_COUNTER} triggers per counter`]); - } - - // Normalize triggers - for (const [triggerName, trigger] of Object.entries(counter.triggers)) { - const triggerObj = (typeof trigger === "string" ? { condition: trigger } : trigger) as Partial; - - triggerObj.name = triggerName; - const parsedCondition = parseCounterConditionString(triggerObj.condition || ""); - if (!parsedCondition) { - throw new StrictValidationError([ - `Invalid comparison in counter trigger ${counterName}/${triggerName}: "${triggerObj.condition}"`, - ]); - } - - triggerObj.condition = buildCounterConditionString(parsedCondition[0], parsedCondition[1]); - triggerObj.reverse_condition = - triggerObj.reverse_condition || - buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]); - - counter.triggers[triggerName] = triggerObj as TTrigger; - } - } - - if (Object.values((input as any).counters || {}).length > MAX_COUNTERS) { - throw new StrictValidationError([`You can only have at most ${MAX_COUNTERS} counters`]); - } - - return parseIoTsSchema(ConfigSchema, input); - }, + configParser: (input) => zCountersConfig.parse(input), public: { counterExists: mapToPublicFn(counterExists), @@ -163,13 +120,12 @@ export const CountersPlugin = zeppelinGuildPlugin()({ state.counterTriggersByCounterId.set(dbCounter.id, thisCounterTriggers); // Initialize triggers - for (const trigger of Object.values(counter.triggers)) { - const theTrigger = trigger as TTrigger; - const parsedCondition = parseCounterConditionString(theTrigger.condition)!; - const parsedReverseCondition = parseCounterConditionString(theTrigger.reverse_condition)!; + for (const trigger of values(counter.triggers)) { + const parsedCondition = parseCounterConditionString(trigger.condition)!; + const parsedReverseCondition = parseCounterConditionString(trigger.reverse_condition)!; const counterTrigger = await state.counters.initCounterTrigger( dbCounter.id, - theTrigger.name, + trigger.name, parsedCondition[0], parsedCondition[1], parsedReverseCondition[0], diff --git a/backend/src/plugins/Counters/functions/getPrettyNameForCounterTrigger.ts b/backend/src/plugins/Counters/functions/getPrettyNameForCounterTrigger.ts index 1445bdd83..5e891c184 100644 --- a/backend/src/plugins/Counters/functions/getPrettyNameForCounterTrigger.ts +++ b/backend/src/plugins/Counters/functions/getPrettyNameForCounterTrigger.ts @@ -1,5 +1,5 @@ import { GuildPluginData } from "knub"; -import { CountersPluginType, TTrigger } from "../types"; +import { CountersPluginType } from "../types"; export function getPrettyNameForCounterTrigger( pluginData: GuildPluginData, @@ -12,6 +12,6 @@ export function getPrettyNameForCounterTrigger( return "Unknown Counter Trigger"; } - const trigger = counter.triggers[triggerName] as TTrigger | undefined; + const trigger = counter.triggers[triggerName]; return trigger ? trigger.pretty_name || trigger.name : "Unknown Counter Trigger"; } diff --git a/backend/src/plugins/Counters/types.ts b/backend/src/plugins/Counters/types.ts index 4187c9e41..2b8cce16c 100644 --- a/backend/src/plugins/Counters/types.ts +++ b/backend/src/plugins/Counters/types.ts @@ -1,45 +1,98 @@ import { EventEmitter } from "events"; -import * as t from "io-ts"; import { BasePluginType } from "knub"; +import z from "zod"; import { GuildCounters } from "../../data/GuildCounters"; -import { CounterTrigger } from "../../data/entities/CounterTrigger"; -import { tDelayString, tNullable } from "../../utils"; +import { CounterTrigger, buildCounterConditionString, getReverseCounterComparisonOp, parseCounterConditionString } from "../../data/entities/CounterTrigger"; +import { zBoundedCharacters, zBoundedRecord, zDelayString } from "../../utils"; import Timeout = NodeJS.Timeout; -export const Trigger = t.type({ - name: t.string, - pretty_name: tNullable(t.string), - condition: t.string, - reverse_condition: t.string, +const MAX_COUNTERS = 5; +const MAX_TRIGGERS_PER_COUNTER = 5; + +export const zTrigger = z.strictObject({ + // Dummy type because name gets replaced by the property key in zTriggerInput + name: z.never().optional().transform(() => ""), + pretty_name: zBoundedCharacters(0, 100).nullable().default(null), + condition: zBoundedCharacters(1, 64).refine( + (str) => parseCounterConditionString(str) !== null, + { message: "Invalid counter trigger condition" }, + ), + reverse_condition: zBoundedCharacters(1, 64).refine( + (str) => parseCounterConditionString(str) !== null, + { message: "Invalid counter trigger reverse condition" }, + ), }); -export type TTrigger = t.TypeOf; - -export const Counter = t.type({ - name: t.string, - pretty_name: tNullable(t.string), - per_channel: t.boolean, - per_user: t.boolean, - initial_value: t.number, - triggers: t.record(t.string, t.union([t.string, Trigger])), - decay: tNullable( - t.type({ - amount: t.number, - every: tDelayString, - }), + +const zTriggerInput = z.union([zBoundedCharacters(0, 100), zTrigger]) + .transform((val, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (typeof val === "string") { + const parsedCondition = parseCounterConditionString(val); + if (!parsedCondition) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid counter trigger condition", + }); + return z.NEVER; + } + return { + name: ruleName, + pretty_name: null, + condition: buildCounterConditionString(parsedCondition[0], parsedCondition[1]), + reverse_condition: buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]), + }; + } + return { + ...val, + name: ruleName, + }; + }); + +export const zCounter = z.strictObject({ + // Typed as "never" because you are not expected to supply this directly. + // The transform instead picks it up from the property key and the output type is a string. + name: z.never().optional().transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (! ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Counters must have names", + }); + return z.NEVER; + } + return ruleName; + }), + pretty_name: zBoundedCharacters(0, 100).nullable().default(null), + per_channel: z.boolean().default(false), + per_user: z.boolean().default(false), + initial_value: z.number().default(0), + triggers: zBoundedRecord( + z.record( + zBoundedCharacters(0, 100), + zTriggerInput, + ), + 1, + MAX_TRIGGERS_PER_COUNTER, ), - can_view: tNullable(t.boolean), - can_edit: tNullable(t.boolean), - can_reset_all: tNullable(t.boolean), + decay: z.strictObject({ + amount: z.number(), + every: zDelayString, + }).nullable().default(null), + can_view: z.boolean(), + can_edit: z.boolean(), + can_reset_all: z.boolean(), }); -export type TCounter = t.TypeOf; -export const ConfigSchema = t.type({ - counters: t.record(t.string, Counter), - can_view: t.boolean, - can_edit: t.boolean, - can_reset_all: t.boolean, +export const zCountersConfig = z.strictObject({ + counters: zBoundedRecord( + z.record(zBoundedCharacters(0, 100), zCounter), + 0, + MAX_COUNTERS, + ), + can_view: z.boolean(), + can_edit: z.boolean(), + can_reset_all: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface CounterEvents { trigger: (counterName: string, triggerName: string, channelId: string | null, userId: string | null) => void; @@ -52,7 +105,7 @@ export interface CounterEventEmitter extends EventEmitter { } export interface CountersPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { counters: GuildCounters; counterIds: Record; diff --git a/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts b/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts index 6d5ba2ba6..e17cd96bc 100644 --- a/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts +++ b/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts @@ -2,7 +2,6 @@ import { GuildChannel, GuildMember, User } from "discord.js"; import { guildPluginMessageCommand, parseSignature } from "knub"; import { TSignature } from "knub-command-manager"; import { commandTypes } from "../../commandTypes"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { TemplateSafeValueContainer, createTypedTemplateSafeValueContainer } from "../../templateFormatter"; import { UnknownUser } from "../../utils"; import { isScalar } from "../../utils/isScalar"; @@ -14,7 +13,7 @@ import { } from "../../utils/templateSafeObjects"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { runEvent } from "./functions/runEvent"; -import { ConfigSchema, CustomEventsPluginType } from "./types"; +import { CustomEventsPluginType, zCustomEventsConfig } from "./types"; const defaultOptions = { config: { @@ -26,7 +25,7 @@ export const CustomEventsPlugin = zeppelinGuildPlugin()( name: "custom_events", showInDocs: false, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zCustomEventsConfig.parse(input), defaultOptions, afterLoad(pluginData) { diff --git a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts index 29ded8572..f08709585 100644 --- a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts +++ b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts @@ -1,17 +1,17 @@ -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { canActOn } from "../../../pluginUtils"; import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter"; -import { resolveMember } from "../../../utils"; +import { resolveMember, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const AddRoleAction = t.type({ - type: t.literal("add_role"), - target: t.string, - role: t.union([t.string, t.array(t.string)]), +export const zAddRoleAction = z.strictObject({ + type: z.literal("add_role"), + target: zSnowflake, + role: z.union([zSnowflake, z.array(zSnowflake)]), }); -export type TAddRoleAction = t.TypeOf; +export type TAddRoleAction = z.infer; export async function addRoleAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/actions/createCaseAction.ts b/backend/src/plugins/CustomEvents/actions/createCaseAction.ts index d8d766b58..e894a4461 100644 --- a/backend/src/plugins/CustomEvents/actions/createCaseAction.ts +++ b/backend/src/plugins/CustomEvents/actions/createCaseAction.ts @@ -1,19 +1,20 @@ -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { CaseTypes } from "../../../data/CaseTypes"; import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter"; +import { zBoundedCharacters, zSnowflake } from "../../../utils"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const CreateCaseAction = t.type({ - type: t.literal("create_case"), - case_type: t.string, - mod: t.string, - target: t.string, - reason: t.string, +export const zCreateCaseAction = z.strictObject({ + type: z.literal("create_case"), + case_type: zBoundedCharacters(0, 32), + mod: zSnowflake, + target: zSnowflake, + reason: zBoundedCharacters(0, 4000), }); -export type TCreateCaseAction = t.TypeOf; +export type TCreateCaseAction = z.infer; export async function createCaseAction( pluginData: GuildPluginData, @@ -32,7 +33,7 @@ export async function createCaseAction( } const casesPlugin = pluginData.getPlugin(CasesPlugin); - await casesPlugin.createCase({ + await casesPlugin!.createCase({ userId: targetId, modId, type: CaseTypes[action.case_type], diff --git a/backend/src/plugins/CustomEvents/actions/makeRoleMentionableAction.ts b/backend/src/plugins/CustomEvents/actions/makeRoleMentionableAction.ts index bf3144291..7727e3395 100644 --- a/backend/src/plugins/CustomEvents/actions/makeRoleMentionableAction.ts +++ b/backend/src/plugins/CustomEvents/actions/makeRoleMentionableAction.ts @@ -1,17 +1,17 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { TemplateSafeValueContainer } from "../../../templateFormatter"; -import { convertDelayStringToMS, noop, tDelayString } from "../../../utils"; +import { convertDelayStringToMS, noop, zDelayString, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const MakeRoleMentionableAction = t.type({ - type: t.literal("make_role_mentionable"), - role: t.string, - timeout: tDelayString, +export const zMakeRoleMentionableAction = z.strictObject({ + type: z.literal("make_role_mentionable"), + role: zSnowflake, + timeout: zDelayString, }); -export type TMakeRoleMentionableAction = t.TypeOf; +export type TMakeRoleMentionableAction = z.infer; export async function makeRoleMentionableAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/actions/makeRoleUnmentionableAction.ts b/backend/src/plugins/CustomEvents/actions/makeRoleUnmentionableAction.ts index e86d03b56..8dca7323f 100644 --- a/backend/src/plugins/CustomEvents/actions/makeRoleUnmentionableAction.ts +++ b/backend/src/plugins/CustomEvents/actions/makeRoleUnmentionableAction.ts @@ -1,15 +1,16 @@ import { Snowflake } from "discord.js"; -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { TemplateSafeValueContainer } from "../../../templateFormatter"; +import { zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const MakeRoleUnmentionableAction = t.type({ - type: t.literal("make_role_unmentionable"), - role: t.string, +export const zMakeRoleUnmentionableAction = z.strictObject({ + type: z.literal("make_role_unmentionable"), + role: zSnowflake, }); -export type TMakeRoleUnmentionableAction = t.TypeOf; +export type TMakeRoleUnmentionableAction = z.infer; export async function makeRoleUnmentionableAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/actions/messageAction.ts b/backend/src/plugins/CustomEvents/actions/messageAction.ts index f06534ad0..40eee4b81 100644 --- a/backend/src/plugins/CustomEvents/actions/messageAction.ts +++ b/backend/src/plugins/CustomEvents/actions/messageAction.ts @@ -1,16 +1,17 @@ import { Snowflake, TextChannel } from "discord.js"; -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { zBoundedCharacters, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType } from "../types"; -export const MessageAction = t.type({ - type: t.literal("message"), - channel: t.string, - content: t.string, +export const zMessageAction = z.strictObject({ + type: z.literal("message"), + channel: zSnowflake, + content: zBoundedCharacters(0, 4000), }); -export type TMessageAction = t.TypeOf; +export type TMessageAction = z.infer; export async function messageAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts b/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts index 8ef746cde..d42059f52 100644 --- a/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts +++ b/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts @@ -1,18 +1,18 @@ import { Snowflake, VoiceChannel } from "discord.js"; -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { canActOn } from "../../../pluginUtils"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; -import { resolveMember } from "../../../utils"; +import { resolveMember, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const MoveToVoiceChannelAction = t.type({ - type: t.literal("move_to_vc"), - target: t.string, - channel: t.string, +export const zMoveToVoiceChannelAction = z.strictObject({ + type: z.literal("move_to_vc"), + target: zSnowflake, + channel: zSnowflake, }); -export type TMoveToVoiceChannelAction = t.TypeOf; +export type TMoveToVoiceChannelAction = z.infer; export async function moveToVoiceChannelAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts b/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts index 6bae4c357..dbd7b932d 100644 --- a/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts +++ b/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts @@ -1,23 +1,24 @@ import { PermissionsBitField, PermissionsString, Snowflake } from "discord.js"; -import * as t from "io-ts"; import { GuildPluginData } from "knub"; +import z from "zod"; import { TemplateSafeValueContainer } from "../../../templateFormatter"; +import { zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; -export const SetChannelPermissionOverridesAction = t.type({ - type: t.literal("set_channel_permission_overrides"), - channel: t.string, - overrides: t.array( - t.type({ - type: t.union([t.literal("member"), t.literal("role")]), - id: t.string, - allow: t.number, - deny: t.number, +export const zSetChannelPermissionOverridesAction = z.strictObject({ + type: z.literal("set_channel_permission_overrides"), + channel: zSnowflake, + overrides: z.array( + z.strictObject({ + type: z.union([z.literal("member"), z.literal("role")]), + id: zSnowflake, + allow: z.number(), + deny: z.number(), }), - ), + ).max(15), }); -export type TSetChannelPermissionOverridesAction = t.TypeOf; +export type TSetChannelPermissionOverridesAction = z.infer; export async function setChannelPermissionOverridesAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/CustomEvents/types.ts b/backend/src/plugins/CustomEvents/types.ts index e273e7b6e..4572b1cf4 100644 --- a/backend/src/plugins/CustomEvents/types.ts +++ b/backend/src/plugins/CustomEvents/types.ts @@ -1,47 +1,50 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; -import { AddRoleAction } from "./actions/addRoleAction"; -import { CreateCaseAction } from "./actions/createCaseAction"; -import { MakeRoleMentionableAction } from "./actions/makeRoleMentionableAction"; -import { MakeRoleUnmentionableAction } from "./actions/makeRoleUnmentionableAction"; -import { MessageAction } from "./actions/messageAction"; -import { MoveToVoiceChannelAction } from "./actions/moveToVoiceChannelAction"; -import { SetChannelPermissionOverridesAction } from "./actions/setChannelPermissionOverrides"; +import z from "zod"; +import { zBoundedCharacters, zBoundedRecord } from "../../utils"; +import { zAddRoleAction } from "./actions/addRoleAction"; +import { zCreateCaseAction } from "./actions/createCaseAction"; +import { zMakeRoleMentionableAction } from "./actions/makeRoleMentionableAction"; +import { zMakeRoleUnmentionableAction } from "./actions/makeRoleUnmentionableAction"; +import { zMessageAction } from "./actions/messageAction"; +import { zMoveToVoiceChannelAction } from "./actions/moveToVoiceChannelAction"; +import { zSetChannelPermissionOverridesAction } from "./actions/setChannelPermissionOverrides"; -// Triggers -const CommandTrigger = t.type({ - type: t.literal("command"), - name: t.string, - params: t.string, - can_use: t.boolean, +const zCommandTrigger = z.strictObject({ + type: z.literal("command"), + name: zBoundedCharacters(0, 100), + params: zBoundedCharacters(0, 255), + can_use: z.boolean(), }); -const AnyTrigger = CommandTrigger; // TODO: Make into a union once we have more triggers +const zAnyTrigger = zCommandTrigger; // TODO: Make into a union once we have more triggers -const AnyAction = t.union([ - AddRoleAction, - CreateCaseAction, - MoveToVoiceChannelAction, - MessageAction, - MakeRoleMentionableAction, - MakeRoleUnmentionableAction, - SetChannelPermissionOverridesAction, +const zAnyAction = z.union([ + zAddRoleAction, + zCreateCaseAction, + zMoveToVoiceChannelAction, + zMessageAction, + zMakeRoleMentionableAction, + zMakeRoleUnmentionableAction, + zSetChannelPermissionOverridesAction, ]); -export const CustomEvent = t.type({ - name: t.string, - trigger: AnyTrigger, - actions: t.array(AnyAction), +export const zCustomEvent = z.strictObject({ + name: zBoundedCharacters(0, 100), + trigger: zAnyTrigger, + actions: z.array(zAnyAction).max(10), }); -export type TCustomEvent = t.TypeOf; +export type TCustomEvent = z.infer; -export const ConfigSchema = t.type({ - events: t.record(t.string, CustomEvent), +export const zCustomEventsConfig = z.strictObject({ + events: zBoundedRecord( + z.record(zBoundedCharacters(0, 100), zCustomEvent), + 0, + 100, + ), }); -export type TConfigSchema = t.TypeOf; export interface CustomEventsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { clearTriggers: () => void; }; diff --git a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts index c4f7eaaf3..b8639134d 100644 --- a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts +++ b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts @@ -1,11 +1,10 @@ import { Guild } from "discord.js"; -import * as t from "io-ts"; import { BasePluginType, GlobalPluginData, globalPluginEventListener } from "knub"; import { AllowedGuilds } from "../../data/AllowedGuilds"; import { Configs } from "../../data/Configs"; import { env } from "../../env"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint"; +import z from "zod"; interface GuildAccessMonitorPluginType extends BasePluginType { state: { @@ -26,7 +25,7 @@ async function checkGuild(pluginData: GlobalPluginData()({ name: "guild_access_monitor", - configParser: makeIoTsConfigParser(t.type({})), + configParser: (input) => z.strictObject({}).parse(input), events: [ globalPluginEventListener()({ diff --git a/backend/src/plugins/GuildConfigReloader/GuildConfigReloaderPlugin.ts b/backend/src/plugins/GuildConfigReloader/GuildConfigReloaderPlugin.ts index 5ae04fb5c..6fdc467ac 100644 --- a/backend/src/plugins/GuildConfigReloader/GuildConfigReloaderPlugin.ts +++ b/backend/src/plugins/GuildConfigReloader/GuildConfigReloaderPlugin.ts @@ -1,6 +1,5 @@ -import * as t from "io-ts"; +import z from "zod"; import { Configs } from "../../data/Configs"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint"; import { reloadChangedGuilds } from "./functions/reloadChangedGuilds"; import { GuildConfigReloaderPluginType } from "./types"; @@ -9,7 +8,7 @@ export const GuildConfigReloaderPlugin = zeppelinGlobalPlugin z.strictObject({}).parse(input), async beforeLoad(pluginData) { const { state } = pluginData; diff --git a/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts b/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts index 687175f17..a8d71e06c 100644 --- a/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts +++ b/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts @@ -1,18 +1,17 @@ import { Guild } from "discord.js"; -import * as t from "io-ts"; import { guildPluginEventListener } from "knub"; import { AllowedGuilds } from "../../data/AllowedGuilds"; import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { MINUTES } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { GuildInfoSaverPluginType } from "./types"; +import z from "zod"; export const GuildInfoSaverPlugin = zeppelinGuildPlugin()({ name: "guild_info_saver", showInDocs: false, - configParser: makeIoTsConfigParser(t.type({})), + configParser: (input) => z.strictObject({}).parse(input), events: [ guildPluginEventListener({ diff --git a/backend/src/plugins/GuildMemberCache/GuildMemberCachePlugin.ts b/backend/src/plugins/GuildMemberCache/GuildMemberCachePlugin.ts index d29b342db..293d582e0 100644 --- a/backend/src/plugins/GuildMemberCache/GuildMemberCachePlugin.ts +++ b/backend/src/plugins/GuildMemberCache/GuildMemberCachePlugin.ts @@ -1,6 +1,6 @@ -import * as t from "io-ts"; +import z from "zod"; import { GuildMemberCache } from "../../data/GuildMemberCache"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { SECONDS } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { cancelDeletionOnMemberJoin } from "./events/cancelDeletionOnMemberJoin"; @@ -18,7 +18,7 @@ export const GuildMemberCachePlugin = zeppelinGuildPlugin z.strictObject({}).parse(input), events: [ updateMemberCacheOnMemberUpdate, diff --git a/backend/src/plugins/InternalPoster/InternalPosterPlugin.ts b/backend/src/plugins/InternalPoster/InternalPosterPlugin.ts index 3fbcbbf8b..9365109ed 100644 --- a/backend/src/plugins/InternalPoster/InternalPosterPlugin.ts +++ b/backend/src/plugins/InternalPoster/InternalPosterPlugin.ts @@ -1,11 +1,12 @@ import { PluginOptions } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { Webhooks } from "../../data/Webhooks"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { editMessage } from "./functions/editMessage"; import { sendMessage } from "./functions/sendMessage"; -import { ConfigSchema, InternalPosterPluginType } from "./types"; +import { InternalPosterPluginType } from "./types"; const defaultOptions: PluginOptions = { config: {}, @@ -16,7 +17,7 @@ export const InternalPosterPlugin = zeppelinGuildPlugin z.strictObject({}).parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/InternalPoster/types.ts b/backend/src/plugins/InternalPoster/types.ts index e5f1a1a35..78dabd42b 100644 --- a/backend/src/plugins/InternalPoster/types.ts +++ b/backend/src/plugins/InternalPoster/types.ts @@ -1,15 +1,9 @@ import { WebhookClient } from "discord.js"; -import * as t from "io-ts"; import { BasePluginType } from "knub"; import { Queue } from "../../Queue"; import { Webhooks } from "../../data/Webhooks"; -export const ConfigSchema = t.type({}); -export type TConfigSchema = t.TypeOf; - export interface InternalPosterPluginType extends BasePluginType { - config: TConfigSchema; - state: { queue: Queue; webhooks: Webhooks; diff --git a/backend/src/plugins/LocateUser/LocateUserPlugin.ts b/backend/src/plugins/LocateUser/LocateUserPlugin.ts index 51d479452..a99dc84cb 100644 --- a/backend/src/plugins/LocateUser/LocateUserPlugin.ts +++ b/backend/src/plugins/LocateUser/LocateUserPlugin.ts @@ -1,7 +1,6 @@ import { PluginOptions } from "knub"; import { onGuildEvent } from "../../data/GuildEvents"; import { GuildVCAlerts } from "../../data/GuildVCAlerts"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { FollowCmd } from "./commands/FollowCmd"; @@ -9,7 +8,7 @@ import { DeleteFollowCmd, ListFollowCmd } from "./commands/ListFollowCmd"; import { WhereCmd } from "./commands/WhereCmd"; import { GuildBanRemoveAlertsEvt } from "./events/BanRemoveAlertsEvt"; import { VoiceStateUpdateAlertEvt } from "./events/SendAlertsEvts"; -import { ConfigSchema, LocateUserPluginType } from "./types"; +import { LocateUserPluginType, zLocateUserConfig } from "./types"; import { clearExpiredAlert } from "./utils/clearExpiredAlert"; import { fillActiveAlertsList } from "./utils/fillAlertsList"; @@ -39,10 +38,10 @@ export const LocateUserPlugin = zeppelinGuildPlugin()({ * Instantly receive an invite to the voice channel of a user * Be notified as soon as a user switches or joins a voice channel `), - configSchema: ConfigSchema, + configSchema: zLocateUserConfig, }, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zLocateUserConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/LocateUser/types.ts b/backend/src/plugins/LocateUser/types.ts index 1bfb063e1..4139f4656 100644 --- a/backend/src/plugins/LocateUser/types.ts +++ b/backend/src/plugins/LocateUser/types.ts @@ -1,15 +1,14 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildVCAlerts } from "../../data/GuildVCAlerts"; -export const ConfigSchema = t.type({ - can_where: t.boolean, - can_alert: t.boolean, +export const zLocateUserConfig = z.strictObject({ + can_where: z.boolean(), + can_alert: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface LocateUserPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { alerts: GuildVCAlerts; usersWithAlerts: string[]; diff --git a/backend/src/plugins/Logs/LogsPlugin.ts b/backend/src/plugins/Logs/LogsPlugin.ts index e56ba756e..923ac6232 100644 --- a/backend/src/plugins/Logs/LogsPlugin.ts +++ b/backend/src/plugins/Logs/LogsPlugin.ts @@ -6,7 +6,7 @@ import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { LogType } from "../../data/LogType"; import { logger } from "../../logger"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners"; import { TypedTemplateSafeValueContainer, createTypedTemplateSafeValueContainer } from "../../templateFormatter"; import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin"; @@ -31,7 +31,7 @@ import { import { LogsThreadCreateEvt, LogsThreadDeleteEvt, LogsThreadUpdateEvt } from "./events/LogsThreadModifyEvts"; import { LogsGuildMemberUpdateEvt } from "./events/LogsUserUpdateEvts"; import { LogsVoiceStateUpdateEvt } from "./events/LogsVoiceChannelEvts"; -import { ConfigSchema, FORMAT_NO_TIMESTAMP, ILogTypeData, LogsPluginType, TLogChannel } from "./types"; +import { FORMAT_NO_TIMESTAMP, ILogTypeData, LogsPluginType, TLogChannel, zLogsConfig } from "./types"; import { getLogMessage } from "./util/getLogMessage"; import { log } from "./util/log"; import { onMessageDelete } from "./util/onMessageDelete"; @@ -110,7 +110,6 @@ import { logVoiceChannelForceMove } from "./logFunctions/logVoiceChannelForceMov import { logVoiceChannelJoin } from "./logFunctions/logVoiceChannelJoin"; import { logVoiceChannelLeave } from "./logFunctions/logVoiceChannelLeave"; import { logVoiceChannelMove } from "./logFunctions/logVoiceChannelMove"; -import { asBoundedString } from "../../utils/iotsUtils"; // The `any` cast here is to prevent TypeScript from locking up from the circular dependency function getCasesPlugin(): Promise { @@ -121,12 +120,12 @@ const defaultOptions: PluginOptions = { config: { channels: {}, format: { - timestamp: asBoundedString(FORMAT_NO_TIMESTAMP), // Legacy/deprecated, use timestamp_format below instead + timestamp: FORMAT_NO_TIMESTAMP, ...DefaultLogMessages, }, - ping_user: true, // Legacy/deprecated, if below is false mentions wont actually ping. In case you really want the old behavior, set below to true + ping_user: true, allow_user_mentions: false, - timestamp_format: asBoundedString("[]"), + timestamp_format: "[]", include_embed_timestamp: true, }, @@ -134,7 +133,8 @@ const defaultOptions: PluginOptions = { { level: ">=50", config: { - ping_user: false, // Legacy/deprecated, read comment on global ping_user option + // Legacy/deprecated, read comment on global ping_user option + ping_user: false, }, }, ], @@ -145,11 +145,11 @@ export const LogsPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Logs", - configSchema: ConfigSchema, + configSchema: zLogsConfig, }, dependencies: async () => [TimeAndDatePlugin, InternalPosterPlugin, (await getCasesPlugin()).CasesPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zLogsConfig.parse(input), defaultOptions, events: [ diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts index 0596869c2..25c8c3407 100644 --- a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts +++ b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts @@ -32,7 +32,7 @@ export function logMessageDelete(pluginData: GuildPluginData, da // See comment on FORMAT_NO_TIMESTAMP in types.ts const config = pluginData.config.get(); const timestampFormat = - (config.format.timestamp !== FORMAT_NO_TIMESTAMP ? config.format.timestamp : null) ?? config.timestamp_format; + (config.format.timestamp !== FORMAT_NO_TIMESTAMP ? config.format.timestamp : null) ?? config.timestamp_format ?? undefined; return log( pluginData, diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 759f680d2..51f67b872 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -1,4 +1,3 @@ -import * as t from "io-ts"; import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub"; import { z } from "zod"; import { RegExpRunner } from "../../RegExpRunner"; @@ -7,7 +6,7 @@ import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { LogType } from "../../data/LogType"; -import { tMessageContent, tNullable } from "../../utils"; +import { zBoundedCharacters, zMessageContent, zRegex, zSnowflake } from "../../utils"; import { MessageBuffer } from "../../utils/MessageBuffer"; import { TemplateSafeCase, @@ -22,55 +21,56 @@ import { TemplateSafeUnknownUser, TemplateSafeUser, } from "../../utils/templateSafeObjects"; -import { TRegex } from "../../validatorUtils"; -import { tBoundedString } from "../../utils/iotsUtils"; - -export const tLogFormats = t.record(t.string, t.union([t.string, tMessageContent])); -export type TLogFormats = t.TypeOf; - -const LogChannel = t.partial({ - include: t.array(t.string), - exclude: t.array(t.string), - batched: t.boolean, - batch_time: t.number, - excluded_users: t.array(t.string), - 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), - timestamp_format: t.string, - include_embed_timestamp: t.boolean, + +const DEFAULT_BATCH_TIME = 1000; +const MIN_BATCH_TIME = 250; +const MAX_BATCH_TIME = 5000; + +export const zLogFormats = z.record( + zBoundedCharacters(1, 255), + zMessageContent, +); +export type TLogFormats = z.infer; + +const zLogChannel = z.strictObject({ + include: z.array(zBoundedCharacters(1, 255)).default([]), + exclude: z.array(zBoundedCharacters(1, 255)).default([]), + batched: z.boolean().default(true), + batch_time: z.number().min(MIN_BATCH_TIME).max(MAX_BATCH_TIME).default(DEFAULT_BATCH_TIME), + excluded_users: z.array(zSnowflake).nullable().default(null), + excluded_message_regexes: z.array(zRegex(z.string())).nullable().default(null), + excluded_channels: z.array(zSnowflake).nullable().default(null), + excluded_categories: z.array(zSnowflake).nullable().default(null), + excluded_threads: z.array(zSnowflake).nullable().default(null), + exclude_bots: z.boolean().default(false), + excluded_roles: z.array(zSnowflake).nullable().default(null), + format: zLogFormats.default({}), + timestamp_format: z.string().nullable().default(null), + include_embed_timestamp: z.boolean().nullable().default(null), }); -export type TLogChannel = t.TypeOf; - -const LogChannelMap = t.record(t.string, LogChannel); -export type TLogChannelMap = t.TypeOf; - -export const ConfigSchema = t.type({ - channels: LogChannelMap, - format: t.intersection([ - tLogFormats, - t.type({ - timestamp: tBoundedString(0, 64), // Legacy/deprecated - }), - ]), - ping_user: t.boolean, // Legacy/deprecated, if below is false mentions wont actually ping - allow_user_mentions: t.boolean, - timestamp_format: tBoundedString(0, 64), - include_embed_timestamp: t.boolean, +export type TLogChannel = z.infer; + +const zLogChannelMap = z.record(zSnowflake, zLogChannel); +export type TLogChannelMap = z.infer; + +export const zLogsConfig = z.strictObject({ + channels: zLogChannelMap, + format: z.intersection(zLogFormats, z.strictObject({ + // Legacy/deprecated, use timestamp_format below instead + timestamp: zBoundedCharacters(0, 64).nullable(), + })), + // Legacy/deprecated, if below is false mentions wont actually ping. In case you really want the old behavior, set below to true + ping_user: z.boolean(), + allow_user_mentions: z.boolean(), + timestamp_format: z.string().nullable(), + include_embed_timestamp: z.boolean(), }); -export type TConfigSchema = t.TypeOf; -// Hacky way of allowing a """null""" default value for config.format.timestamp -// The type cannot be made nullable properly because io-ts's intersection type still considers -// that it has to match the record type of tLogFormats, which includes string. +// Hacky way of allowing a """null""" default value for config.format.timestamp due to legacy io-ts reasons export const FORMAT_NO_TIMESTAMP = "__NO_TIMESTAMP__"; export interface LogsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { guildLogs: GuildLogs; savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/MessageSaver/MessageSaverPlugin.ts b/backend/src/plugins/MessageSaver/MessageSaverPlugin.ts index 9e775251e..0b140cd7a 100644 --- a/backend/src/plugins/MessageSaver/MessageSaverPlugin.ts +++ b/backend/src/plugins/MessageSaver/MessageSaverPlugin.ts @@ -1,11 +1,10 @@ import { PluginOptions } from "knub"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { SaveMessagesToDBCmd } from "./commands/SaveMessagesToDB"; import { SavePinsToDBCmd } from "./commands/SavePinsToDB"; import { MessageCreateEvt, MessageDeleteBulkEvt, MessageDeleteEvt, MessageUpdateEvt } from "./events/SaveMessagesEvts"; -import { ConfigSchema, MessageSaverPluginType } from "./types"; +import { MessageSaverPluginType, zMessageSaverConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -25,7 +24,7 @@ export const MessageSaverPlugin = zeppelinGuildPlugin()( name: "message_saver", showInDocs: false, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zMessageSaverConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/MessageSaver/types.ts b/backend/src/plugins/MessageSaver/types.ts index 2fdef6653..f42fa2c3e 100644 --- a/backend/src/plugins/MessageSaver/types.ts +++ b/backend/src/plugins/MessageSaver/types.ts @@ -1,14 +1,13 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -export const ConfigSchema = t.type({ - can_manage: t.boolean, +export const zMessageSaverConfig = z.strictObject({ + can_manage: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface MessageSaverPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { savedMessages: GuildSavedMessages; }; diff --git a/backend/src/plugins/ModActions/ModActionsPlugin.ts b/backend/src/plugins/ModActions/ModActionsPlugin.ts index bf83b13e3..4c9c89587 100644 --- a/backend/src/plugins/ModActions/ModActionsPlugin.ts +++ b/backend/src/plugins/ModActions/ModActionsPlugin.ts @@ -6,7 +6,7 @@ import { onGuildEvent } from "../../data/GuildEvents"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; import { GuildTempbans } from "../../data/GuildTempbans"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { MINUTES, trimPluginDescription } from "../../utils"; import { CasesPlugin } from "../Cases/CasesPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; @@ -47,7 +47,7 @@ import { offModActionsEvent } from "./functions/offModActionsEvent"; import { onModActionsEvent } from "./functions/onModActionsEvent"; import { updateCase } from "./functions/updateCase"; import { warnMember } from "./functions/warnMember"; -import { BanOptions, ConfigSchema, KickOptions, ModActionsPluginType, WarnOptions } from "./types"; +import { BanOptions, KickOptions, ModActionsPluginType, WarnOptions, zModActionsConfig } from "./types"; const defaultOptions = { config: { @@ -121,11 +121,11 @@ export const ModActionsPlugin = zeppelinGuildPlugin()({ description: trimPluginDescription(` This plugin contains the 'typical' mod actions such as warning, muting, kicking, banning, etc. `), - configSchema: ConfigSchema, + configSchema: zModActionsConfig, }, dependencies: () => [TimeAndDatePlugin, CasesPlugin, MutesPlugin, LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zModActionsConfig.parse(input), defaultOptions, events: [CreateBanCaseOnManualBanEvt, CreateUnbanCaseOnManualUnbanEvt, PostAlertOnMemberJoinEvt, AuditLogEvents], diff --git a/backend/src/plugins/ModActions/types.ts b/backend/src/plugins/ModActions/types.ts index 447b96382..fbe7890a7 100644 --- a/backend/src/plugins/ModActions/types.ts +++ b/backend/src/plugins/ModActions/types.ts @@ -1,51 +1,50 @@ import { GuildTextBasedChannel } from "discord.js"; import { EventEmitter } from "events"; -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; import { GuildTempbans } from "../../data/GuildTempbans"; import { Case } from "../../data/entities/Case"; -import { UserNotificationMethod, UserNotificationResult, tNullable } from "../../utils"; +import { UserNotificationMethod, UserNotificationResult } from "../../utils"; import { CaseArgs } from "../Cases/types"; -export const ConfigSchema = t.type({ - dm_on_warn: t.boolean, - dm_on_kick: t.boolean, - dm_on_ban: t.boolean, - message_on_warn: t.boolean, - message_on_kick: t.boolean, - message_on_ban: t.boolean, - message_channel: tNullable(t.string), - warn_message: tNullable(t.string), - kick_message: tNullable(t.string), - ban_message: tNullable(t.string), - tempban_message: tNullable(t.string), - alert_on_rejoin: t.boolean, - alert_channel: tNullable(t.string), - warn_notify_enabled: t.boolean, - warn_notify_threshold: t.number, - warn_notify_message: t.string, - ban_delete_message_days: t.number, - can_note: t.boolean, - can_warn: t.boolean, - can_mute: t.boolean, - can_kick: t.boolean, - can_ban: t.boolean, - can_unban: t.boolean, - can_view: t.boolean, - can_addcase: t.boolean, - can_massunban: t.boolean, - can_massban: t.boolean, - can_massmute: t.boolean, - can_hidecase: t.boolean, - can_deletecase: t.boolean, - can_act_as_other: t.boolean, - create_cases_for_manual_actions: t.boolean, +export const zModActionsConfig = z.strictObject({ + dm_on_warn: z.boolean(), + dm_on_kick: z.boolean(), + dm_on_ban: z.boolean(), + message_on_warn: z.boolean(), + message_on_kick: z.boolean(), + message_on_ban: z.boolean(), + message_channel: z.nullable(z.string()), + warn_message: z.nullable(z.string()), + kick_message: z.nullable(z.string()), + ban_message: z.nullable(z.string()), + tempban_message: z.nullable(z.string()), + alert_on_rejoin: z.boolean(), + alert_channel: z.nullable(z.string()), + warn_notify_enabled: z.boolean(), + warn_notify_threshold: z.number(), + warn_notify_message: z.string(), + ban_delete_message_days: z.number(), + can_note: z.boolean(), + can_warn: z.boolean(), + can_mute: z.boolean(), + can_kick: z.boolean(), + can_ban: z.boolean(), + can_unban: z.boolean(), + can_view: z.boolean(), + can_addcase: z.boolean(), + can_massunban: z.boolean(), + can_massban: z.boolean(), + can_massmute: z.boolean(), + can_hidecase: z.boolean(), + can_deletecase: z.boolean(), + can_act_as_other: z.boolean(), + create_cases_for_manual_actions: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface ModActionsEvents { note: (userId: string, reason?: string) => void; @@ -62,7 +61,7 @@ export interface ModActionsEventEmitter extends EventEmitter { } export interface ModActionsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { mutes: GuildMutes; cases: GuildCases; diff --git a/backend/src/plugins/Mutes/MutesPlugin.ts b/backend/src/plugins/Mutes/MutesPlugin.ts index 1a205bbea..7c9eada80 100644 --- a/backend/src/plugins/Mutes/MutesPlugin.ts +++ b/backend/src/plugins/Mutes/MutesPlugin.ts @@ -5,7 +5,7 @@ import { GuildCases } from "../../data/GuildCases"; import { onGuildEvent } from "../../data/GuildEvents"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { CasesPlugin } from "../Cases/CasesPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; @@ -22,7 +22,7 @@ import { offMutesEvent } from "./functions/offMutesEvent"; import { onMutesEvent } from "./functions/onMutesEvent"; import { renewTimeoutMute } from "./functions/renewTimeoutMute"; import { unmuteUser } from "./functions/unmuteUser"; -import { ConfigSchema, MutesPluginType } from "./types"; +import { MutesPluginType, zMutesConfig } from "./types"; const defaultOptions = { config: { @@ -65,11 +65,11 @@ export const MutesPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Mutes", - configSchema: ConfigSchema, + configSchema: zMutesConfig, }, dependencies: () => [CasesPlugin, LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zMutesConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Mutes/types.ts b/backend/src/plugins/Mutes/types.ts index 0c69c657b..e1f266a94 100644 --- a/backend/src/plugins/Mutes/types.ts +++ b/backend/src/plugins/Mutes/types.ts @@ -1,36 +1,35 @@ import { GuildMember } from "discord.js"; import { EventEmitter } from "events"; -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; import { Case } from "../../data/entities/Case"; import { Mute } from "../../data/entities/Mute"; -import { UserNotificationMethod, UserNotificationResult, tNullable } from "../../utils"; +import { UserNotificationMethod, UserNotificationResult, zSnowflake } from "../../utils"; import { CaseArgs } from "../Cases/types"; -export const ConfigSchema = t.type({ - mute_role: tNullable(t.string), - move_to_voice_channel: tNullable(t.string), - kick_from_voice_channel: t.boolean, +export const zMutesConfig = z.strictObject({ + mute_role: zSnowflake.nullable(), + move_to_voice_channel: zSnowflake.nullable(), + kick_from_voice_channel: z.boolean(), - dm_on_mute: t.boolean, - dm_on_update: t.boolean, - message_on_mute: t.boolean, - message_on_update: t.boolean, - message_channel: tNullable(t.string), - mute_message: tNullable(t.string), - timed_mute_message: tNullable(t.string), - update_mute_message: tNullable(t.string), - remove_roles_on_mute: t.union([t.boolean, t.array(t.string)]), - restore_roles_on_mute: t.union([t.boolean, t.array(t.string)]), + dm_on_mute: z.boolean(), + dm_on_update: z.boolean(), + message_on_mute: z.boolean(), + message_on_update: z.boolean(), + message_channel: z.string().nullable(), + mute_message: z.string().nullable(), + timed_mute_message: z.string().nullable(), + update_mute_message: z.string().nullable(), + remove_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).default(false), + restore_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).default(false), - can_view_list: t.boolean, - can_cleanup: t.boolean, + can_view_list: z.boolean(), + can_cleanup: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface MutesEvents { mute: (userId: string, reason?: string, isAutomodAction?: boolean) => void; @@ -43,7 +42,7 @@ export interface MutesEventEmitter extends EventEmitter { } export interface MutesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { mutes: GuildMutes; cases: GuildCases; diff --git a/backend/src/plugins/NameHistory/NameHistoryPlugin.ts b/backend/src/plugins/NameHistory/NameHistoryPlugin.ts index 7b9273e3e..915ffa3c0 100644 --- a/backend/src/plugins/NameHistory/NameHistoryPlugin.ts +++ b/backend/src/plugins/NameHistory/NameHistoryPlugin.ts @@ -2,10 +2,9 @@ import { PluginOptions } from "knub"; import { Queue } from "../../Queue"; import { GuildNicknameHistory } from "../../data/GuildNicknameHistory"; import { UsernameHistory } from "../../data/UsernameHistory"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { NamesCmd } from "./commands/NamesCmd"; -import { ConfigSchema, NameHistoryPluginType } from "./types"; +import { NameHistoryPluginType, zNameHistoryConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -25,7 +24,7 @@ export const NameHistoryPlugin = zeppelinGuildPlugin()({ name: "name_history", showInDocs: false, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zNameHistoryConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/NameHistory/types.ts b/backend/src/plugins/NameHistory/types.ts index e85f2f405..70101b539 100644 --- a/backend/src/plugins/NameHistory/types.ts +++ b/backend/src/plugins/NameHistory/types.ts @@ -1,16 +1,15 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { GuildNicknameHistory } from "../../data/GuildNicknameHistory"; import { UsernameHistory } from "../../data/UsernameHistory"; -export const ConfigSchema = t.type({ - can_view: t.boolean, +export const zNameHistoryConfig = z.strictObject({ + can_view: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface NameHistoryPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { nicknameHistory: GuildNicknameHistory; usernameHistory: UsernameHistory; diff --git a/backend/src/plugins/Persist/PersistPlugin.ts b/backend/src/plugins/Persist/PersistPlugin.ts index ecd50067c..dc489a257 100644 --- a/backend/src/plugins/Persist/PersistPlugin.ts +++ b/backend/src/plugins/Persist/PersistPlugin.ts @@ -1,7 +1,6 @@ import { PluginOptions } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildPersistedData } from "../../data/GuildPersistedData"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { GuildMemberCachePlugin } from "../GuildMemberCache/GuildMemberCachePlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; @@ -9,7 +8,7 @@ import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { LoadDataEvt } from "./events/LoadDataEvt"; import { StoreDataEvt } from "./events/StoreDataEvt"; -import { ConfigSchema, PersistPluginType } from "./types"; +import { PersistPluginType, zPersistConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -28,11 +27,11 @@ export const PersistPlugin = zeppelinGuildPlugin()({ Re-apply roles or nicknames for users when they rejoin the server. Mute roles are re-applied automatically, this plugin is not required for that. `), - configSchema: ConfigSchema, + configSchema: zPersistConfig, }, dependencies: () => [LogsPlugin, RoleManagerPlugin, GuildMemberCachePlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zPersistConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Persist/types.ts b/backend/src/plugins/Persist/types.ts index 8ab258b76..4f42faa97 100644 --- a/backend/src/plugins/Persist/types.ts +++ b/backend/src/plugins/Persist/types.ts @@ -1,17 +1,17 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildPersistedData } from "../../data/GuildPersistedData"; +import { zSnowflake } from "../../utils"; -export const ConfigSchema = t.type({ - persisted_roles: t.array(t.string), - persist_nicknames: t.boolean, - persist_voice_mutes: t.boolean, // Deprecated, here to not break old configs +export const zPersistConfig = z.strictObject({ + persisted_roles: z.array(zSnowflake), + persist_nicknames: z.boolean(), + persist_voice_mutes: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface PersistPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { persistedData: GuildPersistedData; diff --git a/backend/src/plugins/Phisherman/PhishermanPlugin.ts b/backend/src/plugins/Phisherman/PhishermanPlugin.ts index e8f74ce38..8e895d841 100644 --- a/backend/src/plugins/Phisherman/PhishermanPlugin.ts +++ b/backend/src/plugins/Phisherman/PhishermanPlugin.ts @@ -1,10 +1,10 @@ import { PluginOptions } from "knub"; import { hasPhishermanMasterAPIKey, phishermanApiKeyIsValid } from "../../data/Phisherman"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { getDomainInfo } from "./functions/getDomainInfo"; import { pluginInfo } from "./info"; -import { ConfigSchema, PhishermanPluginType } from "./types"; +import { PhishermanPluginType, zPhishermanConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -18,7 +18,7 @@ export const PhishermanPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: pluginInfo, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zPhishermanConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Phisherman/info.ts b/backend/src/plugins/Phisherman/info.ts index 826da43d6..24530dce0 100644 --- a/backend/src/plugins/Phisherman/info.ts +++ b/backend/src/plugins/Phisherman/info.ts @@ -1,6 +1,6 @@ import { trimPluginDescription } from "../../utils"; import { ZeppelinGuildPluginBlueprint } from "../ZeppelinPluginBlueprint"; -import { ConfigSchema } from "./types"; +import { zPhishermanConfig } from "./types"; export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { prettyName: "Phisherman", @@ -39,5 +39,5 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { clean: true ~~~ `), - configSchema: ConfigSchema, + configSchema: zPhishermanConfig, }; diff --git a/backend/src/plugins/Phisherman/types.ts b/backend/src/plugins/Phisherman/types.ts index 56ed7aca5..d21eb38ec 100644 --- a/backend/src/plugins/Phisherman/types.ts +++ b/backend/src/plugins/Phisherman/types.ts @@ -1,14 +1,12 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; -import { tNullable } from "../../utils"; +import z from "zod"; -export const ConfigSchema = t.type({ - api_key: tNullable(t.string), +export const zPhishermanConfig = z.strictObject({ + api_key: z.string().max(255).nullable(), }); -export type TConfigSchema = t.TypeOf; export interface PhishermanPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { validApiKey: string | null; diff --git a/backend/src/plugins/PingableRoles/PingableRolesPlugin.ts b/backend/src/plugins/PingableRoles/PingableRolesPlugin.ts index 331410f93..a33103bf5 100644 --- a/backend/src/plugins/PingableRoles/PingableRolesPlugin.ts +++ b/backend/src/plugins/PingableRoles/PingableRolesPlugin.ts @@ -1,10 +1,9 @@ import { PluginOptions } from "knub"; import { GuildPingableRoles } from "../../data/GuildPingableRoles"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { PingableRoleDisableCmd } from "./commands/PingableRoleDisableCmd"; import { PingableRoleEnableCmd } from "./commands/PingableRoleEnableCmd"; -import { ConfigSchema, PingableRolesPluginType } from "./types"; +import { PingableRolesPluginType, zPingableRolesConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -25,10 +24,10 @@ export const PingableRolesPlugin = zeppelinGuildPlugin( showInDocs: true, info: { prettyName: "Pingable roles", - configSchema: ConfigSchema, + configSchema: zPingableRolesConfig, }, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zPingableRolesConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/PingableRoles/types.ts b/backend/src/plugins/PingableRoles/types.ts index 272f75940..3bd6faa80 100644 --- a/backend/src/plugins/PingableRoles/types.ts +++ b/backend/src/plugins/PingableRoles/types.ts @@ -1,15 +1,14 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildPingableRoles } from "../../data/GuildPingableRoles"; import { PingableRole } from "../../data/entities/PingableRole"; -export const ConfigSchema = t.type({ - can_manage: t.boolean, +export const zPingableRolesConfig = z.strictObject({ + can_manage: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface PingableRolesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { pingableRoles: GuildPingableRoles; diff --git a/backend/src/plugins/Post/PostPlugin.ts b/backend/src/plugins/Post/PostPlugin.ts index 09d069a2d..304d6b65d 100644 --- a/backend/src/plugins/Post/PostPlugin.ts +++ b/backend/src/plugins/Post/PostPlugin.ts @@ -3,7 +3,6 @@ import { onGuildEvent } from "../../data/GuildEvents"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildScheduledPosts } from "../../data/GuildScheduledPosts"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; @@ -14,7 +13,7 @@ import { PostEmbedCmd } from "./commands/PostEmbedCmd"; import { ScheduledPostsDeleteCmd } from "./commands/ScheduledPostsDeleteCmd"; import { ScheduledPostsListCmd } from "./commands/ScheduledPostsListCmd"; import { ScheduledPostsShowCmd } from "./commands/ScheduledPostsShowCmd"; -import { ConfigSchema, PostPluginType } from "./types"; +import { PostPluginType, zPostConfig } from "./types"; import { postScheduledPost } from "./util/postScheduledPost"; const defaultOptions: PluginOptions = { @@ -36,11 +35,11 @@ export const PostPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Post", - configSchema: ConfigSchema, + configSchema: zPostConfig, }, dependencies: () => [TimeAndDatePlugin, LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zPostConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Post/types.ts b/backend/src/plugins/Post/types.ts index 815b19b8d..e0ec7d2c9 100644 --- a/backend/src/plugins/Post/types.ts +++ b/backend/src/plugins/Post/types.ts @@ -1,16 +1,15 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildScheduledPosts } from "../../data/GuildScheduledPosts"; -export const ConfigSchema = t.type({ - can_post: t.boolean, +export const zPostConfig = z.strictObject({ + can_post: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface PostPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { savedMessages: GuildSavedMessages; scheduledPosts: GuildScheduledPosts; diff --git a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts index ac68de33c..06fff9772 100644 --- a/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts +++ b/backend/src/plugins/ReactionRoles/ReactionRolesPlugin.ts @@ -2,7 +2,6 @@ import { PluginOptions } from "knub"; import { Queue } from "../../Queue"; import { GuildReactionRoles } from "../../data/GuildReactionRoles"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { ClearReactionRolesCmd } from "./commands/ClearReactionRolesCmd"; @@ -10,7 +9,7 @@ import { InitReactionRolesCmd } from "./commands/InitReactionRolesCmd"; import { RefreshReactionRolesCmd } from "./commands/RefreshReactionRolesCmd"; import { AddReactionRoleEvt } from "./events/AddReactionRoleEvt"; import { MessageDeletedEvt } from "./events/MessageDeletedEvt"; -import { ConfigSchema, ReactionRolesPluginType } from "./types"; +import { ReactionRolesPluginType, zReactionRolesConfig } from "./types"; const MIN_AUTO_REFRESH = 1000 * 60 * 15; // 15min minimum, let's not abuse the API @@ -40,11 +39,11 @@ export const ReactionRolesPlugin = zeppelinGuildPlugin( info: { prettyName: "Reaction roles", legacy: "Consider using the [Role buttons](/docs/plugins/role_buttons) plugin instead.", - configSchema: ConfigSchema, + configSchema: zReactionRolesConfig, }, dependencies: () => [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zReactionRolesConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/ReactionRoles/types.ts b/backend/src/plugins/ReactionRoles/types.ts index 6f65ad98a..a1c09f001 100644 --- a/backend/src/plugins/ReactionRoles/types.ts +++ b/backend/src/plugins/ReactionRoles/types.ts @@ -1,17 +1,15 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { GuildReactionRoles } from "../../data/GuildReactionRoles"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -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 const zReactionRolesConfig = z.strictObject({ + auto_refresh_interval: z.number(), + remove_user_reactions: z.boolean(), + can_manage: z.boolean(), + button_groups: z.nullable(z.unknown()), }); -export type TConfigSchema = t.TypeOf; export type RoleChangeMode = "+" | "-"; @@ -24,12 +22,14 @@ export type PendingMemberRoleChanges = { }>; }; -const ReactionRolePair = t.union([t.tuple([t.string, t.string, t.string]), t.tuple([t.string, t.string])]); -export type TReactionRolePair = t.TypeOf; -type ReactionRolePair = [string, string, string?]; +const zReactionRolePair = z.union([ + z.tuple([z.string(), z.string(), z.string()]), + z.tuple([z.string(), z.string()]), +]); +export type TReactionRolePair = z.infer; export interface ReactionRolesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { reactionRoles: GuildReactionRoles; savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/Reminders/RemindersPlugin.ts b/backend/src/plugins/Reminders/RemindersPlugin.ts index 128e945c2..5e86ab49e 100644 --- a/backend/src/plugins/Reminders/RemindersPlugin.ts +++ b/backend/src/plugins/Reminders/RemindersPlugin.ts @@ -1,14 +1,13 @@ import { PluginOptions } from "knub"; import { onGuildEvent } from "../../data/GuildEvents"; import { GuildReminders } from "../../data/GuildReminders"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { RemindCmd } from "./commands/RemindCmd"; import { RemindersCmd } from "./commands/RemindersCmd"; import { RemindersDeleteCmd } from "./commands/RemindersDeleteCmd"; import { postReminder } from "./functions/postReminder"; -import { ConfigSchema, RemindersPluginType } from "./types"; +import { RemindersPluginType, zRemindersConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -29,11 +28,11 @@ export const RemindersPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Reminders", - configSchema: ConfigSchema, + configSchema: zRemindersConfig, }, dependencies: () => [TimeAndDatePlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zRemindersConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Reminders/types.ts b/backend/src/plugins/Reminders/types.ts index 5bc896ba8..4356fac0d 100644 --- a/backend/src/plugins/Reminders/types.ts +++ b/backend/src/plugins/Reminders/types.ts @@ -1,14 +1,13 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildReminders } from "../../data/GuildReminders"; -export const ConfigSchema = t.type({ - can_use: t.boolean, +export const zRemindersConfig = z.strictObject({ + can_use: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface RemindersPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { reminders: GuildReminders; diff --git a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts index 79cfb8b4c..3f1e34eaf 100644 --- a/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts +++ b/backend/src/plugins/RoleButtons/RoleButtonsPlugin.ts @@ -1,15 +1,12 @@ import { GuildRoleButtons } from "../../data/GuildRoleButtons"; -import { parseIoTsSchema, StrictValidationError } from "../../validatorUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { resetButtonsCmd } from "./commands/resetButtons"; import { onButtonInteraction } from "./events/buttonInteraction"; import { applyAllRoleButtons } from "./functions/applyAllRoleButtons"; -import { createButtonComponents } from "./functions/createButtonComponents"; -import { TooManyComponentsError } from "./functions/TooManyComponentsError"; import { pluginInfo } from "./info"; -import { ConfigSchema, RoleButtonsPluginType } from "./types"; +import { RoleButtonsPluginType, zRoleButtonsConfig } from "./types"; export const RoleButtonsPlugin = zeppelinGuildPlugin()({ name: "role_buttons", @@ -31,41 +28,7 @@ export const RoleButtonsPlugin = zeppelinGuildPlugin()({ ], }, - configParser(input) { - // Auto-fill "name" property for buttons based on the object key - const seenMessages = new Set(); - for (const [name, buttonsConfig] of Object.entries((input as any).buttons ?? {})) { - if (name.length > 16) { - throw new StrictValidationError(["Name for role buttons can be at most 16 characters long"]); - } - - if (buttonsConfig) { - buttonsConfig.name = name; - - 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); - } - } - - 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"]); - } - } - } - } - - return parseIoTsSchema(ConfigSchema, input); - }, + configParser: (input) => zRoleButtonsConfig.parse(input), dependencies: () => [LogsPlugin, RoleManagerPlugin], diff --git a/backend/src/plugins/RoleButtons/info.ts b/backend/src/plugins/RoleButtons/info.ts index d63fb17cf..6076419c7 100644 --- a/backend/src/plugins/RoleButtons/info.ts +++ b/backend/src/plugins/RoleButtons/info.ts @@ -1,6 +1,6 @@ import { trimPluginDescription } from "../../utils"; import { ZeppelinGuildPluginBlueprint } from "../ZeppelinPluginBlueprint"; -import { ConfigSchema } from "./types"; +import { zRoleButtonsConfig } from "./types"; export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { prettyName: "Role buttons", @@ -78,5 +78,5 @@ export const pluginInfo: ZeppelinGuildPluginBlueprint["info"] = { ... # See above for examples for options ~~~ `), - configSchema: ConfigSchema, + configSchema: zRoleButtonsConfig, }; diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts index f5792f36b..3c94f8a8f 100644 --- a/backend/src/plugins/RoleButtons/types.ts +++ b/backend/src/plugins/RoleButtons/types.ts @@ -1,58 +1,102 @@ import { ButtonStyle } from "discord.js"; -import * as t from "io-ts"; import { BasePluginType } from "knub"; +import z from "zod"; import { GuildRoleButtons } from "../../data/GuildRoleButtons"; -import { tMessageContent, tNullable } from "../../utils"; +import { zBoundedCharacters, zBoundedRecord, zMessageContent, zSnowflake } from "../../utils"; +import { TooManyComponentsError } from "./functions/TooManyComponentsError"; +import { createButtonComponents } from "./functions/createButtonComponents"; -const RoleButtonOption = t.type({ - role_id: t.string, - label: tNullable(t.string), - emoji: tNullable(t.string), +const zRoleButtonOption = z.strictObject({ + role_id: zSnowflake, + label: z.string().nullable().default(null), + emoji: z.string().nullable().default(null), // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle - style: tNullable( - t.union([ - t.literal(ButtonStyle.Primary), - t.literal(ButtonStyle.Secondary), - t.literal(ButtonStyle.Success), - t.literal(ButtonStyle.Danger), + style: z.union([ + z.literal(ButtonStyle.Primary), + z.literal(ButtonStyle.Secondary), + z.literal(ButtonStyle.Success), + z.literal(ButtonStyle.Danger), - // The following are deprecated - 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), + // The following are deprecated + z.literal("PRIMARY"), + z.literal("SECONDARY"), + z.literal("SUCCESS"), + z.literal("DANGER"), + // z.literal("LINK"), // Role buttons don't use link buttons, but adding this here so it's documented why it's not available + ]).nullable().default(null), + start_new_row: z.boolean().default(false), }); -export type TRoleButtonOption = t.TypeOf; +export type TRoleButtonOption = z.infer; -const RoleButtonsConfigItem = t.type({ - name: t.string, - message: t.union([ - t.type({ - channel_id: t.string, - message_id: t.string, +const zRoleButtonsConfigItem = z.strictObject({ + // Typed as "never" because you are not expected to supply this directly. + // The transform instead picks it up from the property key and the output type is a string. + name: z.never().optional().transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (! ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Role buttons must have names", + }); + return z.NEVER; + } + return ruleName; + }), + message: z.union([ + z.strictObject({ + channel_id: zSnowflake, + message_id: zSnowflake, }), - t.type({ - channel_id: t.string, - content: tMessageContent, + z.strictObject({ + channel_id: zSnowflake, + content: zMessageContent, }), ]), - options: t.array(RoleButtonOption), - exclusive: tNullable(t.boolean), -}); -export type TRoleButtonsConfigItem = t.TypeOf; + options: z.array(zRoleButtonOption).max(25), + exclusive: z.boolean().default(false), +}) + .refine((parsed) => { + try { + createButtonComponents(parsed); + } catch (err) { + if (err instanceof TooManyComponentsError) { + return false; + } + throw err; + } + return true; + }, { + message: "Too many options; can only have max 5 buttons per row on max 5 rows." + }); +export type TRoleButtonsConfigItem = z.infer; -export const ConfigSchema = t.type({ - buttons: t.record(t.string, RoleButtonsConfigItem), - can_reset: t.boolean, -}); -export type TConfigSchema = t.TypeOf; +export const zRoleButtonsConfig = z.strictObject({ + buttons: zBoundedRecord( + z.record(zBoundedCharacters(1, 16), zRoleButtonsConfigItem), + 0, + 100, + ), + can_reset: z.boolean(), +}) + .refine((parsed) => { + const seenMessages = new Set(); + for (const button of Object.values(parsed.buttons)) { + if (button.message) { + if ("message_id" in button.message) { + if (seenMessages.has(button.message.message_id)) { + return false; + } + seenMessages.add(button.message.message_id); + } + } + } + return true; + }, { + message: "Can't target the same message with two sets of role buttons", + }); export interface RoleButtonsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { roleButtons: GuildRoleButtons; }; diff --git a/backend/src/plugins/RoleManager/RoleManagerPlugin.ts b/backend/src/plugins/RoleManager/RoleManagerPlugin.ts index 878b2cd44..34427d987 100644 --- a/backend/src/plugins/RoleManager/RoleManagerPlugin.ts +++ b/backend/src/plugins/RoleManager/RoleManagerPlugin.ts @@ -1,5 +1,5 @@ import { GuildRoleQueue } from "../../data/GuildRoleQueue"; -import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; +import { mapToPublicFn } from "../../pluginUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { addPriorityRole } from "./functions/addPriorityRole"; @@ -7,14 +7,14 @@ import { addRole } from "./functions/addRole"; import { removePriorityRole } from "./functions/removePriorityRole"; import { removeRole } from "./functions/removeRole"; import { runRoleAssignmentLoop } from "./functions/runRoleAssignmentLoop"; -import { ConfigSchema, RoleManagerPluginType } from "./types"; +import { RoleManagerPluginType, zRoleManagerConfig } from "./types"; export const RoleManagerPlugin = zeppelinGuildPlugin()({ name: "role_manager", showInDocs: false, dependencies: () => [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zRoleManagerConfig.parse(input), public: { addRole: mapToPublicFn(addRole), diff --git a/backend/src/plugins/RoleManager/types.ts b/backend/src/plugins/RoleManager/types.ts index 54f5033a9..51ba30808 100644 --- a/backend/src/plugins/RoleManager/types.ts +++ b/backend/src/plugins/RoleManager/types.ts @@ -1,12 +1,11 @@ -import * as t from "io-ts"; import { BasePluginType } from "knub"; +import z from "zod"; import { GuildRoleQueue } from "../../data/GuildRoleQueue"; -export const ConfigSchema = t.type({}); -export type TConfigSchema = t.TypeOf; +export const zRoleManagerConfig = z.strictObject({}); export interface RoleManagerPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { roleQueue: GuildRoleQueue; roleAssignmentLoopRunning: boolean; diff --git a/backend/src/plugins/Roles/RolesPlugin.ts b/backend/src/plugins/Roles/RolesPlugin.ts index 6c8109400..0e181cfa0 100644 --- a/backend/src/plugins/Roles/RolesPlugin.ts +++ b/backend/src/plugins/Roles/RolesPlugin.ts @@ -1,6 +1,5 @@ import { PluginOptions } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; @@ -9,13 +8,13 @@ import { AddRoleCmd } from "./commands/AddRoleCmd"; import { MassAddRoleCmd } from "./commands/MassAddRoleCmd"; import { MassRemoveRoleCmd } from "./commands/MassRemoveRoleCmd"; import { RemoveRoleCmd } from "./commands/RemoveRoleCmd"; -import { ConfigSchema, RolesPluginType } from "./types"; +import { RolesPluginType, zRolesConfig } from "./types"; const defaultOptions: PluginOptions = { config: { can_assign: false, can_mass_assign: false, - assignable_roles: ["558037973581430785"], + assignable_roles: [], }, overrides: [ { @@ -41,11 +40,11 @@ export const RolesPlugin = zeppelinGuildPlugin()({ description: trimPluginDescription(` Enables authorised users to add and remove whitelisted roles with a command. `), - configSchema: ConfigSchema, + configSchema: zRolesConfig, }, dependencies: () => [LogsPlugin, RoleManagerPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zRolesConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Roles/types.ts b/backend/src/plugins/Roles/types.ts index 346dc5624..caf55b769 100644 --- a/backend/src/plugins/Roles/types.ts +++ b/backend/src/plugins/Roles/types.ts @@ -1,16 +1,15 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; -export const ConfigSchema = t.type({ - can_assign: t.boolean, - can_mass_assign: t.boolean, - assignable_roles: t.array(t.string), +export const zRolesConfig = z.strictObject({ + can_assign: z.boolean(), + can_mass_assign: z.boolean(), + assignable_roles: z.array(z.string()).max(100), }); -export type TConfigSchema = t.TypeOf; export interface RolesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { logs: GuildLogs; }; diff --git a/backend/src/plugins/SelfGrantableRoles/SelfGrantableRolesPlugin.ts b/backend/src/plugins/SelfGrantableRoles/SelfGrantableRolesPlugin.ts index f16cff922..6f0d666bd 100644 --- a/backend/src/plugins/SelfGrantableRoles/SelfGrantableRolesPlugin.ts +++ b/backend/src/plugins/SelfGrantableRoles/SelfGrantableRolesPlugin.ts @@ -1,11 +1,10 @@ import { CooldownManager, PluginOptions } from "knub"; import { trimPluginDescription } from "../../utils"; -import { parseIoTsSchema } from "../../validatorUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { RoleAddCmd } from "./commands/RoleAddCmd"; import { RoleHelpCmd } from "./commands/RoleHelpCmd"; import { RoleRemoveCmd } from "./commands/RoleRemoveCmd"; -import { ConfigSchema, SelfGrantableRolesPluginType, defaultSelfGrantableRoleEntry } from "./types"; +import { SelfGrantableRolesPluginType, zSelfGrantableRolesConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -66,25 +65,10 @@ export const SelfGrantableRolesPlugin = zeppelinGuildPlugin { - const entries = (input as any).entries; - for (const [key, entry] of Object.entries(entries)) { - // Apply default entry config - entries[key] = { ...defaultSelfGrantableRoleEntry, ...entry }; - - // Normalize alias names - if (entry.roles) { - for (const [roleId, aliases] of Object.entries(entry.roles)) { - entry.roles[roleId] = aliases.map((a) => a.toLowerCase()); - } - } - } - - return parseIoTsSchema(ConfigSchema, input); - }, + configParser: (input) => zSelfGrantableRolesConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/SelfGrantableRoles/types.ts b/backend/src/plugins/SelfGrantableRoles/types.ts index 08d665df3..a1aed241e 100644 --- a/backend/src/plugins/SelfGrantableRoles/types.ts +++ b/backend/src/plugins/SelfGrantableRoles/types.ts @@ -1,31 +1,29 @@ -import * as t from "io-ts"; import { BasePluginType, CooldownManager, guildPluginMessageCommand } from "knub"; +import z from "zod"; +import { zBoundedCharacters, zBoundedRecord } from "../../utils"; -const RoleMap = t.record(t.string, t.array(t.string)); +const zRoleMap = z.record( + zBoundedCharacters(1, 100), + z.array(zBoundedCharacters(1, 2000)) + .max(100) + .transform((parsed) => parsed.map(v => v.toLowerCase())), +); -const SelfGrantableRoleEntry = t.type({ - roles: RoleMap, - can_use: t.boolean, - can_ignore_cooldown: t.boolean, - max_roles: t.number, +const zSelfGrantableRoleEntry = z.strictObject({ + roles: zBoundedRecord(zRoleMap, 0, 100), + can_use: z.boolean().default(false), + can_ignore_cooldown: z.boolean().default(false), + max_roles: z.number().default(0), }); -const PartialRoleEntry = t.partial(SelfGrantableRoleEntry.props); -export type TSelfGrantableRoleEntry = t.TypeOf; +export type TSelfGrantableRoleEntry = z.infer; -export const ConfigSchema = t.type({ - entries: t.record(t.string, SelfGrantableRoleEntry), - mention_roles: t.boolean, +export const zSelfGrantableRolesConfig = z.strictObject({ + entries: zBoundedRecord(z.record(zBoundedCharacters(0, 255), zSelfGrantableRoleEntry), 0, 100), + mention_roles: z.boolean(), }); -type TConfigSchema = t.TypeOf; - -export const defaultSelfGrantableRoleEntry: t.TypeOf = { - can_use: false, - can_ignore_cooldown: false, - max_roles: 0, -}; export interface SelfGrantableRolesPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { cooldowns: CooldownManager; }; diff --git a/backend/src/plugins/Slowmode/SlowmodePlugin.ts b/backend/src/plugins/Slowmode/SlowmodePlugin.ts index 4f6c09969..174f38a99 100644 --- a/backend/src/plugins/Slowmode/SlowmodePlugin.ts +++ b/backend/src/plugins/Slowmode/SlowmodePlugin.ts @@ -2,7 +2,6 @@ import { PluginOptions } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildSlowmodes } from "../../data/GuildSlowmodes"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { SECONDS } from "../../utils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; @@ -11,7 +10,7 @@ import { SlowmodeDisableCmd } from "./commands/SlowmodeDisableCmd"; import { SlowmodeGetCmd } from "./commands/SlowmodeGetCmd"; import { SlowmodeListCmd } from "./commands/SlowmodeListCmd"; import { SlowmodeSetCmd } from "./commands/SlowmodeSetCmd"; -import { ConfigSchema, SlowmodePluginType } from "./types"; +import { SlowmodePluginType, zSlowmodeConfig } from "./types"; import { clearExpiredSlowmodes } from "./util/clearExpiredSlowmodes"; import { onMessageCreate } from "./util/onMessageCreate"; @@ -41,7 +40,7 @@ export const SlowmodePlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Slowmode", - configSchema: ConfigSchema, + configSchema: zSlowmodeConfig, }, // prettier-ignore @@ -49,7 +48,7 @@ export const SlowmodePlugin = zeppelinGuildPlugin()({ LogsPlugin, ], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zSlowmodeConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Slowmode/types.ts b/backend/src/plugins/Slowmode/types.ts index 089a59ef7..c4fe44d56 100644 --- a/backend/src/plugins/Slowmode/types.ts +++ b/backend/src/plugins/Slowmode/types.ts @@ -1,20 +1,19 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildSlowmodes } from "../../data/GuildSlowmodes"; import { SlowmodeChannel } from "../../data/entities/SlowmodeChannel"; -export const ConfigSchema = t.type({ - use_native_slowmode: t.boolean, - - can_manage: t.boolean, - is_affected: t.boolean, +export const zSlowmodeConfig = z.strictObject({ + use_native_slowmode: z.boolean(), + + can_manage: z.boolean(), + is_affected: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface SlowmodePluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { slowmodes: GuildSlowmodes; savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/Spam/SpamPlugin.ts b/backend/src/plugins/Spam/SpamPlugin.ts index e1a7efc04..54ec540cd 100644 --- a/backend/src/plugins/Spam/SpamPlugin.ts +++ b/backend/src/plugins/Spam/SpamPlugin.ts @@ -3,12 +3,11 @@ import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { SpamVoiceStateUpdateEvt } from "./events/SpamVoiceEvt"; -import { ConfigSchema, SpamPluginType } from "./types"; +import { SpamPluginType, zSpamConfig } from "./types"; import { clearOldRecentActions } from "./util/clearOldRecentActions"; import { onMessageCreate } from "./util/onMessageCreate"; @@ -53,11 +52,11 @@ export const SpamPlugin = zeppelinGuildPlugin()({ For more advanced spam filtering, check out the Automod plugin! `), legacy: true, - configSchema: ConfigSchema, + configSchema: zSpamConfig, }, dependencies: () => [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zSpamConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Spam/types.ts b/backend/src/plugins/Spam/types.ts index 1e561477c..74ea872f4 100644 --- a/backend/src/plugins/Spam/types.ts +++ b/backend/src/plugins/Spam/types.ts @@ -1,35 +1,40 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener } from "knub"; +import z from "zod"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildMutes } from "../../data/GuildMutes"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { tNullable } from "../../utils"; +import { zSnowflake } from "../../utils"; -const BaseSingleSpamConfig = t.type({ - interval: t.number, - count: t.number, - mute: tNullable(t.boolean), - mute_time: tNullable(t.number), - remove_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])), - restore_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])), - clean: tNullable(t.boolean), +const zBaseSingleSpamConfig = z.strictObject({ + interval: z.number(), + count: z.number(), + mute: z.boolean().default(false), + mute_time: z.number().nullable().default(null), + remove_roles_on_mute: z.union([ + z.boolean(), + z.array(zSnowflake), + ]).default(false), + restore_roles_on_mute: z.union([ + z.boolean(), + z.array(zSnowflake), + ]).default(false), + clean: z.boolean().default(false), }); -export type TBaseSingleSpamConfig = t.TypeOf; +export type TBaseSingleSpamConfig = z.infer; -export const ConfigSchema = t.type({ - max_censor: tNullable(BaseSingleSpamConfig), - max_messages: tNullable(BaseSingleSpamConfig), - max_mentions: tNullable(BaseSingleSpamConfig), - max_links: tNullable(BaseSingleSpamConfig), - max_attachments: tNullable(BaseSingleSpamConfig), - max_emojis: tNullable(BaseSingleSpamConfig), - max_newlines: tNullable(BaseSingleSpamConfig), - max_duplicates: tNullable(BaseSingleSpamConfig), - max_characters: tNullable(BaseSingleSpamConfig), - max_voice_moves: tNullable(BaseSingleSpamConfig), +export const zSpamConfig = z.strictObject({ + max_censor: zBaseSingleSpamConfig.nullable(), + max_messages: zBaseSingleSpamConfig.nullable(), + max_mentions: zBaseSingleSpamConfig.nullable(), + max_links: zBaseSingleSpamConfig.nullable(), + max_attachments: zBaseSingleSpamConfig.nullable(), + max_emojis: zBaseSingleSpamConfig.nullable(), + max_newlines: zBaseSingleSpamConfig.nullable(), + max_duplicates: zBaseSingleSpamConfig.nullable(), + max_characters: zBaseSingleSpamConfig.nullable(), + max_voice_moves: zBaseSingleSpamConfig.nullable(), }); -export type TConfigSchema = t.TypeOf; export enum RecentActionType { Message = 1, @@ -53,7 +58,7 @@ interface IRecentAction { } export interface SpamPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { logs: GuildLogs; archives: GuildArchives; diff --git a/backend/src/plugins/Starboard/StarboardPlugin.ts b/backend/src/plugins/Starboard/StarboardPlugin.ts index 050b90375..4ca3c4419 100644 --- a/backend/src/plugins/Starboard/StarboardPlugin.ts +++ b/backend/src/plugins/Starboard/StarboardPlugin.ts @@ -3,12 +3,11 @@ import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildStarboardMessages } from "../../data/GuildStarboardMessages"; import { GuildStarboardReactions } from "../../data/GuildStarboardReactions"; import { trimPluginDescription } from "../../utils"; -import { parseIoTsSchema } from "../../validatorUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { MigratePinsCmd } from "./commands/MigratePinsCmd"; import { StarboardReactionAddEvt } from "./events/StarboardReactionAddEvt"; import { StarboardReactionRemoveAllEvt, StarboardReactionRemoveEvt } from "./events/StarboardReactionRemoveEvts"; -import { ConfigSchema, StarboardPluginType, defaultStarboardOpts } from "./types"; +import { StarboardPluginType, zStarboardConfig } from "./types"; import { onMessageDelete } from "./util/onMessageDelete"; const defaultOptions: PluginOptions = { @@ -120,19 +119,10 @@ export const StarboardPlugin = zeppelinGuildPlugin()({ enabled: true ~~~ `), - configSchema: ConfigSchema, + configSchema: zStarboardConfig, }, - configParser(input) { - const boards = (input as any).boards; - if (boards) { - for (const [name, opts] of Object.entries(boards)) { - boards[name] = Object.assign({}, defaultStarboardOpts, opts); - } - } - - return parseIoTsSchema(ConfigSchema, input); - }, + configParser: (input) => zStarboardConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Starboard/types.ts b/backend/src/plugins/Starboard/types.ts index 223501e38..7dc2d8f58 100644 --- a/backend/src/plugins/Starboard/types.ts +++ b/backend/src/plugins/Starboard/types.ts @@ -1,39 +1,33 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildStarboardMessages } from "../../data/GuildStarboardMessages"; import { GuildStarboardReactions } from "../../data/GuildStarboardReactions"; -import { tDeepPartial, tNullable } from "../../utils"; - -const StarboardOpts = t.type({ - channel_id: t.string, - stars_required: t.number, - star_emoji: tNullable(t.array(t.string)), - allow_selfstars: tNullable(t.boolean), - copy_full_embed: tNullable(t.boolean), - enabled: tNullable(t.boolean), - show_star_count: t.boolean, - color: tNullable(t.number), +import { zBoundedRecord, zSnowflake } from "../../utils"; + +const zStarboardOpts = z.strictObject({ + channel_id: zSnowflake, + stars_required: z.number(), + star_emoji: z.array(z.string()).default(["⭐"]), + allow_selfstars: z.boolean().default(false), + copy_full_embed: z.boolean().default(false), + enabled: z.boolean().default(true), + show_star_count: z.boolean().default(true), + color: z.number().nullable().default(null), }); -export type TStarboardOpts = t.TypeOf; - -export const ConfigSchema = t.type({ - boards: t.record(t.string, StarboardOpts), - can_migrate: t.boolean, +export type TStarboardOpts = z.infer; + +export const zStarboardConfig = z.strictObject({ + boards: zBoundedRecord( + z.record(z.string(), zStarboardOpts), + 0, + 100, + ), + can_migrate: z.boolean(), }); -export type TConfigSchema = t.TypeOf; - -export const PartialConfigSchema = tDeepPartial(ConfigSchema); - -export const defaultStarboardOpts: Partial = { - star_emoji: ["⭐"], - enabled: true, - show_star_count: true, - color: null, -}; export interface StarboardPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { savedMessages: GuildSavedMessages; diff --git a/backend/src/plugins/Starboard/util/preprocessStaticConfig.ts b/backend/src/plugins/Starboard/util/preprocessStaticConfig.ts deleted file mode 100644 index 572587592..000000000 --- a/backend/src/plugins/Starboard/util/preprocessStaticConfig.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as t from "io-ts"; -import { defaultStarboardOpts, PartialConfigSchema } from "../types"; - -export function preprocessStaticConfig(config: t.TypeOf) { - if (config.boards) { - for (const [name, opts] of Object.entries(config.boards)) { - config.boards[name] = Object.assign({}, defaultStarboardOpts, opts); - } - } - - return config; -} diff --git a/backend/src/plugins/Tags/TagsPlugin.ts b/backend/src/plugins/Tags/TagsPlugin.ts index 3e0a5bb4e..c68f90bfe 100644 --- a/backend/src/plugins/Tags/TagsPlugin.ts +++ b/backend/src/plugins/Tags/TagsPlugin.ts @@ -2,7 +2,6 @@ import { Snowflake } from "discord.js"; import humanizeDuration from "humanize-duration"; import { PluginOptions } from "knub"; import moment from "moment-timezone"; -import { parseIoTsSchema, StrictValidationError } from "src/validatorUtils"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; @@ -19,7 +18,7 @@ import { TagListCmd } from "./commands/TagListCmd"; import { TagSourceCmd } from "./commands/TagSourceCmd"; import { generateTemplateMarkdown } from "./docs"; import { TemplateFunctions } from "./templateFunctions"; -import { ConfigSchema, TagsPluginType } from "./types"; +import { TagsPluginType, zTagsConfig } from "./types"; import { findTagByName } from "./util/findTagByName"; import { onMessageCreate } from "./util/onMessageCreate"; import { onMessageDelete } from "./util/onMessageDelete"; @@ -71,7 +70,7 @@ export const TagsPlugin = zeppelinGuildPlugin()({ ${generateTemplateMarkdown(TemplateFunctions)} `), - configSchema: ConfigSchema, + configSchema: zTagsConfig, }, dependencies: () => [LogsPlugin], @@ -96,28 +95,7 @@ export const TagsPlugin = zeppelinGuildPlugin()({ findTagByName: mapToPublicFn(findTagByName), }, - configParser(_input) { - const input = _input as any; - - if (input.delete_with_command && input.auto_delete_command) { - throw new StrictValidationError([ - `Cannot have both (global) delete_with_command and global_delete_invoke enabled`, - ]); - } - - // Check each category for conflicting options - if (input.categories) { - for (const [name, cat] of Object.entries(input.categories)) { - if ((cat as any).delete_with_command && (cat as any).auto_delete_command) { - throw new StrictValidationError([ - `Cannot have both (category specific) delete_with_command and category_delete_invoke enabled at `, - ]); - } - } - } - - return parseIoTsSchema(ConfigSchema, input); - }, + configParser: (input) => zTagsConfig.parse(input), beforeLoad(pluginData) { const { state, guild } = pluginData; diff --git a/backend/src/plugins/Tags/types.ts b/backend/src/plugins/Tags/types.ts index 3a7eb2b32..441906fee 100644 --- a/backend/src/plugins/Tags/types.ts +++ b/backend/src/plugins/Tags/types.ts @@ -1,52 +1,63 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { GuildTags } from "../../data/GuildTags"; -import { tEmbed, tNullable } from "../../utils"; +import { zEmbedInput } from "../../utils"; -export const Tag = t.union([t.string, tEmbed]); -export type TTag = t.TypeOf; +export const zTag = z.union([z.string(), zEmbedInput]); +export type TTag = z.infer; -export const TagCategory = t.type({ - prefix: tNullable(t.string), - delete_with_command: tNullable(t.boolean), +export const zTagCategory = z.strictObject({ + prefix: z.string().nullable().default(null), + delete_with_command: z.boolean().default(false), - user_tag_cooldown: tNullable(t.union([t.string, t.number])), // Per user, per tag - user_category_cooldown: tNullable(t.union([t.string, t.number])), // Per user, per tag category - global_tag_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per tag - allow_mentions: tNullable(t.boolean), // Per user, per category - global_category_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per category - auto_delete_command: tNullable(t.boolean), // Any tag, per tag category + user_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag + user_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag category + global_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per tag + allow_mentions: z.boolean().nullable().default(null), + global_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per category + auto_delete_command: z.boolean().nullable().default(null), - tags: t.record(t.string, Tag), + tags: z.record(z.string(), zTag), - can_use: tNullable(t.boolean), -}); -export type TTagCategory = t.TypeOf; + can_use: z.boolean().nullable().default(null), +}) + .refine( + (parsed) => ! (parsed.auto_delete_command && parsed.delete_with_command), + { + message: "Cannot have both (category specific) delete_with_command and auto_delete_command enabled", + }, + ); +export type TTagCategory = z.infer; -export const ConfigSchema = t.type({ - prefix: t.string, - delete_with_command: t.boolean, +export const zTagsConfig = z.strictObject({ + prefix: z.string(), + delete_with_command: z.boolean(), - user_tag_cooldown: tNullable(t.union([t.string, t.number])), // Per user, per tag - global_tag_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per tag - user_cooldown: tNullable(t.union([t.string, t.number])), // Per user - allow_mentions: t.boolean, // Per user - global_cooldown: tNullable(t.union([t.string, t.number])), // Any tag use - auto_delete_command: t.boolean, // Any tag + user_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user, per tag + global_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Any user, per tag + user_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user + allow_mentions: z.boolean(), // Per user + global_cooldown: z.union([z.string(), z.number()]).nullable(), // Any tag use + auto_delete_command: z.boolean(), // Any tag - categories: t.record(t.string, TagCategory), + categories: z.record(z.string(), zTagCategory), - can_create: t.boolean, - can_use: t.boolean, - can_list: t.boolean, -}); -export type TConfigSchema = t.TypeOf; + can_create: z.boolean(), + can_use: z.boolean(), + can_list: z.boolean(), +}) +.refine( + (parsed) => ! (parsed.auto_delete_command && parsed.delete_with_command), + { + message: "Cannot have both (category specific) delete_with_command and auto_delete_command enabled", + }, +); export interface TagsPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { archives: GuildArchives; tags: GuildTags; diff --git a/backend/src/plugins/Tags/util/findTagByName.ts b/backend/src/plugins/Tags/util/findTagByName.ts index 1b877f33f..98fafc3f3 100644 --- a/backend/src/plugins/Tags/util/findTagByName.ts +++ b/backend/src/plugins/Tags/util/findTagByName.ts @@ -1,12 +1,11 @@ -import * as t from "io-ts"; import { ExtendedMatchParams, GuildPluginData } from "knub"; -import { Tag, TagsPluginType } from "../types"; +import { TTag, TagsPluginType } from "../types"; export async function findTagByName( pluginData: GuildPluginData, name: string, matchParams: ExtendedMatchParams = {}, -): Promise | null> { +): Promise { const config = await pluginData.config.getMatchingConfig(matchParams); // Tag from a hardcoded category diff --git a/backend/src/plugins/Tags/util/onMessageCreate.ts b/backend/src/plugins/Tags/util/onMessageCreate.ts index 12c6cf8d7..f5b0b04ae 100644 --- a/backend/src/plugins/Tags/util/onMessageCreate.ts +++ b/backend/src/plugins/Tags/util/onMessageCreate.ts @@ -2,9 +2,8 @@ import { Snowflake, TextChannel } from "discord.js"; import { GuildPluginData } from "knub"; import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions"; import { SavedMessage } from "../../../data/entities/SavedMessage"; -import { convertDelayStringToMS, resolveMember, tStrictMessageContent } from "../../../utils"; +import { convertDelayStringToMS, resolveMember, zStrictMessageContent } from "../../../utils"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; -import { validate } from "../../../validatorUtils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TagsPluginType } from "../types"; import { matchAndRenderTagFromString } from "./matchAndRenderTagFromString"; @@ -85,10 +84,10 @@ export async function onMessageCreate(pluginData: GuildPluginData = { config: { @@ -39,10 +39,10 @@ export const TimeAndDatePlugin = zeppelinGuildPlugin()({ description: trimPluginDescription(` Allows controlling the displayed time/date formats and timezones `), - configSchema: ConfigSchema, + configSchema: zTimeAndDateConfig, }, - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zTimeAndDateConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/TimeAndDate/types.ts b/backend/src/plugins/TimeAndDate/types.ts index 102d620bf..7a942518c 100644 --- a/backend/src/plugins/TimeAndDate/types.ts +++ b/backend/src/plugins/TimeAndDate/types.ts @@ -1,19 +1,21 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginMessageCommand } from "knub"; +import { U } from "ts-toolbelt"; +import z from "zod"; import { GuildMemberTimezones } from "../../data/GuildMemberTimezones"; -import { tNullable, tPartialDictionary } from "../../utils"; -import { tValidTimezone } from "../../utils/tValidTimezone"; +import { keys } from "../../utils"; +import { zValidTimezone } from "../../utils/zValidTimezone"; import { defaultDateFormats } from "./defaultDateFormats"; -export const ConfigSchema = t.type({ - timezone: tValidTimezone, - date_formats: tNullable(tPartialDictionary(t.keyof(defaultDateFormats), t.string)), - can_set_timezone: t.boolean, +const zDateFormatKeys = z.enum(keys(defaultDateFormats) as U.ListOf); + +export const zTimeAndDateConfig = z.strictObject({ + timezone: zValidTimezone(z.string()), + date_formats: z.record(zDateFormatKeys, z.string()).nullable(), + can_set_timezone: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface TimeAndDatePluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { memberTimezones: GuildMemberTimezones; }; diff --git a/backend/src/plugins/UsernameSaver/UsernameSaverPlugin.ts b/backend/src/plugins/UsernameSaver/UsernameSaverPlugin.ts index 3bdb310c9..e64d3c985 100644 --- a/backend/src/plugins/UsernameSaver/UsernameSaverPlugin.ts +++ b/backend/src/plugins/UsernameSaver/UsernameSaverPlugin.ts @@ -1,16 +1,14 @@ -import * as t from "io-ts"; import { Queue } from "../../Queue"; import { UsernameHistory } from "../../data/UsernameHistory"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { MessageCreateUpdateUsernameEvt, VoiceChannelJoinUpdateUsernameEvt } from "./events/UpdateUsernameEvts"; -import { UsernameSaverPluginType } from "./types"; +import { UsernameSaverPluginType, zUsernameSaverConfig } from "./types"; export const UsernameSaverPlugin = zeppelinGuildPlugin()({ name: "username_saver", showInDocs: false, - configParser: makeIoTsConfigParser(t.type({})), + configParser: (input) => zUsernameSaverConfig.parse(input), // prettier-ignore events: [ diff --git a/backend/src/plugins/UsernameSaver/types.ts b/backend/src/plugins/UsernameSaver/types.ts index d3c5518f0..16d6e3424 100644 --- a/backend/src/plugins/UsernameSaver/types.ts +++ b/backend/src/plugins/UsernameSaver/types.ts @@ -1,8 +1,12 @@ import { BasePluginType, guildPluginEventListener } from "knub"; +import z from "zod"; import { Queue } from "../../Queue"; import { UsernameHistory } from "../../data/UsernameHistory"; +export const zUsernameSaverConfig = z.strictObject({}); + export interface UsernameSaverPluginType extends BasePluginType { + config: z.infer; state: { usernameHistory: UsernameHistory; updateQueue: Queue; diff --git a/backend/src/plugins/Utility/UtilityPlugin.ts b/backend/src/plugins/Utility/UtilityPlugin.ts index 68f6987a9..efb892ec8 100644 --- a/backend/src/plugins/Utility/UtilityPlugin.ts +++ b/backend/src/plugins/Utility/UtilityPlugin.ts @@ -5,7 +5,7 @@ import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { Supporters } from "../../data/Supporters"; -import { makeIoTsConfigParser, sendSuccessMessage } from "../../pluginUtils"; +import { sendSuccessMessage } from "../../pluginUtils"; import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { ModActionsPlugin } from "../ModActions/ModActionsPlugin"; @@ -42,7 +42,7 @@ import { getUserInfoEmbed } from "./functions/getUserInfoEmbed"; import { hasPermission } from "./functions/hasPermission"; import { activeReloads } from "./guildReloads"; import { refreshMembersIfNeeded } from "./refreshMembers"; -import { ConfigSchema, UtilityPluginType } from "./types"; +import { UtilityPluginType, zUtilityConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -117,11 +117,11 @@ export const UtilityPlugin = zeppelinGuildPlugin()({ showInDocs: true, info: { prettyName: "Utility", - configSchema: ConfigSchema, + configSchema: zUtilityConfig, }, dependencies: () => [TimeAndDatePlugin, ModActionsPlugin, LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zUtilityConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts index 19710b581..dbaacf27b 100644 --- a/backend/src/plugins/Utility/search.ts +++ b/backend/src/plugins/Utility/search.ts @@ -14,10 +14,9 @@ import { ArgsFromSignatureOrArray, GuildPluginData } from "knub"; import moment from "moment-timezone"; import { RegExpRunner, allowTimeout } from "../../RegExpRunner"; import { getBaseUrl, sendErrorMessage } from "../../pluginUtils"; -import { MINUTES, multiSorter, renderUserUsername, sorter, trimLines } from "../../utils"; +import { InvalidRegexError, MINUTES, inputPatternToRegExp, multiSorter, renderUserUsername, sorter, trimLines } from "../../utils"; import { asyncFilter } from "../../utils/async"; import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions"; -import { InvalidRegexError, inputPatternToRegExp } from "../../validatorUtils"; import { banSearchSignature } from "./commands/BanSearchCmd"; import { searchCmdSignature } from "./commands/SearchCmd"; import { getUserInfoEmbed } from "./functions/getUserInfoEmbed"; diff --git a/backend/src/plugins/Utility/types.ts b/backend/src/plugins/Utility/types.ts index aaac036a9..77b3d8acd 100644 --- a/backend/src/plugins/Utility/types.ts +++ b/backend/src/plugins/Utility/types.ts @@ -1,5 +1,5 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener, guildPluginMessageCommand } from "knub"; +import z from "zod"; import { RegExpRunner } from "../../RegExpRunner"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; @@ -7,39 +7,38 @@ import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { Supporters } from "../../data/Supporters"; -export const ConfigSchema = t.type({ - can_roles: t.boolean, - can_level: t.boolean, - can_search: t.boolean, - can_clean: t.boolean, - can_info: t.boolean, - can_server: t.boolean, - can_inviteinfo: t.boolean, - can_channelinfo: t.boolean, - can_messageinfo: t.boolean, - can_userinfo: t.boolean, - can_roleinfo: t.boolean, - can_emojiinfo: t.boolean, - can_snowflake: t.boolean, - can_reload_guild: t.boolean, - can_nickname: t.boolean, - can_ping: t.boolean, - can_source: t.boolean, - can_vcmove: t.boolean, - can_vckick: t.boolean, - can_help: t.boolean, - can_about: t.boolean, - can_context: t.boolean, - can_jumbo: t.boolean, - jumbo_size: t.Integer, - can_avatar: t.boolean, - info_on_single_result: t.boolean, - autojoin_threads: t.boolean, +export const zUtilityConfig = z.strictObject({ + can_roles: z.boolean(), + can_level: z.boolean(), + can_search: z.boolean(), + can_clean: z.boolean(), + can_info: z.boolean(), + can_server: z.boolean(), + can_inviteinfo: z.boolean(), + can_channelinfo: z.boolean(), + can_messageinfo: z.boolean(), + can_userinfo: z.boolean(), + can_roleinfo: z.boolean(), + can_emojiinfo: z.boolean(), + can_snowflake: z.boolean(), + can_reload_guild: z.boolean(), + can_nickname: z.boolean(), + can_ping: z.boolean(), + can_source: z.boolean(), + can_vcmove: z.boolean(), + can_vckick: z.boolean(), + can_help: z.boolean(), + can_about: z.boolean(), + can_context: z.boolean(), + can_jumbo: z.boolean(), + jumbo_size: z.number(), + can_avatar: z.boolean(), + info_on_single_result: z.boolean(), + autojoin_threads: z.boolean(), }); -export type TConfigSchema = t.TypeOf; export interface UtilityPluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { logs: GuildLogs; cases: GuildCases; diff --git a/backend/src/plugins/WelcomeMessage/WelcomeMessagePlugin.ts b/backend/src/plugins/WelcomeMessage/WelcomeMessagePlugin.ts index e007b9689..ba8f9de35 100644 --- a/backend/src/plugins/WelcomeMessage/WelcomeMessagePlugin.ts +++ b/backend/src/plugins/WelcomeMessage/WelcomeMessagePlugin.ts @@ -1,10 +1,9 @@ import { PluginOptions } from "knub"; import { GuildLogs } from "../../data/GuildLogs"; -import { makeIoTsConfigParser } from "../../pluginUtils"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { SendWelcomeMessageEvt } from "./events/SendWelcomeMessageEvt"; -import { ConfigSchema, WelcomeMessagePluginType } from "./types"; +import { WelcomeMessagePluginType, zWelcomeMessageConfig } from "./types"; const defaultOptions: PluginOptions = { config: { @@ -19,11 +18,11 @@ export const WelcomeMessagePlugin = zeppelinGuildPlugin [LogsPlugin], - configParser: makeIoTsConfigParser(ConfigSchema), + configParser: (input) => zWelcomeMessageConfig.parse(input), defaultOptions, // prettier-ignore diff --git a/backend/src/plugins/WelcomeMessage/types.ts b/backend/src/plugins/WelcomeMessage/types.ts index 682cfe392..25e9afb16 100644 --- a/backend/src/plugins/WelcomeMessage/types.ts +++ b/backend/src/plugins/WelcomeMessage/types.ts @@ -1,17 +1,15 @@ -import * as t from "io-ts"; import { BasePluginType, guildPluginEventListener } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; -import { tNullable } from "../../utils"; -export const ConfigSchema = t.type({ - send_dm: t.boolean, - send_to_channel: tNullable(t.string), - message: tNullable(t.string), +export const zWelcomeMessageConfig = z.strictObject({ + send_dm: z.boolean(), + send_to_channel: z.string().nullable(), + message: z.string().nullable(), }); -export type TConfigSchema = t.TypeOf; export interface WelcomeMessagePluginType extends BasePluginType { - config: TConfigSchema; + config: z.infer; state: { logs: GuildLogs; sentWelcomeMessages: Set; diff --git a/backend/src/plugins/ZeppelinPluginBlueprint.ts b/backend/src/plugins/ZeppelinPluginBlueprint.ts index 165c67b5c..aa266abcf 100644 --- a/backend/src/plugins/ZeppelinPluginBlueprint.ts +++ b/backend/src/plugins/ZeppelinPluginBlueprint.ts @@ -1,4 +1,3 @@ -import * as t from "io-ts"; import { BasePluginType, globalPlugin, @@ -9,6 +8,7 @@ import { GuildPluginData, } from "knub"; import { TMarkdown } from "../types"; +import { ZodTypeAny } from "zod"; /** * GUILD PLUGINS @@ -23,7 +23,7 @@ export interface ZeppelinGuildPluginBlueprint; + configSchema?: ZodTypeAny; }; } diff --git a/backend/src/types.ts b/backend/src/types.ts index 45974aee2..409c4dc63 100644 --- a/backend/src/types.ts +++ b/backend/src/types.ts @@ -1,5 +1,6 @@ -import * as t from "io-ts"; import { BaseConfig, Knub } from "knub"; +import z from "zod"; +import { zSnowflake } from "./utils"; export interface ZeppelinGuildConfig extends BaseConfig { success_emoji?: string; @@ -10,31 +11,19 @@ export interface ZeppelinGuildConfig extends BaseConfig { date_formats?: any; } -export const ZeppelinGuildConfigSchema = t.type({ +export const zZeppelinGuildConfig = z.strictObject({ // From BaseConfig - prefix: t.string, - levels: t.record(t.string, t.number), - plugins: t.record(t.string, t.unknown), + prefix: z.string().optional(), + levels: z.record(zSnowflake, z.number()).optional(), + plugins: z.record(z.string(), z.unknown()).optional(), // From ZeppelinGuildConfig - success_emoji: t.string, - error_emoji: t.string, + success_emoji: z.string().optional(), + error_emoji: z.string().optional(), // Deprecated - timezone: t.string, - date_formats: t.unknown, -}); -export const PartialZeppelinGuildConfigSchema = t.partial(ZeppelinGuildConfigSchema.props); - -export interface ZeppelinGlobalConfig extends BaseConfig { - url: string; - owners?: string[]; -} - -export const ZeppelinGlobalConfigSchema = t.type({ - url: t.string, - owners: t.array(t.string), - plugins: t.record(t.string, t.unknown), + timezone: z.string().optional(), + date_formats: z.unknown().optional(), }); export type TZeppelinKnub = Knub; diff --git a/backend/src/utils.test.ts b/backend/src/utils.test.ts index f5c9f935b..461be47be 100644 --- a/backend/src/utils.test.ts +++ b/backend/src/utils.test.ts @@ -1,6 +1,6 @@ import test from "ava"; -import * as ioTs from "io-ts"; -import { convertDelayStringToMS, convertMSToDelayString, getUrlsInString, tAllowedMentions } from "./utils"; +import z from "zod"; +import { convertDelayStringToMS, convertMSToDelayString, getUrlsInString, zAllowedMentions } from "./utils"; import { ErisAllowedMentionFormat } from "./utils/erisAllowedMentionsToDjsMentionOptions"; type AssertEquals = TActual extends TExpected ? true : false; @@ -50,7 +50,7 @@ test("delay strings: reverse conversion (conservative)", (t) => { }); test("tAllowedMentions matches Eris's AllowedMentions", (t) => { - type TAllowedMentions = ioTs.TypeOf; + type TAllowedMentions = z.infer; // eslint-disable-next-line @typescript-eslint/no-unused-vars const typeTest: AssertEquals = true; t.pass(); diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 1bb4d6ce6..641a25734 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -21,31 +21,26 @@ import { PartialChannelData, PartialMessage, RoleResolvable, - Snowflake, Sticker, TextBasedChannel, User, } from "discord.js"; import emojiRegex from "emoji-regex"; -import { either } from "fp-ts/lib/Either"; -import { unsafeCoerce } from "fp-ts/lib/function"; import fs from "fs"; import https from "https"; import humanizeDuration from "humanize-duration"; -import * as t from "io-ts"; import { isEqual } from "lodash"; -import moment from "moment-timezone"; import { performance } from "perf_hooks"; import tlds from "tlds"; import tmp from "tmp"; import { URL } from "url"; -import { z, ZodError } from "zod"; +import { z, ZodEffects, ZodError, ZodRecord, ZodString } from "zod"; import { ISavedMessageAttachmentData, SavedMessage } from "./data/entities/SavedMessage"; import { getProfiler } from "./profiler"; import { SimpleCache } from "./SimpleCache"; import { sendDM } from "./utils/sendDM"; +import { Brand } from "./utils/typeUtils"; import { waitForButtonConfirm } from "./utils/waitForInteraction"; -import { decodeAndValidateStrict, StrictValidationError } from "./validatorUtils"; const fsp = fs.promises; @@ -91,71 +86,9 @@ export function isDiscordAPIError(err: Error | string): err is DiscordAPIError { return err instanceof DiscordAPIError; } -export function tNullable>(type: T) { - return t.union([type, t.undefined, t.null], `Nullable<${type.name}>`); -} - -export const tNormalizedNullOrUndefined = new t.Type( - "tNormalizedNullOrUndefined", - (v): v is undefined => typeof v === "undefined", - (v, c) => (v == null ? t.success(undefined) : t.failure(v, c, "Value must be null or undefined")), - () => undefined, -); - -/** - * Similar to `tNullable`, but normalizes both `null` and `undefined` to `undefined`. - * This allows adding optional config options that can be "removed" by setting the value to `null`. - */ -export function tNormalizedNullOptional>(type: T) { - return t.union( - [type, tNormalizedNullOrUndefined], - `Optional<${type.name}>`, // Simplified name for errors and config schema views - ); -} - -export type TDeepPartial = T extends t.InterfaceType - ? TDeepPartialProps - : T extends t.DictionaryType - ? t.DictionaryType> - : T extends t.UnionType - ? t.UnionType>> - : T extends t.IntersectionType - ? t.IntersectionType>> - : T extends t.ArrayType - ? t.ArrayType> - : T; - -// Based on t.PartialC -export interface TDeepPartialProps

- extends t.PartialType< - P, - { - [K in keyof P]?: TDeepPartial>; - }, - { - [K in keyof P]?: TDeepPartial>; - } - > {} - -export function tDeepPartial(type: T): TDeepPartial { - if (type instanceof t.InterfaceType || type instanceof t.PartialType) { - const newProps = {}; - for (const [key, prop] of Object.entries(type.props)) { - newProps[key] = tDeepPartial(prop); - } - return t.partial(newProps) as TDeepPartial; - } else if (type instanceof t.DictionaryType) { - return t.record(type.domain, tDeepPartial(type.codomain)) as TDeepPartial; - } else if (type instanceof t.UnionType) { - return t.union(type.types.map((unionType) => tDeepPartial(unionType))) as TDeepPartial; - } else if (type instanceof t.IntersectionType) { - const types = type.types.map((intersectionType) => tDeepPartial(intersectionType)); - return t.intersection(types as [t.Mixed, t.Mixed]) as unknown as TDeepPartial; - } else if (type instanceof t.ArrayType) { - return t.array(tDeepPartial(type.type)) as TDeepPartial; - } else { - return type as TDeepPartial; - } +// null | undefined -> undefined +export function zNullishToUndefined(type: T): ZodEffects> | undefined> { + return type.transform(v => v ?? undefined); } export function getScalarDifference( @@ -207,29 +140,6 @@ export function differenceToString(diff: Map): st // https://stackoverflow.com/a/49262929/316944 export type Not = T & Exclude; -// io-ts partial dictionary type -// From https://github.com/gcanti/io-ts/issues/429#issuecomment-655394345 -export interface PartialDictionaryC - extends t.DictionaryType< - D, - C, - { - [K in t.TypeOf]?: t.TypeOf; - }, - { - [K in t.OutputOf]?: t.OutputOf; - }, - unknown - > {} - -export const tPartialDictionary = ( - domain: D, - codomain: C, - name?: string, -): PartialDictionaryC => { - return unsafeCoerce(t.record(t.union([domain, t.undefined]), codomain, name)); -}; - export function nonNullish(v: V): v is NonNullable { return v != null; } @@ -240,69 +150,59 @@ export type GroupDMInvite = Invite & { type: typeof ChannelType.GroupDM; }; +function isBoundedString(str: unknown, min: number, max: number): str is string { + if (typeof str !== "string") { + return false; + } + return (str.length >= min && str.length <= max); +} + +export function zBoundedCharacters(min: number, max: number) { + return z.string().refine(str => { + const len = [...str].length; // Unicode aware character split + return (len >= min && len <= max); + }, { + message: `String must be between ${min} and ${max} characters long`, + }); +} + +export const zSnowflake = z.string().refine(str => isSnowflake(str), { + message: "Invalid snowflake ID", +}); + +const regexWithFlags = /^\/(.*?)\/([i]*)$/; + +export class InvalidRegexError extends Error {} + /** - * Mirrors EmbedOptions from Eris + * This function supports two input syntaxes for regexes: // and just */ -export const tEmbed = t.type({ - title: tNullable(t.string), - description: tNullable(t.string), - url: tNullable(t.string), - timestamp: tNullable(t.string), - color: tNullable(t.number), - footer: tNullable( - t.type({ - text: t.string, - icon_url: tNullable(t.string), - proxy_icon_url: tNullable(t.string), - }), - ), - image: tNullable( - t.type({ - url: tNullable(t.string), - proxy_url: tNullable(t.string), - width: tNullable(t.number), - height: tNullable(t.number), - }), - ), - thumbnail: tNullable( - t.type({ - url: tNullable(t.string), - proxy_url: tNullable(t.string), - width: tNullable(t.number), - height: tNullable(t.number), - }), - ), - video: tNullable( - t.type({ - url: tNullable(t.string), - width: tNullable(t.number), - height: tNullable(t.number), - }), - ), - provider: tNullable( - t.type({ - name: t.string, - url: tNullable(t.string), - }), - ), - fields: tNullable( - t.array( - t.type({ - name: tNullable(t.string), - value: tNullable(t.string), - inline: tNullable(t.boolean), - }), - ), - ), - author: tNullable( - t.type({ - name: t.string, - url: tNullable(t.string), - width: tNullable(t.number), - height: tNullable(t.number), - }), - ), -}); +export function inputPatternToRegExp(pattern: string) { + const advancedSyntaxMatch = pattern.match(regexWithFlags); + const [finalPattern, flags] = advancedSyntaxMatch ? [advancedSyntaxMatch[1], advancedSyntaxMatch[2]] : [pattern, ""]; + try { + return new RegExp(finalPattern, flags); + } catch (e) { + throw new InvalidRegexError(e.message); + } +} + +export function zRegex(zStr: T) { + return zStr.transform((str, ctx) => { + try { + return inputPatternToRegExp(str); + } catch (err) { + if (err instanceof InvalidRegexError) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid regex" + }); + return z.NEVER; + } + throw err; + } + }); +} export const zEmbedInput = z.object({ title: z.string().optional(), @@ -387,15 +287,7 @@ export type StrictMessageContent = { embeds?: APIEmbed[]; }; -export const tStrictMessageContent = t.type({ - content: tNullable(t.string), - tts: tNullable(t.boolean), - disableEveryone: tNullable(t.boolean), - embed: tNullable(tEmbed), - embeds: tNullable(t.array(tEmbed)), -}); - -export const tMessageContent = t.union([t.string, tStrictMessageContent]); +export const zMessageContent = z.union([zBoundedCharacters(0, 4000), zStrictMessageContent]); export function validateAndParseMessageContent(input: unknown): StrictMessageContent { if (input == null) { @@ -454,11 +346,11 @@ function dropNullValuesRecursively(obj: any) { /** * Mirrors AllowedMentions from Eris */ -export const tAllowedMentions = t.type({ - everyone: tNormalizedNullOptional(t.boolean), - users: tNormalizedNullOptional(t.union([t.boolean, t.array(t.string)])), - roles: tNormalizedNullOptional(t.union([t.boolean, t.array(t.string)])), - repliedUser: tNormalizedNullOptional(t.boolean), +export const zAllowedMentions = z.strictObject({ + everyone: zNullishToUndefined(z.boolean().nullable().optional()), + users: zNullishToUndefined(z.union([z.boolean(), z.array(z.string())]).nullable().optional()), + roles: zNullishToUndefined(z.union([z.boolean(), z.array(z.string())]).nullable().optional()), + replied_user: zNullishToUndefined(z.boolean().nullable().optional()), }); export function dropPropertiesByName(obj, propName) { @@ -472,39 +364,18 @@ export function dropPropertiesByName(obj, propName) { } } -export const tAlphanumeric = new t.Type( - "tAlphanumeric", - (s): s is string => typeof s === "string", - (from, to) => - either.chain(t.string.validate(from, to), (s) => { - return s.match(/\W/) ? t.failure(from, to, "String must be alphanumeric") : t.success(s); - }), - (s) => s, -); - -export const tDateTime = new t.Type( - "tDateTime", - (s): s is string => typeof s === "string", - (from, to) => - either.chain(t.string.validate(from, to), (s) => { - const parsed = - s.length === 10 ? moment.utc(s, "YYYY-MM-DD") : s.length === 19 ? moment.utc(s, "YYYY-MM-DD HH:mm:ss") : null; - - return parsed && parsed.isValid() ? t.success(s) : t.failure(from, to, "Invalid datetime"); - }), - (s) => s, -); - -export const tDelayString = new t.Type( - "tDelayString", - (s): s is string => typeof s === "string", - (from, to) => - either.chain(t.string.validate(from, to), (s) => { - const ms = convertDelayStringToMS(s); - return ms === null ? t.failure(from, to, "Invalid delay string") : t.success(s); - }), - (s) => s, -); +export function zBoundedRecord>(record: TRecord, minKeys: number, maxKeys: number): ZodEffects { + return record.refine(data => { + const len = Object.keys(data).length; + return (len >= minKeys && len <= maxKeys); + }, { + message: `Object must have ${minKeys}-${maxKeys} keys`, + }); +} + +export const zDelayString = z.string().max(32).refine(str => convertDelayStringToMS(str) !== null, { + message: "Invalid delay string", +}); // To avoid running into issues with the JS max date vaLue, we cap maximum delay strings *far* below that. // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps @@ -609,9 +480,11 @@ export function stripObjectToScalars(obj, includedNested: string[] = []) { export const snowflakeRegex = /[1-9][0-9]{5,19}/; +export type Snowflake = Brand; + const isSnowflakeRegex = new RegExp(`^${snowflakeRegex.source}$`); -export function isSnowflake(v: string): boolean { - return isSnowflakeRegex.test(v); +export function isSnowflake(v: unknown): v is Snowflake { + return typeof v === "string" && isSnowflakeRegex.test(v); } export function sleep(ms: number): Promise { @@ -1474,8 +1347,7 @@ export function messageLink(guildIdOrMessage: string | Message | null, channelId } export function isValidEmbed(embed: any): boolean { - const result = decodeAndValidateStrict(tEmbed, embed); - return !(result instanceof StrictValidationError); + return zEmbedInput.safeParse(embed).success; } const formatter = new Intl.NumberFormat("en-US"); @@ -1613,3 +1485,19 @@ export function renderUsername(username: string, discriminator: string): string export function renderUserUsername(user: User | UnknownUser): string { return renderUsername(user.username, user.discriminator); } + +type Entries = Array<{ + [Key in keyof T]-?: [Key, T[Key]]; +}[keyof T]>; + +export function entries(object: T) { + return Object.entries(object) as Entries; +} + +export function keys(object: T) { + return Object.keys(object) as Array; +} + +export function values(object: T) { + return Object.values(object) as Array; +} diff --git a/backend/src/utils/iotsUtils.ts b/backend/src/utils/iotsUtils.ts deleted file mode 100644 index a3636c840..000000000 --- a/backend/src/utils/iotsUtils.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as t from "io-ts"; - -interface BoundedStringBrand { - readonly BoundedString: unique symbol; -} - -export function asBoundedString(str: string) { - return str as t.Branded; -} - -export function tBoundedString(min: number, max: number) { - return t.brand( - t.string, - (str): str is t.Branded => (str.length >= min && str.length <= max), - "BoundedString", - ); -} diff --git a/backend/src/utils/tColor.ts b/backend/src/utils/tColor.ts deleted file mode 100644 index f240f7f44..000000000 --- a/backend/src/utils/tColor.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { either } from "fp-ts/lib/Either"; -import * as t from "io-ts"; -import { intToRgb } from "./intToRgb"; -import { parseColor } from "./parseColor"; -import { rgbToInt } from "./rgbToInt"; - -export const tColor = new t.Type( - "tColor", - (s): s is number => typeof s === "number", - (from, to) => - either.chain(t.string.validate(from, to), (input) => { - const parsedColor = parseColor(input); - return parsedColor == null ? t.failure(from, to, "Invalid color") : t.success(rgbToInt(parsedColor)); - }), - (s) => intToRgb(s).join(","), -); diff --git a/backend/src/utils/tValidTimezone.ts b/backend/src/utils/tValidTimezone.ts deleted file mode 100644 index 35fc97c54..000000000 --- a/backend/src/utils/tValidTimezone.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { either } from "fp-ts/lib/Either"; -import * as t from "io-ts"; -import { isValidTimezone } from "./isValidTimezone"; - -export const tValidTimezone = new t.Type( - "tValidTimezone", - (s): s is string => typeof s === "string", - (from, to) => - either.chain(t.string.validate(from, to), (input) => { - return isValidTimezone(input) ? t.success(input) : t.failure(from, to, `Invalid timezone: ${input}`); - }), - (s) => s, -); diff --git a/backend/src/utils/typeUtils.ts b/backend/src/utils/typeUtils.ts index 7c8b4cbd9..983015816 100644 --- a/backend/src/utils/typeUtils.ts +++ b/backend/src/utils/typeUtils.ts @@ -14,3 +14,11 @@ export type Awaitable = T | Promise; export type DeepMutable = { -readonly [P in keyof T]: DeepMutable; }; + +// From https://stackoverflow.com/a/70262876/316944 +export declare abstract class As { + private static readonly $as$: unique symbol; + private [As.$as$]: Record; +} + +export type Brand = T & As; diff --git a/backend/src/utils/zColor.ts b/backend/src/utils/zColor.ts new file mode 100644 index 000000000..1bc3ae924 --- /dev/null +++ b/backend/src/utils/zColor.ts @@ -0,0 +1,15 @@ +import z from "zod"; +import { parseColor } from "./parseColor"; +import { rgbToInt } from "./rgbToInt"; + +export const zColor = z.string().transform((val, ctx) => { + const parsedColor = parseColor(val); + if (parsedColor == null) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid color", + }); + return z.NEVER; + } + return rgbToInt(parsedColor); +}); diff --git a/backend/src/utils/zValidTimezone.ts b/backend/src/utils/zValidTimezone.ts new file mode 100644 index 000000000..b83c47c10 --- /dev/null +++ b/backend/src/utils/zValidTimezone.ts @@ -0,0 +1,8 @@ +import { ZodString } from "zod"; +import { isValidTimezone } from "./isValidTimezone"; + +export function zValidTimezone(z: Z) { + return z.refine((val) => isValidTimezone(val), { + message: "Invalid timezone", + }); +} diff --git a/backend/src/validation.test.ts b/backend/src/validation.test.ts deleted file mode 100644 index d41d6c4af..000000000 --- a/backend/src/validation.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import test from "ava"; -import * as t from "io-ts"; -import { tDeepPartial } from "./utils"; -import * as validatorUtils from "./validatorUtils"; - -test("tDeepPartial works", (ava) => { - const originalSchema = t.type({ - listOfThings: t.record( - t.string, - t.type({ - enabled: t.boolean, - someValue: t.number, - }), - ), - }); - - const deepPartialSchema = tDeepPartial(originalSchema); - - const partialValidValue = { - listOfThings: { - myThing: { - someValue: 5, - }, - }, - }; - - const partialErrorValue = { - listOfThings: { - myThing: { - someValue: "test", - }, - }, - }; - - const result1 = validatorUtils.validate(deepPartialSchema, partialValidValue); - ava.is(result1, null); - - const result2 = validatorUtils.validate(deepPartialSchema, partialErrorValue); - ava.not(result2, null); -}); diff --git a/backend/src/validatorUtils.ts b/backend/src/validatorUtils.ts deleted file mode 100644 index 31139596d..000000000 --- a/backend/src/validatorUtils.ts +++ /dev/null @@ -1,140 +0,0 @@ -import deepDiff from "deep-diff"; -import { either, fold, isLeft } from "fp-ts/lib/Either"; -import { pipe } from "fp-ts/lib/pipeable"; -import * as t from "io-ts"; -import { noop } from "./utils"; - -const regexWithFlags = /^\/(.*?)\/([i]*)$/; - -export class InvalidRegexError extends Error {} - -/** - * This function supports two input syntaxes for regexes: // and just - */ -export function inputPatternToRegExp(pattern: string) { - const advancedSyntaxMatch = pattern.match(regexWithFlags); - const [finalPattern, flags] = advancedSyntaxMatch ? [advancedSyntaxMatch[1], advancedSyntaxMatch[2]] : [pattern, ""]; - try { - return new RegExp(finalPattern, flags); - } catch (e) { - throw new InvalidRegexError(e.message); - } -} - -export const TRegex = new t.Type( - "TRegex", - (s): s is RegExp => s instanceof RegExp, - (from, to) => - either.chain(t.string.validate(from, to), (s) => { - try { - return t.success(inputPatternToRegExp(s)); - } catch (err) { - if (err instanceof InvalidRegexError) { - return t.failure(s, [], err.message); - } - - throw err; - } - }), - (s) => `/${s.source}/${s.flags}`, -); - -// From io-ts/lib/PathReporter -function stringify(v) { - if (typeof v === "function") { - return t.getFunctionName(v); - } - if (typeof v === "number" && !isFinite(v)) { - if (isNaN(v)) { - return "NaN"; - } - return v > 0 ? "Infinity" : "-Infinity"; - } - return JSON.stringify(v); -} - -export class StrictValidationError extends Error { - private readonly errors; - - constructor(errors: string[]) { - errors = Array.from(new Set(errors)); - super(errors.join("\n")); - this.errors = errors; - } - getErrors() { - return this.errors; - } -} - -const report = fold((errors: any): StrictValidationError | void => { - const errorStrings = errors.map((err) => { - const context = err.context.map((c) => c.key).filter((k) => k && !k.startsWith("{")); - while (context.length > 0 && !isNaN(context[context.length - 1])) context.splice(-1); - - const value = stringify(err.value); - return value === undefined - ? `<${context.join("/")}> is required` - : `Invalid value supplied to <${context.join("/")}>${err.message ? `: ${err.message}` : ""}`; - }); - - return new StrictValidationError(errorStrings); -}, noop); - -export function validate(schema: t.Type, value: any): StrictValidationError | null { - const validationResult = schema.decode(value); - return ( - pipe( - validationResult, - fold( - () => report(validationResult), - () => null, - ), - ) || null - ); -} - -export function parseIoTsSchema>(schema: T, value: unknown): t.TypeOf { - const decodeResult = schema.decode(value); - if (isLeft(decodeResult)) { - throw report(decodeResult); - } - return decodeResult.right; -} - -/** - * Decodes and validates the given value against the given schema while also disallowing extra properties - * See: https://github.com/gcanti/io-ts/issues/322 - */ -export function decodeAndValidateStrict( - schema: T, - value: any, - debug = false, -): StrictValidationError | any { - const validationResult = t.exact(schema).decode(value); - return pipe( - validationResult, - fold( - () => report(validationResult), - (result) => { - // Make sure there are no extra properties - if (debug) { - // tslint:disable-next-line:no-console - console.log( - "JSON.stringify() check:", - JSON.stringify(value) === JSON.stringify(result) - ? "they are the same, no excess" - : "they are not the same, might have excess", - result, - ); - } - if (JSON.stringify(value) !== JSON.stringify(result)) { - const diff = deepDiff(result, value); - const errors = diff.filter((d) => d.kind === "N").map((d) => `Unknown property <${d.path.join(".")}>`); - if (errors.length) return new StrictValidationError(errors); - } - - return result; - }, - ), - ); -} diff --git a/package-lock.json b/package-lock.json index 6fe63dc24..d853c8db0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "lint-staged": "^9.4.2", "prettier": "^2.8.4", "prettier-plugin-organize-imports": "^3.2.2", + "ts-toolbelt": "^9.6.0", "tsc-watch": "^6.0.4", "typescript": "^5.0.4" } @@ -3483,6 +3484,12 @@ "node": ">=8.0" } }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "dev": true + }, "node_modules/tsc-watch": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-6.0.4.tgz", diff --git a/package.json b/package.json index 0cec20930..0309d59c7 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "lint-staged": "^9.4.2", "prettier": "^2.8.4", "prettier-plugin-organize-imports": "^3.2.2", + "ts-toolbelt": "^9.6.0", "tsc-watch": "^6.0.4", "typescript": "^5.0.4" }, From 39e8367f5fcbd890ba7a0b2a96e0598841f8e3f7 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Mon, 15 Jan 2024 12:23:52 +0000 Subject: [PATCH 053/128] disable guildmembercache Signed-off-by: GitHub --- backend/src/plugins/Persist/PersistPlugin.ts | 3 +-- backend/src/plugins/Persist/events/StoreDataEvt.ts | 6 ++++-- backend/src/plugins/availablePlugins.ts | 5 ++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/plugins/Persist/PersistPlugin.ts b/backend/src/plugins/Persist/PersistPlugin.ts index ecd50067c..bc914c444 100644 --- a/backend/src/plugins/Persist/PersistPlugin.ts +++ b/backend/src/plugins/Persist/PersistPlugin.ts @@ -3,7 +3,6 @@ import { GuildLogs } from "../../data/GuildLogs"; import { GuildPersistedData } from "../../data/GuildPersistedData"; import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; -import { GuildMemberCachePlugin } from "../GuildMemberCache/GuildMemberCachePlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; @@ -31,7 +30,7 @@ export const PersistPlugin = zeppelinGuildPlugin()({ configSchema: ConfigSchema, }, - dependencies: () => [LogsPlugin, RoleManagerPlugin, GuildMemberCachePlugin], + dependencies: () => [LogsPlugin, RoleManagerPlugin], configParser: makeIoTsConfigParser(ConfigSchema), defaultOptions, diff --git a/backend/src/plugins/Persist/events/StoreDataEvt.ts b/backend/src/plugins/Persist/events/StoreDataEvt.ts index 537c7b625..9385c2795 100644 --- a/backend/src/plugins/Persist/events/StoreDataEvt.ts +++ b/backend/src/plugins/Persist/events/StoreDataEvt.ts @@ -1,5 +1,4 @@ import { PersistedData } from "../../../data/entities/PersistedData"; -import { GuildMemberCachePlugin } from "../../GuildMemberCache/GuildMemberCachePlugin"; import { persistEvt } from "../types"; export const StoreDataEvt = persistEvt({ @@ -9,8 +8,11 @@ export const StoreDataEvt = persistEvt({ const config = await pluginData.config.getForUser(member.user); const persistData: Partial = {}; + // FIXME: New caching thing, or fix deadlocks with this plugin if (member.partial) { + return; // Djs hasn't cached member data => use db cache + /* const data = await pluginData.getPlugin(GuildMemberCachePlugin).getCachedMemberData(member.id); if (!data) { return; @@ -22,7 +24,7 @@ export const StoreDataEvt = persistEvt({ } if (config.persist_nicknames && data.nickname) { persistData.nickname = data.nickname; - } + }*/ } else { // Djs has cached member data => use that const memberRoles = Array.from(member.roles.cache.keys()); diff --git a/backend/src/plugins/availablePlugins.ts b/backend/src/plugins/availablePlugins.ts index 58af41fc3..3df9c347a 100644 --- a/backend/src/plugins/availablePlugins.ts +++ b/backend/src/plugins/availablePlugins.ts @@ -12,7 +12,6 @@ import { CustomEventsPlugin } from "./CustomEvents/CustomEventsPlugin"; import { GuildAccessMonitorPlugin } from "./GuildAccessMonitor/GuildAccessMonitorPlugin"; import { GuildConfigReloaderPlugin } from "./GuildConfigReloader/GuildConfigReloaderPlugin"; import { GuildInfoSaverPlugin } from "./GuildInfoSaver/GuildInfoSaverPlugin"; -import { GuildMemberCachePlugin } from "./GuildMemberCache/GuildMemberCachePlugin"; import { InternalPosterPlugin } from "./InternalPoster/InternalPosterPlugin"; import { LocateUserPlugin } from "./LocateUser/LocateUserPlugin"; import { LogsPlugin } from "./Logs/LogsPlugin"; @@ -54,7 +53,7 @@ export const guildPlugins: Array> = [ PostPlugin, ReactionRolesPlugin, MessageSaverPlugin, - GuildMemberCachePlugin, + // GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin ModActionsPlugin, NameHistoryPlugin, RemindersPlugin, @@ -93,7 +92,7 @@ export const baseGuildPlugins: Array> = [ GuildInfoSaverPlugin, MessageSaverPlugin, NameHistoryPlugin, - GuildMemberCachePlugin, + // GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin CasesPlugin, MutesPlugin, TimeAndDatePlugin, From 3db90907058b4a14ef52fcf8a862b93b66b4e819 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:03:45 +0000 Subject: [PATCH 054/128] fix: circular dependency in automod types --- backend/src/plugins/Automod/actions/ban.ts | 2 +- backend/src/plugins/Automod/actions/kick.ts | 2 +- backend/src/plugins/Automod/actions/mute.ts | 2 +- backend/src/plugins/Automod/actions/warn.ts | 2 +- backend/src/plugins/Automod/constants.ts | 6 ++++++ backend/src/plugins/Automod/types.ts | 5 ----- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/backend/src/plugins/Automod/actions/ban.ts b/backend/src/plugins/Automod/actions/ban.ts index dcc9563f2..22cc81673 100644 --- a/backend/src/plugins/Automod/actions/ban.ts +++ b/backend/src/plugins/Automod/actions/ban.ts @@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../types"; +import { zNotify } from "../constants"; const configSchema = z.strictObject({ reason: zBoundedCharacters(0, 4000).nullable().default(null), diff --git a/backend/src/plugins/Automod/actions/kick.ts b/backend/src/plugins/Automod/actions/kick.ts index 5afba467a..412309cdf 100644 --- a/backend/src/plugins/Automod/actions/kick.ts +++ b/backend/src/plugins/Automod/actions/kick.ts @@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../types"; +import { zNotify } from "../constants"; export const KickAction = automodAction({ configSchema: z.strictObject({ diff --git a/backend/src/plugins/Automod/actions/mute.ts b/backend/src/plugins/Automod/actions/mute.ts index 4a2a42ad3..c2f8e1867 100644 --- a/backend/src/plugins/Automod/actions/mute.ts +++ b/backend/src/plugins/Automod/actions/mute.ts @@ -6,7 +6,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../types"; +import { zNotify } from "../constants"; export const MuteAction = automodAction({ configSchema: z.strictObject({ diff --git a/backend/src/plugins/Automod/actions/warn.ts b/backend/src/plugins/Automod/actions/warn.ts index e8c63340c..7ccb38983 100644 --- a/backend/src/plugins/Automod/actions/warn.ts +++ b/backend/src/plugins/Automod/actions/warn.ts @@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../types"; +import { zNotify } from "../constants"; export const WarnAction = automodAction({ configSchema: z.strictObject({ diff --git a/backend/src/plugins/Automod/constants.ts b/backend/src/plugins/Automod/constants.ts index 53ff75ad3..cc37f4022 100644 --- a/backend/src/plugins/Automod/constants.ts +++ b/backend/src/plugins/Automod/constants.ts @@ -1,3 +1,4 @@ +import z from "zod"; import { MINUTES, SECONDS } from "../../utils"; export const RECENT_SPAM_EXPIRY_TIME = 10 * SECONDS; @@ -18,3 +19,8 @@ export enum RecentActionType { MemberLeave, ThreadCreate, } + +export const zNotify = z.union([ + z.literal("dm"), + z.literal("channel"), +]); diff --git a/backend/src/plugins/Automod/types.ts b/backend/src/plugins/Automod/types.ts index 59a09a331..251ef6437 100644 --- a/backend/src/plugins/Automod/types.ts +++ b/backend/src/plugins/Automod/types.ts @@ -65,11 +65,6 @@ const zRule = z.strictObject({ }); export type TRule = z.infer; -export const zNotify = z.union([ - z.literal("dm"), - z.literal("channel"), -]); - export const zAutomodConfig = z.strictObject({ rules: zBoundedRecord( z.record(z.string().max(100), zRule), From ac8926cdb80a52874ba71ad8abb1e398db3d6966 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:05:01 +0000 Subject: [PATCH 055/128] chore: fix inconsistent import paths --- backend/src/data/GuildArchives.ts | 2 +- backend/src/plugins/Automod/actions/alert.ts | 2 +- backend/src/plugins/ContextMenus/actions/mute.ts | 4 ++-- backend/src/plugins/Logs/logFunctions/logCensor.ts | 2 +- backend/src/plugins/ModActions/functions/clearTempban.ts | 4 ++-- backend/src/plugins/Tags/docs.ts | 2 +- backend/src/plugins/Tags/util/onMessageCreate.ts | 2 +- backend/src/utils/templateSafeObjects.ts | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/data/GuildArchives.ts b/backend/src/data/GuildArchives.ts index de1e9d07e..0451dfe0c 100644 --- a/backend/src/data/GuildArchives.ts +++ b/backend/src/data/GuildArchives.ts @@ -1,6 +1,5 @@ import { Guild, Snowflake } from "discord.js"; import moment from "moment-timezone"; -import { isDefaultSticker } from "src/utils/isDefaultSticker"; import { Repository } from "typeorm"; import { TemplateSafeValueContainer, renderTemplate } from "../templateFormatter"; import { renderUsername, trimLines } from "../utils"; @@ -10,6 +9,7 @@ import { BaseGuildRepository } from "./BaseGuildRepository"; import { dataSource } from "./dataSource"; import { ArchiveEntry } from "./entities/ArchiveEntry"; import { SavedMessage } from "./entities/SavedMessage"; +import { isDefaultSticker } from "../utils/isDefaultSticker"; const DEFAULT_EXPIRY_DAYS = 30; diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts index 1a767a0e5..c5fcd4b35 100644 --- a/backend/src/plugins/Automod/actions/alert.ts +++ b/backend/src/plugins/Automod/actions/alert.ts @@ -1,5 +1,4 @@ import { Snowflake } from "discord.js"; -import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions"; import z from "zod"; import { LogType } from "../../../data/LogType"; import { @@ -19,6 +18,7 @@ import { zNullishToUndefined, zSnowflake } from "../../../utils"; +import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { InternalPosterPlugin } from "../../InternalPoster/InternalPosterPlugin"; diff --git a/backend/src/plugins/ContextMenus/actions/mute.ts b/backend/src/plugins/ContextMenus/actions/mute.ts index 556ee248c..c6eedbc67 100644 --- a/backend/src/plugins/ContextMenus/actions/mute.ts +++ b/backend/src/plugins/ContextMenus/actions/mute.ts @@ -1,14 +1,14 @@ import { ContextMenuCommandInteraction } from "discord.js"; import humanizeDuration from "humanize-duration"; import { GuildPluginData } from "knub"; -import { canActOn } from "src/pluginUtils"; -import { ModActionsPlugin } from "src/plugins/ModActions/ModActionsPlugin"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; import { convertDelayStringToMS } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; import { ContextMenuPluginType } from "../types"; +import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; +import { canActOn } from "../../../pluginUtils"; export async function muteAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/Logs/logFunctions/logCensor.ts b/backend/src/plugins/Logs/logFunctions/logCensor.ts index cec6e4413..c1853baf6 100644 --- a/backend/src/plugins/Logs/logFunctions/logCensor.ts +++ b/backend/src/plugins/Logs/logFunctions/logCensor.ts @@ -1,11 +1,11 @@ import { GuildTextBasedChannel, User } from "discord.js"; import { GuildPluginData } from "knub"; import { deactivateMentions, disableCodeBlocks } from "knub/helpers"; -import { resolveChannelIds } from "src/utils/resolveChannelIds"; import { LogType } from "../../../data/LogType"; import { SavedMessage } from "../../../data/entities/SavedMessage"; import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter"; import { UnknownUser } from "../../../utils"; +import { resolveChannelIds } from "../../../utils/resolveChannelIds"; import { channelToTemplateSafeChannel, savedMessageToTemplateSafeSavedMessage, diff --git a/backend/src/plugins/ModActions/functions/clearTempban.ts b/backend/src/plugins/ModActions/functions/clearTempban.ts index 25807df85..5173ca7e1 100644 --- a/backend/src/plugins/ModActions/functions/clearTempban.ts +++ b/backend/src/plugins/ModActions/functions/clearTempban.ts @@ -2,8 +2,6 @@ import { Snowflake } from "discord.js"; import humanizeDuration from "humanize-duration"; import { GuildPluginData } from "knub"; import moment from "moment-timezone"; -import { LogType } from "src/data/LogType"; -import { logger } from "src/logger"; import { CaseTypes } from "../../../data/CaseTypes"; import { Tempban } from "../../../data/entities/Tempban"; import { resolveUser } from "../../../utils"; @@ -13,6 +11,8 @@ import { IgnoredEventType, ModActionsPluginType } from "../types"; import { formatReasonWithAttachments } from "./formatReasonWithAttachments"; import { ignoreEvent } from "./ignoreEvent"; import { isBanned } from "./isBanned"; +import { LogType } from "../../../data/LogType"; +import { logger } from "../../../logger"; export async function clearTempban(pluginData: GuildPluginData, tempban: Tempban) { if (!(await isBanned(pluginData, tempban.user_id))) { diff --git a/backend/src/plugins/Tags/docs.ts b/backend/src/plugins/Tags/docs.ts index bc1608bbd..61f4dfcb0 100644 --- a/backend/src/plugins/Tags/docs.ts +++ b/backend/src/plugins/Tags/docs.ts @@ -1,4 +1,4 @@ -import { trimPluginDescription } from "src/utils"; +import { trimPluginDescription } from "../../utils"; import { TemplateFunction } from "./types"; export function generateTemplateMarkdown(definitions: TemplateFunction[]): string { diff --git a/backend/src/plugins/Tags/util/onMessageCreate.ts b/backend/src/plugins/Tags/util/onMessageCreate.ts index f5b0b04ae..aa7c84901 100644 --- a/backend/src/plugins/Tags/util/onMessageCreate.ts +++ b/backend/src/plugins/Tags/util/onMessageCreate.ts @@ -1,12 +1,12 @@ import { Snowflake, TextChannel } from "discord.js"; import { GuildPluginData } from "knub"; -import { erisAllowedMentionsToDjsMentionOptions } from "src/utils/erisAllowedMentionsToDjsMentionOptions"; import { SavedMessage } from "../../../data/entities/SavedMessage"; import { convertDelayStringToMS, resolveMember, zStrictMessageContent } from "../../../utils"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TagsPluginType } from "../types"; import { matchAndRenderTagFromString } from "./matchAndRenderTagFromString"; +import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions"; export async function onMessageCreate(pluginData: GuildPluginData, msg: SavedMessage) { if (msg.is_bot) return; diff --git a/backend/src/utils/templateSafeObjects.ts b/backend/src/utils/templateSafeObjects.ts index 67517f192..3395cd6f4 100644 --- a/backend/src/utils/templateSafeObjects.ts +++ b/backend/src/utils/templateSafeObjects.ts @@ -13,7 +13,6 @@ import { User, } from "discord.js"; import { GuildPluginData } from "knub"; -import { UnknownUser, renderUserUsername } from "src/utils"; import { Case } from "../data/entities/Case"; import { ISavedMessageAttachmentData, @@ -27,6 +26,7 @@ import { TypedTemplateSafeValueContainer, ingestDataIntoTemplateSafeValueContainer, } from "../templateFormatter"; +import { UnknownUser, renderUserUsername } from "../utils"; type InputProps = Omit< { From cbec80981daacd5e03ba88ac7c6e2357ff8fcffb Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:36:10 +0000 Subject: [PATCH 056/128] feat: improve ZodIssue rendering in config validation --- backend/src/configValidator.ts | 10 +++++++--- backend/src/utils/formatZodIssue.ts | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 backend/src/utils/formatZodIssue.ts diff --git a/backend/src/configValidator.ts b/backend/src/configValidator.ts index 96e08ba3c..eb115d467 100644 --- a/backend/src/configValidator.ts +++ b/backend/src/configValidator.ts @@ -1,9 +1,10 @@ -import { PluginConfigManager } from "knub"; +import { ConfigValidationError, PluginConfigManager } from "knub"; import moment from "moment-timezone"; import { ZodError } from "zod"; import { ZeppelinPlugin } from "./plugins/ZeppelinPlugin"; import { guildPlugins } from "./plugins/availablePlugins"; import { ZeppelinGuildConfig, zZeppelinGuildConfig } from "./types"; +import { formatZodIssue } from "./utils/formatZodIssue"; const pluginNameToPlugin = new Map(); for (const plugin of guildPlugins) { @@ -13,7 +14,7 @@ for (const plugin of guildPlugins) { export async function validateGuildConfig(config: any): Promise { const validationResult = zZeppelinGuildConfig.safeParse(config); if (!validationResult.success) { - return validationResult.error.issues.join("\n"); + return validationResult.error.issues.map(formatZodIssue).join("\n"); } const guildConfig = config as ZeppelinGuildConfig; @@ -44,7 +45,10 @@ export async function validateGuildConfig(config: any): Promise { await configManager.init(); } catch (err) { if (err instanceof ZodError) { - return `${pluginName}: ${err.issues.join("\n")}`; + return `${pluginName}: ${err.issues.map(formatZodIssue).join("\n")}`; + } + if (err instanceof ConfigValidationError) { + return `${pluginName}: ${err.message}`; } throw err; diff --git a/backend/src/utils/formatZodIssue.ts b/backend/src/utils/formatZodIssue.ts new file mode 100644 index 000000000..2b5c3d8e4 --- /dev/null +++ b/backend/src/utils/formatZodIssue.ts @@ -0,0 +1,6 @@ +import { ZodIssue } from "zod"; + +export function formatZodIssue(issue: ZodIssue): string { + const path = issue.path.join("/"); + return `${path}: ${issue.message}`; +} From 82d720d308a2998b731354200b384c317244a30e Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:37:39 +0000 Subject: [PATCH 057/128] refactor: change LogType to a plain object instead of an enum --- backend/src/data/Configs.ts | 6 + backend/src/data/GuildLogs.ts | 10 +- backend/src/data/LogType.ts | 176 ++++++++---------- backend/src/plugins/Logs/types.ts | 19 +- backend/src/plugins/Logs/util/isLogIgnored.ts | 2 +- 5 files changed, 97 insertions(+), 116 deletions(-) diff --git a/backend/src/data/Configs.ts b/backend/src/data/Configs.ts index 1b9ade22c..bc702b5ed 100644 --- a/backend/src/data/Configs.ts +++ b/backend/src/data/Configs.ts @@ -27,6 +27,12 @@ export class Configs extends BaseRepository { this.configs = dataSource.getRepository(Config); } + getActive() { + return this.configs.find({ + where: { is_active: true }, + }); + } + getActiveByKey(key) { return this.configs.findOne({ where: { diff --git a/backend/src/data/GuildLogs.ts b/backend/src/data/GuildLogs.ts index b324984ed..5f7dc4ed5 100644 --- a/backend/src/data/GuildLogs.ts +++ b/backend/src/data/GuildLogs.ts @@ -5,7 +5,7 @@ import { LogType } from "./LogType"; const guildInstances: Map = new Map(); interface IIgnoredLog { - type: LogType; + type: keyof typeof LogType; ignoreId: any; } @@ -27,7 +27,7 @@ export class GuildLogs extends events.EventEmitter { guildInstances.set(guildId, this); } - log(type: LogType, data: any, ignoreId?: string) { + log(type: keyof typeof LogType, data: any, ignoreId?: string) { if (ignoreId && this.isLogIgnored(type, ignoreId)) { this.clearIgnoredLog(type, ignoreId); return; @@ -36,7 +36,7 @@ export class GuildLogs extends events.EventEmitter { this.emit("log", { type, data }); } - ignoreLog(type: LogType, ignoreId: any, timeout?: number) { + ignoreLog(type: keyof typeof LogType, ignoreId: any, timeout?: number) { this.ignoredLogs.push({ type, ignoreId }); // Clear after expiry (15sec by default) @@ -45,11 +45,11 @@ export class GuildLogs extends events.EventEmitter { }, timeout || 1000 * 15); } - isLogIgnored(type: LogType, ignoreId: any) { + isLogIgnored(type: keyof typeof LogType, ignoreId: any) { return this.ignoredLogs.some((info) => type === info.type && ignoreId === info.ignoreId); } - clearIgnoredLog(type: LogType, ignoreId: any) { + clearIgnoredLog(type: keyof typeof LogType, ignoreId: any) { this.ignoredLogs.splice( this.ignoredLogs.findIndex((info) => type === info.type && ignoreId === info.ignoreId), 1, diff --git a/backend/src/data/LogType.ts b/backend/src/data/LogType.ts index 90c81173f..1aba45ec0 100644 --- a/backend/src/data/LogType.ts +++ b/backend/src/data/LogType.ts @@ -1,102 +1,74 @@ -export enum LogType { - MEMBER_WARN = 1, - MEMBER_MUTE, - MEMBER_UNMUTE, - MEMBER_MUTE_EXPIRED, - MEMBER_KICK, - MEMBER_BAN, - MEMBER_UNBAN, - MEMBER_FORCEBAN, - MEMBER_SOFTBAN, - MEMBER_JOIN, - MEMBER_LEAVE, - MEMBER_ROLE_ADD, - MEMBER_ROLE_REMOVE, - MEMBER_NICK_CHANGE, - MEMBER_USERNAME_CHANGE, - MEMBER_RESTORE, - - CHANNEL_CREATE, - CHANNEL_DELETE, - CHANNEL_UPDATE, - - THREAD_CREATE, - THREAD_DELETE, - THREAD_UPDATE, - - ROLE_CREATE, - ROLE_DELETE, - ROLE_UPDATE, - - MESSAGE_EDIT, - MESSAGE_DELETE, - MESSAGE_DELETE_BULK, - MESSAGE_DELETE_BARE, - - VOICE_CHANNEL_JOIN, - VOICE_CHANNEL_LEAVE, - VOICE_CHANNEL_MOVE, - - STAGE_INSTANCE_CREATE, - STAGE_INSTANCE_DELETE, - STAGE_INSTANCE_UPDATE, - - EMOJI_CREATE, - EMOJI_DELETE, - EMOJI_UPDATE, - - STICKER_CREATE, - STICKER_DELETE, - STICKER_UPDATE, - - COMMAND, - - MESSAGE_SPAM_DETECTED, - CENSOR, - CLEAN, - - CASE_CREATE, - - MASSUNBAN, - MASSBAN, - MASSMUTE, - - MEMBER_TIMED_MUTE, - MEMBER_TIMED_UNMUTE, - MEMBER_TIMED_BAN, - MEMBER_TIMED_UNBAN, - - MEMBER_JOIN_WITH_PRIOR_RECORDS, - OTHER_SPAM_DETECTED, - - MEMBER_ROLE_CHANGES, - VOICE_CHANNEL_FORCE_MOVE, - VOICE_CHANNEL_FORCE_DISCONNECT, - - CASE_UPDATE, - - MEMBER_MUTE_REJOIN, - - SCHEDULED_MESSAGE, - POSTED_SCHEDULED_MESSAGE, - - BOT_ALERT, - AUTOMOD_ACTION, - - SCHEDULED_REPEATED_MESSAGE, - REPEATED_MESSAGE, - - MESSAGE_DELETE_AUTO, - - SET_ANTIRAID_USER, - SET_ANTIRAID_AUTO, - - MASS_ASSIGN_ROLES, - MASS_UNASSIGN_ROLES, - - MEMBER_NOTE, - - CASE_DELETE, - - DM_FAILED, -} +export const LogType = { + MEMBER_WARN: "MEMBER_WARN", + MEMBER_MUTE: "MEMBER_MUTE", + MEMBER_UNMUTE: "MEMBER_UNMUTE", + MEMBER_MUTE_EXPIRED: "MEMBER_MUTE_EXPIRED", + MEMBER_KICK: "MEMBER_KICK", + MEMBER_BAN: "MEMBER_BAN", + MEMBER_UNBAN: "MEMBER_UNBAN", + MEMBER_FORCEBAN: "MEMBER_FORCEBAN", + MEMBER_SOFTBAN: "MEMBER_SOFTBAN", + MEMBER_JOIN: "MEMBER_JOIN", + MEMBER_LEAVE: "MEMBER_LEAVE", + MEMBER_ROLE_ADD: "MEMBER_ROLE_ADD", + MEMBER_ROLE_REMOVE: "MEMBER_ROLE_REMOVE", + MEMBER_NICK_CHANGE: "MEMBER_NICK_CHANGE", + MEMBER_USERNAME_CHANGE: "MEMBER_USERNAME_CHANGE", + MEMBER_RESTORE: "MEMBER_RESTORE", + CHANNEL_CREATE: "CHANNEL_CREATE", + CHANNEL_DELETE: "CHANNEL_DELETE", + CHANNEL_UPDATE: "CHANNEL_UPDATE", + THREAD_CREATE: "THREAD_CREATE", + THREAD_DELETE: "THREAD_DELETE", + THREAD_UPDATE: "THREAD_UPDATE", + ROLE_CREATE: "ROLE_CREATE", + ROLE_DELETE: "ROLE_DELETE", + ROLE_UPDATE: "ROLE_UPDATE", + MESSAGE_EDIT: "MESSAGE_EDIT", + MESSAGE_DELETE: "MESSAGE_DELETE", + MESSAGE_DELETE_BULK: "MESSAGE_DELETE_BULK", + MESSAGE_DELETE_BARE: "MESSAGE_DELETE_BARE", + VOICE_CHANNEL_JOIN: "VOICE_CHANNEL_JOIN", + VOICE_CHANNEL_LEAVE: "VOICE_CHANNEL_LEAVE", + VOICE_CHANNEL_MOVE: "VOICE_CHANNEL_MOVE", + STAGE_INSTANCE_CREATE: "STAGE_INSTANCE_CREATE", + STAGE_INSTANCE_DELETE: "STAGE_INSTANCE_DELETE", + STAGE_INSTANCE_UPDATE: "STAGE_INSTANCE_UPDATE", + EMOJI_CREATE: "EMOJI_CREATE", + EMOJI_DELETE: "EMOJI_DELETE", + EMOJI_UPDATE: "EMOJI_UPDATE", + STICKER_CREATE: "STICKER_CREATE", + STICKER_DELETE: "STICKER_DELETE", + STICKER_UPDATE: "STICKER_UPDATE", + COMMAND: "COMMAND", + MESSAGE_SPAM_DETECTED: "MESSAGE_SPAM_DETECTED", + CENSOR: "CENSOR", + CLEAN: "CLEAN", + CASE_CREATE: "CASE_CREATE", + MASSUNBAN: "MASSUNBAN", + MASSBAN: "MASSBAN", + MASSMUTE: "MASSMUTE", + MEMBER_TIMED_MUTE: "MEMBER_TIMED_MUTE", + MEMBER_TIMED_UNMUTE: "MEMBER_TIMED_UNMUTE", + MEMBER_TIMED_BAN: "MEMBER_TIMED_BAN", + MEMBER_TIMED_UNBAN: "MEMBER_TIMED_UNBAN", + MEMBER_JOIN_WITH_PRIOR_RECORDS: "MEMBER_JOIN_WITH_PRIOR_RECORDS", + OTHER_SPAM_DETECTED: "OTHER_SPAM_DETECTED", + MEMBER_ROLE_CHANGES: "MEMBER_ROLE_CHANGES", + VOICE_CHANNEL_FORCE_MOVE: "VOICE_CHANNEL_FORCE_MOVE", + VOICE_CHANNEL_FORCE_DISCONNECT: "VOICE_CHANNEL_FORCE_DISCONNECT", + CASE_UPDATE: "CASE_UPDATE", + MEMBER_MUTE_REJOIN: "MEMBER_MUTE_REJOIN", + SCHEDULED_MESSAGE: "SCHEDULED_MESSAGE", + POSTED_SCHEDULED_MESSAGE: "POSTED_SCHEDULED_MESSAGE", + BOT_ALERT: "BOT_ALERT", + AUTOMOD_ACTION: "AUTOMOD_ACTION", + SCHEDULED_REPEATED_MESSAGE: "SCHEDULED_REPEATED_MESSAGE", + REPEATED_MESSAGE: "REPEATED_MESSAGE", + MESSAGE_DELETE_AUTO: "MESSAGE_DELETE_AUTO", + SET_ANTIRAID_USER: "SET_ANTIRAID_USER", + SET_ANTIRAID_AUTO: "SET_ANTIRAID_AUTO", + MEMBER_NOTE: "MEMBER_NOTE", + CASE_DELETE: "CASE_DELETE", + DM_FAILED: "DM_FAILED", +} as const; diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 51f67b872..2960c2ae8 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -1,12 +1,12 @@ import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub"; -import { z } from "zod"; +import { ZodString, z } from "zod"; import { RegExpRunner } from "../../RegExpRunner"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { LogType } from "../../data/LogType"; -import { zBoundedCharacters, zMessageContent, zRegex, zSnowflake } from "../../utils"; +import { keys, zBoundedCharacters, zMessageContent, zRegex, zSnowflake } from "../../utils"; import { MessageBuffer } from "../../utils/MessageBuffer"; import { TemplateSafeCase, @@ -26,10 +26,13 @@ const DEFAULT_BATCH_TIME = 1000; const MIN_BATCH_TIME = 250; const MAX_BATCH_TIME = 5000; -export const zLogFormats = z.record( - zBoundedCharacters(1, 255), - zMessageContent, -); +type ZLogFormatsHelper = { + -readonly [K in keyof typeof LogType]: typeof zMessageContent; +}; +export const zLogFormats = z.strictObject(keys(LogType).reduce((map, logType) => { + map[logType] = zMessageContent; + return map; +}, {} as ZLogFormatsHelper)); export type TLogFormats = z.infer; const zLogChannel = z.strictObject({ @@ -44,7 +47,7 @@ const zLogChannel = z.strictObject({ excluded_threads: z.array(zSnowflake).nullable().default(null), exclude_bots: z.boolean().default(false), excluded_roles: z.array(zSnowflake).nullable().default(null), - format: zLogFormats.default({}), + format: zLogFormats.partial().default({}), timestamp_format: z.string().nullable().default(null), include_embed_timestamp: z.boolean().nullable().default(null), }); @@ -55,7 +58,7 @@ export type TLogChannelMap = z.infer; export const zLogsConfig = z.strictObject({ channels: zLogChannelMap, - format: z.intersection(zLogFormats, z.strictObject({ + format: zLogFormats.merge(z.strictObject({ // Legacy/deprecated, use timestamp_format below instead timestamp: zBoundedCharacters(0, 64).nullable(), })), diff --git a/backend/src/plugins/Logs/util/isLogIgnored.ts b/backend/src/plugins/Logs/util/isLogIgnored.ts index eb23b9273..71255f50f 100644 --- a/backend/src/plugins/Logs/util/isLogIgnored.ts +++ b/backend/src/plugins/Logs/util/isLogIgnored.ts @@ -2,6 +2,6 @@ import { GuildPluginData } from "knub"; import { LogType } from "../../../data/LogType"; import { LogsPluginType } from "../types"; -export function isLogIgnored(pluginData: GuildPluginData, type: LogType, ignoreId: string) { +export function isLogIgnored(pluginData: GuildPluginData, type: keyof typeof LogType, ignoreId: string) { return pluginData.state.guildLogs.isLogIgnored(type, ignoreId); } From 5a5be89573337f701e1115a2e7c8497608f917ad Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:38:48 +0000 Subject: [PATCH 058/128] fix: counter types --- backend/src/plugins/Counters/types.ts | 57 ++++++++++++++++----------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/backend/src/plugins/Counters/types.ts b/backend/src/plugins/Counters/types.ts index 2b8cce16c..783ec6660 100644 --- a/backend/src/plugins/Counters/types.ts +++ b/backend/src/plugins/Counters/types.ts @@ -10,7 +10,7 @@ const MAX_COUNTERS = 5; const MAX_TRIGGERS_PER_COUNTER = 5; export const zTrigger = z.strictObject({ - // Dummy type because name gets replaced by the property key in zTriggerInput + // Dummy type because name gets replaced by the property key in transform() name: z.never().optional().transform(() => ""), pretty_name: zBoundedCharacters(0, 100).nullable().default(null), condition: zBoundedCharacters(1, 64).refine( @@ -20,34 +20,45 @@ export const zTrigger = z.strictObject({ reverse_condition: zBoundedCharacters(1, 64).refine( (str) => parseCounterConditionString(str) !== null, { message: "Invalid counter trigger reverse condition" }, - ), -}); - -const zTriggerInput = z.union([zBoundedCharacters(0, 100), zTrigger]) + ).optional(), +}) .transform((val, ctx) => { const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); - if (typeof val === "string") { - const parsedCondition = parseCounterConditionString(val); - if (!parsedCondition) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Invalid counter trigger condition", - }); - return z.NEVER; - } - return { - name: ruleName, - pretty_name: null, - condition: buildCounterConditionString(parsedCondition[0], parsedCondition[1]), - reverse_condition: buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]), - }; + + let reverseCondition = val.reverse_condition; + if (! reverseCondition) { + const parsedCondition = parseCounterConditionString(val.condition)!; + reverseCondition = buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]); } + return { ...val, name: ruleName, + reverse_condition: reverseCondition, }; }); +const zTriggerFromString = zBoundedCharacters(0, 100) + .transform((val, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + const parsedCondition = parseCounterConditionString(val); + if (!parsedCondition) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid counter trigger condition", + }); + return z.NEVER; + } + return { + name: ruleName, + pretty_name: null, + condition: buildCounterConditionString(parsedCondition[0], parsedCondition[1]), + reverse_condition: buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]), + }; + }); + +const zTriggerInput = z.union([zTrigger, zTriggerFromString]); + export const zCounter = z.strictObject({ // Typed as "never" because you are not expected to supply this directly. // The transform instead picks it up from the property key and the output type is a string. @@ -78,9 +89,9 @@ export const zCounter = z.strictObject({ amount: z.number(), every: zDelayString, }).nullable().default(null), - can_view: z.boolean(), - can_edit: z.boolean(), - can_reset_all: z.boolean(), + can_view: z.boolean().default(false), + can_edit: z.boolean().default(false), + can_reset_all: z.boolean().default(false), }); export const zCountersConfig = z.strictObject({ From e4b098b5639aaf579fcb41b1dc0ab2954cb090fe Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:39:27 +0000 Subject: [PATCH 059/128] fix: automod types --- backend/src/plugins/Automod/actions/changePerms.ts | 6 +++--- .../Automod/functions/createMessageSpamTrigger.ts | 2 +- backend/src/plugins/Automod/triggers/matchLinks.ts | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index b5bc96867..33b0c283b 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -2,7 +2,7 @@ import { PermissionsBitField, PermissionsString } from "discord.js"; import { U } from "ts-toolbelt"; import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; -import { isValidSnowflake, keys, noop, zSnowflake } from "../../../utils"; +import { isValidSnowflake, keys, noop, zBoundedCharacters, zSnowflake } from "../../../utils"; import { guildToTemplateSafeGuild, savedMessageToTemplateSafeSavedMessage, @@ -66,8 +66,8 @@ const allPermissionNames = [...permissionNames, ...legacyPermissionNames] as con export const ChangePermsAction = automodAction({ configSchema: z.strictObject({ - target: zSnowflake, - channel: zSnowflake.nullable().default(null), + target: zBoundedCharacters(1, 255), + channel: zBoundedCharacters(1, 255).nullable().default(null), perms: z.record( z.enum(allPermissionNames), z.boolean().nullable(), diff --git a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts index 19364eee6..562ade6be 100644 --- a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts +++ b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts @@ -16,7 +16,7 @@ interface TMessageSpamMatchResultType { const configSchema = z.strictObject({ amount: z.number().int(), within: zDelayString, - per_channel: z.boolean().optional(), + per_channel: z.boolean().nullable().default(false), }); export function createMessageSpamTrigger(spamType: RecentActionType, prettyName: string) { diff --git a/backend/src/plugins/Automod/triggers/matchLinks.ts b/backend/src/plugins/Automod/triggers/matchLinks.ts index 128b3cd14..fe3280fcb 100644 --- a/backend/src/plugins/Automod/triggers/matchLinks.ts +++ b/backend/src/plugins/Automod/triggers/matchLinks.ts @@ -21,18 +21,18 @@ const regexCache = new WeakMap(); const quickLinkCheck = /^https?:\/\//i; const configSchema = z.strictObject({ - include_domains: z.array(z.string().max(255)).max(255).optional(), - exclude_domains: z.array(z.string().max(255)).max(255).optional(), + include_domains: z.array(z.string().max(255)).max(700).optional(), + exclude_domains: z.array(z.string().max(255)).max(700).optional(), include_subdomains: z.boolean().default(true), - include_words: z.array(z.string().max(2000)).max(512).optional(), - exclude_words: z.array(z.string().max(2000)).max(512).optional(), + include_words: z.array(z.string().max(2000)).max(700).optional(), + exclude_words: z.array(z.string().max(2000)).max(700).optional(), include_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), exclude_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), phisherman: z.strictObject({ include_suspected: z.boolean().optional(), include_verified: z.boolean().optional(), }).optional(), - only_real_links: z.boolean(), + only_real_links: z.boolean().default(true), match_messages: z.boolean().default(true), match_embeds: z.boolean().default(true), match_visible_names: z.boolean().default(false), From 61b5f3f0d39d0b0f59ba599310cf97e4e068c0ea Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:44:00 +0000 Subject: [PATCH 060/128] feat: add cli command to validate active configs --- .gitignore | 2 ++ backend/package.json | 1 + backend/src/data/db.ts | 6 ++++ backend/src/validateActiveConfigs.ts | 46 ++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 backend/src/validateActiveConfigs.ts diff --git a/.gitignore b/.gitignore index 890e9c978..5b9127453 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,5 @@ npm-audit.txt *.debug.js .vscode/ + +config-errors.txt diff --git a/backend/package.json b/backend/package.json index fbbe2ddcb..b23dd8b6b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -24,6 +24,7 @@ "migrate-rollback": "npm run typeorm -- migration:revert -d dist/backend/src/data/dataSource.js", "migrate-rollback-prod": "cross-env NODE_ENV=production npm run migrate", "migrate-rollback-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", + "validate-active-configs": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps dist/backend/src/validateActiveConfigs.js > ../config-errors.txt", "test": "npm run build && npm run run-tests", "run-tests": "ava", "test-watch": "tsc-watch --onSuccess \"npx ava\"" diff --git a/backend/src/data/db.ts b/backend/src/data/db.ts index a4f9b88bf..f8d8f3bf7 100644 --- a/backend/src/data/db.ts +++ b/backend/src/data/db.ts @@ -15,3 +15,9 @@ export function connect() { return connectionPromise; } + +export function disconnect() { + if (connectionPromise) { + connectionPromise.then(() => dataSource.destroy()); + } +} diff --git a/backend/src/validateActiveConfigs.ts b/backend/src/validateActiveConfigs.ts new file mode 100644 index 000000000..c9e3414bb --- /dev/null +++ b/backend/src/validateActiveConfigs.ts @@ -0,0 +1,46 @@ +import { YAMLException } from "js-yaml"; +import { validateGuildConfig } from "./configValidator"; +import { Configs } from "./data/Configs"; +import { connect, disconnect } from "./data/db"; +import { loadYamlSafely } from "./utils/loadYamlSafely"; +import { ObjectAliasError } from "./utils/validateNoObjectAliases"; + +function writeError(key: string, error: string) { + const indented = error.split("\n").map(s => " ".repeat(64) + s).join("\n"); + const prefix = `Invalid config ${key}:`; + const prefixed = prefix + indented.slice(prefix.length); + console.log(prefixed + "\n\n"); +} + +connect().then(async () => { + const configs = new Configs(); + const activeConfigs = await configs.getActive(); + for (const config of activeConfigs) { + if (config.key === "global") { + continue; + } + + let parsed: unknown; + try { + parsed = loadYamlSafely(config.config); + } catch (err) { + if (err instanceof ObjectAliasError) { + writeError(config.key, err.message); + continue; + } + if (err instanceof YAMLException) { + writeError(config.key, `invalid YAML: ${err.message}`); + continue; + } + throw err; + } + + const errors = await validateGuildConfig(parsed); + if (errors) { + writeError(config.key, errors); + } + } + + await disconnect(); + process.exit(0); +}); From 1b76af357999b4926d04e104aa4318a2da0b2056 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:45:07 +0000 Subject: [PATCH 061/128] fix: cases types --- backend/src/plugins/Cases/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Cases/types.ts b/backend/src/plugins/Cases/types.ts index e25b7ed0c..bcc50eedc 100644 --- a/backend/src/plugins/Cases/types.ts +++ b/backend/src/plugins/Cases/types.ts @@ -16,7 +16,7 @@ export const zCasesConfig = z.strictObject({ show_relative_times: z.boolean(), relative_time_cutoff: zDelayString.default("1w"), case_colors: z.record(z.enum(caseKeys), zColor).nullable(), - case_icons: z.record(z.enum(caseKeys), zBoundedCharacters(0, 32)).nullable(), + case_icons: z.record(z.enum(caseKeys), zBoundedCharacters(0, 100)).nullable(), }); export interface CasesPluginType extends BasePluginType { From a562182e7ca8024ff58a8181d6e6404a893edf61 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 15 Jan 2024 22:45:38 +0000 Subject: [PATCH 062/128] chore: remove unused log types from presetup-configurator --- presetup-configurator/src/LogChannels.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/presetup-configurator/src/LogChannels.tsx b/presetup-configurator/src/LogChannels.tsx index 40c0ca0fc..bdc2c5b60 100644 --- a/presetup-configurator/src/LogChannels.tsx +++ b/presetup-configurator/src/LogChannels.tsx @@ -67,8 +67,6 @@ const LOG_TYPES = { MESSAGE_DELETE_AUTO: "Message deleted (auto)", SET_ANTIRAID_USER: "Set antiraid (user)", SET_ANTIRAID_AUTO: "Set antiraid (auto)", - MASS_ASSIGN_ROLES: "Mass-assigned roles", - MASS_UNASSIGN_ROLES: "Mass-unassigned roles", MEMBER_NOTE: "Member noted", CASE_DELETE: "Case deleted", DM_FAILED: "Failed to DM member", From be87fe6c43389fab07c2eb364b610f998fc6e0f2 Mon Sep 17 00:00:00 2001 From: Almeida Date: Tue, 23 Jan 2024 16:36:45 +0000 Subject: [PATCH 063/128] fix case note on timeout expiration for manual timeouts --- backend/src/plugins/ModActions/events/AuditLogEvents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/ModActions/events/AuditLogEvents.ts b/backend/src/plugins/ModActions/events/AuditLogEvents.ts index a8a7f4ef8..347d594eb 100644 --- a/backend/src/plugins/ModActions/events/AuditLogEvents.ts +++ b/backend/src/plugins/ModActions/events/AuditLogEvents.ts @@ -42,7 +42,7 @@ export const AuditLogEvents = modActionsEvt({ caseId: existingCaseId, modId: auditLogEntry.executor?.id || "0", body: auditLogEntry.reason || "", - noteDetails: [`Timeout set to expire on `], + noteDetails: [`Timeout set to expire on `], }); } else { await casesPlugin.createCase({ From 681b19b69c5b5ff7c9d636bac7e1d8cd036aa413 Mon Sep 17 00:00:00 2001 From: Almeida Date: Tue, 23 Jan 2024 16:47:58 +0000 Subject: [PATCH 064/128] fmt --- backend/src/plugins/ModActions/events/AuditLogEvents.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/ModActions/events/AuditLogEvents.ts b/backend/src/plugins/ModActions/events/AuditLogEvents.ts index 347d594eb..a66328b94 100644 --- a/backend/src/plugins/ModActions/events/AuditLogEvents.ts +++ b/backend/src/plugins/ModActions/events/AuditLogEvents.ts @@ -42,7 +42,9 @@ export const AuditLogEvents = modActionsEvt({ caseId: existingCaseId, modId: auditLogEntry.executor?.id || "0", body: auditLogEntry.reason || "", - noteDetails: [`Timeout set to expire on `], + noteDetails: [ + `Timeout set to expire on `, + ], }); } else { await casesPlugin.createCase({ From 6110b8190c4152735acbb8bf64bcbed4ec152195 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:45:52 +0200 Subject: [PATCH 065/128] chore: use @zeppelinbot scope over @zeppelin for package names --- backend/package.json | 2 +- dashboard/package.json | 2 +- package.json | 2 +- shared/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/package.json b/backend/package.json index b23dd8b6b..0ac26264b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,5 +1,5 @@ { - "name": "@zeppelin/backend", + "name": "@zeppelinbot/backend", "version": "0.0.1", "description": "", "private": true, diff --git a/dashboard/package.json b/dashboard/package.json index 633f3d2c2..269e9d6d7 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1,5 +1,5 @@ { - "name": "@zeppelin/dashboard", + "name": "@zeppelinbot/dashboard", "version": "1.0.0", "description": "", "private": true, diff --git a/package.json b/package.json index 0309d59c7..4cae320e8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@zeppelin/zeppelin", + "name": "@zeppelinbot/zeppelin", "version": "0.0.1", "description": "", "private": true, diff --git a/shared/package.json b/shared/package.json index 134cab28a..83a2dd167 100644 --- a/shared/package.json +++ b/shared/package.json @@ -1,5 +1,5 @@ { - "name": "@zeppelin/shared", + "name": "@zeppelinbot/shared", "version": "0.0.1", "description": "", "private": true, From b0a9cf1bcd4b28ad3a5184bbb8ba0b1ab2a11325 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:46:48 +0200 Subject: [PATCH 066/128] fix: tweaks to config types --- backend/src/plugins/Automod/actions/alert.ts | 2 +- backend/src/plugins/Automod/actions/changePerms.ts | 6 +++--- backend/src/plugins/Automod/triggers/matchWords.ts | 2 +- backend/src/plugins/Automod/types.ts | 2 +- backend/src/utils.ts | 2 ++ 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts index c5fcd4b35..654562180 100644 --- a/backend/src/plugins/Automod/actions/alert.ts +++ b/backend/src/plugins/Automod/actions/alert.ts @@ -27,7 +27,7 @@ import { automodAction } from "../helpers"; const configSchema = z.object({ channel: zSnowflake, - text: zBoundedCharacters(1, 4000), + text: zBoundedCharacters(0, 4000), allowed_mentions: zNullishToUndefined(zAllowedMentions.nullable().default(null)), }); diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 33b0c283b..92fdbb843 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -2,7 +2,7 @@ import { PermissionsBitField, PermissionsString } from "discord.js"; import { U } from "ts-toolbelt"; import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; -import { isValidSnowflake, keys, noop, zBoundedCharacters, zSnowflake } from "../../../utils"; +import { isValidSnowflake, keys, noop, zBoundedCharacters } from "../../../utils"; import { guildToTemplateSafeGuild, savedMessageToTemplateSafeSavedMessage, @@ -66,8 +66,8 @@ const allPermissionNames = [...permissionNames, ...legacyPermissionNames] as con export const ChangePermsAction = automodAction({ configSchema: z.strictObject({ - target: zBoundedCharacters(1, 255), - channel: zBoundedCharacters(1, 255).nullable().default(null), + target: zBoundedCharacters(1, 2000), + channel: zBoundedCharacters(1, 2000).nullable().default(null), perms: z.record( z.enum(allPermissionNames), z.boolean().nullable(), diff --git a/backend/src/plugins/Automod/triggers/matchWords.ts b/backend/src/plugins/Automod/triggers/matchWords.ts index e8c275e13..95556289c 100644 --- a/backend/src/plugins/Automod/triggers/matchWords.ts +++ b/backend/src/plugins/Automod/triggers/matchWords.ts @@ -14,7 +14,7 @@ interface MatchResultType { const regexCache = new WeakMap(); const configSchema = z.strictObject({ - words: z.array(z.string().max(2000)).max(512), + words: z.array(z.string().max(2000)).max(1024), case_sensitive: z.boolean().default(false), only_full_words: z.boolean().default(true), normalize: z.boolean().default(false), diff --git a/backend/src/plugins/Automod/types.ts b/backend/src/plugins/Automod/types.ts index 251ef6437..086060a07 100644 --- a/backend/src/plugins/Automod/types.ts +++ b/backend/src/plugins/Automod/types.ts @@ -69,7 +69,7 @@ export const zAutomodConfig = z.strictObject({ rules: zBoundedRecord( z.record(z.string().max(100), zRule), 0, - 100, + 255, ), antiraid_levels: z.array(z.string().max(100)).max(10), can_set_antiraid: z.boolean(), diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 641a25734..e7160e6bb 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -289,6 +289,8 @@ export type StrictMessageContent = { export const zMessageContent = z.union([zBoundedCharacters(0, 4000), zStrictMessageContent]); +export type MessageContent = string | StrictMessageContent; + export function validateAndParseMessageContent(input: unknown): StrictMessageContent { if (input == null) { return {}; From b83f38809694f20be5a03549567cd4f4d3f79fe4 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:47:30 +0200 Subject: [PATCH 067/128] feat: add cli command to export configs as json schema --- .gitignore | 1 + backend/package-lock.json | 18 ++++++++++++++---- backend/package.json | 4 +++- backend/src/exportSchemas.ts | 24 ++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 backend/src/exportSchemas.ts diff --git a/.gitignore b/.gitignore index 5b9127453..a312a7f93 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ npm-audit.txt .vscode/ config-errors.txt +/config-schema.json diff --git a/backend/package-lock.json b/backend/package-lock.json index 1f2f5992e..12d2473a0 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -75,7 +75,8 @@ "@types/uuid": "^9.0.2", "ava": "^5.3.1", "rimraf": "^2.6.2", - "source-map-support": "^0.5.16" + "source-map-support": "^0.5.16", + "zod-to-json-schema": "^3.22.3" } }, "node_modules/@assemblyscript/loader": { @@ -10192,12 +10193,21 @@ } }, "node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "node_modules/zod-to-json-schema": { + "version": "3.22.3", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.22.3.tgz", + "integrity": "sha512-9isG8SqRe07p+Aio2ruBZmLm2Q6Sq4EqmXOiNpDxp+7f0LV6Q/LX65fs5Nn+FV/CzfF3NLBoksXbS2jNYIfpKw==", + "dev": true, + "peerDependencies": { + "zod": "^3.22.4" + } } } } diff --git a/backend/package.json b/backend/package.json index 0ac26264b..8a0c0e8f2 100644 --- a/backend/package.json +++ b/backend/package.json @@ -25,6 +25,7 @@ "migrate-rollback-prod": "cross-env NODE_ENV=production npm run migrate", "migrate-rollback-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", "validate-active-configs": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps dist/backend/src/validateActiveConfigs.js > ../config-errors.txt", + "export-config-json-schema": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps dist/backend/src/exportSchemas.js > ../config-schema.json", "test": "npm run build && npm run run-tests", "run-tests": "ava", "test-watch": "tsc-watch --onSuccess \"npx ava\"" @@ -97,7 +98,8 @@ "@types/uuid": "^9.0.2", "ava": "^5.3.1", "rimraf": "^2.6.2", - "source-map-support": "^0.5.16" + "source-map-support": "^0.5.16", + "zod-to-json-schema": "^3.22.3" }, "ava": { "files": [ diff --git a/backend/src/exportSchemas.ts b/backend/src/exportSchemas.ts new file mode 100644 index 000000000..9fa5c3a5b --- /dev/null +++ b/backend/src/exportSchemas.ts @@ -0,0 +1,24 @@ +import { z } from "zod"; +import { guildPlugins } from "./plugins/availablePlugins"; +import zodToJsonSchema from "zod-to-json-schema"; +import { zZeppelinGuildConfig } from "./types"; + +const pluginSchemaMap = guildPlugins.reduce((map, plugin) => { + if (! plugin.info) { + return map; + } + map[plugin.name] = plugin.info.configSchema; + return map; +}, {}); + +const fullSchema = zZeppelinGuildConfig + .omit({ plugins: true }) + .merge(z.strictObject({ + plugins: z.strictObject(pluginSchemaMap).partial(), + })); + +const jsonSchema = zodToJsonSchema(fullSchema); + +console.log(JSON.stringify(jsonSchema, null, 2)); + +process.exit(0); From 7ba318a6d9b6eebcfd587bbab427241b8dc91fa5 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:50:09 +0200 Subject: [PATCH 068/128] chore: centralize common TS config options --- backend/tsconfig.json | 19 ++----------------- dashboard/tsconfig.json | 9 +-------- shared/tsconfig.json | 9 +-------- tsconfig.json | 19 +++++++++++++++++++ 4 files changed, 23 insertions(+), 33 deletions(-) create mode 100644 tsconfig.json diff --git a/backend/tsconfig.json b/backend/tsconfig.json index bec249ad2..2000565b3 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,28 +1,13 @@ { + "extends": "../tsconfig.json", "compilerOptions": { "moduleResolution": "NodeNext", "module": "NodeNext", - "noImplicitAny": false, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "target": "esnext", - "lib": ["es2023"], "baseUrl": ".", - "resolveJsonModule": true, - "esModuleInterop": true, "outDir": "./dist", "paths": { "@shared/*": ["../shared/src/*"] - }, - "sourceMap": true, - "alwaysStrict": true, - "noImplicitThis": true, - "skipLibCheck": true, - "strict": true, - "strictPropertyInitialization": false, - "useUnknownInCatchVariables": false, - "allowJs": true + } }, "include": ["src/**/*.ts"] } diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json index 1bd1fd320..34507dfc7 100644 --- a/dashboard/tsconfig.json +++ b/dashboard/tsconfig.json @@ -1,18 +1,11 @@ { + "extends": "../tsconfig.json", "compilerOptions": { "moduleResolution": "node", "module": "esnext", "target": "es2018", - "sourceMap": true, - "noImplicitAny": false, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "strict": false, "lib": ["esnext", "dom"], "baseUrl": ".", - "resolveJsonModule": true, - "esModuleInterop": true, "allowJs": true, "paths": { "@shared/*": ["../shared/src/*"] diff --git a/shared/tsconfig.json b/shared/tsconfig.json index c5c16316c..cea9087ad 100644 --- a/shared/tsconfig.json +++ b/shared/tsconfig.json @@ -1,16 +1,9 @@ { + "extends": "../tsconfig.json", "compilerOptions": { "moduleResolution": "NodeNext", "module": "NodeNext", - "noImplicitAny": false, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "target": "es2022", - "lib": ["es2022"], "baseUrl": "src", - "resolveJsonModule": true, - "esModuleInterop": true, "outDir": "./dist" }, "include": ["src/**/*.ts"] diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..3701310e5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "noImplicitAny": false, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "target": "esnext", + "lib": ["es2023"], + "resolveJsonModule": true, + "esModuleInterop": true, + "sourceMap": true, + "alwaysStrict": true, + "noImplicitThis": true, + "skipLibCheck": true, + "strict": true, + "strictPropertyInitialization": false, + "useUnknownInCatchVariables": false + } +} From 49866d375acf14f0ebe9d5c177f3c7c7526e28ff Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 13:55:26 +0200 Subject: [PATCH 069/128] feat: zod config schema formatting --- backend/src/api/docs.ts | 107 ++++++++++++++++++++++++++++++++-------- 1 file changed, 86 insertions(+), 21 deletions(-) diff --git a/backend/src/api/docs.ts b/backend/src/api/docs.ts index dcb75c499..5b9de52b2 100644 --- a/backend/src/api/docs.ts +++ b/backend/src/api/docs.ts @@ -1,34 +1,99 @@ import express from "express"; +import z from "zod"; import { guildPlugins } from "../plugins/availablePlugins"; import { indentLines } from "../utils"; import { notFound } from "./responses"; -function formatConfigSchema(schema) { - if (schema._tag === "InterfaceType" || schema._tag === "PartialType") { +function isZodObject(schema: z.ZodTypeAny): schema is z.ZodObject { + return schema._def.typeName === "ZodObject"; +} + +function isZodRecord(schema: z.ZodTypeAny): schema is z.ZodRecord { + return schema._def.typeName === "ZodRecord"; +} + +function isZodEffects(schema: z.ZodTypeAny): schema is z.ZodEffects { + return schema._def.typeName === "ZodEffects"; +} + +function isZodOptional(schema: z.ZodTypeAny): schema is z.ZodOptional { + return schema._def.typeName === "ZodOptional"; +} + +function isZodArray(schema: z.ZodTypeAny): schema is z.ZodArray { + return schema._def.typeName === "ZodArray"; +} + +function isZodUnion(schema: z.ZodTypeAny): schema is z.ZodUnion { + return schema._def.typeName === "ZodUnion"; +} + +function isZodNullable(schema: z.ZodTypeAny): schema is z.ZodNullable { + return schema._def.typeName === "ZodNullable"; +} + +function isZodDefault(schema: z.ZodTypeAny): schema is z.ZodDefault { + return schema._def.typeName === "ZodDefault"; +} + +function isZodLiteral(schema: z.ZodTypeAny): schema is z.ZodLiteral { + return schema._def.typeName === "ZodLiteral"; +} + +function isZodIntersection(schema: z.ZodTypeAny): schema is z.ZodIntersection { + return schema._def.typeName === "ZodIntersection"; +} + +function formatZodConfigSchema(schema: z.ZodTypeAny) { + if (isZodObject(schema)) { return ( `{\n` + - Object.entries(schema.props) - .map(([k, value]) => indentLines(`${k}: ${formatConfigSchema(value)}`, 2)) + Object.entries(schema._def.shape()) + .map(([k, value]) => indentLines(`${k}: ${formatZodConfigSchema(value as z.ZodTypeAny)}`, 2)) .join("\n") + "\n}" ); - } else if (schema._tag === "DictionaryType") { - return "{\n" + indentLines(`[string]: ${formatConfigSchema(schema.codomain)}`, 2) + "\n}"; - } else if (schema._tag === "ArrayType") { - return `Array<${formatConfigSchema(schema.type)}>`; - } else if (schema._tag === "UnionType") { - if (schema.name.startsWith("Nullable<")) { - return `Nullable<${formatConfigSchema(schema.types[0])}>`; - } else if (schema.name.startsWith("Optional<")) { - return `Optional<${formatConfigSchema(schema.types[0])}>`; - } else { - return schema.types.map((t) => formatConfigSchema(t)).join(" | "); - } - } else if (schema._tag === "IntersectionType") { - return schema.types.map((t) => formatConfigSchema(t)).join(" & "); - } else { - return schema.name; } + if (isZodRecord(schema)) { + return "{\n" + indentLines(`[string]: ${formatZodConfigSchema(schema._def.valueType)}`, 2) + "\n}"; + } + if (isZodEffects(schema)) { + return formatZodConfigSchema(schema._def.schema); + } + if (isZodOptional(schema)) { + return `Optional<${formatZodConfigSchema(schema._def.innerType)}>`; + } + if (isZodArray(schema)) { + return `Array<${formatZodConfigSchema(schema._def.type)}>`; + } + if (isZodUnion(schema)) { + return schema._def.options.map((t) => formatZodConfigSchema(t)).join(" | "); + } + if (isZodNullable(schema)) { + return `Nullable<${formatZodConfigSchema(schema._def.innerType)}>`; + } + if (isZodDefault(schema)) { + return formatZodConfigSchema(schema._def.innerType); + } + if (isZodLiteral(schema)) { + return schema._def.value; + } + if (isZodIntersection(schema)) { + return [formatZodConfigSchema(schema._def.left), formatZodConfigSchema(schema._def.right)].join(" & "); + } + if (schema._def.typeName === "ZodString") { + return "string"; + } + if (schema._def.typeName === "ZodNumber") { + return "number"; + } + if (schema._def.typeName === "ZodBoolean") { + return "boolean"; + } + if (schema._def.typeName === "ZodNever") { + return "never"; + } + return "unknown"; } export function initDocs(app: express.Express) { @@ -67,7 +132,7 @@ export function initDocs(app: express.Express) { })); const defaultOptions = plugin.defaultOptions || {}; - const configSchema = plugin.info?.configSchema && formatConfigSchema(plugin.info.configSchema); + const configSchema = plugin.info?.configSchema && formatZodConfigSchema(plugin.info.configSchema); res.json({ name, From adab5dd591af7df85619fa7adc3a95d07a12abf8 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:04:49 +0200 Subject: [PATCH 070/128] fix: revert dashboard tsconfig There are a lot of errors with the stricter settings that the backend uses and it's not worth it fixing the dashboard now when we're rewriting it in the near future. --- dashboard/tsconfig.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dashboard/tsconfig.json b/dashboard/tsconfig.json index 34507dfc7..1bd1fd320 100644 --- a/dashboard/tsconfig.json +++ b/dashboard/tsconfig.json @@ -1,11 +1,18 @@ { - "extends": "../tsconfig.json", "compilerOptions": { "moduleResolution": "node", "module": "esnext", "target": "es2018", + "sourceMap": true, + "noImplicitAny": false, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "strict": false, "lib": ["esnext", "dom"], "baseUrl": ".", + "resolveJsonModule": true, + "esModuleInterop": true, "allowJs": true, "paths": { "@shared/*": ["../shared/src/*"] From 77ab2718e7a60cd5bb82e3eb9be86aa7566ad0ab Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:21:32 +0200 Subject: [PATCH 071/128] chore: resolve lint errors --- backend/src/index.ts | 2 +- .../src/plugins/ContextMenus/actions/userInfo.ts | 2 +- backend/src/plugins/Logs/types.ts | 2 +- backend/src/plugins/Utility/UtilityPlugin.ts | 4 ++-- backend/src/plugins/Utility/commands/InfoCmd.ts | 13 ++++++------- .../src/plugins/Utility/commands/MessageInfoCmd.ts | 1 - backend/src/plugins/Utility/commands/RoleInfoCmd.ts | 2 +- .../src/plugins/Utility/commands/ServerInfoCmd.ts | 2 +- .../plugins/Utility/commands/SnowflakeInfoCmd.ts | 4 ++-- backend/src/plugins/Utility/commands/UserInfoCmd.ts | 2 +- .../Utility/functions/getChannelInfoEmbed.ts | 1 - .../Utility/functions/getMessageInfoEmbed.ts | 4 ---- .../plugins/Utility/functions/getRoleInfoEmbed.ts | 1 - .../plugins/Utility/functions/getServerInfoEmbed.ts | 1 - .../Utility/functions/getSnowflakeInfoEmbed.ts | 4 ---- .../plugins/Utility/functions/getUserInfoEmbed.ts | 4 ---- backend/src/utils.ts | 7 ------- 17 files changed, 16 insertions(+), 40 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 2fe16c115..6dad14b14 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -203,7 +203,7 @@ if (env.DEBUG) { } logger.info("Connecting to database"); -connect().then(async (connection) => { +connect().then(async () => { const client = new Client({ partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction], diff --git a/backend/src/plugins/ContextMenus/actions/userInfo.ts b/backend/src/plugins/ContextMenus/actions/userInfo.ts index e445e1c8a..a2d44d7ab 100644 --- a/backend/src/plugins/ContextMenus/actions/userInfo.ts +++ b/backend/src/plugins/ContextMenus/actions/userInfo.ts @@ -16,7 +16,7 @@ export async function userInfoAction( const utility = pluginData.getPlugin(UtilityPlugin); if (userCfg.can_use && (await utility.hasPermission(executingMember, interaction.channelId, "can_userinfo"))) { - const embed = await utility.userInfo(interaction.targetId, interaction.user.id); + const embed = await utility.userInfo(interaction.targetId); if (!embed) { await interaction.followUp({ content: "Cannot info: internal error" }); return; diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 2960c2ae8..6b214c990 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -1,5 +1,5 @@ import { BasePluginType, CooldownManager, guildPluginEventListener } from "knub"; -import { ZodString, z } from "zod"; +import { z } from "zod"; import { RegExpRunner } from "../../RegExpRunner"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildCases } from "../../data/GuildCases"; diff --git a/backend/src/plugins/Utility/UtilityPlugin.ts b/backend/src/plugins/Utility/UtilityPlugin.ts index efb892ec8..5f44118ef 100644 --- a/backend/src/plugins/Utility/UtilityPlugin.ts +++ b/backend/src/plugins/Utility/UtilityPlugin.ts @@ -169,8 +169,8 @@ export const UtilityPlugin = zeppelinGuildPlugin()({ }, userInfo(pluginData) { - return (userId: Snowflake, requestMemberId?: Snowflake) => { - return getUserInfoEmbed(pluginData, userId, false, requestMemberId); + return (userId: Snowflake) => { + return getUserInfoEmbed(pluginData, userId, false); }; }, diff --git a/backend/src/plugins/Utility/commands/InfoCmd.ts b/backend/src/plugins/Utility/commands/InfoCmd.ts index 63d0ae81f..a430898e7 100644 --- a/backend/src/plugins/Utility/commands/InfoCmd.ts +++ b/backend/src/plugins/Utility/commands/InfoCmd.ts @@ -42,7 +42,7 @@ export const InfoCmd = utilityCmd({ const channelId = getChannelId(value); const channel = channelId && pluginData.guild.channels.cache.get(channelId as Snowflake); if (channel) { - const embed = await getChannelInfoEmbed(pluginData, channelId!, message.author.id); + const embed = await getChannelInfoEmbed(pluginData, channelId!); if (embed) { message.channel.send({ embeds: [embed] }); return; @@ -54,7 +54,7 @@ export const InfoCmd = utilityCmd({ if (userCfg.can_server) { const guild = await pluginData.client.guilds.fetch(value as Snowflake).catch(noop); if (guild) { - const embed = await getServerInfoEmbed(pluginData, value, message.author.id); + const embed = await getServerInfoEmbed(pluginData, value); if (embed) { message.channel.send({ embeds: [embed] }); return; @@ -66,7 +66,7 @@ export const InfoCmd = utilityCmd({ if (userCfg.can_userinfo) { const user = await resolveUser(pluginData.client, value); if (user && userCfg.can_userinfo) { - const embed = await getUserInfoEmbed(pluginData, user.id, Boolean(args.compact), message.author.id); + const embed = await getUserInfoEmbed(pluginData, user.id, Boolean(args.compact)); if (embed) { message.channel.send({ embeds: [embed] }); return; @@ -83,7 +83,6 @@ export const InfoCmd = utilityCmd({ pluginData, messageTarget.channel.id, messageTarget.messageId, - message.author.id, ); if (embed) { message.channel.send({ embeds: [embed] }); @@ -112,7 +111,7 @@ export const InfoCmd = utilityCmd({ if (userCfg.can_server) { const serverPreview = await getGuildPreview(pluginData.client, value).catch(() => null); if (serverPreview) { - const embed = await getServerInfoEmbed(pluginData, value, message.author.id); + const embed = await getServerInfoEmbed(pluginData, value); if (embed) { message.channel.send({ embeds: [embed] }); return; @@ -125,7 +124,7 @@ export const InfoCmd = utilityCmd({ const roleId = getRoleId(value); const role = roleId && pluginData.guild.roles.cache.get(roleId as Snowflake); if (role) { - const embed = await getRoleInfoEmbed(pluginData, role, message.author.id); + const embed = await getRoleInfoEmbed(pluginData, role); message.channel.send({ embeds: [embed] }); return; } @@ -145,7 +144,7 @@ export const InfoCmd = utilityCmd({ // 9. Arbitrary ID if (isValidSnowflake(value) && userCfg.can_snowflake) { - const embed = await getSnowflakeInfoEmbed(pluginData, value, true, message.author.id); + const embed = await getSnowflakeInfoEmbed(value, true); message.channel.send({ embeds: [embed] }); return; } diff --git a/backend/src/plugins/Utility/commands/MessageInfoCmd.ts b/backend/src/plugins/Utility/commands/MessageInfoCmd.ts index 82096250e..72df1f6ce 100644 --- a/backend/src/plugins/Utility/commands/MessageInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/MessageInfoCmd.ts @@ -24,7 +24,6 @@ export const MessageInfoCmd = utilityCmd({ pluginData, args.message.channel.id, args.message.messageId, - message.author.id, ); if (!embed) { sendErrorMessage(pluginData, message.channel, "Unknown message"); diff --git a/backend/src/plugins/Utility/commands/RoleInfoCmd.ts b/backend/src/plugins/Utility/commands/RoleInfoCmd.ts index b04b49a7d..6f540b4b1 100644 --- a/backend/src/plugins/Utility/commands/RoleInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/RoleInfoCmd.ts @@ -13,7 +13,7 @@ export const RoleInfoCmd = utilityCmd({ }, async run({ message, args, pluginData }) { - const embed = await getRoleInfoEmbed(pluginData, args.role, message.author.id); + const embed = await getRoleInfoEmbed(pluginData, args.role); message.channel.send({ embeds: [embed] }); }, }); diff --git a/backend/src/plugins/Utility/commands/ServerInfoCmd.ts b/backend/src/plugins/Utility/commands/ServerInfoCmd.ts index 30fb7efef..9d1d4ed66 100644 --- a/backend/src/plugins/Utility/commands/ServerInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/ServerInfoCmd.ts @@ -15,7 +15,7 @@ export const ServerInfoCmd = utilityCmd({ async run({ message, pluginData, args }) { const serverId = args.serverId || pluginData.guild.id; - const serverInfoEmbed = await getServerInfoEmbed(pluginData, serverId, message.author.id); + const serverInfoEmbed = await getServerInfoEmbed(pluginData, serverId); if (!serverInfoEmbed) { sendErrorMessage(pluginData, message.channel, "Could not find information for that server"); return; diff --git a/backend/src/plugins/Utility/commands/SnowflakeInfoCmd.ts b/backend/src/plugins/Utility/commands/SnowflakeInfoCmd.ts index 59f438931..bf0e859fc 100644 --- a/backend/src/plugins/Utility/commands/SnowflakeInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/SnowflakeInfoCmd.ts @@ -12,8 +12,8 @@ export const SnowflakeInfoCmd = utilityCmd({ id: ct.anyId(), }, - async run({ message, args, pluginData }) { - const embed = await getSnowflakeInfoEmbed(pluginData, args.id, false, message.author.id); + async run({ message, args }) { + const embed = await getSnowflakeInfoEmbed(args.id, false); message.channel.send({ embeds: [embed] }); }, }); diff --git a/backend/src/plugins/Utility/commands/UserInfoCmd.ts b/backend/src/plugins/Utility/commands/UserInfoCmd.ts index c7ce8b48c..d796bf364 100644 --- a/backend/src/plugins/Utility/commands/UserInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/UserInfoCmd.ts @@ -17,7 +17,7 @@ export const UserInfoCmd = utilityCmd({ async run({ message, args, pluginData }) { const userId = args.user?.id || message.author.id; - const embed = await getUserInfoEmbed(pluginData, userId, args.compact, message.author.id); + const embed = await getUserInfoEmbed(pluginData, userId, args.compact); if (!embed) { sendErrorMessage(pluginData, message.channel, "User not found"); return; diff --git a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts index ee006f5f2..33a04b8e0 100644 --- a/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getChannelInfoEmbed.ts @@ -22,7 +22,6 @@ const FORUM_CHANNEL_ICON = export async function getChannelInfoEmbed( pluginData: GuildPluginData, channelId: string, - requestMemberId?: string, ): Promise { const channel = pluginData.guild.channels.cache.get(channelId as Snowflake); if (!channel) { diff --git a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts index 1568a3e30..4b615cf0f 100644 --- a/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getMessageInfoEmbed.ts @@ -9,7 +9,6 @@ import { trimEmptyLines, trimLines, } from "../../../utils"; -import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; import { UtilityPluginType } from "../types"; const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png"; @@ -18,7 +17,6 @@ export async function getMessageInfoEmbed( pluginData: GuildPluginData, channelId: string, messageId: string, - requestMemberId?: string, ): Promise { const message = await (pluginData.guild.channels.resolve(channelId as Snowflake) as TextChannel).messages .fetch(messageId as Snowflake) @@ -27,8 +25,6 @@ export async function getMessageInfoEmbed( return null; } - const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); - const embed: EmbedWith<"fields" | "author"> = { fields: [], author: { diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts index fa3188ec5..700546ca6 100644 --- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts @@ -9,7 +9,6 @@ const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/ export async function getRoleInfoEmbed( pluginData: GuildPluginData, role: Role, - requestMemberId?: string, ): Promise { const embed: EmbedWith<"fields" | "author" | "color"> = { fields: [], diff --git a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts index d0202db78..bbd1f78f0 100644 --- a/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getServerInfoEmbed.ts @@ -25,7 +25,6 @@ const prettifyFeature = (feature: string): string => export async function getServerInfoEmbed( pluginData: GuildPluginData, serverId: string, - requestMemberId?: string, ): Promise { const thisServer = serverId === pluginData.guild.id ? pluginData.guild : null; const [restGuild, guildPreview] = await Promise.all([ diff --git a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts index ef676fd17..7009241c3 100644 --- a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts @@ -1,16 +1,12 @@ import { APIEmbed } from "discord.js"; -import { GuildPluginData } from "knub"; import { EmbedWith, preEmbedPadding } from "../../../utils"; import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp"; -import { UtilityPluginType } from "../types"; const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png"; export async function getSnowflakeInfoEmbed( - pluginData: GuildPluginData, snowflake: string, showUnknownWarning = false, - requestMemberId?: string, ): Promise { const embed: EmbedWith<"fields" | "author"> = { fields: [], diff --git a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts index ef8d23205..b568a833a 100644 --- a/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getUserInfoEmbed.ts @@ -13,7 +13,6 @@ import { trimLines, UnknownUser, } from "../../../utils"; -import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; import { UtilityPluginType } from "../types"; const MAX_ROLES_TO_DISPLAY = 15; @@ -27,7 +26,6 @@ export async function getUserInfoEmbed( pluginData: GuildPluginData, userId: string, compact = false, - requestMemberId?: string, ): Promise { const user = await resolveUser(pluginData.client, userId); if (!user || user instanceof UnknownUser) { @@ -40,8 +38,6 @@ export async function getUserInfoEmbed( fields: [], }; - const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin); - embed.author = { name: `${user.bot ? "Bot" : "User"}: ${renderUsername(user.username, user.discriminator)}`, }; diff --git a/backend/src/utils.ts b/backend/src/utils.ts index db08dc493..97f513014 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -150,13 +150,6 @@ export type GroupDMInvite = Invite & { type: typeof ChannelType.GroupDM; }; -function isBoundedString(str: unknown, min: number, max: number): str is string { - if (typeof str !== "string") { - return false; - } - return (str.length >= min && str.length <= max); -} - export function zBoundedCharacters(min: number, max: number) { return z.string().refine(str => { const len = [...str].length; // Unicode aware character split From 873bf7eb9962a210c4e62b837f65e429378be388 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:23:13 +0200 Subject: [PATCH 072/128] chore: run prettier --- backend/src/data/GuildArchives.ts | 2 +- backend/src/exportSchemas.ts | 12 +- backend/src/pluginUtils.ts | 8 +- backend/src/plugins/AutoDelete/types.ts | 2 +- backend/src/plugins/Automod/AutomodPlugin.ts | 4 +- backend/src/plugins/Automod/actions/alert.ts | 2 +- backend/src/plugins/Automod/actions/ban.ts | 11 +- .../plugins/Automod/actions/changePerms.ts | 5 +- backend/src/plugins/Automod/actions/kick.ts | 2 +- backend/src/plugins/Automod/actions/mute.ts | 21 ++- backend/src/plugins/Automod/actions/reply.ts | 2 +- backend/src/plugins/Automod/actions/warn.ts | 2 +- backend/src/plugins/Automod/constants.ts | 5 +- .../functions/createMessageSpamTrigger.ts | 2 +- backend/src/plugins/Automod/helpers.ts | 2 +- .../plugins/Automod/triggers/antiraidLevel.ts | 2 +- .../plugins/Automod/triggers/anyMessage.ts | 2 +- .../Automod/triggers/matchAttachmentType.ts | 48 +++--- .../plugins/Automod/triggers/matchLinks.ts | 20 ++- .../plugins/Automod/triggers/matchMimeType.ts | 46 +++--- .../src/plugins/Automod/triggers/roleAdded.ts | 5 +- .../plugins/Automod/triggers/roleRemoved.ts | 5 +- backend/src/plugins/Automod/types.ts | 70 ++++---- .../src/plugins/ContextMenus/actions/mute.ts | 4 +- .../src/plugins/Counters/CountersPlugin.ts | 5 +- backend/src/plugins/Counters/types.ts | 133 ++++++++------- .../actions/setChannelPermissionOverrides.ts | 18 +- backend/src/plugins/CustomEvents/types.ts | 6 +- .../GuildAccessMonitorPlugin.ts | 2 +- .../GuildInfoSaver/GuildInfoSaverPlugin.ts | 2 +- backend/src/plugins/Logs/LogsPlugin.ts | 2 +- .../Logs/logFunctions/logMessageDelete.ts | 4 +- backend/src/plugins/Logs/types.ts | 20 ++- backend/src/plugins/Logs/util/isLogIgnored.ts | 6 +- .../ModActions/functions/clearTempban.ts | 4 +- backend/src/plugins/ReactionRoles/types.ts | 5 +- backend/src/plugins/RoleButtons/types.ts | 154 ++++++++++-------- .../src/plugins/SelfGrantableRoles/types.ts | 5 +- backend/src/plugins/Slowmode/types.ts | 2 +- backend/src/plugins/Spam/types.ts | 10 +- backend/src/plugins/Starboard/types.ts | 6 +- .../src/plugins/Tags/commands/TagEvalCmd.ts | 8 +- backend/src/plugins/Tags/types.ts | 70 ++++---- .../src/plugins/Tags/util/onMessageCreate.ts | 4 +- .../plugins/Tags/util/renderTagFromString.ts | 8 +- .../src/plugins/Utility/commands/InfoCmd.ts | 6 +- .../Utility/commands/MessageInfoCmd.ts | 6 +- .../Utility/functions/getRoleInfoEmbed.ts | 5 +- .../functions/getSnowflakeInfoEmbed.ts | 5 +- backend/src/plugins/Utility/search.ts | 10 +- .../src/plugins/ZeppelinPluginBlueprint.ts | 2 +- backend/src/utils.ts | 83 ++++++---- backend/src/utils/formatZodIssue.ts | 4 +- backend/src/validateActiveConfigs.ts | 5 +- 54 files changed, 465 insertions(+), 419 deletions(-) diff --git a/backend/src/data/GuildArchives.ts b/backend/src/data/GuildArchives.ts index 0451dfe0c..4d74ccefe 100644 --- a/backend/src/data/GuildArchives.ts +++ b/backend/src/data/GuildArchives.ts @@ -4,12 +4,12 @@ import { Repository } from "typeorm"; import { TemplateSafeValueContainer, renderTemplate } from "../templateFormatter"; import { renderUsername, trimLines } from "../utils"; import { decrypt, encrypt } from "../utils/crypt"; +import { isDefaultSticker } from "../utils/isDefaultSticker"; import { channelToTemplateSafeChannel, guildToTemplateSafeGuild } from "../utils/templateSafeObjects"; import { BaseGuildRepository } from "./BaseGuildRepository"; import { dataSource } from "./dataSource"; import { ArchiveEntry } from "./entities/ArchiveEntry"; import { SavedMessage } from "./entities/SavedMessage"; -import { isDefaultSticker } from "../utils/isDefaultSticker"; const DEFAULT_EXPIRY_DAYS = 30; diff --git a/backend/src/exportSchemas.ts b/backend/src/exportSchemas.ts index 9fa5c3a5b..54f552914 100644 --- a/backend/src/exportSchemas.ts +++ b/backend/src/exportSchemas.ts @@ -1,21 +1,21 @@ import { z } from "zod"; -import { guildPlugins } from "./plugins/availablePlugins"; import zodToJsonSchema from "zod-to-json-schema"; +import { guildPlugins } from "./plugins/availablePlugins"; import { zZeppelinGuildConfig } from "./types"; const pluginSchemaMap = guildPlugins.reduce((map, plugin) => { - if (! plugin.info) { + if (!plugin.info) { return map; } map[plugin.name] = plugin.info.configSchema; return map; }, {}); -const fullSchema = zZeppelinGuildConfig - .omit({ plugins: true }) - .merge(z.strictObject({ +const fullSchema = zZeppelinGuildConfig.omit({ plugins: true }).merge( + z.strictObject({ plugins: z.strictObject(pluginSchemaMap).partial(), - })); + }), +); const jsonSchema = zodToJsonSchema(fullSchema); diff --git a/backend/src/pluginUtils.ts b/backend/src/pluginUtils.ts index a2f744d93..31cbd77c3 100644 --- a/backend/src/pluginUtils.ts +++ b/backend/src/pluginUtils.ts @@ -10,13 +10,7 @@ import { PermissionsBitField, TextBasedChannel, } from "discord.js"; -import { - AnyPluginData, - CommandContext, - ExtendedMatchParams, - GuildPluginData, - helpers -} from "knub"; +import { AnyPluginData, CommandContext, ExtendedMatchParams, GuildPluginData, helpers } from "knub"; import { logger } from "./logger"; import { isStaff } from "./staff"; import { TZeppelinKnub } from "./types"; diff --git a/backend/src/plugins/AutoDelete/types.ts b/backend/src/plugins/AutoDelete/types.ts index 691004380..be6ff7ee1 100644 --- a/backend/src/plugins/AutoDelete/types.ts +++ b/backend/src/plugins/AutoDelete/types.ts @@ -1,10 +1,10 @@ import { BasePluginType } from "knub"; +import z from "zod"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; import { SavedMessage } from "../../data/entities/SavedMessage"; import { MINUTES, zDelayString } from "../../utils"; import Timeout = NodeJS.Timeout; -import z from "zod"; export const MAX_DELAY = 5 * MINUTES; diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts index 9634c25db..29fcf9e61 100644 --- a/backend/src/plugins/Automod/AutomodPlugin.ts +++ b/backend/src/plugins/Automod/AutomodPlugin.ts @@ -1,9 +1,9 @@ import { CooldownManager } from "knub"; +import { Queue } from "../../Queue"; import { GuildAntiraidLevels } from "../../data/GuildAntiraidLevels"; import { GuildArchives } from "../../data/GuildArchives"; import { GuildLogs } from "../../data/GuildLogs"; import { GuildSavedMessages } from "../../data/GuildSavedMessages"; -import { Queue } from "../../Queue"; import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners"; import { MINUTES, SECONDS } from "../../utils"; import { registerEventListenersFromMap } from "../../utils/registerEventListenersFromMap"; @@ -19,9 +19,9 @@ import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { AntiraidClearCmd } from "./commands/AntiraidClearCmd"; import { SetAntiraidCmd } from "./commands/SetAntiraidCmd"; import { ViewAntiraidCmd } from "./commands/ViewAntiraidCmd"; -import { runAutomodOnCounterTrigger } from "./events/runAutomodOnCounterTrigger"; import { RunAutomodOnJoinEvt, RunAutomodOnLeaveEvt } from "./events/RunAutomodOnJoinLeaveEvt"; import { RunAutomodOnMemberUpdate } from "./events/RunAutomodOnMemberUpdate"; +import { runAutomodOnCounterTrigger } from "./events/runAutomodOnCounterTrigger"; import { runAutomodOnMessage } from "./events/runAutomodOnMessage"; import { runAutomodOnModAction } from "./events/runAutomodOnModAction"; import { diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts index 654562180..d21fb4d5e 100644 --- a/backend/src/plugins/Automod/actions/alert.ts +++ b/backend/src/plugins/Automod/actions/alert.ts @@ -16,7 +16,7 @@ import { zAllowedMentions, zBoundedCharacters, zNullishToUndefined, - zSnowflake + zSnowflake, } from "../../../utils"; import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; diff --git a/backend/src/plugins/Automod/actions/ban.ts b/backend/src/plugins/Automod/actions/ban.ts index 22cc81673..5bf5b3a23 100644 --- a/backend/src/plugins/Automod/actions/ban.ts +++ b/backend/src/plugins/Automod/actions/ban.ts @@ -1,10 +1,17 @@ import z from "zod"; -import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils"; +import { + convertDelayStringToMS, + nonNullish, + unique, + zBoundedCharacters, + zDelayString, + zSnowflake, +} from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; +import { zNotify } from "../constants"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../constants"; const configSchema = z.strictObject({ reason: zBoundedCharacters(0, 4000).nullable().default(null), diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 92fdbb843..7b7eba379 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -68,10 +68,7 @@ export const ChangePermsAction = automodAction({ configSchema: z.strictObject({ target: zBoundedCharacters(1, 2000), channel: zBoundedCharacters(1, 2000).nullable().default(null), - perms: z.record( - z.enum(allPermissionNames), - z.boolean().nullable(), - ), + perms: z.record(z.enum(allPermissionNames), z.boolean().nullable()), }), async apply({ pluginData, contexts, actionConfig }) { diff --git a/backend/src/plugins/Automod/actions/kick.ts b/backend/src/plugins/Automod/actions/kick.ts index 412309cdf..2161e2c02 100644 --- a/backend/src/plugins/Automod/actions/kick.ts +++ b/backend/src/plugins/Automod/actions/kick.ts @@ -2,9 +2,9 @@ import z from "zod"; import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; +import { zNotify } from "../constants"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../constants"; export const KickAction = automodAction({ configSchema: z.strictObject({ diff --git a/backend/src/plugins/Automod/actions/mute.ts b/backend/src/plugins/Automod/actions/mute.ts index c2f8e1867..ba932b7fe 100644 --- a/backend/src/plugins/Automod/actions/mute.ts +++ b/backend/src/plugins/Automod/actions/mute.ts @@ -1,12 +1,19 @@ import z from "zod"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; -import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils"; +import { + convertDelayStringToMS, + nonNullish, + unique, + zBoundedCharacters, + zDelayString, + zSnowflake, +} from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; +import { zNotify } from "../constants"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../constants"; export const MuteAction = automodAction({ configSchema: z.strictObject({ @@ -14,8 +21,14 @@ export const MuteAction = automodAction({ duration: zDelayString.nullable().default(null), notify: zNotify.nullable().default(null), notifyChannel: zSnowflake.nullable().default(null), - remove_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null), - restore_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null), + remove_roles_on_mute: z + .union([z.boolean(), z.array(zSnowflake)]) + .nullable() + .default(null), + restore_roles_on_mute: z + .union([z.boolean(), z.array(zSnowflake)]) + .nullable() + .default(null), postInCaseLog: z.boolean().nullable().default(null), hide_case: z.boolean().nullable().default(false), }), diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts index 02ff95452..e8b1fdf87 100644 --- a/backend/src/plugins/Automod/actions/reply.ts +++ b/backend/src/plugins/Automod/actions/reply.ts @@ -10,7 +10,7 @@ import { verboseChannelMention, zBoundedCharacters, zDelayString, - zMessageContent + zMessageContent, } from "../../../utils"; import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; diff --git a/backend/src/plugins/Automod/actions/warn.ts b/backend/src/plugins/Automod/actions/warn.ts index 7ccb38983..d8a7805b1 100644 --- a/backend/src/plugins/Automod/actions/warn.ts +++ b/backend/src/plugins/Automod/actions/warn.ts @@ -2,9 +2,9 @@ import z from "zod"; import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; +import { zNotify } from "../constants"; import { resolveActionContactMethods } from "../functions/resolveActionContactMethods"; import { automodAction } from "../helpers"; -import { zNotify } from "../constants"; export const WarnAction = automodAction({ configSchema: z.strictObject({ diff --git a/backend/src/plugins/Automod/constants.ts b/backend/src/plugins/Automod/constants.ts index cc37f4022..c2baae776 100644 --- a/backend/src/plugins/Automod/constants.ts +++ b/backend/src/plugins/Automod/constants.ts @@ -20,7 +20,4 @@ export enum RecentActionType { ThreadCreate, } -export const zNotify = z.union([ - z.literal("dm"), - z.literal("channel"), -]); +export const zNotify = z.union([z.literal("dm"), z.literal("channel")]); diff --git a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts index 562ade6be..cb7eb2888 100644 --- a/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts +++ b/backend/src/plugins/Automod/functions/createMessageSpamTrigger.ts @@ -1,3 +1,4 @@ +import z from "zod"; import { SavedMessage } from "../../../data/entities/SavedMessage"; import { humanizeDurationShort } from "../../../humanizeDurationShort"; import { getBaseUrl } from "../../../pluginUtils"; @@ -7,7 +8,6 @@ import { automodTrigger } from "../helpers"; import { findRecentSpam } from "./findRecentSpam"; import { getMatchingMessageRecentActions } from "./getMatchingMessageRecentActions"; import { getMessageSpamIdentifier } from "./getSpamIdentifier"; -import z from "zod"; interface TMessageSpamMatchResultType { archiveId: string; diff --git a/backend/src/plugins/Automod/helpers.ts b/backend/src/plugins/Automod/helpers.ts index d1c04d61c..b4b9f764d 100644 --- a/backend/src/plugins/Automod/helpers.ts +++ b/backend/src/plugins/Automod/helpers.ts @@ -1,7 +1,7 @@ import { GuildPluginData } from "knub"; +import z, { ZodTypeAny } from "zod"; import { Awaitable } from "../../utils/typeUtils"; import { AutomodContext, AutomodPluginType } from "./types"; -import z, { ZodTypeAny } from "zod"; interface BaseAutomodTriggerMatchResult { extraContexts?: AutomodContext[]; diff --git a/backend/src/plugins/Automod/triggers/antiraidLevel.ts b/backend/src/plugins/Automod/triggers/antiraidLevel.ts index 1c5f7458b..c1467bf8e 100644 --- a/backend/src/plugins/Automod/triggers/antiraidLevel.ts +++ b/backend/src/plugins/Automod/triggers/antiraidLevel.ts @@ -1,5 +1,5 @@ -import { automodTrigger } from "../helpers"; import z from "zod"; +import { automodTrigger } from "../helpers"; interface AntiraidLevelTriggerResult {} diff --git a/backend/src/plugins/Automod/triggers/anyMessage.ts b/backend/src/plugins/Automod/triggers/anyMessage.ts index 93ce0abcf..71c92019b 100644 --- a/backend/src/plugins/Automod/triggers/anyMessage.ts +++ b/backend/src/plugins/Automod/triggers/anyMessage.ts @@ -1,7 +1,7 @@ import { Snowflake } from "discord.js"; +import z from "zod"; import { verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; -import z from "zod"; interface AnyMessageResultType {} diff --git a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts index 6dd49580a..8c562eb1c 100644 --- a/backend/src/plugins/Automod/triggers/matchAttachmentType.ts +++ b/backend/src/plugins/Automod/triggers/matchAttachmentType.ts @@ -1,6 +1,6 @@ import { escapeInlineCode, Snowflake } from "discord.js"; -import z from "zod"; import { extname } from "path"; +import z from "zod"; import { asSingleLine, messageSummary, verboseChannelMention } from "../../../utils"; import { automodTrigger } from "../helpers"; @@ -9,28 +9,30 @@ interface MatchResultType { mode: "blacklist" | "whitelist"; } -const configSchema = z.strictObject({ - filetype_blacklist: z.array(z.string().max(32)).max(255).default([]), - blacklist_enabled: z.boolean().default(false), - filetype_whitelist: z.array(z.string().max(32)).max(255).default([]), - whitelist_enabled: z.boolean().default(false), -}).transform((parsed, ctx) => { - if (parsed.blacklist_enabled && parsed.whitelist_enabled) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Cannot have both blacklist and whitelist enabled", - }); - return z.NEVER; - } - if (! parsed.blacklist_enabled && ! parsed.whitelist_enabled) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Must have either blacklist or whitelist enabled", - }); - return z.NEVER; - } - return parsed; -}); +const configSchema = z + .strictObject({ + filetype_blacklist: z.array(z.string().max(32)).max(255).default([]), + blacklist_enabled: z.boolean().default(false), + filetype_whitelist: z.array(z.string().max(32)).max(255).default([]), + whitelist_enabled: z.boolean().default(false), + }) + .transform((parsed, ctx) => { + if (parsed.blacklist_enabled && parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Cannot have both blacklist and whitelist enabled", + }); + return z.NEVER; + } + if (!parsed.blacklist_enabled && !parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Must have either blacklist or whitelist enabled", + }); + return z.NEVER; + } + return parsed; + }); export const MatchAttachmentTypeTrigger = automodTrigger()({ configSchema, diff --git a/backend/src/plugins/Automod/triggers/matchLinks.ts b/backend/src/plugins/Automod/triggers/matchLinks.ts index fe3280fcb..c43d83203 100644 --- a/backend/src/plugins/Automod/triggers/matchLinks.ts +++ b/backend/src/plugins/Automod/triggers/matchLinks.ts @@ -26,12 +26,20 @@ const configSchema = z.strictObject({ include_subdomains: z.boolean().default(true), include_words: z.array(z.string().max(2000)).max(700).optional(), exclude_words: z.array(z.string().max(2000)).max(700).optional(), - include_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), - exclude_regex: z.array(zRegex(z.string().max(2000))).max(512).optional(), - phisherman: z.strictObject({ - include_suspected: z.boolean().optional(), - include_verified: z.boolean().optional(), - }).optional(), + include_regex: z + .array(zRegex(z.string().max(2000))) + .max(512) + .optional(), + exclude_regex: z + .array(zRegex(z.string().max(2000))) + .max(512) + .optional(), + phisherman: z + .strictObject({ + include_suspected: z.boolean().optional(), + include_verified: z.boolean().optional(), + }) + .optional(), only_real_links: z.boolean().default(true), match_messages: z.boolean().default(true), match_embeds: z.boolean().default(true), diff --git a/backend/src/plugins/Automod/triggers/matchMimeType.ts b/backend/src/plugins/Automod/triggers/matchMimeType.ts index 8da9b2e36..862329168 100644 --- a/backend/src/plugins/Automod/triggers/matchMimeType.ts +++ b/backend/src/plugins/Automod/triggers/matchMimeType.ts @@ -8,28 +8,30 @@ interface MatchResultType { mode: "blacklist" | "whitelist"; } -const configSchema = z.strictObject({ - mime_type_blacklist: z.array(z.string().max(255)).max(255).default([]), - blacklist_enabled: z.boolean().default(false), - mime_type_whitelist: z.array(z.string().max(255)).max(255).default([]), - whitelist_enabled: z.boolean().default(false), -}).transform((parsed, ctx) => { - if (parsed.blacklist_enabled && parsed.whitelist_enabled) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Cannot have both blacklist and whitelist enabled", - }); - return z.NEVER; - } - if (! parsed.blacklist_enabled && ! parsed.whitelist_enabled) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Must have either blacklist or whitelist enabled", - }); - return z.NEVER; - } - return parsed; -}); +const configSchema = z + .strictObject({ + mime_type_blacklist: z.array(z.string().max(255)).max(255).default([]), + blacklist_enabled: z.boolean().default(false), + mime_type_whitelist: z.array(z.string().max(255)).max(255).default([]), + whitelist_enabled: z.boolean().default(false), + }) + .transform((parsed, ctx) => { + if (parsed.blacklist_enabled && parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Cannot have both blacklist and whitelist enabled", + }); + return z.NEVER; + } + if (!parsed.blacklist_enabled && !parsed.whitelist_enabled) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Must have either blacklist or whitelist enabled", + }); + return z.NEVER; + } + return parsed; + }); export const MatchMimeTypeTrigger = automodTrigger()({ configSchema, diff --git a/backend/src/plugins/Automod/triggers/roleAdded.ts b/backend/src/plugins/Automod/triggers/roleAdded.ts index 47027b6bc..ce1e0ab58 100644 --- a/backend/src/plugins/Automod/triggers/roleAdded.ts +++ b/backend/src/plugins/Automod/triggers/roleAdded.ts @@ -8,10 +8,7 @@ interface RoleAddedMatchResult { matchedRoleId: string; } -const configSchema = z.union([ - zSnowflake, - z.array(zSnowflake).max(255), -]).default([]); +const configSchema = z.union([zSnowflake, z.array(zSnowflake).max(255)]).default([]); export const RoleAddedTrigger = automodTrigger()({ configSchema, diff --git a/backend/src/plugins/Automod/triggers/roleRemoved.ts b/backend/src/plugins/Automod/triggers/roleRemoved.ts index 26caf227d..f11dafeb6 100644 --- a/backend/src/plugins/Automod/triggers/roleRemoved.ts +++ b/backend/src/plugins/Automod/triggers/roleRemoved.ts @@ -8,10 +8,7 @@ interface RoleAddedMatchResult { matchedRoleId: string; } -const configSchema = z.union([ - zSnowflake, - z.array(zSnowflake).max(255), -]).default([]); +const configSchema = z.union([zSnowflake, z.array(zSnowflake).max(255)]).default([]); export const RoleRemovedTrigger = automodTrigger()({ configSchema, diff --git a/backend/src/plugins/Automod/types.ts b/backend/src/plugins/Automod/types.ts index 2cf2df2fd..6cf88ad65 100644 --- a/backend/src/plugins/Automod/types.ts +++ b/backend/src/plugins/Automod/types.ts @@ -19,58 +19,62 @@ import { availableTriggers } from "./triggers/availableTriggers"; import Timeout = NodeJS.Timeout; export type ZTriggersMapHelper = { - [TriggerName in keyof typeof availableTriggers]: typeof availableTriggers[TriggerName]["configSchema"]; + [TriggerName in keyof typeof availableTriggers]: (typeof availableTriggers)[TriggerName]["configSchema"]; }; -const zTriggersMap = z.strictObject(entries(availableTriggers).reduce((map, [triggerName, trigger]) => { - map[triggerName] = trigger.configSchema; - return map; -}, {} as ZTriggersMapHelper)).partial(); +const zTriggersMap = z + .strictObject( + entries(availableTriggers).reduce((map, [triggerName, trigger]) => { + map[triggerName] = trigger.configSchema; + return map; + }, {} as ZTriggersMapHelper), + ) + .partial(); type ZActionsMapHelper = { - [ActionName in keyof typeof availableActions]: typeof availableActions[ActionName]["configSchema"]; + [ActionName in keyof typeof availableActions]: (typeof availableActions)[ActionName]["configSchema"]; }; -const zActionsMap = z.strictObject(entries(availableActions).reduce((map, [actionName, action]) => { - // @ts-expect-error TS can't infer this properly but it works fine thanks to our helper - map[actionName] = action.configSchema; - return map; -}, {} as ZActionsMapHelper)).partial(); +const zActionsMap = z + .strictObject( + entries(availableActions).reduce((map, [actionName, action]) => { + // @ts-expect-error TS can't infer this properly but it works fine thanks to our helper + map[actionName] = action.configSchema; + return map; + }, {} as ZActionsMapHelper), + ) + .partial(); const zRule = z.strictObject({ enabled: z.boolean().default(true), // Typed as "never" because you are not expected to supply this directly. // The transform instead picks it up from the property key and the output type is a string. - name: z.never().optional().transform((_, ctx) => { - const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); - if (! ruleName) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Automod rules must have names", - }); - return z.NEVER; - } - return ruleName; - }), + name: z + .never() + .optional() + .transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (!ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Automod rules must have names", + }); + return z.NEVER; + } + return ruleName; + }), presets: z.array(z.string().max(100)).max(25).default([]), affects_bots: z.boolean().default(false), affects_self: z.boolean().default(false), cooldown: zDelayString.nullable().default(null), allow_further_rules: z.boolean().default(false), triggers: z.array(zTriggersMap), - actions: zActionsMap.refine( - (v) => ! (v.clean && v.start_thread), - { - message: "Cannot have both clean and start_thread active at the same time", - } - ), + actions: zActionsMap.refine((v) => !(v.clean && v.start_thread), { + message: "Cannot have both clean and start_thread active at the same time", + }), }); export type TRule = z.infer; export const zAutomodConfig = z.strictObject({ - rules: zBoundedRecord( - z.record(z.string().max(100), zRule), - 0, - 255, - ), + rules: zBoundedRecord(z.record(z.string().max(100), zRule), 0, 255), antiraid_levels: z.array(z.string().max(100)).max(10), can_set_antiraid: z.boolean(), can_view_antiraid: z.boolean(), diff --git a/backend/src/plugins/ContextMenus/actions/mute.ts b/backend/src/plugins/ContextMenus/actions/mute.ts index c6eedbc67..16b48a4ae 100644 --- a/backend/src/plugins/ContextMenus/actions/mute.ts +++ b/backend/src/plugins/ContextMenus/actions/mute.ts @@ -2,13 +2,13 @@ import { ContextMenuCommandInteraction } from "discord.js"; import humanizeDuration from "humanize-duration"; import { GuildPluginData } from "knub"; import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError"; +import { canActOn } from "../../../pluginUtils"; import { convertDelayStringToMS } from "../../../utils"; import { CaseArgs } from "../../Cases/types"; import { LogsPlugin } from "../../Logs/LogsPlugin"; +import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; import { MutesPlugin } from "../../Mutes/MutesPlugin"; import { ContextMenuPluginType } from "../types"; -import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin"; -import { canActOn } from "../../../pluginUtils"; export async function muteAction( pluginData: GuildPluginData, diff --git a/backend/src/plugins/Counters/CountersPlugin.ts b/backend/src/plugins/Counters/CountersPlugin.ts index 85be2cf53..1cc1ec251 100644 --- a/backend/src/plugins/Counters/CountersPlugin.ts +++ b/backend/src/plugins/Counters/CountersPlugin.ts @@ -1,10 +1,7 @@ import { EventEmitter } from "events"; import { PluginOptions } from "knub"; import { GuildCounters } from "../../data/GuildCounters"; -import { - CounterTrigger, - parseCounterConditionString -} from "../../data/entities/CounterTrigger"; +import { CounterTrigger, parseCounterConditionString } from "../../data/entities/CounterTrigger"; import { mapToPublicFn } from "../../pluginUtils"; import { MINUTES, convertDelayStringToMS, values } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; diff --git a/backend/src/plugins/Counters/types.ts b/backend/src/plugins/Counters/types.ts index 783ec6660..8e70c4ab7 100644 --- a/backend/src/plugins/Counters/types.ts +++ b/backend/src/plugins/Counters/types.ts @@ -2,33 +2,45 @@ import { EventEmitter } from "events"; import { BasePluginType } from "knub"; import z from "zod"; import { GuildCounters } from "../../data/GuildCounters"; -import { CounterTrigger, buildCounterConditionString, getReverseCounterComparisonOp, parseCounterConditionString } from "../../data/entities/CounterTrigger"; +import { + CounterTrigger, + buildCounterConditionString, + getReverseCounterComparisonOp, + parseCounterConditionString, +} from "../../data/entities/CounterTrigger"; import { zBoundedCharacters, zBoundedRecord, zDelayString } from "../../utils"; import Timeout = NodeJS.Timeout; const MAX_COUNTERS = 5; const MAX_TRIGGERS_PER_COUNTER = 5; -export const zTrigger = z.strictObject({ - // Dummy type because name gets replaced by the property key in transform() - name: z.never().optional().transform(() => ""), - pretty_name: zBoundedCharacters(0, 100).nullable().default(null), - condition: zBoundedCharacters(1, 64).refine( - (str) => parseCounterConditionString(str) !== null, - { message: "Invalid counter trigger condition" }, - ), - reverse_condition: zBoundedCharacters(1, 64).refine( - (str) => parseCounterConditionString(str) !== null, - { message: "Invalid counter trigger reverse condition" }, - ).optional(), -}) +export const zTrigger = z + .strictObject({ + // Dummy type because name gets replaced by the property key in transform() + name: z + .never() + .optional() + .transform(() => ""), + pretty_name: zBoundedCharacters(0, 100).nullable().default(null), + condition: zBoundedCharacters(1, 64).refine((str) => parseCounterConditionString(str) !== null, { + message: "Invalid counter trigger condition", + }), + reverse_condition: zBoundedCharacters(1, 64) + .refine((str) => parseCounterConditionString(str) !== null, { + message: "Invalid counter trigger reverse condition", + }) + .optional(), + }) .transform((val, ctx) => { const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); let reverseCondition = val.reverse_condition; - if (! reverseCondition) { + if (!reverseCondition) { const parsedCondition = parseCounterConditionString(val.condition)!; - reverseCondition = buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]); + reverseCondition = buildCounterConditionString( + getReverseCounterComparisonOp(parsedCondition[0]), + parsedCondition[1], + ); } return { @@ -38,68 +50,65 @@ export const zTrigger = z.strictObject({ }; }); -const zTriggerFromString = zBoundedCharacters(0, 100) - .transform((val, ctx) => { - const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); - const parsedCondition = parseCounterConditionString(val); - if (!parsedCondition) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Invalid counter trigger condition", - }); - return z.NEVER; - } - return { - name: ruleName, - pretty_name: null, - condition: buildCounterConditionString(parsedCondition[0], parsedCondition[1]), - reverse_condition: buildCounterConditionString(getReverseCounterComparisonOp(parsedCondition[0]), parsedCondition[1]), - }; - }); +const zTriggerFromString = zBoundedCharacters(0, 100).transform((val, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + const parsedCondition = parseCounterConditionString(val); + if (!parsedCondition) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid counter trigger condition", + }); + return z.NEVER; + } + return { + name: ruleName, + pretty_name: null, + condition: buildCounterConditionString(parsedCondition[0], parsedCondition[1]), + reverse_condition: buildCounterConditionString( + getReverseCounterComparisonOp(parsedCondition[0]), + parsedCondition[1], + ), + }; +}); const zTriggerInput = z.union([zTrigger, zTriggerFromString]); export const zCounter = z.strictObject({ // Typed as "never" because you are not expected to supply this directly. // The transform instead picks it up from the property key and the output type is a string. - name: z.never().optional().transform((_, ctx) => { - const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); - if (! ruleName) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Counters must have names", - }); - return z.NEVER; - } - return ruleName; - }), + name: z + .never() + .optional() + .transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (!ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Counters must have names", + }); + return z.NEVER; + } + return ruleName; + }), pretty_name: zBoundedCharacters(0, 100).nullable().default(null), per_channel: z.boolean().default(false), per_user: z.boolean().default(false), initial_value: z.number().default(0), - triggers: zBoundedRecord( - z.record( - zBoundedCharacters(0, 100), - zTriggerInput, - ), - 1, - MAX_TRIGGERS_PER_COUNTER, - ), - decay: z.strictObject({ - amount: z.number(), - every: zDelayString, - }).nullable().default(null), + triggers: zBoundedRecord(z.record(zBoundedCharacters(0, 100), zTriggerInput), 1, MAX_TRIGGERS_PER_COUNTER), + decay: z + .strictObject({ + amount: z.number(), + every: zDelayString, + }) + .nullable() + .default(null), can_view: z.boolean().default(false), can_edit: z.boolean().default(false), can_reset_all: z.boolean().default(false), }); export const zCountersConfig = z.strictObject({ - counters: zBoundedRecord( - z.record(zBoundedCharacters(0, 100), zCounter), - 0, - MAX_COUNTERS, - ), + counters: zBoundedRecord(z.record(zBoundedCharacters(0, 100), zCounter), 0, MAX_COUNTERS), can_view: z.boolean(), can_edit: z.boolean(), can_reset_all: z.boolean(), diff --git a/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts b/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts index dbd7b932d..b2e44d93d 100644 --- a/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts +++ b/backend/src/plugins/CustomEvents/actions/setChannelPermissionOverrides.ts @@ -9,14 +9,16 @@ import { CustomEventsPluginType, TCustomEvent } from "../types"; export const zSetChannelPermissionOverridesAction = z.strictObject({ type: z.literal("set_channel_permission_overrides"), channel: zSnowflake, - overrides: z.array( - z.strictObject({ - type: z.union([z.literal("member"), z.literal("role")]), - id: zSnowflake, - allow: z.number(), - deny: z.number(), - }), - ).max(15), + overrides: z + .array( + z.strictObject({ + type: z.union([z.literal("member"), z.literal("role")]), + id: zSnowflake, + allow: z.number(), + deny: z.number(), + }), + ) + .max(15), }); export type TSetChannelPermissionOverridesAction = z.infer; diff --git a/backend/src/plugins/CustomEvents/types.ts b/backend/src/plugins/CustomEvents/types.ts index 4572b1cf4..6433b6d03 100644 --- a/backend/src/plugins/CustomEvents/types.ts +++ b/backend/src/plugins/CustomEvents/types.ts @@ -36,11 +36,7 @@ export const zCustomEvent = z.strictObject({ export type TCustomEvent = z.infer; export const zCustomEventsConfig = z.strictObject({ - events: zBoundedRecord( - z.record(zBoundedCharacters(0, 100), zCustomEvent), - 0, - 100, - ), + events: zBoundedRecord(z.record(zBoundedCharacters(0, 100), zCustomEvent), 0, 100), }); export interface CustomEventsPluginType extends BasePluginType { diff --git a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts index b8639134d..3c267aab8 100644 --- a/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts +++ b/backend/src/plugins/GuildAccessMonitor/GuildAccessMonitorPlugin.ts @@ -1,10 +1,10 @@ import { Guild } from "discord.js"; import { BasePluginType, GlobalPluginData, globalPluginEventListener } from "knub"; +import z from "zod"; import { AllowedGuilds } from "../../data/AllowedGuilds"; import { Configs } from "../../data/Configs"; import { env } from "../../env"; import { zeppelinGlobalPlugin } from "../ZeppelinPluginBlueprint"; -import z from "zod"; interface GuildAccessMonitorPluginType extends BasePluginType { state: { diff --git a/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts b/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts index a8d71e06c..873711b3e 100644 --- a/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts +++ b/backend/src/plugins/GuildInfoSaver/GuildInfoSaverPlugin.ts @@ -1,11 +1,11 @@ import { Guild } from "discord.js"; import { guildPluginEventListener } from "knub"; +import z from "zod"; import { AllowedGuilds } from "../../data/AllowedGuilds"; import { ApiPermissionAssignments } from "../../data/ApiPermissionAssignments"; import { MINUTES } from "../../utils"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { GuildInfoSaverPluginType } from "./types"; -import z from "zod"; export const GuildInfoSaverPlugin = zeppelinGuildPlugin()({ name: "guild_info_saver", diff --git a/backend/src/plugins/Logs/LogsPlugin.ts b/backend/src/plugins/Logs/LogsPlugin.ts index 923ac6232..c989c6825 100644 --- a/backend/src/plugins/Logs/LogsPlugin.ts +++ b/backend/src/plugins/Logs/LogsPlugin.ts @@ -123,7 +123,7 @@ const defaultOptions: PluginOptions = { timestamp: FORMAT_NO_TIMESTAMP, ...DefaultLogMessages, }, - ping_user: true, + ping_user: true, allow_user_mentions: false, timestamp_format: "[]", include_embed_timestamp: true, diff --git a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts index 25c8c3407..b56f74101 100644 --- a/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts +++ b/backend/src/plugins/Logs/logFunctions/logMessageDelete.ts @@ -32,7 +32,9 @@ export function logMessageDelete(pluginData: GuildPluginData, da // See comment on FORMAT_NO_TIMESTAMP in types.ts const config = pluginData.config.get(); const timestampFormat = - (config.format.timestamp !== FORMAT_NO_TIMESTAMP ? config.format.timestamp : null) ?? config.timestamp_format ?? undefined; + (config.format.timestamp !== FORMAT_NO_TIMESTAMP ? config.format.timestamp : null) ?? + config.timestamp_format ?? + undefined; return log( pluginData, diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 6b214c990..47557514a 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -29,10 +29,12 @@ const MAX_BATCH_TIME = 5000; type ZLogFormatsHelper = { -readonly [K in keyof typeof LogType]: typeof zMessageContent; }; -export const zLogFormats = z.strictObject(keys(LogType).reduce((map, logType) => { - map[logType] = zMessageContent; - return map; -}, {} as ZLogFormatsHelper)); +export const zLogFormats = z.strictObject( + keys(LogType).reduce((map, logType) => { + map[logType] = zMessageContent; + return map; + }, {} as ZLogFormatsHelper), +); export type TLogFormats = z.infer; const zLogChannel = z.strictObject({ @@ -58,10 +60,12 @@ export type TLogChannelMap = z.infer; export const zLogsConfig = z.strictObject({ channels: zLogChannelMap, - format: zLogFormats.merge(z.strictObject({ - // Legacy/deprecated, use timestamp_format below instead - timestamp: zBoundedCharacters(0, 64).nullable(), - })), + format: zLogFormats.merge( + z.strictObject({ + // Legacy/deprecated, use timestamp_format below instead + timestamp: zBoundedCharacters(0, 64).nullable(), + }), + ), // Legacy/deprecated, if below is false mentions wont actually ping. In case you really want the old behavior, set below to true ping_user: z.boolean(), allow_user_mentions: z.boolean(), diff --git a/backend/src/plugins/Logs/util/isLogIgnored.ts b/backend/src/plugins/Logs/util/isLogIgnored.ts index 71255f50f..8d3e15c14 100644 --- a/backend/src/plugins/Logs/util/isLogIgnored.ts +++ b/backend/src/plugins/Logs/util/isLogIgnored.ts @@ -2,6 +2,10 @@ import { GuildPluginData } from "knub"; import { LogType } from "../../../data/LogType"; import { LogsPluginType } from "../types"; -export function isLogIgnored(pluginData: GuildPluginData, type: keyof typeof LogType, ignoreId: string) { +export function isLogIgnored( + pluginData: GuildPluginData, + type: keyof typeof LogType, + ignoreId: string, +) { return pluginData.state.guildLogs.isLogIgnored(type, ignoreId); } diff --git a/backend/src/plugins/ModActions/functions/clearTempban.ts b/backend/src/plugins/ModActions/functions/clearTempban.ts index 5173ca7e1..1133d6516 100644 --- a/backend/src/plugins/ModActions/functions/clearTempban.ts +++ b/backend/src/plugins/ModActions/functions/clearTempban.ts @@ -3,7 +3,9 @@ import humanizeDuration from "humanize-duration"; import { GuildPluginData } from "knub"; import moment from "moment-timezone"; import { CaseTypes } from "../../../data/CaseTypes"; +import { LogType } from "../../../data/LogType"; import { Tempban } from "../../../data/entities/Tempban"; +import { logger } from "../../../logger"; import { resolveUser } from "../../../utils"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; @@ -11,8 +13,6 @@ import { IgnoredEventType, ModActionsPluginType } from "../types"; import { formatReasonWithAttachments } from "./formatReasonWithAttachments"; import { ignoreEvent } from "./ignoreEvent"; import { isBanned } from "./isBanned"; -import { LogType } from "../../../data/LogType"; -import { logger } from "../../../logger"; export async function clearTempban(pluginData: GuildPluginData, tempban: Tempban) { if (!(await isBanned(pluginData, tempban.user_id))) { diff --git a/backend/src/plugins/ReactionRoles/types.ts b/backend/src/plugins/ReactionRoles/types.ts index a1c09f001..b955c6fa2 100644 --- a/backend/src/plugins/ReactionRoles/types.ts +++ b/backend/src/plugins/ReactionRoles/types.ts @@ -22,10 +22,7 @@ export type PendingMemberRoleChanges = { }>; }; -const zReactionRolePair = z.union([ - z.tuple([z.string(), z.string(), z.string()]), - z.tuple([z.string(), z.string()]), -]); +const zReactionRolePair = z.union([z.tuple([z.string(), z.string(), z.string()]), z.tuple([z.string(), z.string()])]); export type TReactionRolePair = z.infer; export interface ReactionRolesPluginType extends BasePluginType { diff --git a/backend/src/plugins/RoleButtons/types.ts b/backend/src/plugins/RoleButtons/types.ts index 3c94f8a8f..95e46f79c 100644 --- a/backend/src/plugins/RoleButtons/types.ts +++ b/backend/src/plugins/RoleButtons/types.ts @@ -11,89 +11,99 @@ const zRoleButtonOption = z.strictObject({ label: z.string().nullable().default(null), emoji: z.string().nullable().default(null), // https://discord.js.org/#/docs/discord.js/v13/typedef/MessageButtonStyle - style: z.union([ - z.literal(ButtonStyle.Primary), - z.literal(ButtonStyle.Secondary), - z.literal(ButtonStyle.Success), - z.literal(ButtonStyle.Danger), + style: z + .union([ + z.literal(ButtonStyle.Primary), + z.literal(ButtonStyle.Secondary), + z.literal(ButtonStyle.Success), + z.literal(ButtonStyle.Danger), - // The following are deprecated - z.literal("PRIMARY"), - z.literal("SECONDARY"), - z.literal("SUCCESS"), - z.literal("DANGER"), - // z.literal("LINK"), // Role buttons don't use link buttons, but adding this here so it's documented why it's not available - ]).nullable().default(null), + // The following are deprecated + z.literal("PRIMARY"), + z.literal("SECONDARY"), + z.literal("SUCCESS"), + z.literal("DANGER"), + // z.literal("LINK"), // Role buttons don't use link buttons, but adding this here so it's documented why it's not available + ]) + .nullable() + .default(null), start_new_row: z.boolean().default(false), }); export type TRoleButtonOption = z.infer; -const zRoleButtonsConfigItem = z.strictObject({ - // Typed as "never" because you are not expected to supply this directly. - // The transform instead picks it up from the property key and the output type is a string. - name: z.never().optional().transform((_, ctx) => { - const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); - if (! ruleName) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Role buttons must have names", - }); - return z.NEVER; - } - return ruleName; - }), - message: z.union([ - z.strictObject({ - channel_id: zSnowflake, - message_id: zSnowflake, - }), - z.strictObject({ - channel_id: zSnowflake, - content: zMessageContent, - }), - ]), - options: z.array(zRoleButtonOption).max(25), - exclusive: z.boolean().default(false), -}) - .refine((parsed) => { - try { - createButtonComponents(parsed); - } catch (err) { - if (err instanceof TooManyComponentsError) { - return false; +const zRoleButtonsConfigItem = z + .strictObject({ + // Typed as "never" because you are not expected to supply this directly. + // The transform instead picks it up from the property key and the output type is a string. + name: z + .never() + .optional() + .transform((_, ctx) => { + const ruleName = String(ctx.path[ctx.path.length - 2]).trim(); + if (!ruleName) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Role buttons must have names", + }); + return z.NEVER; + } + return ruleName; + }), + message: z.union([ + z.strictObject({ + channel_id: zSnowflake, + message_id: zSnowflake, + }), + z.strictObject({ + channel_id: zSnowflake, + content: zMessageContent, + }), + ]), + options: z.array(zRoleButtonOption).max(25), + exclusive: z.boolean().default(false), + }) + .refine( + (parsed) => { + try { + createButtonComponents(parsed); + } catch (err) { + if (err instanceof TooManyComponentsError) { + return false; + } + throw err; } - throw err; - } - return true; - }, { - message: "Too many options; can only have max 5 buttons per row on max 5 rows." - }); + return true; + }, + { + message: "Too many options; can only have max 5 buttons per row on max 5 rows.", + }, + ); export type TRoleButtonsConfigItem = z.infer; -export const zRoleButtonsConfig = z.strictObject({ - buttons: zBoundedRecord( - z.record(zBoundedCharacters(1, 16), zRoleButtonsConfigItem), - 0, - 100, - ), - can_reset: z.boolean(), -}) - .refine((parsed) => { - const seenMessages = new Set(); - for (const button of Object.values(parsed.buttons)) { - if (button.message) { - if ("message_id" in button.message) { - if (seenMessages.has(button.message.message_id)) { - return false; +export const zRoleButtonsConfig = z + .strictObject({ + buttons: zBoundedRecord(z.record(zBoundedCharacters(1, 16), zRoleButtonsConfigItem), 0, 100), + can_reset: z.boolean(), + }) + .refine( + (parsed) => { + const seenMessages = new Set(); + for (const button of Object.values(parsed.buttons)) { + if (button.message) { + if ("message_id" in button.message) { + if (seenMessages.has(button.message.message_id)) { + return false; + } + seenMessages.add(button.message.message_id); } - seenMessages.add(button.message.message_id); } } - } - return true; - }, { - message: "Can't target the same message with two sets of role buttons", - }); + return true; + }, + { + message: "Can't target the same message with two sets of role buttons", + }, + ); export interface RoleButtonsPluginType extends BasePluginType { config: z.infer; diff --git a/backend/src/plugins/SelfGrantableRoles/types.ts b/backend/src/plugins/SelfGrantableRoles/types.ts index a1aed241e..e3c7a7867 100644 --- a/backend/src/plugins/SelfGrantableRoles/types.ts +++ b/backend/src/plugins/SelfGrantableRoles/types.ts @@ -4,9 +4,10 @@ import { zBoundedCharacters, zBoundedRecord } from "../../utils"; const zRoleMap = z.record( zBoundedCharacters(1, 100), - z.array(zBoundedCharacters(1, 2000)) + z + .array(zBoundedCharacters(1, 2000)) .max(100) - .transform((parsed) => parsed.map(v => v.toLowerCase())), + .transform((parsed) => parsed.map((v) => v.toLowerCase())), ); const zSelfGrantableRoleEntry = z.strictObject({ diff --git a/backend/src/plugins/Slowmode/types.ts b/backend/src/plugins/Slowmode/types.ts index c4fe44d56..7c8d5b566 100644 --- a/backend/src/plugins/Slowmode/types.ts +++ b/backend/src/plugins/Slowmode/types.ts @@ -7,7 +7,7 @@ import { SlowmodeChannel } from "../../data/entities/SlowmodeChannel"; export const zSlowmodeConfig = z.strictObject({ use_native_slowmode: z.boolean(), - + can_manage: z.boolean(), is_affected: z.boolean(), }); diff --git a/backend/src/plugins/Spam/types.ts b/backend/src/plugins/Spam/types.ts index 74ea872f4..f71e41806 100644 --- a/backend/src/plugins/Spam/types.ts +++ b/backend/src/plugins/Spam/types.ts @@ -11,14 +11,8 @@ const zBaseSingleSpamConfig = z.strictObject({ count: z.number(), mute: z.boolean().default(false), mute_time: z.number().nullable().default(null), - remove_roles_on_mute: z.union([ - z.boolean(), - z.array(zSnowflake), - ]).default(false), - restore_roles_on_mute: z.union([ - z.boolean(), - z.array(zSnowflake), - ]).default(false), + remove_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).default(false), + restore_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).default(false), clean: z.boolean().default(false), }); export type TBaseSingleSpamConfig = z.infer; diff --git a/backend/src/plugins/Starboard/types.ts b/backend/src/plugins/Starboard/types.ts index 7dc2d8f58..bb8845fe2 100644 --- a/backend/src/plugins/Starboard/types.ts +++ b/backend/src/plugins/Starboard/types.ts @@ -18,11 +18,7 @@ const zStarboardOpts = z.strictObject({ export type TStarboardOpts = z.infer; export const zStarboardConfig = z.strictObject({ - boards: zBoundedRecord( - z.record(z.string(), zStarboardOpts), - 0, - 100, - ), + boards: zBoundedRecord(z.record(z.string(), zStarboardOpts), 0, 100), can_migrate: z.boolean(), }); diff --git a/backend/src/plugins/Tags/commands/TagEvalCmd.ts b/backend/src/plugins/Tags/commands/TagEvalCmd.ts index 27cbe4f3c..3515ef745 100644 --- a/backend/src/plugins/Tags/commands/TagEvalCmd.ts +++ b/backend/src/plugins/Tags/commands/TagEvalCmd.ts @@ -1,11 +1,11 @@ import { MessageCreateOptions } from "discord.js"; import { commandTypeHelpers as ct } from "../../../commandTypes"; +import { logger } from "../../../logger"; import { sendErrorMessage } from "../../../pluginUtils"; import { TemplateParseError } from "../../../templateFormatter"; import { memberToTemplateSafeMember, userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { tagsCmd } from "../types"; import { renderTagBody } from "../util/renderTagBody"; -import { logger } from "../../../logger"; export const TagEvalCmd = tagsCmd({ trigger: "tag eval", @@ -35,13 +35,11 @@ export const TagEvalCmd = tagsCmd({ msg.channel.send(rendered); } catch (e) { - const errorMessage = e instanceof TemplateParseError - ? e.message - : "Internal error"; + const errorMessage = e instanceof TemplateParseError ? e.message : "Internal error"; sendErrorMessage(pluginData, msg.channel, `Failed to render tag: ${errorMessage}`); - if (! (e instanceof TemplateParseError)) { + if (!(e instanceof TemplateParseError)) { logger.warn(`Internal error evaluating tag in ${pluginData.guild.id}: ${e}`); } diff --git a/backend/src/plugins/Tags/types.ts b/backend/src/plugins/Tags/types.ts index 441906fee..5ff7e9c7c 100644 --- a/backend/src/plugins/Tags/types.ts +++ b/backend/src/plugins/Tags/types.ts @@ -9,52 +9,48 @@ import { zEmbedInput } from "../../utils"; export const zTag = z.union([z.string(), zEmbedInput]); export type TTag = z.infer; -export const zTagCategory = z.strictObject({ - prefix: z.string().nullable().default(null), - delete_with_command: z.boolean().default(false), +export const zTagCategory = z + .strictObject({ + prefix: z.string().nullable().default(null), + delete_with_command: z.boolean().default(false), - user_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag - user_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag category - global_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per tag - allow_mentions: z.boolean().nullable().default(null), - global_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per category - auto_delete_command: z.boolean().nullable().default(null), + user_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag + user_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Per user, per tag category + global_tag_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per tag + allow_mentions: z.boolean().nullable().default(null), + global_category_cooldown: z.union([z.string(), z.number()]).nullable().default(null), // Any user, per category + auto_delete_command: z.boolean().nullable().default(null), - tags: z.record(z.string(), zTag), + tags: z.record(z.string(), zTag), - can_use: z.boolean().nullable().default(null), -}) - .refine( - (parsed) => ! (parsed.auto_delete_command && parsed.delete_with_command), - { - message: "Cannot have both (category specific) delete_with_command and auto_delete_command enabled", - }, - ); + can_use: z.boolean().nullable().default(null), + }) + .refine((parsed) => !(parsed.auto_delete_command && parsed.delete_with_command), { + message: "Cannot have both (category specific) delete_with_command and auto_delete_command enabled", + }); export type TTagCategory = z.infer; -export const zTagsConfig = z.strictObject({ - prefix: z.string(), - delete_with_command: z.boolean(), +export const zTagsConfig = z + .strictObject({ + prefix: z.string(), + delete_with_command: z.boolean(), - user_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user, per tag - global_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Any user, per tag - user_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user - allow_mentions: z.boolean(), // Per user - global_cooldown: z.union([z.string(), z.number()]).nullable(), // Any tag use - auto_delete_command: z.boolean(), // Any tag + user_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user, per tag + global_tag_cooldown: z.union([z.string(), z.number()]).nullable(), // Any user, per tag + user_cooldown: z.union([z.string(), z.number()]).nullable(), // Per user + allow_mentions: z.boolean(), // Per user + global_cooldown: z.union([z.string(), z.number()]).nullable(), // Any tag use + auto_delete_command: z.boolean(), // Any tag - categories: z.record(z.string(), zTagCategory), + categories: z.record(z.string(), zTagCategory), - can_create: z.boolean(), - can_use: z.boolean(), - can_list: z.boolean(), -}) -.refine( - (parsed) => ! (parsed.auto_delete_command && parsed.delete_with_command), - { + can_create: z.boolean(), + can_use: z.boolean(), + can_list: z.boolean(), + }) + .refine((parsed) => !(parsed.auto_delete_command && parsed.delete_with_command), { message: "Cannot have both (category specific) delete_with_command and auto_delete_command enabled", - }, -); + }); export interface TagsPluginType extends BasePluginType { config: z.infer; diff --git a/backend/src/plugins/Tags/util/onMessageCreate.ts b/backend/src/plugins/Tags/util/onMessageCreate.ts index aa7c84901..f06d3282b 100644 --- a/backend/src/plugins/Tags/util/onMessageCreate.ts +++ b/backend/src/plugins/Tags/util/onMessageCreate.ts @@ -2,11 +2,11 @@ import { Snowflake, TextChannel } from "discord.js"; import { GuildPluginData } from "knub"; import { SavedMessage } from "../../../data/entities/SavedMessage"; import { convertDelayStringToMS, resolveMember, zStrictMessageContent } from "../../../utils"; +import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions"; import { messageIsEmpty } from "../../../utils/messageIsEmpty"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { TagsPluginType } from "../types"; import { matchAndRenderTagFromString } from "./matchAndRenderTagFromString"; -import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions"; export async function onMessageCreate(pluginData: GuildPluginData, msg: SavedMessage) { if (msg.is_bot) return; @@ -85,7 +85,7 @@ export async function onMessageCreate(pluginData: GuildPluginData, @@ -36,14 +36,12 @@ export async function renderTagFromString( return validateAndParseMessageContent(rendered); } catch (e) { const logs = pluginData.getPlugin(LogsPlugin); - const errorMessage = e instanceof TemplateParseError - ? e.message - : "Internal error"; + const errorMessage = e instanceof TemplateParseError ? e.message : "Internal error"; logs.logBotAlert({ body: `Failed to render tag \`${prefix}${tagName}\`: ${errorMessage}`, }); - if (! (e instanceof TemplateParseError)) { + if (!(e instanceof TemplateParseError)) { logger.warn(`Internal error rendering tag ${tagName} in ${pluginData.guild.id}: ${e}`); } diff --git a/backend/src/plugins/Utility/commands/InfoCmd.ts b/backend/src/plugins/Utility/commands/InfoCmd.ts index a430898e7..62f89bd69 100644 --- a/backend/src/plugins/Utility/commands/InfoCmd.ts +++ b/backend/src/plugins/Utility/commands/InfoCmd.ts @@ -79,11 +79,7 @@ export const InfoCmd = utilityCmd({ const messageTarget = await resolveMessageTarget(pluginData, value); if (messageTarget) { if (canReadChannel(messageTarget.channel, message.member)) { - const embed = await getMessageInfoEmbed( - pluginData, - messageTarget.channel.id, - messageTarget.messageId, - ); + const embed = await getMessageInfoEmbed(pluginData, messageTarget.channel.id, messageTarget.messageId); if (embed) { message.channel.send({ embeds: [embed] }); return; diff --git a/backend/src/plugins/Utility/commands/MessageInfoCmd.ts b/backend/src/plugins/Utility/commands/MessageInfoCmd.ts index 72df1f6ce..19164ca49 100644 --- a/backend/src/plugins/Utility/commands/MessageInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/MessageInfoCmd.ts @@ -20,11 +20,7 @@ export const MessageInfoCmd = utilityCmd({ return; } - const embed = await getMessageInfoEmbed( - pluginData, - args.message.channel.id, - args.message.messageId, - ); + const embed = await getMessageInfoEmbed(pluginData, args.message.channel.id, args.message.messageId); if (!embed) { sendErrorMessage(pluginData, message.channel, "Unknown message"); return; diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts index 700546ca6..dd19d9b2a 100644 --- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts @@ -6,10 +6,7 @@ import { UtilityPluginType } from "../types"; const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png"; -export async function getRoleInfoEmbed( - pluginData: GuildPluginData, - role: Role, -): Promise { +export async function getRoleInfoEmbed(pluginData: GuildPluginData, role: Role): Promise { const embed: EmbedWith<"fields" | "author" | "color"> = { fields: [], author: { diff --git a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts index 7009241c3..8449ba74d 100644 --- a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts @@ -4,10 +4,7 @@ import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp"; const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png"; -export async function getSnowflakeInfoEmbed( - snowflake: string, - showUnknownWarning = false, -): Promise { +export async function getSnowflakeInfoEmbed(snowflake: string, showUnknownWarning = false): Promise { const embed: EmbedWith<"fields" | "author"> = { fields: [], author: { diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts index dbaacf27b..92b5b75f0 100644 --- a/backend/src/plugins/Utility/search.ts +++ b/backend/src/plugins/Utility/search.ts @@ -14,7 +14,15 @@ import { ArgsFromSignatureOrArray, GuildPluginData } from "knub"; import moment from "moment-timezone"; import { RegExpRunner, allowTimeout } from "../../RegExpRunner"; import { getBaseUrl, sendErrorMessage } from "../../pluginUtils"; -import { InvalidRegexError, MINUTES, inputPatternToRegExp, multiSorter, renderUserUsername, sorter, trimLines } from "../../utils"; +import { + InvalidRegexError, + MINUTES, + inputPatternToRegExp, + multiSorter, + renderUserUsername, + sorter, + trimLines, +} from "../../utils"; import { asyncFilter } from "../../utils/async"; import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions"; import { banSearchSignature } from "./commands/BanSearchCmd"; diff --git a/backend/src/plugins/ZeppelinPluginBlueprint.ts b/backend/src/plugins/ZeppelinPluginBlueprint.ts index aa266abcf..338182dfb 100644 --- a/backend/src/plugins/ZeppelinPluginBlueprint.ts +++ b/backend/src/plugins/ZeppelinPluginBlueprint.ts @@ -7,8 +7,8 @@ import { GuildPluginBlueprint, GuildPluginData, } from "knub"; -import { TMarkdown } from "../types"; import { ZodTypeAny } from "zod"; +import { TMarkdown } from "../types"; /** * GUILD PLUGINS diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 97f513014..8790ab503 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -87,8 +87,10 @@ export function isDiscordAPIError(err: Error | string): err is DiscordAPIError { } // null | undefined -> undefined -export function zNullishToUndefined(type: T): ZodEffects> | undefined> { - return type.transform(v => v ?? undefined); +export function zNullishToUndefined( + type: T, +): ZodEffects> | undefined> { + return type.transform((v) => v ?? undefined); } export function getScalarDifference( @@ -151,15 +153,18 @@ export type GroupDMInvite = Invite & { }; export function zBoundedCharacters(min: number, max: number) { - return z.string().refine(str => { - const len = [...str].length; // Unicode aware character split - return (len >= min && len <= max); - }, { - message: `String must be between ${min} and ${max} characters long`, - }); -} - -export const zSnowflake = z.string().refine(str => isSnowflake(str), { + return z.string().refine( + (str) => { + const len = [...str].length; // Unicode aware character split + return len >= min && len <= max; + }, + { + message: `String must be between ${min} and ${max} characters long`, + }, + ); +} + +export const zSnowflake = z.string().refine((str) => isSnowflake(str), { message: "Invalid snowflake ID", }); @@ -188,7 +193,7 @@ export function zRegex(zStr: T) { if (err instanceof InvalidRegexError) { ctx.addIssue({ code: z.ZodIssueCode.custom, - message: "Invalid regex" + message: "Invalid regex", }); return z.NEVER; } @@ -343,8 +348,18 @@ function dropNullValuesRecursively(obj: any) { */ export const zAllowedMentions = z.strictObject({ everyone: zNullishToUndefined(z.boolean().nullable().optional()), - users: zNullishToUndefined(z.union([z.boolean(), z.array(z.string())]).nullable().optional()), - roles: zNullishToUndefined(z.union([z.boolean(), z.array(z.string())]).nullable().optional()), + users: zNullishToUndefined( + z + .union([z.boolean(), z.array(z.string())]) + .nullable() + .optional(), + ), + roles: zNullishToUndefined( + z + .union([z.boolean(), z.array(z.string())]) + .nullable() + .optional(), + ), replied_user: zNullishToUndefined(z.boolean().nullable().optional()), }); @@ -359,18 +374,28 @@ export function dropPropertiesByName(obj, propName) { } } -export function zBoundedRecord>(record: TRecord, minKeys: number, maxKeys: number): ZodEffects { - return record.refine(data => { - const len = Object.keys(data).length; - return (len >= minKeys && len <= maxKeys); - }, { - message: `Object must have ${minKeys}-${maxKeys} keys`, +export function zBoundedRecord>( + record: TRecord, + minKeys: number, + maxKeys: number, +): ZodEffects { + return record.refine( + (data) => { + const len = Object.keys(data).length; + return len >= minKeys && len <= maxKeys; + }, + { + message: `Object must have ${minKeys}-${maxKeys} keys`, + }, + ); +} + +export const zDelayString = z + .string() + .max(32) + .refine((str) => convertDelayStringToMS(str) !== null, { + message: "Invalid delay string", }); -} - -export const zDelayString = z.string().max(32).refine(str => convertDelayStringToMS(str) !== null, { - message: "Invalid delay string", -}); // To avoid running into issues with the JS max date vaLue, we cap maximum delay strings *far* below that. // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#The_ECMAScript_epoch_and_timestamps @@ -1487,9 +1512,11 @@ export function renderUserUsername(user: User | UnknownUser): string { return renderUsername(user.username, user.discriminator); } -type Entries = Array<{ - [Key in keyof T]-?: [Key, T[Key]]; -}[keyof T]>; +type Entries = Array< + { + [Key in keyof T]-?: [Key, T[Key]]; + }[keyof T] +>; export function entries(object: T) { return Object.entries(object) as Entries; diff --git a/backend/src/utils/formatZodIssue.ts b/backend/src/utils/formatZodIssue.ts index 2b5c3d8e4..93932f663 100644 --- a/backend/src/utils/formatZodIssue.ts +++ b/backend/src/utils/formatZodIssue.ts @@ -1,6 +1,6 @@ import { ZodIssue } from "zod"; export function formatZodIssue(issue: ZodIssue): string { - const path = issue.path.join("/"); - return `${path}: ${issue.message}`; + const path = issue.path.join("/"); + return `${path}: ${issue.message}`; } diff --git a/backend/src/validateActiveConfigs.ts b/backend/src/validateActiveConfigs.ts index c9e3414bb..f985fd142 100644 --- a/backend/src/validateActiveConfigs.ts +++ b/backend/src/validateActiveConfigs.ts @@ -6,7 +6,10 @@ import { loadYamlSafely } from "./utils/loadYamlSafely"; import { ObjectAliasError } from "./utils/validateNoObjectAliases"; function writeError(key: string, error: string) { - const indented = error.split("\n").map(s => " ".repeat(64) + s).join("\n"); + const indented = error + .split("\n") + .map((s) => " ".repeat(64) + s) + .join("\n"); const prefix = `Invalid config ${key}:`; const prefixed = prefix + indented.slice(prefix.length); console.log(prefixed + "\n\n"); From 710bedd050b59e501d6209b9c3ca38e6f83e0353 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:38:02 +0200 Subject: [PATCH 073/128] chore: run prettier --- backend/src/plugins/Automod/actions/startThread.ts | 7 +------ backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts | 5 +---- .../src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 94e0e0e34..41648ad4c 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -1,9 +1,4 @@ -import { - ChannelType, - GuildTextThreadCreateOptions, - ThreadAutoArchiveDuration, - ThreadChannel, -} from "discord.js"; +import { ChannelType, GuildTextThreadCreateOptions, ThreadAutoArchiveDuration, ThreadChannel } from "discord.js"; import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { MINUTES, convertDelayStringToMS, noop, zBoundedCharacters, zDelayString } from "../../../utils"; diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts index 700546ca6..dd19d9b2a 100644 --- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts @@ -6,10 +6,7 @@ import { UtilityPluginType } from "../types"; const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png"; -export async function getRoleInfoEmbed( - pluginData: GuildPluginData, - role: Role, -): Promise { +export async function getRoleInfoEmbed(pluginData: GuildPluginData, role: Role): Promise { const embed: EmbedWith<"fields" | "author" | "color"> = { fields: [], author: { diff --git a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts index 7009241c3..8449ba74d 100644 --- a/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getSnowflakeInfoEmbed.ts @@ -4,10 +4,7 @@ import { snowflakeToTimestamp } from "../../../utils/snowflakeToTimestamp"; const SNOWFLAKE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/742020790471491668/snowflake.png"; -export async function getSnowflakeInfoEmbed( - snowflake: string, - showUnknownWarning = false, -): Promise { +export async function getSnowflakeInfoEmbed(snowflake: string, showUnknownWarning = false): Promise { const embed: EmbedWith<"fields" | "author"> = { fields: [], author: { From e42bbb953fe34bd8d6b4991c5979b6fc443d6909 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:47:59 +0200 Subject: [PATCH 074/128] fix: use lower casesPerPage Temporary fix to make it unlikely to go over the 4096 character limit Needs a proper fix in the future where we pre-render the case summaries and paginate based on their length. --- backend/src/plugins/ModActions/commands/CasesModCmd.ts | 2 +- backend/src/plugins/ModActions/commands/CasesUserCmd.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/CasesModCmd.ts b/backend/src/plugins/ModActions/commands/CasesModCmd.ts index 67363fe5d..306c1ad14 100644 --- a/backend/src/plugins/ModActions/commands/CasesModCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesModCmd.ts @@ -12,7 +12,7 @@ const opts = { mod: ct.userId({ option: true }), }; -const casesPerPage = 10; +const casesPerPage = 5; export const CasesModCmd = modActionsCmd({ trigger: ["cases", "modlogs", "infractions"], diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 08c6f2a66..1fd8973b5 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -28,7 +28,7 @@ const opts = { unbans: ct.switchOption({ def: false, shortcut: "ub" }), }; -const casesPerPage = 10; +const casesPerPage = 5; export const CasesUserCmd = modActionsCmd({ trigger: ["cases", "modlogs"], From 90c7024b053e393b975579222107b5ef4b02f9d4 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:50:57 +0200 Subject: [PATCH 075/128] chore: run prettier --- backend/src/plugins/ModActions/commands/CasesUserCmd.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts index 1fd8973b5..08e586c81 100644 --- a/backend/src/plugins/ModActions/commands/CasesUserCmd.ts +++ b/backend/src/plugins/ModActions/commands/CasesUserCmd.ts @@ -3,14 +3,7 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { sendErrorMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; -import { - UnknownUser, - chunkArray, - emptyEmbedValue, - renderUsername, - resolveMember, - resolveUser, -} from "../../../utils"; +import { UnknownUser, chunkArray, emptyEmbedValue, renderUsername, resolveMember, resolveUser } from "../../../utils"; import { asyncMap } from "../../../utils/async"; import { createPaginatedMessage } from "../../../utils/createPaginatedMessage.js"; import { getGuildPrefix } from "../../../utils/getGuildPrefix"; From 6840fb464632aafd1359020df5f8a8b40cde0243 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:57:57 +0200 Subject: [PATCH 076/128] fix: clamp counter values in config --- backend/src/data/GuildCounters.ts | 9 ++++++--- backend/src/plugins/Automod/actions/setCounter.ts | 3 ++- backend/src/plugins/Counters/types.ts | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/src/data/GuildCounters.ts b/backend/src/data/GuildCounters.ts index 0c8fde5b0..18c9b5e6a 100644 --- a/backend/src/data/GuildCounters.ts +++ b/backend/src/data/GuildCounters.ts @@ -12,7 +12,8 @@ import { CounterValue } from "./entities/CounterValue"; const DELETE_UNUSED_COUNTERS_AFTER = 1 * DAYS; const DELETE_UNUSED_COUNTER_TRIGGERS_AFTER = 1 * DAYS; -const MAX_COUNTER_VALUE = 2147483647; // 2^31-1, for MySQL INT +export const MIN_COUNTER_VALUE = 0; +export const MAX_COUNTER_VALUE = 2147483647; // 2^31-1, for MySQL INT const decayQueue = new Queue(); @@ -115,7 +116,9 @@ export class GuildCounters extends BaseGuildRepository { userId = userId || "0"; const rawUpdate = - change >= 0 ? `value = LEAST(value + ${change}, ${MAX_COUNTER_VALUE})` : `value = GREATEST(value ${change}, 0)`; + change >= 0 + ? `value = LEAST(value + ${change}, ${MAX_COUNTER_VALUE})` + : `value = GREATEST(value ${change}, ${MIN_COUNTER_VALUE})`; await this.counterValues.query( ` @@ -173,7 +176,7 @@ export class GuildCounters extends BaseGuildRepository { const rawUpdate = decayAmountToApply >= 0 - ? `GREATEST(value - ${decayAmountToApply}, 0)` + ? `GREATEST(value - ${decayAmountToApply}, ${MIN_COUNTER_VALUE})` : `LEAST(value + ${Math.abs(decayAmountToApply)}, ${MAX_COUNTER_VALUE})`; // Using an UPDATE with ORDER BY in an attempt to avoid deadlocks from simultaneous decays diff --git a/backend/src/plugins/Automod/actions/setCounter.ts b/backend/src/plugins/Automod/actions/setCounter.ts index dea4bdd64..604d9bf4f 100644 --- a/backend/src/plugins/Automod/actions/setCounter.ts +++ b/backend/src/plugins/Automod/actions/setCounter.ts @@ -1,4 +1,5 @@ import z from "zod"; +import { MAX_COUNTER_VALUE, MIN_COUNTER_VALUE } from "../../../data/GuildCounters"; import { zBoundedCharacters } from "../../../utils"; import { CountersPlugin } from "../../Counters/CountersPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; @@ -7,7 +8,7 @@ import { automodAction } from "../helpers"; export const SetCounterAction = automodAction({ configSchema: z.strictObject({ counter: zBoundedCharacters(0, 100), - value: z.number(), + value: z.number().min(MIN_COUNTER_VALUE).max(MAX_COUNTER_VALUE), }), async apply({ pluginData, contexts, actionConfig, ruleName }) { diff --git a/backend/src/plugins/Counters/types.ts b/backend/src/plugins/Counters/types.ts index 8e70c4ab7..ef322e7b2 100644 --- a/backend/src/plugins/Counters/types.ts +++ b/backend/src/plugins/Counters/types.ts @@ -1,7 +1,7 @@ import { EventEmitter } from "events"; import { BasePluginType } from "knub"; import z from "zod"; -import { GuildCounters } from "../../data/GuildCounters"; +import { GuildCounters, MAX_COUNTER_VALUE, MIN_COUNTER_VALUE } from "../../data/GuildCounters"; import { CounterTrigger, buildCounterConditionString, @@ -93,7 +93,7 @@ export const zCounter = z.strictObject({ pretty_name: zBoundedCharacters(0, 100).nullable().default(null), per_channel: z.boolean().default(false), per_user: z.boolean().default(false), - initial_value: z.number().default(0), + initial_value: z.number().min(MIN_COUNTER_VALUE).max(MAX_COUNTER_VALUE).default(0), triggers: zBoundedRecord(z.record(zBoundedCharacters(0, 100), zTriggerInput), 1, MAX_TRIGGERS_PER_COUNTER), decay: z .strictObject({ From 008ac1bec0b86a0c0f0c708c5502bd9bcc2d274a Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:04:39 +0200 Subject: [PATCH 077/128] fix: missing imports --- backend/src/plugins/Automod/triggers/roleAdded.ts | 2 +- backend/src/plugins/Automod/triggers/roleRemoved.ts | 2 +- backend/src/plugins/Utility/search.ts | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/backend/src/plugins/Automod/triggers/roleAdded.ts b/backend/src/plugins/Automod/triggers/roleAdded.ts index e2a5767b6..5a9ee3af4 100644 --- a/backend/src/plugins/Automod/triggers/roleAdded.ts +++ b/backend/src/plugins/Automod/triggers/roleAdded.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; import z from "zod"; -import { zSnowflake } from "../../../utils"; +import { renderUsername, zSnowflake } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; diff --git a/backend/src/plugins/Automod/triggers/roleRemoved.ts b/backend/src/plugins/Automod/triggers/roleRemoved.ts index a5659ecb1..82479c0ec 100644 --- a/backend/src/plugins/Automod/triggers/roleRemoved.ts +++ b/backend/src/plugins/Automod/triggers/roleRemoved.ts @@ -1,6 +1,6 @@ import { Snowflake } from "discord.js"; import z from "zod"; -import { zSnowflake } from "../../../utils"; +import { renderUsername, zSnowflake } from "../../../utils"; import { consumeIgnoredRoleChange } from "../functions/ignoredRoleChanges"; import { automodTrigger } from "../helpers"; diff --git a/backend/src/plugins/Utility/search.ts b/backend/src/plugins/Utility/search.ts index 105afc865..4f5d08ef0 100644 --- a/backend/src/plugins/Utility/search.ts +++ b/backend/src/plugins/Utility/search.ts @@ -14,7 +14,15 @@ import { ArgsFromSignatureOrArray, GuildPluginData } from "knub"; import moment from "moment-timezone"; import { RegExpRunner, allowTimeout } from "../../RegExpRunner"; import { getBaseUrl, sendErrorMessage } from "../../pluginUtils"; -import { MINUTES, multiSorter, renderUsername, sorter, trimLines } from "../../utils"; +import { + InvalidRegexError, + MINUTES, + inputPatternToRegExp, + multiSorter, + renderUsername, + sorter, + trimLines, +} from "../../utils"; import { asyncFilter } from "../../utils/async"; import { hasDiscordPermissions } from "../../utils/hasDiscordPermissions"; import { banSearchSignature } from "./commands/BanSearchCmd"; From 2ce5082018118fafd5cd860b62d692d7da6cc688 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:05:35 +0200 Subject: [PATCH 078/128] fix: shorter than 6 character invite codes Fixes ZDEV-108 --- backend/src/utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 49a03c279..174a720f0 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -557,11 +557,12 @@ export function getUrlsInString(str: string, onlyUnique = false): MatchedURL[] { } export function parseInviteCodeInput(str: string): string { - if (str.match(/^[a-z0-9]{6,}$/i)) { - return str; + const parsedInviteCodes = getInviteCodesInString(str); + if (parsedInviteCodes.length) { + return parsedInviteCodes[0]; } - return getInviteCodesInString(str)[0]; + return str; } export function isNotNull(value: T): value is Exclude { From ffa9eeb3f53762fa9014f2fe5cd7bdfa8c867138 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 27 Jan 2024 16:01:48 +0200 Subject: [PATCH 079/128] feat: handle template errors Fixes ZDEV-20 --- backend/src/RecoverablePluginError.ts | 2 + .../plugins/Automod/actions/changePerms.ts | 55 +++++++++++----- backend/src/plugins/Automod/actions/reply.ts | 21 ++++-- .../plugins/Automod/actions/startThread.ts | 23 +++++-- .../CustomEvents/CustomEventsPlugin.ts | 2 + .../CustomEvents/actions/addRoleAction.ts | 6 +- .../CustomEvents/actions/createCaseAction.ts | 11 ++-- .../CustomEvents/actions/messageAction.ts | 6 +- .../actions/moveToVoiceChannelAction.ts | 11 +++- .../CustomEvents/catchTemplateError.ts | 13 ++++ .../plugins/ModActions/functions/banUserId.ts | 66 ++++++++++++------- .../ModActions/functions/kickMember.ts | 33 ++++++---- .../ModActions/functions/warnMember.ts | 33 ++++++---- .../src/plugins/Mutes/functions/muteUser.ts | 43 +++++++----- 14 files changed, 231 insertions(+), 94 deletions(-) create mode 100644 backend/src/plugins/CustomEvents/catchTemplateError.ts diff --git a/backend/src/RecoverablePluginError.ts b/backend/src/RecoverablePluginError.ts index 46a86ae55..64fed6185 100644 --- a/backend/src/RecoverablePluginError.ts +++ b/backend/src/RecoverablePluginError.ts @@ -11,6 +11,7 @@ export enum ERRORS { MUTE_ROLE_ABOVE_ZEP, USER_ABOVE_ZEP, USER_NOT_MODERATABLE, + TEMPLATE_PARSE_ERROR, } export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = { @@ -24,6 +25,7 @@ export const RECOVERABLE_PLUGIN_ERROR_MESSAGES = { [ERRORS.MUTE_ROLE_ABOVE_ZEP]: "Specified mute role is above Zeppelin in the role hierarchy", [ERRORS.USER_ABOVE_ZEP]: "Cannot mute user, specified user is above Zeppelin in the role hierarchy", [ERRORS.USER_NOT_MODERATABLE]: "Cannot mute user, specified user is not moderatable", + [ERRORS.TEMPLATE_PARSE_ERROR]: "Template parse error", }; export class RecoverablePluginError extends Error { diff --git a/backend/src/plugins/Automod/actions/changePerms.ts b/backend/src/plugins/Automod/actions/changePerms.ts index 7b7eba379..351b1637c 100644 --- a/backend/src/plugins/Automod/actions/changePerms.ts +++ b/backend/src/plugins/Automod/actions/changePerms.ts @@ -1,13 +1,14 @@ import { PermissionsBitField, PermissionsString } from "discord.js"; import { U } from "ts-toolbelt"; import z from "zod"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { isValidSnowflake, keys, noop, zBoundedCharacters } from "../../../utils"; import { guildToTemplateSafeGuild, savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser, } from "../../../utils/templateSafeObjects"; +import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; type LegacyPermMap = Record; @@ -71,30 +72,52 @@ export const ChangePermsAction = automodAction({ perms: z.record(z.enum(allPermissionNames), z.boolean().nullable()), }), - async apply({ pluginData, contexts, actionConfig }) { + 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, + let target: string; + try { + target = await renderTemplate( + actionConfig.target, 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; + } catch (err) { + if (err instanceof TemplateParseError) { + pluginData.getPlugin(LogsPlugin).logBotAlert({ + body: `Error in target format of automod rule ${ruleName}: ${err.message}`, + }); + return; + } + throw err; + } + + let channelId: string | null = null; + if (actionConfig.channel) { + try { + channelId = await renderTemplate( + actionConfig.channel, + new TemplateSafeValueContainer({ + user: user ? userToTemplateSafeUser(user) : null, + guild: guildToTemplateSafeGuild(pluginData.guild), + message: message ? savedMessageToTemplateSafeSavedMessage(message) : null, + }), + ); + } catch (err) { + if (err instanceof TemplateParseError) { + pluginData.getPlugin(LogsPlugin).logBotAlert({ + body: `Error in channel format of automod rule ${ruleName}: ${err.message}`, + }); + return; + } + throw err; + } + } + const role = pluginData.guild.roles.resolve(target); if (!role) { const member = await pluginData.guild.members.fetch(target).catch(noop); diff --git a/backend/src/plugins/Automod/actions/reply.ts b/backend/src/plugins/Automod/actions/reply.ts index e8b1fdf87..0628e26fa 100644 --- a/backend/src/plugins/Automod/actions/reply.ts +++ b/backend/src/plugins/Automod/actions/reply.ts @@ -1,6 +1,6 @@ import { GuildTextBasedChannel, MessageCreateOptions, PermissionsBitField, Snowflake, User } from "discord.js"; import z from "zod"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { convertDelayStringToMS, noop, @@ -58,10 +58,21 @@ export const ReplyAction = automodAction({ }), ); - const formatted = - typeof actionConfig === "string" - ? await renderReplyText(actionConfig) - : ((await renderRecursively(actionConfig.text, renderReplyText)) as MessageCreateOptions); + let formatted: string | MessageCreateOptions; + try { + formatted = + typeof actionConfig === "string" + ? await renderReplyText(actionConfig) + : ((await renderRecursively(actionConfig.text, renderReplyText)) as MessageCreateOptions); + } catch (err) { + if (err instanceof TemplateParseError) { + pluginData.getPlugin(LogsPlugin).logBotAlert({ + body: `Error in reply format of automod rule \`${ruleName}\`: ${err.message}`, + }); + return; + } + throw err; + } if (formatted) { const channel = pluginData.guild.channels.cache.get(channelId as Snowflake) as GuildTextBasedChannel; diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 41648ad4c..a521d72f2 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -1,8 +1,9 @@ import { ChannelType, GuildTextThreadCreateOptions, ThreadAutoArchiveDuration, ThreadChannel } from "discord.js"; import z from "zod"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { MINUTES, convertDelayStringToMS, noop, zBoundedCharacters, zDelayString } from "../../../utils"; import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; +import { LogsPlugin } from "../../Logs/LogsPlugin"; import { automodAction } from "../helpers"; const validThreadAutoArchiveDurations: ThreadAutoArchiveDuration[] = [ @@ -21,7 +22,7 @@ export const StartThreadAction = automodAction({ limit_per_channel: z.number().nullable().default(5), }), - async apply({ pluginData, contexts, actionConfig }) { + async apply({ pluginData, contexts, actionConfig, ruleName }) { // check if the message still exists, we don't want to create threads for deleted messages const threads = contexts.filter((c) => { if (!c.message || !c.user) return false; @@ -48,15 +49,25 @@ export const StartThreadAction = automodAction({ const channel = pluginData.guild.channels.cache.get(threadContext.message!.channel_id); if (!channel || !("threads" in channel) || channel.isThreadOnly()) continue; - const renderThreadName = async (str: string) => - renderTemplate( - str, + let threadName: string; + try { + threadName = await renderTemplate( + actionConfig.name ?? "{user.renderedUsername}'s thread", new TemplateSafeValueContainer({ user: userToTemplateSafeUser(threadContext.user!), msg: savedMessageToTemplateSafeSavedMessage(threadContext.message!), }), ); - const threadName = await renderThreadName(actionConfig.name ?? "{user.renderedUsername}'s thread"); + } catch (err) { + if (err instanceof TemplateParseError) { + pluginData.getPlugin(LogsPlugin).logBotAlert({ + body: `Error in thread name format of automod rule ${ruleName}: ${err.message}`, + }); + return; + } + throw err; + } + const threadOptions: GuildTextThreadCreateOptions = { name: threadName, autoArchiveDuration: autoArchive, diff --git a/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts b/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts index e17cd96bc..82c5e6121 100644 --- a/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts +++ b/backend/src/plugins/CustomEvents/CustomEventsPlugin.ts @@ -11,6 +11,7 @@ import { messageToTemplateSafeMessage, userToTemplateSafeUser, } from "../../utils/templateSafeObjects"; +import { LogsPlugin } from "../Logs/LogsPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { runEvent } from "./functions/runEvent"; import { CustomEventsPluginType, zCustomEventsConfig } from "./types"; @@ -25,6 +26,7 @@ export const CustomEventsPlugin = zeppelinGuildPlugin()( name: "custom_events", showInDocs: false, + dependencies: () => [LogsPlugin], configParser: (input) => zCustomEventsConfig.parse(input), defaultOptions, diff --git a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts index f08709585..cd6476874 100644 --- a/backend/src/plugins/CustomEvents/actions/addRoleAction.ts +++ b/backend/src/plugins/CustomEvents/actions/addRoleAction.ts @@ -4,6 +4,7 @@ import { canActOn } from "../../../pluginUtils"; import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter"; import { resolveMember, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; +import { catchTemplateError } from "../catchTemplateError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; export const zAddRoleAction = z.strictObject({ @@ -20,7 +21,10 @@ export async function addRoleAction( event: TCustomEvent, eventData: any, ) { - const targetId = await renderTemplate(action.target, values, false); + const targetId = await catchTemplateError( + () => renderTemplate(action.target, values, false), + "Invalid target format", + ); const target = await resolveMember(pluginData.client, pluginData.guild, targetId); if (!target) throw new ActionError(`Unknown target member: ${targetId}`); diff --git a/backend/src/plugins/CustomEvents/actions/createCaseAction.ts b/backend/src/plugins/CustomEvents/actions/createCaseAction.ts index e894a4461..a5e624fa1 100644 --- a/backend/src/plugins/CustomEvents/actions/createCaseAction.ts +++ b/backend/src/plugins/CustomEvents/actions/createCaseAction.ts @@ -5,6 +5,7 @@ import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFor import { zBoundedCharacters, zSnowflake } from "../../../utils"; import { CasesPlugin } from "../../Cases/CasesPlugin"; import { ActionError } from "../ActionError"; +import { catchTemplateError } from "../catchTemplateError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; export const zCreateCaseAction = z.strictObject({ @@ -23,10 +24,12 @@ export async function createCaseAction( event: TCustomEvent, eventData: any, // eslint-disable-line @typescript-eslint/no-unused-vars ) { - const modId = await renderTemplate(action.mod, values, false); - const targetId = await renderTemplate(action.target, values, false); - - const reason = await renderTemplate(action.reason, values, false); + const modId = await catchTemplateError(() => renderTemplate(action.mod, values, false), "Invalid mod format"); + const targetId = await catchTemplateError( + () => renderTemplate(action.target, values, false), + "Invalid target format", + ); + const reason = await catchTemplateError(() => renderTemplate(action.reason, values, false), "Invalid reason format"); if (CaseTypes[action.case_type] == null) { throw new ActionError(`Invalid case type: ${action.type}`); diff --git a/backend/src/plugins/CustomEvents/actions/messageAction.ts b/backend/src/plugins/CustomEvents/actions/messageAction.ts index 40eee4b81..277802657 100644 --- a/backend/src/plugins/CustomEvents/actions/messageAction.ts +++ b/backend/src/plugins/CustomEvents/actions/messageAction.ts @@ -4,6 +4,7 @@ import z from "zod"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { zBoundedCharacters, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; +import { catchTemplateError } from "../catchTemplateError"; import { CustomEventsPluginType } from "../types"; export const zMessageAction = z.strictObject({ @@ -18,7 +19,10 @@ export async function messageAction( action: TMessageAction, values: TemplateSafeValueContainer, ) { - const targetChannelId = await renderTemplate(action.channel, values, false); + const targetChannelId = await catchTemplateError( + () => renderTemplate(action.channel, values, false), + "Invalid channel format", + ); const targetChannel = pluginData.guild.channels.cache.get(targetChannelId as Snowflake); if (!targetChannel) throw new ActionError("Unknown target channel"); if (!(targetChannel instanceof TextChannel)) throw new ActionError("Target channel is not a text channel"); diff --git a/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts b/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts index d42059f52..40adcb587 100644 --- a/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts +++ b/backend/src/plugins/CustomEvents/actions/moveToVoiceChannelAction.ts @@ -5,6 +5,7 @@ import { canActOn } from "../../../pluginUtils"; import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { resolveMember, zSnowflake } from "../../../utils"; import { ActionError } from "../ActionError"; +import { catchTemplateError } from "../catchTemplateError"; import { CustomEventsPluginType, TCustomEvent } from "../types"; export const zMoveToVoiceChannelAction = z.strictObject({ @@ -21,7 +22,10 @@ export async function moveToVoiceChannelAction( event: TCustomEvent, eventData: any, ) { - const targetId = await renderTemplate(action.target, values, false); + const targetId = await catchTemplateError( + () => renderTemplate(action.target, values, false), + "Invalid target format", + ); const target = await resolveMember(pluginData.client, pluginData.guild, targetId); if (!target) throw new ActionError("Unknown target member"); @@ -29,7 +33,10 @@ export async function moveToVoiceChannelAction( throw new ActionError("Missing permissions"); } - const targetChannelId = await renderTemplate(action.channel, values, false); + const targetChannelId = await catchTemplateError( + () => renderTemplate(action.channel, values, false), + "Invalid channel format", + ); const targetChannel = pluginData.guild.channels.cache.get(targetChannelId as Snowflake); if (!targetChannel) throw new ActionError("Unknown target channel"); if (!(targetChannel instanceof VoiceChannel)) throw new ActionError("Target channel is not a voice channel"); diff --git a/backend/src/plugins/CustomEvents/catchTemplateError.ts b/backend/src/plugins/CustomEvents/catchTemplateError.ts new file mode 100644 index 000000000..015a4298d --- /dev/null +++ b/backend/src/plugins/CustomEvents/catchTemplateError.ts @@ -0,0 +1,13 @@ +import { TemplateParseError } from "../../templateFormatter"; +import { ActionError } from "./ActionError"; + +export function catchTemplateError(fn: () => Promise, errorText: string): Promise { + try { + return fn(); + } catch (err) { + if (err instanceof TemplateParseError) { + throw new ActionError(`${errorText}: ${err.message}`); + } + throw err; + } +} diff --git a/backend/src/plugins/ModActions/functions/banUserId.ts b/backend/src/plugins/ModActions/functions/banUserId.ts index d9d1454b2..65686c815 100644 --- a/backend/src/plugins/ModActions/functions/banUserId.ts +++ b/backend/src/plugins/ModActions/functions/banUserId.ts @@ -5,7 +5,7 @@ import { CaseTypes } from "../../../data/CaseTypes"; import { LogType } from "../../../data/LogType"; import { registerExpiringTempban } from "../../../data/loops/expiringTempbansLoop"; import { logger } from "../../../logger"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { DAYS, SECONDS, @@ -52,30 +52,52 @@ export async function banUserId( if (contactMethods.length) { if (!banTime && config.ban_message) { - const banMessage = await renderTemplate( - config.ban_message, - new TemplateSafeValueContainer({ - guildName: pluginData.guild.name, - reason, - moderator: banOptions.caseArgs?.modId - ? userToTemplateSafeUser(await resolveUser(pluginData.client, banOptions.caseArgs.modId)) - : null, - }), - ); + let banMessage: string; + try { + banMessage = await renderTemplate( + config.ban_message, + new TemplateSafeValueContainer({ + guildName: pluginData.guild.name, + reason, + moderator: banOptions.caseArgs?.modId + ? userToTemplateSafeUser(await resolveUser(pluginData.client, banOptions.caseArgs.modId)) + : null, + }), + ); + } catch (err) { + if (err instanceof TemplateParseError) { + return { + status: "failed", + error: `Invalid ban_message format: ${err.message}`, + }; + } + throw err; + } notifyResult = await notifyUser(member.user, banMessage, contactMethods); } else if (banTime && config.tempban_message) { - const banMessage = await renderTemplate( - config.tempban_message, - new TemplateSafeValueContainer({ - guildName: pluginData.guild.name, - reason, - moderator: banOptions.caseArgs?.modId - ? userToTemplateSafeUser(await resolveUser(pluginData.client, banOptions.caseArgs.modId)) - : null, - banTime: humanizeDuration(banTime), - }), - ); + let banMessage: string; + try { + banMessage = await renderTemplate( + config.tempban_message, + new TemplateSafeValueContainer({ + guildName: pluginData.guild.name, + reason, + moderator: banOptions.caseArgs?.modId + ? userToTemplateSafeUser(await resolveUser(pluginData.client, banOptions.caseArgs.modId)) + : null, + banTime: humanizeDuration(banTime), + }), + ); + } catch (err) { + if (err instanceof TemplateParseError) { + return { + status: "failed", + error: `Invalid tempban_message format: ${err.message}`, + }; + } + throw err; + } notifyResult = await notifyUser(member.user, banMessage, contactMethods); } else { diff --git a/backend/src/plugins/ModActions/functions/kickMember.ts b/backend/src/plugins/ModActions/functions/kickMember.ts index d54dfd159..6dc26e35a 100644 --- a/backend/src/plugins/ModActions/functions/kickMember.ts +++ b/backend/src/plugins/ModActions/functions/kickMember.ts @@ -2,7 +2,7 @@ import { GuildMember } from "discord.js"; import { GuildPluginData } from "knub"; import { CaseTypes } from "../../../data/CaseTypes"; import { LogType } from "../../../data/LogType"; -import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter"; +import { renderTemplate, TemplateParseError, TemplateSafeValueContainer } from "../../../templateFormatter"; import { createUserNotificationError, notifyUser, resolveUser, ucfirst, UserNotificationResult } from "../../../utils"; import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { CasesPlugin } from "../../Cases/CasesPlugin"; @@ -31,16 +31,27 @@ export async function kickMember( if (contactMethods.length) { if (config.kick_message) { - const kickMessage = await renderTemplate( - config.kick_message, - new TemplateSafeValueContainer({ - guildName: pluginData.guild.name, - reason, - moderator: kickOptions.caseArgs?.modId - ? userToTemplateSafeUser(await resolveUser(pluginData.client, kickOptions.caseArgs.modId)) - : null, - }), - ); + let kickMessage: string; + try { + kickMessage = await renderTemplate( + config.kick_message, + new TemplateSafeValueContainer({ + guildName: pluginData.guild.name, + reason, + moderator: kickOptions.caseArgs?.modId + ? userToTemplateSafeUser(await resolveUser(pluginData.client, kickOptions.caseArgs.modId)) + : null, + }), + ); + } catch (err) { + if (err instanceof TemplateParseError) { + return { + status: "failed", + error: `Invalid kick_message format: ${err.message}`, + }; + } + throw err; + } notifyResult = await notifyUser(member.user, kickMessage, contactMethods); } else { diff --git a/backend/src/plugins/ModActions/functions/warnMember.ts b/backend/src/plugins/ModActions/functions/warnMember.ts index 9bc0fda9d..9aba15f47 100644 --- a/backend/src/plugins/ModActions/functions/warnMember.ts +++ b/backend/src/plugins/ModActions/functions/warnMember.ts @@ -1,7 +1,7 @@ import { GuildMember, Snowflake } from "discord.js"; import { GuildPluginData } from "knub"; import { CaseTypes } from "../../../data/CaseTypes"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { UserNotificationResult, createUserNotificationError, notifyUser, resolveUser, ucfirst } from "../../../utils"; import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { waitForButtonConfirm } from "../../../utils/waitForInteraction"; @@ -20,16 +20,27 @@ export async function warnMember( let notifyResult: UserNotificationResult; if (config.warn_message) { - const warnMessage = await renderTemplate( - config.warn_message, - new TemplateSafeValueContainer({ - guildName: pluginData.guild.name, - reason, - moderator: warnOptions.caseArgs?.modId - ? userToTemplateSafeUser(await resolveUser(pluginData.client, warnOptions.caseArgs.modId)) - : null, - }), - ); + let warnMessage: string; + try { + warnMessage = await renderTemplate( + config.warn_message, + new TemplateSafeValueContainer({ + guildName: pluginData.guild.name, + reason, + moderator: warnOptions.caseArgs?.modId + ? userToTemplateSafeUser(await resolveUser(pluginData.client, warnOptions.caseArgs.modId)) + : null, + }), + ); + } catch (err) { + if (err instanceof TemplateParseError) { + return { + status: "failed", + error: `Invalid warn_message format: ${err.message}`, + }; + } + throw err; + } const contactMethods = warnOptions?.contactMethods ? warnOptions.contactMethods : getDefaultContactMethods(pluginData, "warn"); diff --git a/backend/src/plugins/Mutes/functions/muteUser.ts b/backend/src/plugins/Mutes/functions/muteUser.ts index 575f96fb8..fcc273076 100644 --- a/backend/src/plugins/Mutes/functions/muteUser.ts +++ b/backend/src/plugins/Mutes/functions/muteUser.ts @@ -9,7 +9,7 @@ import { Case } from "../../../data/entities/Case"; import { Mute } from "../../../data/entities/Mute"; import { registerExpiringMute } from "../../../data/loops/expiringMutesLoop"; import { LogsPlugin } from "../../../plugins/Logs/LogsPlugin"; -import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; +import { TemplateParseError, TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter"; import { UserNotificationMethod, UserNotificationResult, @@ -61,9 +61,10 @@ export async function muteUser( const member = await resolveMember(pluginData.client, pluginData.guild, user.id, true); // Grab the fresh member so we don't have stale role info const config = await pluginData.config.getMatchingConfig({ member, userId }); + const logs = pluginData.getPlugin(LogsPlugin); + let rolesToRestore: string[] = []; if (member) { - const logs = pluginData.getPlugin(LogsPlugin); // remove and store any roles to be removed/restored const currentUserRoles = [...member.roles.cache.keys()]; let newRoles: string[] = currentUserRoles; @@ -187,19 +188,31 @@ export async function muteUser( ? config.timed_mute_message : config.mute_message; - const muteMessage = - template && - (await renderTemplate( - template, - new TemplateSafeValueContainer({ - guildName: pluginData.guild.name, - reason: reason || "None", - time: timeUntilUnmuteStr, - moderator: muteOptions.caseArgs?.modId - ? userToTemplateSafeUser(await resolveUser(pluginData.client, muteOptions.caseArgs.modId)) - : null, - }), - )); + let muteMessage: string | null = null; + try { + muteMessage = + template && + (await renderTemplate( + template, + new TemplateSafeValueContainer({ + guildName: pluginData.guild.name, + reason: reason || "None", + time: timeUntilUnmuteStr, + moderator: muteOptions.caseArgs?.modId + ? userToTemplateSafeUser(await resolveUser(pluginData.client, muteOptions.caseArgs.modId)) + : null, + }), + )); + } catch (err) { + if (err instanceof TemplateParseError) { + logs.logBotAlert({ + body: `Invalid mute message format. The mute was still applied: ${err.message}`, + }); + } else { + lock.unlock(); + throw err; + } + } if (muteMessage && member) { let contactMethods: UserNotificationMethod[] = []; From d53f37756d5d4620dcd88e412fb23f6b937a0532 Mon Sep 17 00:00:00 2001 From: Miikka <2606411+Dragory@users.noreply.github.com> Date: Sun, 25 Feb 2024 10:23:10 +0200 Subject: [PATCH 080/128] Update .clabot --- .clabot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.clabot b/.clabot index 43dcfc5f1..2c60807f5 100644 --- a/.clabot +++ b/.clabot @@ -28,7 +28,8 @@ "Obliie", "brawaru", "Benricheson101", - "hawkeye7662" + "hawkeye7662", + "LilyBergonzat" ], "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 7cd56303fc0f6815542d01f7d2bb6605dd52c6ab Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 2 Mar 2024 09:24:07 +0000 Subject: [PATCH 081/128] refactor: use npm workspaces and ts project references --- .gitignore | 2 + backend/package-lock.json | 9127 ------ backend/package.json | 26 +- backend/src/api/guilds.ts | 2 +- backend/src/api/guilds/importExport.ts | 2 +- backend/src/api/guilds/misc.ts | 2 +- backend/src/api/permissions.ts | 2 +- backend/src/data/ApiPermissionAssignments.ts | 2 +- .../plugins/AutoDelete/AutoDeletePlugin.ts | 2 +- .../commands/AddDashboardUserCmd.ts | 2 +- .../commands/AddServerFromInviteCmd.ts | 2 +- .../BotControl/commands/AllowServerCmd.ts | 2 +- backend/tsconfig.json | 17 +- dashboard/package-lock.json | 11819 -------- .../src/components/dashboard/GuildAccess.vue | 2 +- .../dashboard/GuildImportExport.vue | 2 +- .../src/components/dashboard/GuildList.vue | 2 +- .../components/dashboard/PermissionTree.vue | 2 +- .../dashboard/permissionTreeUtils.ts | 2 +- dashboard/src/store/types.ts | 2 +- dashboard/tsconfig.json | 11 +- package-lock.json | 24613 ++++++++++++++-- package.json | 7 +- shared/.gitignore | 1 + shared/package-lock.json | 3190 -- shared/package.json | 2 + shared/src/index.ts | 1 + shared/tsconfig.json | 10 +- tsconfig.base.json | 19 + tsconfig.json | 29 +- 30 files changed, 22440 insertions(+), 26464 deletions(-) delete mode 100644 backend/package-lock.json delete mode 100644 dashboard/package-lock.json create mode 100644 shared/.gitignore delete mode 100644 shared/package-lock.json create mode 100644 shared/src/index.ts create mode 100644 tsconfig.base.json diff --git a/.gitignore b/.gitignore index a312a7f93..e2c7baa6c 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,5 @@ npm-audit.txt config-errors.txt /config-schema.json + +*.tsbuildinfo diff --git a/backend/package-lock.json b/backend/package-lock.json deleted file mode 100644 index 49e158671..000000000 --- a/backend/package-lock.json +++ /dev/null @@ -1,9127 +0,0 @@ -{ - "name": "@zeppelinbot/backend", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@zeppelinbot/backend", - "version": "0.0.1", - "dependencies": { - "@silvia-odwyer/photon-node": "^0.3.1", - "bufferutil": "^4.0.3", - "clinic": "^13.0.0", - "cors": "^2.8.5", - "cross-env": "^7.0.3", - "deep-diff": "^1.0.2", - "discord.js": "^14.14.1", - "dotenv": "^4.0.0", - "emoji-regex": "^8.0.0", - "escape-string-regexp": "^1.0.5", - "express": "^4.17.0", - "fp-ts": "^2.0.1", - "humanize-duration": "^3.15.0", - "js-yaml": "^3.13.1", - "knub": "^32.0.0-next.16", - "knub-command-manager": "^9.1.0", - "last-commit-log": "^2.1.0", - "lodash.chunk": "^4.2.0", - "lodash.clonedeep": "^4.5.0", - "lodash.difference": "^4.5.0", - "lodash.intersection": "^4.4.0", - "lodash.isequal": "^4.5.0", - "lodash.pick": "^4.4.0", - "moment-timezone": "^0.5.21", - "multer": "^1.4.5-lts.1", - "mysql": "^2.16.0", - "parse-color": "^1.0.0", - "passport": "^0.6.0", - "passport-custom": "^1.0.5", - "passport-oauth2": "^1.6.1", - "pkg-up": "^3.1.0", - "reflect-metadata": "^0.1.12", - "regexp-worker": "^1.1.0", - "safe-regex": "^2.0.2", - "seedrandom": "^3.0.1", - "strip-combining-marks": "^1.0.0", - "threads": "^1.7.0", - "tlds": "^1.221.1", - "tmp": "0.0.33", - "tsconfig-paths": "^3.9.0", - "twemoji": "^12.1.4", - "typeorm": "^0.3.17", - "utf-8-validate": "^5.0.5", - "uuid": "^9.0.0", - "yawn-yaml": "github:dragory/yawn-yaml#string-number-fix-build", - "zlib-sync": "^0.1.7", - "zod": "^3.7.2" - }, - "devDependencies": { - "@types/cors": "^2.8.5", - "@types/express": "^4.16.1", - "@types/jest": "^24.0.15", - "@types/js-yaml": "^3.12.1", - "@types/lodash.at": "^4.6.3", - "@types/moment-timezone": "^0.5.6", - "@types/multer": "^1.4.7", - "@types/node": "^18.16.3", - "@types/passport": "^1.0.0", - "@types/passport-oauth2": "^1.4.8", - "@types/passport-strategy": "^0.2.35", - "@types/safe-regex": "^1.1.2", - "@types/tmp": "0.0.33", - "@types/twemoji": "^12.1.0", - "@types/uuid": "^9.0.2", - "ava": "^5.3.1", - "rimraf": "^2.6.2", - "source-map-support": "^0.5.16", - "zod-to-json-schema": "^3.22.3" - } - }, - "node_modules/@assemblyscript/loader": { - "version": "0.19.23", - "license": "Apache-2.0" - }, - "node_modules/@babel/runtime": { - "version": "7.22.5", - "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.13.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@clinic/bubbleprof": { - "version": "10.0.0", - "license": "MIT", - "dependencies": { - "@clinic/clinic-common": "^7.0.0", - "@clinic/node-trace-log-join": "^2.0.0", - "@clinic/trace-events-parser": "^2.0.0", - "array-flatten": "^3.0.0", - "async": "^3.0.1", - "d3-axis": "^1.0.8", - "d3-color": "^1.4.0", - "d3-drag": "^1.2.3", - "d3-ease": "^1.0.3", - "d3-format": "^1.3.0", - "d3-interpolate": "^1.2.0", - "d3-scale": "^3.0.0", - "d3-selection": "^1.3.0", - "d3-shape": "^1.2.0", - "d3-time": "^1.0.8", - "d3-time-format": "^2.1.1", - "d3-transition": "^1.1.1", - "endpoint": "^0.4.5", - "lodash": "^4.14.0", - "minify-stream": "^2.0.1", - "mkdirp": "^1.0.0", - "on-net-listen": "^1.0.0", - "protocol-buffers": "^4.0.4", - "pump": "^3.0.0" - } - }, - "node_modules/@clinic/clinic-common": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "brfs": "^2.0.1", - "browserify": "^17.0.0", - "chalk": "^4.1.0", - "lodash.debounce": "^4.0.8", - "loose-envify": "^1.4.0", - "postcss": "^8.1.10", - "postcss-import": "^13.0.0", - "stream-template": "0.0.10", - "webfontloader": "^1.6.28" - }, - "engines": { - "node": ">= 12.13.0" - } - }, - "node_modules/@clinic/doctor": { - "version": "11.0.0", - "license": "MIT", - "dependencies": { - "@clinic/clinic-common": "^7.0.0", - "@clinic/node-trace-log-join": "^2.0.0", - "@clinic/trace-events-parser": "^2.0.0", - "@tensorflow/tfjs-backend-cpu": "^3.13.0", - "@tensorflow/tfjs-core": "^3.13.0", - "async": "^3.0.1", - "clipboard-copy": "^4.0.1", - "d3-array": "^2.0.0", - "d3-axis": "^1.0.8", - "d3-scale": "^3.0.0", - "d3-selection": "^1.1.0", - "d3-shape": "^1.2.0", - "d3-time-format": "^2.1.0", - "debug": "^4.3.1", - "distributions": "^2.0.0", - "endpoint": "^0.4.5", - "hidden-markov-model-tf": "^4.0.0", - "minify-stream": "^2.0.1", - "mkdirp": "^1.0.0", - "on-net-listen": "^1.0.0", - "protocol-buffers": "^4.0.4", - "pump": "^3.0.0", - "pumpify": "^2.0.0", - "semver": "^7.0.0", - "showdown": "^1.7.6", - "stream-template": "0.0.10", - "streaming-json-stringify": "^3.1.0", - "summary": "^2.1.0", - "ttest": "^3.0.0" - } - }, - "node_modules/@clinic/flame": { - "version": "13.0.0", - "license": "MIT", - "dependencies": { - "@clinic/clinic-common": "^7.0.0", - "0x": "^5.0.0", - "copy-to-clipboard": "^3.0.8", - "d3-array": "^2.0.2", - "d3-fg": "^6.13.1", - "d3-selection": "^1.3.2", - "flame-gradient": "^1.0.0", - "lodash.debounce": "^4.0.8", - "pump": "^3.0.0", - "querystringify": "^2.1.0", - "rimraf": "^3.0.2" - } - }, - "node_modules/@clinic/flame/node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@clinic/heap-profiler": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "@clinic/clinic-common": "^7.0.0", - "@nearform/heap-profiler": "^2.0.0", - "abort-controller": "^3.0.0", - "copy-to-clipboard": "^3.0.8", - "d3-array": "^2.0.2", - "d3-fg": "^6.13.1", - "d3-selection": "^1.3.2", - "fs-extra": "^11.0.0", - "lodash.debounce": "^4.0.8", - "on-net-listen": "1.1.2", - "pump": "^3.0.0", - "querystringify": "^2.1.0", - "sinusoidal-decimal": "^1.0.0" - } - }, - "node_modules/@clinic/node-trace-log-join": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "@clinic/trace-events-parser": "^2.0.0", - "multistream": "^2.1.0", - "pump": "^3.0.0", - "through2": "^2.0.3" - }, - "bin": { - "node-trace-log-join": "bin.js" - } - }, - "node_modules/@clinic/trace-events-parser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "turbo-json-parse": "^2.2.0" - } - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@discordjs/builders": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz", - "integrity": "sha512-GDtbKMkg433cOZur8Dv6c25EHxduNIBsxeHrsRoIM8+AwmEZ8r0tEpckx/sHwTLwQPOF3e2JWloZh9ofCaMfAw==", - "dependencies": { - "@discordjs/formatters": "^0.3.3", - "@discordjs/util": "^1.0.2", - "@sapphire/shapeshift": "^3.9.3", - "discord-api-types": "0.37.61", - "fast-deep-equal": "^3.1.3", - "ts-mixer": "^6.0.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/collection": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", - "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/formatters": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.3.tgz", - "integrity": "sha512-wTcI1Q5cps1eSGhl6+6AzzZkBBlVrBdc9IUhJbijRgVjCNIIIZPgqnUj3ntFODsHrdbGU8BEG9XmDQmgEEYn3w==", - "dependencies": { - "discord-api-types": "0.37.61" - }, - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/rest": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz", - "integrity": "sha512-nXm9wT8oqrYFRMEqTXQx9DUTeEtXUDMmnUKIhZn6O2EeDY9VCdwj23XCPq7fkqMPKdF7ldAfeVKyxxFdbZl59A==", - "dependencies": { - "@discordjs/collection": "^2.0.0", - "@discordjs/util": "^1.0.2", - "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.5.1", - "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "0.37.61", - "magic-bytes.js": "^1.5.0", - "tslib": "^2.6.2", - "undici": "5.27.2" - }, - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", - "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", - "engines": { - "node": ">=18" - } - }, - "node_modules/@discordjs/util": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.2.tgz", - "integrity": "sha512-IRNbimrmfb75GMNEjyznqM1tkI7HrZOf14njX7tCAAUetyZM1Pr8hX/EK2lxBCOgWDRmigbp24fD1hdMfQK5lw==", - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/ws": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz", - "integrity": "sha512-+XI82Rm2hKnFwAySXEep4A7Kfoowt6weO6381jgW+wVdTpMS/56qCvoXyFRY0slcv7c/U8My2PwIB2/wEaAh7Q==", - "dependencies": { - "@discordjs/collection": "^2.0.0", - "@discordjs/rest": "^2.1.0", - "@discordjs/util": "^1.0.2", - "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.9", - "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "0.37.61", - "tslib": "^2.6.2", - "ws": "^8.14.2" - }, - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.0.0.tgz", - "integrity": "sha512-YTWIXLrf5FsrLMycpMM9Q6vnZoR/lN2AWX23/Cuo8uOOtS8eHB2dyQaaGnaF8aZPYnttf2bkLMcXn/j6JUOi3w==", - "engines": { - "node": ">=18" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", - "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@jest/types": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@nearform/heap-profiler": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "abort-controller": "^3.0.0", - "sonic-boom": "^1.0.1" - }, - "engines": { - "node": ">= 12.13.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@sapphire/async-queue": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.2.tgz", - "integrity": "sha512-7X7FFAA4DngXUl95+hYbUF19bp1LGiffjJtu7ygrZrbdCSsdDDBaSjB7Akw0ZbOu6k0xpXyljnJ6/RZUvLfRdg==", - "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@sapphire/shapeshift": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.6.tgz", - "integrity": "sha512-4+Na/fxu2SEepZRb9z0dbsVh59QtwPuBg/UVaDib3av7ZY14b14+z09z6QVn0P6Dv6eOU2NDTsjIi0mbtgP56g==", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "lodash": "^4.17.21" - }, - "engines": { - "node": ">=v18" - } - }, - "node_modules/@sapphire/snowflake": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", - "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", - "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@silvia-odwyer/photon-node": { - "version": "0.3.3", - "license": "Apache-2.0" - }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@sqltools/formatter": { - "version": "1.2.5", - "license": "MIT" - }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "license": "MIT", - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@tensorflow/tfjs-backend-cpu": { - "version": "3.21.0", - "license": "Apache-2.0", - "dependencies": { - "@types/seedrandom": "^2.4.28", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@tensorflow/tfjs-core": { - "version": "3.21.0", - "license": "Apache-2.0", - "dependencies": { - "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.3.0", - "@types/seedrandom": "^2.4.28", - "@types/webgl-ext": "0.0.30", - "@webgpu/types": "0.1.16", - "long": "4.0.0", - "node-fetch": "~2.6.1", - "seedrandom": "^3.0.5" - }, - "engines": { - "yarn": ">= 1.3.2" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/cors": { - "version": "2.8.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.17", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*", - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "24.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-diff": "^24.3.0" - } - }, - "node_modules/@types/js-yaml": { - "version": "3.12.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "license": "MIT" - }, - "node_modules/@types/lodash": { - "version": "4.14.195", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/lodash.at": { - "version": "4.6.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/lodash": "*" - } - }, - "node_modules/@types/long": { - "version": "4.0.2", - "license": "MIT" - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/moment-timezone": { - "version": "0.5.30", - "dev": true, - "license": "MIT", - "dependencies": { - "moment-timezone": "*" - } - }, - "node_modules/@types/multer": { - "version": "1.4.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/node": { - "version": "18.19.10", - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/oauth": { - "version": "0.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/offscreencanvas": { - "version": "2019.3.0", - "license": "MIT" - }, - "node_modules/@types/passport": { - "version": "1.0.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/passport-oauth2": { - "version": "1.4.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*", - "@types/oauth": "*", - "@types/passport": "*" - } - }, - "node_modules/@types/passport-strategy": { - "version": "0.2.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*", - "@types/passport": "*" - } - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/safe-regex": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/seedrandom": { - "version": "2.4.30", - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "0.17.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/twemoji": { - "version": "12.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/uuid": { - "version": "9.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/webgl-ext": { - "version": "0.0.30", - "license": "MIT" - }, - "node_modules/@types/ws": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", - "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "13.0.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@vladfrangu/async_event_emitter": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz", - "integrity": "sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==", - "engines": { - "node": ">=v14.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@webgpu/types": { - "version": "0.1.16", - "license": "BSD-3-Clause" - }, - "node_modules/0x": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "ajv": "^8.8.2", - "browserify": "^17.0.0", - "concat-stream": "^2.0.0", - "d3-fg": "^6.14.0", - "debounce": "^1.2.0", - "debug": "^4.1.1", - "end-of-stream": "^1.1.0", - "env-string": "^1.0.0", - "escape-string-regexp": "^4.0.0", - "execspawn": "^1.0.1", - "fs-extra": "^10.1.0", - "has-unicode": "^2.0.1", - "hsl-to-rgb-for-reals": "^1.1.0", - "jsonstream2": "^3.0.0", - "make-dir": "^3.1.0", - "minimist": "^1.2.0", - "morphdom": "^2.3.3", - "nanohtml": "^1.4.0", - "on-net-listen": "^1.1.0", - "opn": "^5.4.0", - "pump": "^3.0.0", - "pumpify": "^2.0.1", - "semver": "^7.3.5", - "single-line-log": "^1.0.1", - "split2": "^4.0.0", - "tachyons": "^4.9.1", - "through2": "^4.0.0", - "which": "^2.0.2" - }, - "bin": { - "0x": "cmd.js" - }, - "engines": { - "node": ">=8.5.0" - } - }, - "node_modules/0x/node_modules/escape-string-regexp": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/0x/node_modules/fs-extra": { - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/0x/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/0x/node_modules/through2": { - "version": "4.0.2", - "license": "MIT", - "dependencies": { - "readable-stream": "3" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.9.0", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "license": "Apache-2.0", - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-node/node_modules/acorn": { - "version": "7.4.1", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node/node_modules/acorn-walk": { - "version": "7.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/aggregate-error": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ajv": { - "version": "8.12.0", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ansi-align": { - "version": "3.0.1", - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-escapes": { - "version": "3.2.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/ansi-regex": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, - "node_modules/any-shell-escape": { - "version": "0.1.1", - "license": "MIT" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/app-root-path": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/append-field": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-find-index": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-flatten": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/array-from": { - "version": "2.1.1", - "license": "MIT" - }, - "node_modules/arrgv": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/arrify": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "license": "MIT", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/asn1.js": { - "version": "5.4.1", - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/assert": { - "version": "1.5.0", - "license": "MIT", - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "license": "ISC" - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "license": "MIT", - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/async": { - "version": "3.2.4", - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", - "license": "MIT" - }, - "node_modules/atomic-sleep": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/atomically": { - "version": "1.7.0", - "license": "MIT", - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/autocannon": { - "version": "7.11.0", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "char-spinner": "^1.0.1", - "cli-table3": "^0.6.0", - "color-support": "^1.1.1", - "cross-argv": "^2.0.0", - "form-data": "^4.0.0", - "has-async-hooks": "^1.0.0", - "hdr-histogram-js": "^3.0.0", - "hdr-histogram-percentiles-obj": "^3.0.0", - "http-parser-js": "^0.5.2", - "hyperid": "^3.0.0", - "lodash.chunk": "^4.2.0", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "manage-path": "^2.0.0", - "on-net-listen": "^1.1.1", - "pretty-bytes": "^5.4.1", - "progress": "^2.0.3", - "reinterval": "^1.1.0", - "retimer": "^3.0.0", - "semver": "^7.3.2", - "subarg": "^1.0.0", - "timestring": "^6.0.0" - }, - "bin": { - "autocannon": "autocannon.js" - } - }, - "node_modules/autocannon/node_modules/cross-argv": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/ava": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.8.2", - "acorn-walk": "^8.2.0", - "ansi-styles": "^6.2.1", - "arrgv": "^1.0.2", - "arrify": "^3.0.0", - "callsites": "^4.0.0", - "cbor": "^8.1.0", - "chalk": "^5.2.0", - "chokidar": "^3.5.3", - "chunkd": "^2.0.1", - "ci-info": "^3.8.0", - "ci-parallel-vars": "^1.0.1", - "clean-yaml-object": "^0.1.0", - "cli-truncate": "^3.1.0", - "code-excerpt": "^4.0.0", - "common-path-prefix": "^3.0.0", - "concordance": "^5.0.4", - "currently-unhandled": "^0.4.1", - "debug": "^4.3.4", - "emittery": "^1.0.1", - "figures": "^5.0.0", - "globby": "^13.1.4", - "ignore-by-default": "^2.1.0", - "indent-string": "^5.0.0", - "is-error": "^2.2.2", - "is-plain-object": "^5.0.0", - "is-promise": "^4.0.0", - "matcher": "^5.0.0", - "mem": "^9.0.2", - "ms": "^2.1.3", - "p-event": "^5.0.1", - "p-map": "^5.5.0", - "picomatch": "^2.3.1", - "pkg-conf": "^4.0.0", - "plur": "^5.1.0", - "pretty-ms": "^8.0.0", - "resolve-cwd": "^3.0.0", - "stack-utils": "^2.0.6", - "strip-ansi": "^7.0.1", - "supertap": "^3.0.1", - "temp-dir": "^3.0.0", - "write-file-atomic": "^5.0.1", - "yargs": "^17.7.2" - }, - "bin": { - "ava": "entrypoints/cli.mjs" - }, - "engines": { - "node": ">=14.19 <15 || >=16.15 <17 || >=18" - }, - "peerDependencies": { - "@ava/typescript": "*" - }, - "peerDependenciesMeta": { - "@ava/typescript": { - "optional": true - } - } - }, - "node_modules/ava/node_modules/ansi-regex": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ava/node_modules/callsites": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/chalk": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ava/node_modules/ci-info": { - "version": "3.8.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ava/node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/signal-exit": { - "version": "4.0.2", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ava/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/ava/node_modules/write-file-atomic": { - "version": "5.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/ava/node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/ava/node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "license": "MIT" - }, - "node_modules/b4a": { - "version": "1.6.4", - "license": "ISC" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/base64url": { - "version": "3.0.1", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "license": "BSD-3-Clause", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bignumber.js": { - "version": "9.0.0", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/bit-twiddle": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/bl": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "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.19.0", - "dev": true, - "license": "MIT" - }, - "node_modules/bn.js": { - "version": "5.2.1", - "license": "MIT" - }, - "node_modules/body-parser": { - "version": "1.20.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/boxen": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.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": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brfs": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "quote-stream": "^1.0.1", - "resolve": "^1.1.5", - "static-module": "^3.0.2", - "through2": "^2.0.0" - }, - "bin": { - "brfs": "bin/cmd.js" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/browser-pack": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-process-hrtime": { - "version": "0.1.3", - "license": "BSD-2-Clause" - }, - "node_modules/browser-resolve": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "resolve": "^1.17.0" - } - }, - "node_modules/browserify": { - "version": "17.0.0", - "license": "MIT", - "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.1", - "license": "ISC", - "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "license": "MIT", - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserify/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/buffer": { - "version": "5.2.1", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/buffer-equal": { - "version": "0.0.1", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "license": "MIT" - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/bufferutil": { - "version": "4.0.7", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/busboy": { - "version": "1.6.0", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "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", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cached-path-relative": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camel-case": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "license": "Apache-2.0" - }, - "node_modules/cbor": { - "version": "8.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "nofilter": "^3.1.0" - }, - "engines": { - "node": ">=12.19" - } - }, - "node_modules/cephes": { - "version": "1.2.0", - "license": "BSD-3-Clause" - }, - "node_modules/chalk": { - "version": "4.1.2", - "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/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/char-spinner": { - "version": "1.0.1", - "license": "ISC" - }, - "node_modules/chardet": { - "version": "0.7.0", - "license": "MIT" - }, - "node_modules/chokidar": { - "version": "3.5.3", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chunkd": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/ci-info": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/ci-parallel-vars": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/clean-stack": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clean-stack/node_modules/escape-string-regexp": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clean-yaml-object": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.0", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-table3": { - "version": "0.6.3", - "license": "MIT", - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/cli-truncate": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/cli-width": { - "version": "2.2.1", - "license": "ISC" - }, - "node_modules/clinic": { - "version": "13.0.0", - "license": "MIT", - "dependencies": { - "@clinic/bubbleprof": "^10.0.0", - "@clinic/doctor": "^11.0.0", - "@clinic/flame": "^13.0.0", - "@clinic/heap-profiler": "^5.0.0", - "any-shell-escape": "^0.1.1", - "async": "^3.0.1", - "autocannon": "^7.5.0", - "commist": "^1.0.0", - "cross-argv": "^1.0.0", - "dargs": "^7.0.0", - "env-string": "^1.0.1", - "execspawn": "^1.0.1", - "insight": "^0.11.1", - "minimist": "^1.2.0", - "open": "^7.3.0", - "ora": "^5.1.0", - "rimraf": "^3.0.0", - "stream-collector": "^1.0.1", - "subarg": "^1.0.0", - "update-notifier": "^5.0.1" - }, - "bin": { - "clinic": "bin.js" - } - }, - "node_modules/clinic/node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/clipboard-copy": { - "version": "4.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/cliui": { - "version": "7.0.4", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-response": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/code-excerpt": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "convert-to-spaces": "^2.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color-convert": { - "version": "0.5.3" - }, - "node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/color-support": { - "version": "1.1.3", - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "license": "MIT", - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "node_modules/combine-source-map/node_modules/convert-source-map": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "2.20.3", - "license": "MIT" - }, - "node_modules/commist": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "leven": "^2.1.0", - "minimist": "^1.1.0" - } - }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/concat-stream": { - "version": "2.0.0", - "engines": [ - "node >= 6.0" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concordance": { - "version": "5.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "date-time": "^3.1.0", - "esutils": "^2.0.3", - "fast-diff": "^1.2.0", - "js-string-escape": "^1.0.1", - "lodash": "^4.17.15", - "md5-hex": "^3.0.1", - "semver": "^7.3.2", - "well-known-symbols": "^2.0.0" - }, - "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" - } - }, - "node_modules/conf": { - "version": "10.2.0", - "license": "MIT", - "dependencies": { - "ajv": "^8.6.3", - "ajv-formats": "^2.1.1", - "atomically": "^1.7.0", - "debounce-fn": "^4.0.0", - "dot-prop": "^6.0.1", - "env-paths": "^2.2.1", - "json-schema-typed": "^7.0.3", - "onetime": "^5.1.2", - "pkg-up": "^3.1.0", - "semver": "^7.3.5" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/configstore": { - "version": "5.0.1", - "license": "BSD-2-Clause", - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/configstore/node_modules/dot-prop": { - "version": "5.3.0", - "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0" - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" - }, - "node_modules/convert-to-spaces": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/cookie": { - "version": "0.5.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "license": "MIT" - }, - "node_modules/copy-to-clipboard": { - "version": "3.3.3", - "license": "MIT", - "dependencies": { - "toggle-selection": "^1.0.6" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/cors": { - "version": "2.8.5", - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/create-hash": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/cross-argv": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/cross-env": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "license": "MIT", - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/currently-unhandled": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "array-find-index": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cwise-compiler": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "uniq": "^1.0.0" - } - }, - "node_modules/d": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "node_modules/d3-array": { - "version": "2.12.1", - "license": "BSD-3-Clause", - "dependencies": { - "internmap": "^1.0.0" - } - }, - "node_modules/d3-axis": { - "version": "1.0.12", - "license": "BSD-3-Clause" - }, - "node_modules/d3-color": { - "version": "1.4.1", - "license": "BSD-3-Clause" - }, - "node_modules/d3-dispatch": { - "version": "1.0.6", - "license": "BSD-3-Clause" - }, - "node_modules/d3-drag": { - "version": "1.2.5", - "license": "BSD-3-Clause", - "dependencies": { - "d3-dispatch": "1", - "d3-selection": "1" - } - }, - "node_modules/d3-ease": { - "version": "1.0.7", - "license": "BSD-3-Clause" - }, - "node_modules/d3-fg": { - "version": "6.14.0", - "license": "Apache-2.0", - "dependencies": { - "d3-array": "^2.2.0", - "d3-dispatch": "^1.0.5", - "d3-ease": "^1.0.5", - "d3-hierarchy": "^1.1.8", - "d3-scale": "^3.0.0", - "d3-selection": "^1.4.0", - "d3-zoom": "^1.7.3", - "escape-string-regexp": "^1.0.5", - "hsl-to-rgb-for-reals": "^1.1.0" - } - }, - "node_modules/d3-format": { - "version": "1.4.5", - "license": "BSD-3-Clause" - }, - "node_modules/d3-hierarchy": { - "version": "1.1.9", - "license": "BSD-3-Clause" - }, - "node_modules/d3-interpolate": { - "version": "1.4.0", - "license": "BSD-3-Clause", - "dependencies": { - "d3-color": "1" - } - }, - "node_modules/d3-path": { - "version": "1.0.9", - "license": "BSD-3-Clause" - }, - "node_modules/d3-scale": { - "version": "3.3.0", - "license": "BSD-3-Clause", - "dependencies": { - "d3-array": "^2.3.0", - "d3-format": "1 - 2", - "d3-interpolate": "1.2.0 - 2", - "d3-time": "^2.1.1", - "d3-time-format": "2 - 3" - } - }, - "node_modules/d3-scale/node_modules/d3-time": { - "version": "2.1.1", - "license": "BSD-3-Clause", - "dependencies": { - "d3-array": "2" - } - }, - "node_modules/d3-selection": { - "version": "1.4.2", - "license": "BSD-3-Clause" - }, - "node_modules/d3-shape": { - "version": "1.3.7", - "license": "BSD-3-Clause", - "dependencies": { - "d3-path": "1" - } - }, - "node_modules/d3-time": { - "version": "1.1.0", - "license": "BSD-3-Clause" - }, - "node_modules/d3-time-format": { - "version": "2.3.0", - "license": "BSD-3-Clause", - "dependencies": { - "d3-time": "1" - } - }, - "node_modules/d3-timer": { - "version": "1.0.10", - "license": "BSD-3-Clause" - }, - "node_modules/d3-transition": { - "version": "1.3.2", - "license": "BSD-3-Clause", - "dependencies": { - "d3-color": "1", - "d3-dispatch": "1", - "d3-ease": "1", - "d3-interpolate": "1", - "d3-selection": "^1.1.0", - "d3-timer": "1" - } - }, - "node_modules/d3-zoom": { - "version": "1.8.3", - "license": "BSD-3-Clause", - "dependencies": { - "d3-dispatch": "1", - "d3-drag": "1", - "d3-interpolate": "1", - "d3-selection": "1", - "d3-transition": "1" - } - }, - "node_modules/dargs": { - "version": "7.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/dash-ast": { - "version": "2.0.1", - "license": "Apache-2.0" - }, - "node_modules/dashdash": { - "version": "1.14.1", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/date-fns": { - "version": "2.30.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "node_modules/date-time": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "time-zone": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/debounce": { - "version": "1.2.1", - "license": "MIT" - }, - "node_modules/debounce-fn": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "mimic-fn": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decompress-response": { - "version": "3.3.0", - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/deep-diff": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "license": "MIT" - }, - "node_modules/defaults": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/defined": { - "version": "1.0.1", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/deps-sort": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/des.js": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detective": { - "version": "5.2.1", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/diff-sequences": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/discord-api-types": { - "version": "0.37.61", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", - "integrity": "sha512-o/dXNFfhBpYHpQFdT6FWzeO7pKc838QeeZ9d91CfVAtpr5XLK4B/zYxQbYgPdoMiTDvJfzcsLW5naXgmHGDNXw==" - }, - "node_modules/discord.js": { - "version": "14.14.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.14.1.tgz", - "integrity": "sha512-/hUVzkIerxKHyRKopJy5xejp4MYKDPTszAnpYxzVVv4qJYf+Tkt+jnT2N29PIPschicaEEpXwF2ARrTYHYwQ5w==", - "dependencies": { - "@discordjs/builders": "^1.7.0", - "@discordjs/collection": "1.5.3", - "@discordjs/formatters": "^0.3.3", - "@discordjs/rest": "^2.1.0", - "@discordjs/util": "^1.0.2", - "@discordjs/ws": "^1.0.2", - "@sapphire/snowflake": "3.5.1", - "@types/ws": "8.5.9", - "discord-api-types": "0.37.61", - "fast-deep-equal": "3.1.3", - "lodash.snakecase": "4.1.1", - "tslib": "2.6.2", - "undici": "5.27.2", - "ws": "8.14.2" - }, - "engines": { - "node": ">=16.11.0" - } - }, - "node_modules/distributions": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "cephes": "^1.1.2" - } - }, - "node_modules/domain-browser": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/dot-prop": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/dotenv": { - "version": "4.0.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.6.0" - } - }, - "node_modules/dotgitconfig": { - "version": "1.1.2", - "license": "MIT", - "dependencies": { - "ini": "^1.3.5" - } - }, - "node_modules/dup": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "license": "BSD-3-Clause", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/duplexer3": { - "version": "0.1.5", - "license": "BSD-3-Clause" - }, - "node_modules/duplexify": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "node_modules/duplexify/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "license": "MIT", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "node_modules/elliptic": { - "version": "6.5.4", - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/emittery": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/endpoint": { - "version": "0.4.5", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/env-string": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/es5-ext": { - "version": "0.10.62", - "hasInstallScript": true, - "license": "ISC", - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-map": { - "version": "0.1.5", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "node_modules/es6-set": { - "version": "0.1.6", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "es6-iterator": "~2.0.3", - "es6-symbol": "^3.1.3", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/es6-set/node_modules/type": { - "version": "2.7.2", - "license": "ISC" - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-goat": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/escodegen": { - "version": "1.14.3", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/esm": { - "version": "3.2.25", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-is-function": { - "version": "1.0.0", - "license": "Apache-2.0" - }, - "node_modules/estree-is-member-expression": { - "version": "1.0.0", - "license": "Apache-2.0" - }, - "node_modules/esutils": { - "version": "2.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/event-emitter": { - "version": "0.3.5", - "license": "MIT", - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "5.2.0", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execspawn": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "util-extend": "^1.0.1" - } - }, - "node_modules/express": { - "version": "4.18.2", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/array-flatten": { - "version": "1.1.1", - "license": "MIT" - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/ext": { - "version": "1.7.0", - "license": "ISC", - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "license": "ISC" - }, - "node_modules/extend": { - "version": "3.0.2", - "license": "MIT" - }, - "node_modules/external-editor": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-glob": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "license": "MIT" - }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.15.0", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/figures": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^5.0.0", - "is-unicode-supported": "^1.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/is-unicode-supported": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/find-up": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flame-gradient": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "sinusoidal-decimal": "^1.0.0" - } - }, - "node_modules/flatstr": { - "version": "1.0.12", - "license": "MIT" - }, - "node_modules/for-each": { - "version": "0.3.3", - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "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/forwarded": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fp-ts": { - "version": "2.16.0", - "license": "MIT" - }, - "node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/from2": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "node_modules/from2-string": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "from2": "^2.0.3" - } - }, - "node_modules/fs-extra": { - "version": "11.1.1", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/function-bind": { - "version": "1.1.1", - "license": "MIT" - }, - "node_modules/generate-function": { - "version": "2.3.1", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.2" - } - }, - "node_modules/generate-object-property": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "is-property": "^1.0.0" - } - }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "license": "Apache-2.0" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stream": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/global-dirs": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/globby": { - "version": "13.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/got": { - "version": "9.6.0", - "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "license": "ISC" - }, - "node_modules/har-schema": { - "version": "2.0.0", - "license": "ISC", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/har-validator/node_modules/ajv": { - "version": "6.12.6", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/har-validator/node_modules/json-schema-traverse": { - "version": "0.4.1", - "license": "MIT" - }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-async-hooks": { - "version": "1.0.0", - "license": "Apache-2.0" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC" - }, - "node_modules/has-yarn": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash-base/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hdr-histogram-js": { - "version": "3.0.0", - "license": "BSD", - "dependencies": { - "@assemblyscript/loader": "^0.19.21", - "base64-js": "^1.2.0", - "pako": "^1.0.3" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/hdr-histogram-percentiles-obj": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/hidden-markov-model-tf": { - "version": "4.0.0", - "license": "Apache-2.0", - "dependencies": { - "ml-kmeans": "^4.0.1", - "ndarray": "^1.0.18", - "ndarray-cholesky-factorization": "^1.0.2", - "ndarray-determinant": "^1.0.0", - "ndarray-inv": "^0.2.0", - "seedrandom": "^3.0.1", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "^3.13.0" - } - }, - "node_modules/hidden-markov-model-tf/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/hsl-to-rgb-for-reals": { - "version": "1.1.1", - "license": "ISC" - }, - "node_modules/htmlescape": { - "version": "1.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "license": "BSD-2-Clause" - }, - "node_modules/http-errors": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "license": "MIT" - }, - "node_modules/http-signature": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/human-signals": { - "version": "1.1.1", - "license": "Apache-2.0", - "engines": { - "node": ">=8.12.0" - } - }, - "node_modules/humanize-duration": { - "version": "3.28.0", - "license": "Unlicense" - }, - "node_modules/hyperid": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "uuid": "^8.3.2", - "uuid-parse": "^1.1.0" - } - }, - "node_modules/hyperid/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/hyperscript-attribute-to-property": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/hyperx": { - "version": "2.5.4", - "license": "BSD", - "dependencies": { - "hyperscript-attribute-to-property": "^1.0.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.2.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-by-default": { - "version": "2.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10 <11 || >=12 <13 || >=14" - } - }, - "node_modules/import-lazy": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "license": "ISC" - }, - "node_modules/inline-source-map": { - "version": "0.6.2", - "license": "MIT", - "dependencies": { - "source-map": "~0.5.3" - } - }, - "node_modules/inquirer": { - "version": "6.5.2", - "license": "MIT", - "dependencies": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "2.4.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/cli-cursor": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "restore-cursor": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/inquirer/node_modules/figures": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/has-flag": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/mimic-fn": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/onetime": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "mimic-fn": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/restore-cursor": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/string-width": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "5.2.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/insert-module-globals": { - "version": "7.2.1", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } - }, - "node_modules/insert-module-globals/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/insight": { - "version": "0.11.1", - "license": "BSD-2-Clause", - "dependencies": { - "async": "^2.6.2", - "chalk": "^4.1.1", - "conf": "^10.0.1", - "inquirer": "^6.3.1", - "lodash.debounce": "^4.0.8", - "os-name": "^4.0.1", - "request": "^2.88.0", - "tough-cookie": "^4.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=12.20" - } - }, - "node_modules/insight/node_modules/async": { - "version": "2.6.4", - "license": "MIT", - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/insight/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/internmap": { - "version": "1.0.1", - "license": "ISC" - }, - "node_modules/iota-array": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/irregular-plurals": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-any-array": { - "version": "2.0.1", - "license": "MIT" - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-attribute": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "license": "MIT" - }, - "node_modules/is-callable": { - "version": "1.2.7", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-ci": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-error": { - "version": "2.2.2", - "dev": true, - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-interactive": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-npm": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-obj": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-observable": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-promise": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/is-property": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/is-stream": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "license": "MIT" - }, - "node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/isstream": { - "version": "0.1.2", - "license": "MIT" - }, - "node_modules/jest-diff": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jest-diff/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/jest-diff/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-diff/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jest-get-type": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/js-string-escape": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "license": "MIT" - }, - "node_modules/json-buffer": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/json-schema": { - "version": "0.4.0", - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/json-schema-typed": { - "version": "7.0.3", - "license": "BSD-2-Clause" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "license": "ISC" - }, - "node_modules/json5": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonparse": { - "version": "1.3.1", - "engines": [ - "node >= 0.2.0" - ], - "license": "MIT" - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "license": "(MIT OR Apache-2.0)", - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/jsonstream2": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "jsonparse": "1.3.1", - "through2": "^3.0.1", - "type-component": "0.0.1" - }, - "bin": { - "jsonstream": "bin/jsonstream.js" - }, - "engines": { - "node": ">=5.10.0" - } - }, - "node_modules/jsonstream2/node_modules/through2": { - "version": "3.0.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" - } - }, - "node_modules/jsprim": { - "version": "1.4.2", - "license": "MIT", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/keyv": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/knub": { - "version": "32.0.0-next.16", - "license": "MIT", - "dependencies": { - "discord.js": "^14.11.0", - "knub-command-manager": "^9.1.0", - "ts-essentials": "^9", - "zod": "^3.19.1" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/knub-command-manager": { - "version": "9.1.0", - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - } - }, - "node_modules/knub-command-manager/node_modules/escape-string-regexp": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "node_modules/last-commit-log": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "dotgitconfig": "^1.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/latest-version": { - "version": "5.1.0", - "license": "MIT", - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/leven": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/levn": { - "version": "0.3.0", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/load-json-file": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "license": "MIT" - }, - "node_modules/lodash.chunk": { - "version": "4.2.0", - "license": "MIT" - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "license": "MIT" - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "license": "MIT" - }, - "node_modules/lodash.difference": { - "version": "4.5.0", - "license": "MIT" - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "license": "MIT" - }, - "node_modules/lodash.intersection": { - "version": "4.4.0", - "license": "MIT" - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "license": "MIT" - }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "license": "MIT" - }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "license": "MIT" - }, - "node_modules/lodash.snakecase": { - "version": "4.1.1", - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/long": { - "version": "4.0.0", - "license": "Apache-2.0" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lower-case": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/macos-release": { - "version": "2.5.1", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/magic-bytes.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.8.0.tgz", - "integrity": "sha512-lyWpfvNGVb5lu8YUAbER0+UMBTdR63w2mcSUlhhBTyVbxJvjgqwyAf3AZD6MprgK0uHuBoWXSDAMWLupX83o3Q==" - }, - "node_modules/magic-string": { - "version": "0.25.1", - "license": "MIT", - "dependencies": { - "sourcemap-codec": "^1.4.1" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/manage-path": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "p-defer": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/matcher": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/matcher/node_modules/escape-string-regexp": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/md5-hex": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "blueimp-md5": "^2.10.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mem": { - "version": "9.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sindresorhus/mem?sponsor=1" - } - }, - "node_modules/mem/node_modules/mimic-fn": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/merge-source-map": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "source-map": "^0.5.6" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/mime": { - "version": "1.6.0", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/minify-stream": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "concat-stream": "^2.0.0", - "convert-source-map": "^1.5.0", - "duplexify": "^4.1.1", - "from2-string": "^1.1.0", - "terser": "^4.7.0", - "xtend": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "license": "ISC" - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "license": "MIT" - }, - "node_modules/ml-array-max": { - "version": "1.2.4", - "license": "MIT", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-array-min": { - "version": "1.2.3", - "license": "MIT", - "dependencies": { - "is-any-array": "^2.0.0" - } - }, - "node_modules/ml-array-rescale": { - "version": "1.3.7", - "license": "MIT", - "dependencies": { - "is-any-array": "^2.0.0", - "ml-array-max": "^1.2.4", - "ml-array-min": "^1.2.3" - } - }, - "node_modules/ml-distance-euclidean": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/ml-kmeans": { - "version": "4.2.1", - "license": "MIT", - "dependencies": { - "ml-distance-euclidean": "^2.0.0", - "ml-matrix": "^5.1.1", - "ml-nearest-vector": "^2.0.1", - "ml-random": "^0.5.0" - } - }, - "node_modules/ml-matrix": { - "version": "5.3.0", - "license": "MIT", - "dependencies": { - "ml-array-max": "^1.1.1", - "ml-array-rescale": "^1.2.1" - } - }, - "node_modules/ml-nearest-vector": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "ml-distance-euclidean": "^2.0.0" - } - }, - "node_modules/ml-random": { - "version": "0.5.0", - "license": "MIT", - "dependencies": { - "ml-xsadd": "^2.0.0" - } - }, - "node_modules/ml-xsadd": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/module-deps": { - "version": "6.2.3", - "license": "MIT", - "dependencies": { - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/module-deps/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/moment": { - "version": "2.29.4", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/moment-timezone": { - "version": "0.5.43", - "license": "MIT", - "dependencies": { - "moment": "^2.29.4" - }, - "engines": { - "node": "*" - } - }, - "node_modules/morphdom": { - "version": "2.7.0", - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "node_modules/multer": { - "version": "1.4.5-lts.1", - "license": "MIT", - "dependencies": { - "append-field": "^1.0.0", - "busboy": "^1.0.0", - "concat-stream": "^1.5.2", - "mkdirp": "^0.5.4", - "object-assign": "^4.1.1", - "type-is": "^1.6.4", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/multer/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/multer/node_modules/mkdirp": { - "version": "0.5.6", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/multistream": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.5" - } - }, - "node_modules/mute-stream": { - "version": "0.0.7", - "license": "ISC" - }, - "node_modules/mutexify": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "queue-tick": "^1.0.0" - } - }, - "node_modules/mysql": { - "version": "2.18.1", - "license": "MIT", - "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mysql/node_modules/readable-stream": { - "version": "2.3.7", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/mysql/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/mysql/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nan": { - "version": "2.17.0", - "license": "MIT" - }, - "node_modules/nanoassert": { - "version": "1.1.0", - "license": "ISC" - }, - "node_modules/nanobench": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "browser-process-hrtime": "^0.1.2", - "chalk": "^1.1.3", - "mutexify": "^1.1.0", - "pretty-hrtime": "^1.0.2" - }, - "bin": { - "nanobench": "run.js", - "nanobench-compare": "compare.js" - } - }, - "node_modules/nanobench/node_modules/ansi-regex": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanobench/node_modules/ansi-styles": { - "version": "2.2.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanobench/node_modules/chalk": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanobench/node_modules/strip-ansi": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanobench/node_modules/supports-color": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/nanohtml": { - "version": "1.10.0", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.8.2", - "camel-case": "^3.0.0", - "convert-source-map": "^1.5.1", - "estree-is-member-expression": "^1.0.0", - "hyperx": "^2.5.0", - "is-boolean-attribute": "0.0.1", - "nanoassert": "^1.1.0", - "nanobench": "^2.1.0", - "normalize-html-whitespace": "^0.2.0", - "through2": "^2.0.3", - "transform-ast": "^2.4.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.6", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/ndarray": { - "version": "1.0.19", - "license": "MIT", - "dependencies": { - "iota-array": "^1.0.0", - "is-buffer": "^1.0.2" - } - }, - "node_modules/ndarray-blas-level1": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/ndarray-cholesky-factorization": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "ndarray": "^1.0.16", - "ndarray-blas-level1": "^1.0.2", - "ndarray-scratch": "^1.1.1" - } - }, - "node_modules/ndarray-crout-decomposition": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/ndarray-determinant": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "ndarray-crout-decomposition": "^1.1.0", - "ndarray-diagonal": "^1.0.0", - "ndarray-ops": "^1.2.2", - "ndarray-scratch": "^1.1.1" - } - }, - "node_modules/ndarray-diagonal": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "ndarray": "^1.0.15" - } - }, - "node_modules/ndarray-inv": { - "version": "0.2.0", - "license": "MIT", - "dependencies": { - "ndarray": "^1.0.18", - "ndarray-scratch": "^1.2.0" - } - }, - "node_modules/ndarray-ops": { - "version": "1.2.2", - "license": "MIT", - "dependencies": { - "cwise-compiler": "^1.0.0" - } - }, - "node_modules/ndarray-scratch": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "ndarray": "^1.0.14", - "ndarray-ops": "^1.2.1", - "typedarray-pool": "^1.0.2" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/next-tick": { - "version": "1.1.0", - "license": "ISC" - }, - "node_modules/no-case": { - "version": "2.3.2", - "license": "MIT", - "dependencies": { - "lower-case": "^1.1.1" - } - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "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.6.0", - "license": "MIT", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/nofilter": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.19" - } - }, - "node_modules/normalize-html-whitespace": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "4.5.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oauth": { - "version": "0.9.15", - "license": "MIT" - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "license": "Apache-2.0", - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/observable-fns": { - "version": "0.6.1", - "license": "MIT" - }, - "node_modules/on-finished": { - "version": "2.4.1", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-net-listen": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">=9.4.0 || ^8.9.4" - } - }, - "node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/onetime/node_modules/mimic-fn": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/open": { - "version": "7.4.2", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/opn": { - "version": "5.5.0", - "license": "MIT", - "dependencies": { - "is-wsl": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opn/node_modules/is-wsl": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/optionator": { - "version": "0.8.3", - "license": "MIT", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ora": { - "version": "5.4.1", - "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/os-browserify": { - "version": "0.3.0", - "license": "MIT" - }, - "node_modules/os-name": { - "version": "4.0.1", - "license": "MIT", - "dependencies": { - "macos-release": "^2.5.0", - "windows-release": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-defer": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-event": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "p-timeout": "^5.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-map": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-timeout": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json": { - "version": "6.5.0", - "license": "MIT", - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, - "node_modules/parents": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/parse-color": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "color-convert": "~0.5.0" - } - }, - "node_modules/parse-ms": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse5": { - "version": "5.1.1", - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "license": "MIT" - }, - "node_modules/parseurl": { - "version": "1.3.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/passport": { - "version": "0.6.0", - "license": "MIT", - "dependencies": { - "passport-strategy": "1.x.x", - "pause": "0.0.1", - "utils-merge": "^1.0.1" - }, - "engines": { - "node": ">= 0.4.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jaredhanson" - } - }, - "node_modules/passport-custom": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "passport-strategy": "1.x.x" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/passport-oauth2": { - "version": "1.7.0", - "license": "MIT", - "dependencies": { - "base64url": "3.x.x", - "oauth": "0.9.x", - "passport-strategy": "1.x.x", - "uid2": "0.0.x", - "utils-merge": "1.x.x" - }, - "engines": { - "node": ">= 0.4.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/jaredhanson" - } - }, - "node_modules/passport-strategy": { - "version": "1.0.0", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/path-exists": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "license": "MIT" - }, - "node_modules/path-platform": { - "version": "0.11.15", - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pause": { - "version": "0.0.1" - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "license": "MIT", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-conf": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^6.0.0", - "load-json-file": "^7.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/find-up": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/locate-path": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-limit": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/p-locate": { - "version": "6.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/pkg-up": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/plur": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "irregular-plurals": "^3.3.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/postcss": { - "version": "8.4.24", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-import": { - "version": "13.0.0", - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "license": "MIT" - }, - "node_modules/prelude-ls": { - "version": "1.1.2", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prepend-http": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/pretty-bytes": { - "version": "5.6.0", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pretty-format": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pretty-format/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/pretty-format/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/pretty-hrtime": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pretty-ms": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-ms": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/process": { - "version": "0.11.10", - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "node_modules/progress": { - "version": "2.0.3", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/protocol-buffers": { - "version": "4.2.0", - "license": "MIT", - "dependencies": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.2.0", - "protocol-buffers-encodings": "^1.1.0", - "protocol-buffers-schema": "^3.1.1", - "signed-varint": "^2.0.0", - "varint": "^5.0.0" - }, - "bin": { - "protocol-buffers": "bin.js" - } - }, - "node_modules/protocol-buffers-encodings": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "b4a": "^1.6.0", - "signed-varint": "^2.0.1", - "varint": "5.0.0" - } - }, - "node_modules/protocol-buffers-encodings/node_modules/varint": { - "version": "5.0.0", - "license": "MIT" - }, - "node_modules/protocol-buffers-schema": { - "version": "3.6.0", - "license": "MIT" - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "license": "MIT" - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/pumpify": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "duplexify": "^4.1.1", - "inherits": "^2.0.3", - "pump": "^3.0.0" - } - }, - "node_modules/punycode": { - "version": "1.4.1", - "license": "MIT" - }, - "node_modules/pupa": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "license": "MIT" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/queue-tick": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/quote-stream": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "buffer-equal": "0.0.1", - "minimist": "^1.1.3", - "through2": "^2.0.0" - }, - "bin": { - "quote-stream": "bin/cmd.js" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "dev": true, - "license": "MIT" - }, - "node_modules/read-cache": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "pify": "^2.3.0" - } - }, - "node_modules/read-cache/node_modules/pify": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-only-stream": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect-metadata": { - "version": "0.1.13", - "license": "Apache-2.0" - }, - "node_modules/regenerator-runtime": { - "version": "0.13.11", - "license": "MIT" - }, - "node_modules/regexp-tree": { - "version": "0.1.27", - "license": "MIT", - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, - "node_modules/regexp-worker": { - "version": "1.1.1", - "license": "MIT", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/registry-auth-token": { - "version": "4.2.2", - "license": "MIT", - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "license": "MIT", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reinterval": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/request": { - "version": "2.88.2", - "license": "Apache-2.0", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/request/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request/node_modules/tough-cookie": { - "version": "2.5.0", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/requires-port": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/resolve": { - "version": "1.22.2", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/responselike": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/retimer": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "2.7.1", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "6.6.7", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "license": "0BSD" - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-regex": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "regexp-tree": "~0.1.1" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "license": "MIT" - }, - "node_modules/scope-analyzer": { - "version": "2.1.2", - "license": "Apache-2.0", - "dependencies": { - "array-from": "^2.1.1", - "dash-ast": "^2.0.1", - "es6-map": "^0.1.5", - "es6-set": "^0.1.5", - "es6-symbol": "^3.1.1", - "estree-is-function": "^1.0.0", - "get-assigned-identifiers": "^1.1.0" - } - }, - "node_modules/seedrandom": { - "version": "3.0.5", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.5.3", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-diff": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.13.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "license": "MIT", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "license": "ISC" - }, - "node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shallow-copy": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/shasum-object": { - "version": "1.0.0", - "license": "Apache-2.0", - "dependencies": { - "fast-safe-stringify": "^2.0.7" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.8.1", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/showdown": { - "version": "1.9.1", - "license": "BSD-3-Clause", - "dependencies": { - "yargs": "^14.2" - }, - "bin": { - "showdown": "bin/showdown.js" - } - }, - "node_modules/showdown/node_modules/ansi-styles": { - "version": "3.2.1", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/showdown/node_modules/camelcase": { - "version": "5.3.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/showdown/node_modules/cliui": { - "version": "5.0.0", - "license": "ISC", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/showdown/node_modules/color-convert": { - "version": "1.9.3", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/showdown/node_modules/color-name": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/showdown/node_modules/emoji-regex": { - "version": "7.0.3", - "license": "MIT" - }, - "node_modules/showdown/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/showdown/node_modules/string-width": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/showdown/node_modules/strip-ansi": { - "version": "5.2.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/showdown/node_modules/wrap-ansi": { - "version": "5.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/showdown/node_modules/y18n": { - "version": "4.0.3", - "license": "ISC" - }, - "node_modules/showdown/node_modules/yargs": { - "version": "14.2.3", - "license": "MIT", - "dependencies": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.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": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "node_modules/showdown/node_modules/yargs-parser": { - "version": "15.0.3", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "node_modules/signed-varint": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "varint": "~5.0.0" - } - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/single-line-log": { - "version": "1.1.2", - "license": "MIT", - "dependencies": { - "string-width": "^1.0.1" - } - }, - "node_modules/single-line-log/node_modules/ansi-regex": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/single-line-log/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/single-line-log/node_modules/string-width": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/single-line-log/node_modules/strip-ansi": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sinusoidal-decimal": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/slash": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/sonic-boom": { - "version": "1.4.1", - "license": "MIT", - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "license": "MIT" - }, - "node_modules/split2": { - "version": "4.2.0", - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "node_modules/sqlstring": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/sshpk": { - "version": "1.17.0", - "license": "MIT", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/static-eval": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "escodegen": "^1.11.1" - } - }, - "node_modules/static-module": { - "version": "3.0.4", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.3.0", - "concat-stream": "~1.6.0", - "convert-source-map": "^1.5.1", - "duplexer2": "~0.1.4", - "escodegen": "^1.11.1", - "has": "^1.0.1", - "magic-string": "0.25.1", - "merge-source-map": "1.0.4", - "object-inspect": "^1.6.0", - "readable-stream": "~2.3.3", - "scope-analyzer": "^2.0.1", - "shallow-copy": "~0.0.1", - "static-eval": "^2.0.5", - "through2": "~2.0.3" - } - }, - "node_modules/static-module/node_modules/concat-stream": { - "version": "1.6.2", - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/stream-browserify/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-collector": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "once": "^1.3.1" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-http": { - "version": "3.2.0", - "license": "MIT", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/stream-splicer": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-template": { - "version": "0.0.10", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "readable-stream": "^2.3.6" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/streaming-json-stringify": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "json-stringify-safe": "5", - "readable-stream": "2" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-combining-marks": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/subarg": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "minimist": "^1.1.0" - } - }, - "node_modules/summary": { - "version": "2.1.0", - "license": "MIT" - }, - "node_modules/supertap": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "indent-string": "^5.0.0", - "js-yaml": "^3.14.1", - "serialize-error": "^7.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/supertap/node_modules/ansi-regex": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/supertap/node_modules/strip-ansi": { - "version": "7.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/syntax-error": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.2.0" - } - }, - "node_modules/tachyons": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/temp-dir": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.16" - } - }, - "node_modules/terser": { - "version": "4.8.1", - "license": "BSD-2-Clause", - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/terser/node_modules/source-map": { - "version": "0.6.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/threads": { - "version": "1.7.0", - "license": "MIT", - "dependencies": { - "callsites": "^3.1.0", - "debug": "^4.2.0", - "is-observable": "^2.1.0", - "observable-fns": "^0.6.1" - }, - "funding": { - "url": "https://github.com/andywer/threads.js?sponsor=1" - }, - "optionalDependencies": { - "tiny-worker": ">= 2" - } - }, - "node_modules/through": { - "version": "2.3.8", - "license": "MIT" - }, - "node_modules/through2": { - "version": "2.0.5", - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/time-zone": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/timestring": { - "version": "6.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/tiny-worker": { - "version": "2.3.0", - "license": "BSD-3-Clause", - "optional": true, - "dependencies": { - "esm": "^3.2.25" - } - }, - "node_modules/tlds": { - "version": "1.240.0", - "license": "MIT", - "bin": { - "tlds": "bin.js" - } - }, - "node_modules/tmp": { - "version": "0.0.33", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toggle-selection": { - "version": "1.0.6", - "license": "MIT" - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" - }, - "node_modules/transform-ast": { - "version": "2.4.4", - "license": "MIT", - "dependencies": { - "acorn-node": "^1.3.0", - "convert-source-map": "^1.5.1", - "dash-ast": "^1.0.0", - "is-buffer": "^2.0.0", - "magic-string": "^0.23.2", - "merge-source-map": "1.0.4", - "nanobench": "^2.1.1" - } - }, - "node_modules/transform-ast/node_modules/dash-ast": { - "version": "1.0.0", - "license": "Apache-2.0" - }, - "node_modules/transform-ast/node_modules/is-buffer": { - "version": "2.0.5", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/transform-ast/node_modules/magic-string": { - "version": "0.23.2", - "license": "MIT", - "dependencies": { - "sourcemap-codec": "^1.4.1" - } - }, - "node_modules/ts-essentials": { - "version": "9.3.2", - "license": "MIT", - "peerDependencies": { - "typescript": ">=4.1.0" - } - }, - "node_modules/ts-mixer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", - "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==" - }, - "node_modules/tsconfig-paths": { - "version": "3.14.2", - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/ttest": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "distributions": "^2.1.0", - "summary": "^2.0.0" - } - }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/turbo-json-parse": { - "version": "2.3.0", - "license": "MIT", - "dependencies": { - "generate-function": "^2.3.1" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "license": "Unlicense" - }, - "node_modules/twemoji": { - "version": "12.1.6", - "license": [ - "MIT", - "CC-BY-4.0" - ], - "dependencies": { - "fs-extra": "^8.0.1", - "jsonfile": "^5.0.0", - "twemoji-parser": "12.1.3", - "universalify": "^0.1.2" - } - }, - "node_modules/twemoji-parser": { - "version": "12.1.3", - "license": "MIT" - }, - "node_modules/twemoji/node_modules/fs-extra": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/twemoji/node_modules/fs-extra/node_modules/jsonfile": { - "version": "4.0.0", - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/twemoji/node_modules/jsonfile": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "universalify": "^0.1.2" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/twemoji/node_modules/universalify": { - "version": "0.1.2", - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/type": { - "version": "1.2.0", - "license": "ISC" - }, - "node_modules/type-check": { - "version": "0.3.2", - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-component": { - "version": "0.0.1" - }, - "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/type-is": { - "version": "1.6.18", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "license": "MIT" - }, - "node_modules/typedarray-pool": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "bit-twiddle": "^1.0.0", - "dup": "^1.0.0" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typeorm": { - "version": "0.3.17", - "license": "MIT", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "date-fns": "^2.29.3", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^8.1.0", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">= 12.9.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.2.0", - "mssql": "^9.1.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^5.1.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } - } - }, - "node_modules/typeorm/node_modules/brace-expansion": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/typeorm/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/typeorm/node_modules/cliui": { - "version": "8.0.1", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/typeorm/node_modules/dotenv": { - "version": "16.3.1", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" - } - }, - "node_modules/typeorm/node_modules/glob": { - "version": "8.1.0", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typeorm/node_modules/minimatch": { - "version": "5.1.6", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typeorm/node_modules/yargs": { - "version": "17.7.2", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/typeorm/node_modules/yargs-parser": { - "version": "21.1.1", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/typescript": { - "version": "5.1.6", - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uid2": { - "version": "0.0.4", - "license": "MIT" - }, - "node_modules/umd": { - "version": "3.0.3", - "license": "MIT", - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/undeclared-identifiers": { - "version": "1.1.3", - "license": "Apache-2.0", - "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "bin": { - "undeclared-identifiers": "bin.js" - } - }, - "node_modules/undeclared-identifiers/node_modules/dash-ast": { - "version": "1.0.0", - "license": "Apache-2.0" - }, - "node_modules/undici": { - "version": "5.27.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", - "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "license": "MIT" - }, - "node_modules/uniq": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/unique-string": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-notifier": { - "version": "5.1.0", - "license": "BSD-2-Clause", - "dependencies": { - "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.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "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": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/upper-case": { - "version": "1.1.3", - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.3.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/url": { - "version": "0.11.1", - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1", - "qs": "^6.11.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" - } - }, - "node_modules/util": { - "version": "0.12.5", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/util-extend": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "9.0.0", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/uuid-parse": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/varint": { - "version": "5.0.2", - "license": "MIT" - }, - "node_modules/vary": { - "version": "1.1.2", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "license": "MIT" - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webfontloader": { - "version": "1.6.28", - "license": "Apache-2.0" - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" - }, - "node_modules/well-known-symbols": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=6" - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "license": "ISC" - }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/widest-line": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/windows-release": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "execa": "^4.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "node_modules/yaml-js": { - "version": "0.2.3", - "license": "WTFPL" - }, - "node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yawn-yaml": { - "version": "1.5.0", - "resolved": "git+ssh://git@github.com/dragory/yawn-yaml.git#77ab3870ca53c4693002c4a41336e7476e7934ed", - "license": "MIT", - "dependencies": { - "js-yaml": "^3.4.2", - "lodash": "^4.17.11", - "yaml-js": "^0.2.3" - } - }, - "node_modules/yocto-queue": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zlib-sync": { - "version": "0.1.8", - "license": "MIT", - "dependencies": { - "nan": "^2.17.0" - } - }, - "node_modules/zod": { - "version": "3.22.4", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.22.3", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.22.4" - } - } - } -} diff --git a/backend/package.json b/backend/package.json index db8ef873c..18ab6ab60 100644 --- a/backend/package.json +++ b/backend/package.json @@ -6,26 +6,26 @@ "scripts": { "watch": "cross-env NODE_ENV=development tsc-watch --onSuccess \"node start-dev.js\"", "watch-yaml-parse-test": "cross-env NODE_ENV=development tsc-watch --onSuccess \"node dist/backend/src/yamlParseTest.js\"", - "build": "rimraf dist && tsc", - "start-bot-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js", - "start-bot-dev-debug": "NODE_ENV=development DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js", - "start-bot-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/index.js", - "start-bot-prod-debug": "NODE_ENV=production DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js", + "build": "tsc --build", + "start-bot-dev": "cross-env NODE_ENV=development node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js", + "start-bot-dev-debug": "NODE_ENV=development DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js", + "start-bot-prod": "cross-env NODE_ENV=production node --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js", + "start-bot-prod-debug": "NODE_ENV=production DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js", "watch-bot": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-bot-dev\"", - "start-api-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js", - "start-api-dev-debug": "NODE_ENV=development DEBUG=true clinic heapprofiler --collect-only --dest .clinic-api -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js", - "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", - "start-api-prod-debug": "NODE_ENV=production DEBUG=true clinic heapprofiler --collect-only --dest .clinic-api -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js", + "start-api-dev": "cross-env NODE_ENV=development node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js", + "start-api-dev-debug": "NODE_ENV=development DEBUG=true clinic heapprofiler --collect-only --dest .clinic-api -- node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js", + "start-api-prod": "cross-env NODE_ENV=production node --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js", + "start-api-prod-debug": "NODE_ENV=production DEBUG=true clinic heapprofiler --collect-only --dest .clinic-api -- node --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", + "typeorm": "node ./node_modules/typeorm/cli.js", "migrate": "npm run typeorm -- migration:run -d dist/backend/src/data/dataSource.js", "migrate-prod": "cross-env NODE_ENV=production npm run migrate", "migrate-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", "migrate-rollback": "npm run typeorm -- migration:revert -d dist/backend/src/data/dataSource.js", "migrate-rollback-prod": "cross-env NODE_ENV=production npm run migrate", "migrate-rollback-dev": "cross-env NODE_ENV=development npm run build && npm run migrate", - "validate-active-configs": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps dist/backend/src/validateActiveConfigs.js > ../config-errors.txt", - "export-config-json-schema": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps dist/backend/src/exportSchemas.js > ../config-schema.json", + "validate-active-configs": "cross-env NODE_ENV=development node --enable-source-maps dist/backend/src/validateActiveConfigs.js > ../config-errors.txt", + "export-config-json-schema": "cross-env NODE_ENV=development node --enable-source-maps dist/backend/src/exportSchemas.js > ../config-schema.json", "test": "npm run build && npm run run-tests", "run-tests": "ava", "test-watch": "tsc-watch --onSuccess \"npx ava\"" @@ -45,7 +45,7 @@ "fp-ts": "^2.0.1", "humanize-duration": "^3.15.0", "js-yaml": "^3.13.1", - "knub": "^32.0.0-next.16", + "knub": "^32.0.0-next.17", "knub-command-manager": "^9.1.0", "last-commit-log": "^2.1.0", "lodash.chunk": "^4.2.0", diff --git a/backend/src/api/guilds.ts b/backend/src/api/guilds.ts index 4fef738f3..29192c40f 100644 --- a/backend/src/api/guilds.ts +++ b/backend/src/api/guilds.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import express, { Request, Response } from "express"; import { YAMLException } from "js-yaml"; import moment from "moment-timezone"; diff --git a/backend/src/api/guilds/importExport.ts b/backend/src/api/guilds/importExport.ts index a7bb6e2e6..9a4a8710d 100644 --- a/backend/src/api/guilds/importExport.ts +++ b/backend/src/api/guilds/importExport.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import express, { Request, Response } from "express"; import moment from "moment-timezone"; import { z } from "zod"; diff --git a/backend/src/api/guilds/misc.ts b/backend/src/api/guilds/misc.ts index b512b62cd..388352275 100644 --- a/backend/src/api/guilds/misc.ts +++ b/backend/src/api/guilds/misc.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import express, { Request, Response } from "express"; import { YAMLException } from "js-yaml"; import moment from "moment-timezone"; diff --git a/backend/src/api/permissions.ts b/backend/src/api/permissions.ts index 9552aaf41..74675398c 100644 --- a/backend/src/api/permissions.ts +++ b/backend/src/api/permissions.ts @@ -1,4 +1,4 @@ -import { ApiPermissions, hasPermission, permissionArrToSet } from "@shared/apiPermissions"; +import { ApiPermissions, hasPermission, permissionArrToSet } from "@zeppelinbot/shared"; import { Request, Response } from "express"; import { ApiPermissionAssignments } from "../data/ApiPermissionAssignments"; import { isStaff } from "../staff"; diff --git a/backend/src/data/ApiPermissionAssignments.ts b/backend/src/data/ApiPermissionAssignments.ts index b3bb63f55..b52fe01f8 100644 --- a/backend/src/data/ApiPermissionAssignments.ts +++ b/backend/src/data/ApiPermissionAssignments.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import { Repository } from "typeorm"; import { ApiAuditLog } from "./ApiAuditLog"; import { BaseRepository } from "./BaseRepository"; diff --git a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts index d12735779..185f9defa 100644 --- a/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts +++ b/backend/src/plugins/AutoDelete/AutoDeletePlugin.ts @@ -24,7 +24,7 @@ export const AutoDeletePlugin = zeppelinGuildPlugin()({ description: "Allows Zeppelin to auto-delete messages from a channel after a delay", configurationGuide: "Maximum deletion delay is currently 5 minutes", configSchema: zAutoDeleteConfig, - }, + } as any, dependencies: () => [TimeAndDatePlugin, LogsPlugin], configParser: (input) => zAutoDeleteConfig.parse(input), diff --git a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts index 0cb87f952..ff00fd8d5 100644 --- a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts +++ b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; import { renderUsername } from "../../../utils"; diff --git a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts index cbf53bf4f..584ed13f0 100644 --- a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts +++ b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import moment from "moment-timezone"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; diff --git a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts index ce2c3b0c6..08305d22b 100644 --- a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts +++ b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@shared/apiPermissions"; +import { ApiPermissions } from "@zeppelinbot/shared"; import moment from "moment-timezone"; import { commandTypeHelpers as ct } from "../../../commandTypes"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 2000565b3..b012223aa 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,13 +1,16 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "moduleResolution": "NodeNext", "module": "NodeNext", - "baseUrl": ".", - "outDir": "./dist", - "paths": { - "@shared/*": ["../shared/src/*"] - } + "baseUrl": "./src", + "rootDir": "./src", + "outDir": "./dist" }, - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts", "src/**/*.json"], + "references": [ + { + "path": "../shared/tsconfig.json" + } + ] } diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json deleted file mode 100644 index cf8fc8d33..000000000 --- a/dashboard/package-lock.json +++ /dev/null @@ -1,11819 +0,0 @@ -{ - "name": "@zeppelin/dashboard", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@zeppelin/dashboard", - "version": "1.0.0", - "dependencies": { - "@highlightjs/vue-plugin": "^1.0.2", - "highlight.js": "^11.8.0", - "humanize-duration": "^3.27.0", - "js-yaml": "^4.1.0", - "marked": "^5.1.0", - "modern-css-reset": "^1.4.0", - "moment": "^2.29.4", - "vue": "^2.7.14", - "vue-material-design-icons": "^4.1.0", - "vue-router": "^3.6.5", - "vue2-ace-editor": "^0.0.15", - "vuex": "^3.6.2" - }, - "devDependencies": { - "@babel/core": "^7.22.5", - "@babel/preset-env": "^7.22.5", - "@babel/preset-typescript": "^7.22.5", - "babel-loader": "^9.1.2", - "cross-env": "^7.0.3", - "css-loader": "^6.8.1", - "cssnano": "^4.1.10", - "dotenv-webpack": "^8.0.1", - "file-loader": "^6.2.0", - "html-loader": "^4.2.0", - "html-webpack-plugin": "^5.5.3", - "postcss-import": "^15.1.0", - "postcss-loader": "^7.3.3", - "postcss-nesting": "^11.3.0", - "postcss-preset-env": "^8.5.1", - "source-map-loader": "^4.0.1", - "tailwindcss": "^1.9.6", - "ts-loader": "^9.4.3", - "vue-loader": "^15.10.1", - "vue-style-loader": "^4.1.3", - "vue-template-compiler": "^2.7.14", - "webpack": "^5.88.0", - "webpack-cli": "^5.1.4", - "webpack-dev-server": "^4.15.1", - "webpack-merge": "^5.9.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.5.tgz", - "integrity": "sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.5.tgz", - "integrity": "sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helpers": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.5.tgz", - "integrity": "sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.5.tgz", - "integrity": "sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz", - "integrity": "sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz", - "integrity": "sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.5.tgz", - "integrity": "sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "regexpu-core": "^5.3.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz", - "integrity": "sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", - "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", - "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", - "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-wrap-function": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", - "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz", - "integrity": "sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", - "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.5.tgz", - "integrity": "sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.5.tgz", - "integrity": "sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", - "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", - "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", - "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", - "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-unicode-sets-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", - "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", - "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz", - "integrity": "sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.5", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", - "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", - "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", - "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", - "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", - "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz", - "integrity": "sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", - "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", - "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", - "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", - "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", - "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", - "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", - "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", - "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", - "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", - "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", - "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", - "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", - "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", - "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", - "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", - "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", - "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", - "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", - "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", - "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", - "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", - "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", - "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", - "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz", - "integrity": "sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", - "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", - "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", - "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", - "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", - "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "regenerator-transform": "^0.15.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", - "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", - "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", - "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", - "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", - "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", - "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.5.tgz", - "integrity": "sha512-SMubA9S7Cb5sGSFFUlqxyClTA9zWJ8qGQrppNUm05LtFuN1ELRFNndkix4zUJrC9F+YivWwa1dHMSyo0e0N9dA==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/plugin-syntax-typescript": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", - "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", - "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", - "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", - "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.5.tgz", - "integrity": "sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", - "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.22.5", - "@babel/plugin-syntax-import-attributes": "^7.22.5", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.22.5", - "@babel/plugin-transform-async-generator-functions": "^7.22.5", - "@babel/plugin-transform-async-to-generator": "^7.22.5", - "@babel/plugin-transform-block-scoped-functions": "^7.22.5", - "@babel/plugin-transform-block-scoping": "^7.22.5", - "@babel/plugin-transform-class-properties": "^7.22.5", - "@babel/plugin-transform-class-static-block": "^7.22.5", - "@babel/plugin-transform-classes": "^7.22.5", - "@babel/plugin-transform-computed-properties": "^7.22.5", - "@babel/plugin-transform-destructuring": "^7.22.5", - "@babel/plugin-transform-dotall-regex": "^7.22.5", - "@babel/plugin-transform-duplicate-keys": "^7.22.5", - "@babel/plugin-transform-dynamic-import": "^7.22.5", - "@babel/plugin-transform-exponentiation-operator": "^7.22.5", - "@babel/plugin-transform-export-namespace-from": "^7.22.5", - "@babel/plugin-transform-for-of": "^7.22.5", - "@babel/plugin-transform-function-name": "^7.22.5", - "@babel/plugin-transform-json-strings": "^7.22.5", - "@babel/plugin-transform-literals": "^7.22.5", - "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", - "@babel/plugin-transform-member-expression-literals": "^7.22.5", - "@babel/plugin-transform-modules-amd": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.5", - "@babel/plugin-transform-modules-systemjs": "^7.22.5", - "@babel/plugin-transform-modules-umd": "^7.22.5", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.22.5", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", - "@babel/plugin-transform-numeric-separator": "^7.22.5", - "@babel/plugin-transform-object-rest-spread": "^7.22.5", - "@babel/plugin-transform-object-super": "^7.22.5", - "@babel/plugin-transform-optional-catch-binding": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.5", - "@babel/plugin-transform-parameters": "^7.22.5", - "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.5", - "@babel/plugin-transform-property-literals": "^7.22.5", - "@babel/plugin-transform-regenerator": "^7.22.5", - "@babel/plugin-transform-reserved-words": "^7.22.5", - "@babel/plugin-transform-shorthand-properties": "^7.22.5", - "@babel/plugin-transform-spread": "^7.22.5", - "@babel/plugin-transform-sticky-regex": "^7.22.5", - "@babel/plugin-transform-template-literals": "^7.22.5", - "@babel/plugin-transform-typeof-symbol": "^7.22.5", - "@babel/plugin-transform-unicode-escapes": "^7.22.5", - "@babel/plugin-transform-unicode-property-regex": "^7.22.5", - "@babel/plugin-transform-unicode-regex": "^7.22.5", - "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.3", - "babel-plugin-polyfill-corejs3": "^0.8.1", - "babel-plugin-polyfill-regenerator": "^0.5.0", - "core-js-compat": "^3.30.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.22.5.tgz", - "integrity": "sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.5", - "@babel/plugin-syntax-jsx": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.5", - "@babel/plugin-transform-typescript": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/regjsgen": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", - "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", - "dev": true - }, - "node_modules/@babel/runtime": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz", - "integrity": "sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.5.tgz", - "integrity": "sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@csstools/cascade-layer-name-parser": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.2.tgz", - "integrity": "sha512-xm7Mgwej/wBfLoK0K5LfntmPJzoULayl1XZY9JYgQgT29JiqNw++sLnx95u5y9zCihblzkyaRYJrsRMhIBzRdg==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - } - }, - "node_modules/@csstools/color-helpers": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-2.1.0.tgz", - "integrity": "sha512-OWkqBa7PDzZuJ3Ha7T5bxdSVfSCfTq6K1mbAhbO1MD+GSULGjrp45i5RudyJOedstSarN/3mdwu9upJE7gDXfw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - } - }, - "node_modules/@csstools/css-calc": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-1.1.1.tgz", - "integrity": "sha512-Nh+iLCtjlooTzuR0lpmB8I6hPX/VupcGQ3Z1U2+wgJJ4fa8+cWkub+lCsbZcYPzBGsZLEL8fQAg+Na5dwEFJxg==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - } - }, - "node_modules/@csstools/css-color-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-1.2.1.tgz", - "integrity": "sha512-NcmaoJIEycIH0HnzZRrwRcBljPh1AWcXl4CNL8MAD3+Zy8XyIpdTtTMaY/phnLHHIYkyjaoSTdxAecss6+PCcg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/color-helpers": "^2.1.0", - "@csstools/css-calc": "^1.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - } - }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.2.0.tgz", - "integrity": "sha512-9BoQ/jSrPq4vv3b9jjLW+PNNv56KlDH5JMx5yASSNrCtvq70FCNZUjXRvbCeR9hYj9ZyhURtqpU/RFIgg6kiOw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^2.1.1" - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.1.1.tgz", - "integrity": "sha512-GbrTj2Z8MCTUv+52GE0RbFGM527xuXZ0Xa5g0Z+YN573uveS4G0qi6WNOMyz3yrFM/jaILTTwJ0+umx81EzqfA==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - }, - "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.1.tgz", - "integrity": "sha512-pUjtFbaKbiFNjJo8pprrIaXLvQvWIlwPiFnRI4sEnc4F0NIGTOsw8kaJSR3CmZAKEvV8QYckovgAnWQC0bgLLQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.2.0", - "@csstools/css-tokenizer": "^2.1.1" - } - }, - "node_modules/@csstools/postcss-cascade-layers": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-3.0.1.tgz", - "integrity": "sha512-dD8W98dOYNOH/yX4V4HXOhfCOnvVAg8TtsL+qCGNoKXuq5z2C/d026wGWgySgC8cajXXo/wNezS31Glj5GcqrA==", - "dev": true, - "dependencies": { - "@csstools/selector-specificity": "^2.0.2", - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-color-function": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-2.2.3.tgz", - "integrity": "sha512-b1ptNkr1UWP96EEHqKBWWaV5m/0hgYGctgA/RVZhONeP1L3T/8hwoqDm9bB23yVCfOgE9U93KI9j06+pEkJTvw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-color-mix-function": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-color-mix-function/-/postcss-color-mix-function-1.0.3.tgz", - "integrity": "sha512-QGXjGugTluqFZWzVf+S3wCiRiI0ukXlYqCi7OnpDotP/zaVTyl/aqZujLFzTOXy24BoWnu89frGMc79ohY5eog==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-font-format-keywords": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-font-format-keywords/-/postcss-font-format-keywords-2.0.2.tgz", - "integrity": "sha512-iKYZlIs6JsNT7NKyRjyIyezTCHLh4L4BBB3F5Nx7Dc4Z/QmBgX+YJFuUSar8IM6KclGiAUFGomXFdYxAwJydlA==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-gradients-interpolation-method": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@csstools/postcss-gradients-interpolation-method/-/postcss-gradients-interpolation-method-3.0.6.tgz", - "integrity": "sha512-rBOBTat/YMmB0G8VHwKqDEx+RZ4KCU9j42K8LwS0IpZnyThalZZF7BCSsZ6TFlZhcRZKlZy3LLFI2pLqjNVGGA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-hwb-function": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-2.2.2.tgz", - "integrity": "sha512-W5Y5oaJ382HSlbdGfPf60d7dAK6Hqf10+Be1yZbd/TNNrQ/3dDdV1c07YwOXPQ3PZ6dvFMhxbIbn8EC3ki3nEg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-ic-unit": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-2.0.4.tgz", - "integrity": "sha512-9W2ZbV7whWnr1Gt4qYgxMWzbevZMOvclUczT5vk4yR6vS53W/njiiUhtm/jh/BKYwQ1W3PECZjgAd2dH4ebJig==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^2.3.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-is-pseudo-class": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-3.2.1.tgz", - "integrity": "sha512-AtANdV34kJl04Al62is3eQRk/BfOfyAvEmRJvbt+nx5REqImLC+2XhuE6skgkcPli1l8ONS67wS+l1sBzySc3Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/selector-specificity": "^2.0.0", - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-logical-float-and-clear": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-float-and-clear/-/postcss-logical-float-and-clear-1.0.1.tgz", - "integrity": "sha512-eO9z2sMLddvlfFEW5Fxbjyd03zaO7cJafDurK4rCqyRt9P7aaWwha0LcSzoROlcZrw1NBV2JAp2vMKfPMQO1xw==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-logical-resize": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-resize/-/postcss-logical-resize-1.0.1.tgz", - "integrity": "sha512-x1ge74eCSvpBkDDWppl+7FuD2dL68WP+wwP2qvdUcKY17vJksz+XoE1ZRV38uJgS6FNUwC0AxrPW5gy3MxsDHQ==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-logical-viewport-units": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-logical-viewport-units/-/postcss-logical-viewport-units-1.0.3.tgz", - "integrity": "sha512-6zqcyRg9HSqIHIPMYdt6THWhRmE5/tyHKJQLysn2TeDf/ftq7Em9qwMTx98t2C/7UxIsYS8lOiHHxAVjWn2WUg==", - "dev": true, - "dependencies": { - "@csstools/css-tokenizer": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-media-minmax": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-minmax/-/postcss-media-minmax-1.0.4.tgz", - "integrity": "sha512-olnKTQk9+RMzpIpkjv55d44L4Ni02j8ZJoedJezQC5M03a56npcM1hx0apaTRG4Fz1wfPCQ0DBjQ8zsiJFelmA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-calc": "^1.1.1", - "@csstools/css-parser-algorithms": "^2.2.0", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/media-query-list-parser": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-media-queries-aspect-ratio-number-values": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-media-queries-aspect-ratio-number-values/-/postcss-media-queries-aspect-ratio-number-values-1.0.4.tgz", - "integrity": "sha512-IwyTbyR8E2y3kh6Fhrs251KjKBJeUPV5GlnUKnpU70PRFEN2DolWbf2V4+o/B9+Oj77P/DullLTulWEQ8uFtAA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-parser-algorithms": "^2.2.0", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/media-query-list-parser": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-nested-calc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-nested-calc/-/postcss-nested-calc-2.0.2.tgz", - "integrity": "sha512-jbwrP8rN4e7LNaRcpx3xpMUjhtt34I9OV+zgbcsYAAk6k1+3kODXJBf95/JMYWhu9g1oif7r06QVUgfWsKxCFw==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-normalize-display-values": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-normalize-display-values/-/postcss-normalize-display-values-2.0.1.tgz", - "integrity": "sha512-TQT5g3JQ5gPXC239YuRK8jFceXF9d25ZvBkyjzBGGoW5st5sPXFVQS8OjYb9IJ/K3CdfK4528y483cgS2DJR/w==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-oklab-function": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-2.2.3.tgz", - "integrity": "sha512-AgJ2rWMnLCDcbSMTHSqBYn66DNLBym6JpBpCaqmwZ9huGdljjDRuH3DzOYzkgQ7Pm2K92IYIq54IvFHloUOdvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-progressive-custom-properties": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-2.3.0.tgz", - "integrity": "sha512-Zd8ojyMlsL919TBExQ1I0CTpBDdyCpH/yOdqatZpuC3sd22K4SwC7+Yez3Q/vmXMWSAl+shjNeFZ7JMyxMjK+Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-relative-color-syntax": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-relative-color-syntax/-/postcss-relative-color-syntax-1.0.2.tgz", - "integrity": "sha512-juCoVInkgH2TZPfOhyx6tIal7jW37L/0Tt+Vcl1LoxqQA9sxcg3JWYZ98pl1BonDnki6s/M7nXzFQHWsWMeHgw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-scope-pseudo-class": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@csstools/postcss-scope-pseudo-class/-/postcss-scope-pseudo-class-2.0.2.tgz", - "integrity": "sha512-6Pvo4uexUCXt+Hz5iUtemQAcIuCYnL+ePs1khFR6/xPgC92aQLJ0zGHonWoewiBE+I++4gXK3pr+R1rlOFHe5w==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-stepped-value-functions": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-stepped-value-functions/-/postcss-stepped-value-functions-2.1.1.tgz", - "integrity": "sha512-YCvdF0GCZK35nhLgs7ippcxDlRVe5QsSht3+EghqTjnYnyl3BbWIN6fYQ1dKWYTJ+7Bgi41TgqQFfJDcp9Xy/w==", - "dev": true, - "dependencies": { - "@csstools/css-calc": "^1.1.1", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-text-decoration-shorthand": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@csstools/postcss-text-decoration-shorthand/-/postcss-text-decoration-shorthand-2.2.4.tgz", - "integrity": "sha512-zPN56sQkS/7YTCVZhOBVCWf7AiNge8fXDl7JVaHLz2RyT4pnyK2gFjckWRLpO0A2xkm1lCgZ0bepYZTwAVd/5A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/color-helpers": "^2.1.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-trigonometric-functions": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-2.1.1.tgz", - "integrity": "sha512-XcXmHEFfHXhvYz40FtDlA4Fp4NQln2bWTsCwthd2c+MCnYArUYU3YaMqzR5CrKP3pMoGYTBnp5fMqf1HxItNyw==", - "dev": true, - "dependencies": { - "@csstools/css-calc": "^1.1.1", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/postcss-unset-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-2.0.1.tgz", - "integrity": "sha512-oJ9Xl29/yU8U7/pnMJRqAZd4YXNCfGEdcP4ywREuqm/xMqcgDNDppYRoCGDt40aaZQIEKBS79LytUDN/DHf0Ew==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/@csstools/selector-specificity": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", - "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.0.10" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@fullhuman/postcss-purgecss": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.3.0.tgz", - "integrity": "sha512-qnKm5dIOyPGJ70kPZ5jiz0I9foVOic0j+cOzNDoo8KoCf6HjicIZ99UfO2OmE7vCYSKAAepEwJtNzpiiZAh9xw==", - "dev": true, - "dependencies": { - "postcss": "7.0.32", - "purgecss": "^2.3.0" - } - }, - "node_modules/@fullhuman/postcss-purgecss/node_modules/postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - }, - "node_modules/@fullhuman/postcss-purgecss/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@highlightjs/vue-plugin": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@highlightjs/vue-plugin/-/vue-plugin-1.0.2.tgz", - "integrity": "sha512-4VVPeUZL6/NZ7J6/23RQIYLm9HR9rnOdz+cxx7/ISgtMVaf0vHAAwgHKmB54GNs5VvJlWMnKOuiLVcy30elz8g==", - "dependencies": { - "highlight.js": "^10.7.2" - } - }, - "node_modules/@highlightjs/vue-plugin/node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "engines": { - "node": "*" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", - "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", - "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", - "dev": true - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/bonjour": { - "version": "3.5.10", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", - "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", - "integrity": "sha512-4x5FkPpLipqwthjPsF7ZRbOv3uoLUFkTA9G9v583qi4pACvq0uTELrB8OLUzPWUI4IJIyvM85vzkV1nyiI2Lig==", - "dev": true, - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.40.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.2.tgz", - "integrity": "sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", - "dev": true - }, - "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.35", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz", - "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/html-minifier-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", - "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==", - "dev": true - }, - "node_modules/@types/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", - "dev": true - }, - "node_modules/@types/http-proxy": { - "version": "1.17.11", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.11.tgz", - "integrity": "sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", - "dev": true - }, - "node_modules/@types/q": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", - "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", - "dev": true - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "node_modules/@types/send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", - "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", - "dev": true, - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", - "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/sockjs": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", - "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/ws": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", - "integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@vue/compiler-sfc": { - "version": "2.7.14", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz", - "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==", - "dependencies": { - "@babel/parser": "^7.18.4", - "postcss": "^8.4.14", - "source-map": "^0.6.1" - } - }, - "node_modules/@vue/component-compiler-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz", - "integrity": "sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==", - "dev": true, - "dependencies": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.36", - "postcss-selector-parser": "^6.0.2", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "optionalDependencies": { - "prettier": "^1.18.2 || ^2.0.0" - } - }, - "node_modules/@vue/component-compiler-utils/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/@vue/component-compiler-utils/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/@vue/component-compiler-utils/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/@vue/component-compiler-utils/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ==", - "dev": true - }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "bin": { - "ansi-html": "bin/ansi-html" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "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, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - }, - "node_modules/array.prototype.reduce": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", - "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/autoprefixer": { - "version": "10.4.14", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", - "integrity": "sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - } - ], - "dependencies": { - "browserslist": "^4.21.5", - "caniuse-lite": "^1.0.30001464", - "fraction.js": "^4.2.0", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/babel-loader": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", - "integrity": "sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA==", - "dev": true, - "dependencies": { - "find-cache-dir": "^3.3.2", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0", - "webpack": ">=5" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz", - "integrity": "sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.4.0", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz", - "integrity": "sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.0", - "core-js-compat": "^3.30.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz", - "integrity": "sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/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==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/bonjour-service": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.1.tgz", - "integrity": "sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg==", - "dev": true, - "dependencies": { - "array-flatten": "^2.1.2", - "dns-equal": "^1.0.0", - "fast-deep-equal": "^3.1.3", - "multicast-dns": "^7.2.5" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/brace": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/brace/-/brace-0.11.1.tgz", - "integrity": "sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==" - }, - "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==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "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, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", - "dev": true, - "dependencies": { - "callsites": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", - "dev": true, - "dependencies": { - "caller-callsite": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001507", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001507.tgz", - "integrity": "sha512-SFpUDoSLCaE5XYL2jfqe9ova/pbQHEmbheDf5r4diNwbAgR3qxM9NQtfsiSscjqoya5K7kFcHPUQ+VsUkIJR4A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "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, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/clean-css": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", - "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 10.0" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "dependencies": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "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, - "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": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dev": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/compression/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==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", - "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", - "deprecated": "Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog", - "dev": true, - "dependencies": { - "bluebird": "^3.1.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "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": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, - "node_modules/core-js-compat": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.0.tgz", - "integrity": "sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.5" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "dependencies": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/cosmiconfig/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==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/css-blank-pseudo": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-5.0.2.tgz", - "integrity": "sha512-aCU4AZ7uEcVSUzagTlA9pHciz7aWPKA/YzrEkpdSopJ2pvhIxiQ5sYeMz1/KByxlIo4XBdvMNJAVKMg/GRnhfw==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha512-zj5D7X1U2h2zsXOAM8EyUREBnnts6H+Jm+d1M2DbiQQcUtnqgQsMrdo8JW9R80YFUmIdBZeMu5wvYM7hcgWP/Q==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - }, - "engines": { - "node": ">4" - } - }, - "node_modules/css-declaration-sorter/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/css-declaration-sorter/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/css-has-pseudo": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-5.0.2.tgz", - "integrity": "sha512-q+U+4QdwwB7T9VEW/LyO6CFrLAeLqOykC5mDqJXc7aKZAhDbq7BvGT13VGJe+IwBfdN2o3Xdw2kJ5IxwV1Sc9Q==", - "dev": true, - "dependencies": { - "@csstools/selector-specificity": "^2.0.1", - "postcss-selector-parser": "^6.0.10", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/css-loader": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", - "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.21", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.3", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/css-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-loader/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/css-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/css-prefers-color-scheme": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-8.0.2.tgz", - "integrity": "sha512-OvFghizHJ45x7nsJJUSYLyQNTzsCU8yWjxAc/nhPQg1pbs18LMoET8N3kOweFDPy0JV0OSXN2iqRFhPBHYOeMA==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "node_modules/css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", - "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.4", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/css-unit-converter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz", - "integrity": "sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==", - "dev": true - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cssdb": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-7.6.0.tgz", - "integrity": "sha512-Nna7rph8V0jC6+JBY4Vk4ndErUmfJfV6NJCaZdurL0omggabiy+QB2HCQtu5c/ACLZ0I7REv7A4QyPIoYzZx0w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - } - ] - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cssnano": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", - "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", - "dev": true, - "dependencies": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.8", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-preset-default": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", - "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", - "dev": true, - "dependencies": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.3", - "postcss-unique-selectors": "^4.0.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-preset-default/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/cssnano-preset-default/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha512-6RIcwmV3/cBMG8Aj5gucQRsJb4vv4I4rn6YjPbVWd5+Pn/fuG+YseGvXGk00XLkoZkaj31QOD7vMUpNPC4FIuw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha512-JPMZ1TSMRUPVIqEalIBNoBtAYbi8okvcFns4O0YIhcdGebeYZK7dMyHJiQ6GqNBA9kE0Hym4Aqym5rPdsV/4Cw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano-util-raw-cache/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/cssnano-util-raw-cache/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/cssnano/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/cssnano/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", - "dev": true, - "dependencies": { - "css-tree": "^1.1.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", - "dev": true - }, - "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" - }, - "node_modules/de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", - "integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/defined": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", - "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true - }, - "node_modules/detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", - "dev": true - }, - "node_modules/dns-packet": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.0.tgz", - "integrity": "sha512-rza3UH1LwdHh9qyPXp8lkwpjSNk/AMD3dPytUoRoqnypDUhY0xvbdmVhWOfxO68frEfV9BU8V12Ez7ZsHGZpCQ==", - "dev": true, - "dependencies": { - "@leichtgewicht/ip-codec": "^2.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "dependencies": { - "utila": "~0.4" - } - }, - "node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/dotenv-defaults": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dotenv-defaults/-/dotenv-defaults-2.0.2.tgz", - "integrity": "sha512-iOIzovWfsUHU91L5i8bJce3NYK5JXeAwH50Jh6+ARUdLiiGlYWfGw6UkzsYqaXZH/hjE/eCd/PlfM/qqyK0AMg==", - "dev": true, - "dependencies": { - "dotenv": "^8.2.0" - } - }, - "node_modules/dotenv-webpack": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/dotenv-webpack/-/dotenv-webpack-8.0.1.tgz", - "integrity": "sha512-CdrgfhZOnx4uB18SgaoP9XHRN2v48BbjuXQsZY5ixs5A8579NxQkmMxRtI7aTwSiSQcM2ao12Fdu+L3ZS3bG4w==", - "dev": true, - "dependencies": { - "dotenv-defaults": "^2.0.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "webpack": "^4 || ^5" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.440", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.440.tgz", - "integrity": "sha512-r6dCgNpRhPwiWlxbHzZQ/d9swfPaEJGi8ekqRBwQYaR3WmA5VkqQfBWSDDjuJU1ntO+W9tHx8OHV/96Q8e0dVw==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/envinfo": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.9.0.tgz", - "integrity": "sha512-RODB4txU+xImYDemN5DqaKC0CHk05XSVkOX4pq0hK26Qx+1LChkuOyUDlGEjYb3ACr0n9qBhFjg37hQuJvpkRQ==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "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, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", - "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.10", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.7", - "string.prototype.trimend": "^1.0.6", - "string.prototype.trimstart": "^1.0.6", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "node_modules/es-module-lexer": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", - "integrity": "sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==", - "dev": true - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "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==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "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==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/file-loader": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", - "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", - "dev": true, - "dependencies": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/file-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/file-loader/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/file-loader/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/file-loader/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "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, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "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, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", - "dev": true, - "engines": { - "node": "*" - }, - "funding": { - "type": "patreon", - "url": "https://www.patreon.com/infusion" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "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==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs-monkey": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.4.tgz", - "integrity": "sha512-INM/fWAxMICjttnD0DX1rBvinKskj5G1w+oy/pnm9u/tSlnBrzFonJMcalKJ30P8RRsPzKcCG7Q8l0jx5Fh9YQ==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==", - "dev": true - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "node_modules/highlight.js": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", - "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/hpack.js/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/hpack.js/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/hpack.js/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==", - "dev": true - }, - "node_modules/hpack.js/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==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha512-M5ezZw4LzXbBKMruP+BNANf0k+19hDQMgpzBIYnya//Al+fjNct9Wf3b1WedLqdEs2hKBvxq/jh+DsHJLj0F9A==", - "dev": true - }, - "node_modules/hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha512-7Wn5GMLuHBjZCb2bTmnDOycho0p/7UVaAeqXZGbHrBCl6Yd/xDhQJAXe6Ga9AXJH2I5zY1dEdYw2u1UptnSBJA==", - "dev": true - }, - "node_modules/html-entities": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.6.tgz", - "integrity": "sha512-9o0+dcpIw2/HxkNuYKxSJUF/MMRZQECK4GnF+oQOmJ83yCVHTWgCH5aOXxK5bozNRmM8wtgryjHD3uloPBDEGw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ] - }, - "node_modules/html-loader": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-4.2.0.tgz", - "integrity": "sha512-OxCHD3yt+qwqng2vvcaPApCEvbx+nXWu+v69TYHx1FO8bffHn/JjHtE3TTQZmHjwvnJe4xxzuecetDVBrQR1Zg==", - "dev": true, - "dependencies": { - "html-minifier-terser": "^7.0.0", - "parse5": "^7.0.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/html-minifier-terser": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", - "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "clean-css": "~5.3.2", - "commander": "^10.0.0", - "entities": "^4.4.0", - "param-case": "^3.0.4", - "relateurl": "^0.2.7", - "terser": "^5.15.1" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": "^14.13.1 || >=16.0.0" - } - }, - "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/html-webpack-plugin": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.3.tgz", - "integrity": "sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==", - "dev": true, - "dependencies": { - "@types/html-minifier-terser": "^6.0.0", - "html-minifier-terser": "^6.0.2", - "lodash": "^4.17.21", - "pretty-error": "^4.0.0", - "tapable": "^2.0.0" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/html-webpack-plugin" - }, - "peerDependencies": { - "webpack": "^5.20.0" - } - }, - "node_modules/html-webpack-plugin/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, - "node_modules/html-webpack-plugin/node_modules/html-minifier-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", - "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "clean-css": "^5.2.2", - "commander": "^8.3.0", - "he": "^1.2.0", - "param-case": "^3.0.4", - "relateurl": "^0.2.7", - "terser": "^5.10.0" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "dev": true - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", - "dev": true, - "dependencies": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/humanize-duration": { - "version": "3.28.0", - "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.28.0.tgz", - "integrity": "sha512-jMAxraOOmHuPbffLVDKkEKi/NeG8dMqP8lGRd6Tbf7JgAeG33jjgPWDbXXU7ypCI0o+oNKJFgbSB9FKVdWNI2A==" - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", - "dev": true, - "dependencies": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==", - "dev": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/ipaddr.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", - "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha512-vOx7VprsKyllwjSkLV79NIhpyLfr3jAp7VaTCMXOJHu4m0Ew1CZ2fcjASwmV1jI3BWuWHB013M48eyeldk9gYg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha512-H1U8Vz0cfXNujrJzEcvvwMDW9Ra+biSYA3ThdQvAnMLJkEHQXn6bWzLkxHtVYJ+Sdbx0b6finn3jZiaVe7MAHA==", - "dev": true, - "dependencies": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/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/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jiti": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", - "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", - "dev": true, - "bin": { - "jiti": "bin/jiti.js" - } - }, - "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 - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "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 - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/launch-editor": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.0.tgz", - "integrity": "sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ==", - "dev": true, - "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.7.3" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "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" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", - "dev": true - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.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, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/marked": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-5.1.0.tgz", - "integrity": "sha512-z3/nBe7aTI8JDszlYLk7dDVNpngjw0o1ZJtrA9kIfkkHcIF+xH7mO23aISl4WxP83elU+MFROgahqdpd05lMEQ==", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", - "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", - "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", - "dev": true, - "dependencies": { - "fs-monkey": "^1.0.4" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, - "node_modules/merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/modern-css-reset": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/modern-css-reset/-/modern-css-reset-1.4.0.tgz", - "integrity": "sha512-0crZmSFmrxkI7159rvQWjpDhy0u4+Awg/iOycJdlVn0RSeft/a+6BrQHR3IqvmdK25sqt0o6Z5Ap7cWgUee2rw==" - }, - "node_modules/moment": { - "version": "2.29.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", - "engines": { - "node": "*" - } - }, - "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/multicast-dns": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", - "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", - "dev": true, - "dependencies": { - "dns-packet": "^5.2.2", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "node_modules/node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", - "dev": true, - "dependencies": { - "lodash": "^4.17.21" - } - }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "dev": true, - "engines": { - "node": ">= 6.13.0" - } - }, - "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", - "dev": true - }, - "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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/normalize.css": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", - "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==", - "dev": true - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==", - "dev": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", - "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", - "dev": true, - "dependencies": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.values": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", - "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dev": true, - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "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==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module/node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "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" - } - }, - "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "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": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss": { - "version": "8.4.24", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", - "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-attribute-case-insensitive": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-6.0.2.tgz", - "integrity": "sha512-IRuCwwAAQbgaLhxQdQcIIK0dCVXg3XDUnzgKD8iwdiYdwU4rMWRWyl/W9/0nA4ihVpq5pyALiHB2veBJ0292pw==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", - "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - } - }, - "node_modules/postcss-calc/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-calc/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-clamp": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-clamp/-/postcss-clamp-4.1.0.tgz", - "integrity": "sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": ">=7.6.0" - }, - "peerDependencies": { - "postcss": "^8.4.6" - } - }, - "node_modules/postcss-color-functional-notation": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-5.1.0.tgz", - "integrity": "sha512-w2R4py6zrVE1U7FwNaAc76tNQlG9GLkrBbcFw+VhUjyDDiV28vfZG+l4LyPmpoQpeSJVtu8VgNjE8Jv5SpC7dQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^2.3.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-color-hex-alpha": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-9.0.2.tgz", - "integrity": "sha512-SfPjgr//VQ/DOCf80STIAsdAs7sbIbxATvVmd+Ec7JvR8onz9pjawhq3BJM3Pie40EE3TyB0P6hft16D33Nlyg==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-color-rebeccapurple": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-8.0.2.tgz", - "integrity": "sha512-xWf/JmAxVoB5bltHpXk+uGRoGFwu4WDAR7210el+iyvTdqiKpDhtcT8N3edXMoVJY0WHFMrKMUieql/wRNiXkw==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-colormin/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-colormin/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-colormin/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-convert-values/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-convert-values/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-convert-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-custom-media": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-9.1.5.tgz", - "integrity": "sha512-GStyWMz7Qbo/Gtw1xVspzVSX8eipgNg4lpsO3CAeY4/A1mzok+RV6MCv3fg62trWijh/lYEj6vps4o8JcBBpDA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.2", - "@csstools/css-parser-algorithms": "^2.2.0", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/media-query-list-parser": "^2.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-custom-properties": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.2.0.tgz", - "integrity": "sha512-UYiPqbqmVayyv56y0mtGhvUKZClflwE9cTTmPaqEX8fOVjVwsotqKGYtJXSLxrJLwf9tt7ka+Luyh1ZAOhGHWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.2", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-custom-selectors": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-7.1.3.tgz", - "integrity": "sha512-GTVscax6O/8s7agFF0HsOoIyjrnAbLjgCUle8tn+0oDGJuVx7p56U7ClSRoC49poxFuMfu2B4Q8GnxSCOeuFKw==", - "dev": true, - "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.2", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-dir-pseudo-class": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-7.0.2.tgz", - "integrity": "sha512-cMnslilYxBf9k3qejnovrUONZx1rXeUZJw06fgIUBzABJe3D2LiLL5WAER7Imt3nrkaIgG05XZBztueLEf5P8w==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-comments/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-discard-comments/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-duplicates/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-discard-duplicates/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-empty/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-discard-empty/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-discard-overridden/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-discard-overridden/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-double-position-gradients": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-4.0.4.tgz", - "integrity": "sha512-nUAbUXURemLXIrl4Xoia2tiu5z/n8sY+BVDZApoeT9BlpByyrp02P/lFCRrRvZ/zrGRE+MOGLhk8o7VcMCtPtQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/postcss-progressive-custom-properties": "^2.3.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-focus-visible": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-8.0.2.tgz", - "integrity": "sha512-f/Vd+EC/GaKElknU59esVcRYr/Y3t1ZAQyL4u2xSOgkDy4bMCmG7VP5cGvj3+BTLNE9ETfEuz2nnt4qkZwTTeA==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-focus-within": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-7.0.2.tgz", - "integrity": "sha512-AHAJ89UQBcqBvFgQJE9XasGuwMNkKsGj4D/f9Uk60jFmEBHpAL14DrnSk3Rj+SwZTr/WUG+mh+Rvf8fid/346w==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-font-variant": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", - "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==", - "dev": true, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-functions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-functions/-/postcss-functions-3.0.0.tgz", - "integrity": "sha512-N5yWXWKA+uhpLQ9ZhBRl2bIAdM6oVJYpDojuI1nF2SzXBimJcdjFwiAouBVbO5VuOF3qA6BSFWFc3wXbbj72XQ==", - "dev": true, - "dependencies": { - "glob": "^7.1.2", - "object-assign": "^4.1.1", - "postcss": "^6.0.9", - "postcss-value-parser": "^3.3.0" - } - }, - "node_modules/postcss-functions/node_modules/postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "dependencies": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/postcss-functions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-gap-properties": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-4.0.1.tgz", - "integrity": "sha512-V5OuQGw4lBumPlwHWk/PRfMKjaq/LTGR4WDTemIMCaMevArVfCCA9wBJiL1VjDAd+rzuCIlkRoRvDsSiAaZ4Fg==", - "dev": true, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-image-set-function": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-5.0.2.tgz", - "integrity": "sha512-Sszjwo0ubETX0Fi5MvpYzsONwrsjeabjMoc5YqHvURFItXgIu3HdCjcVuVKGMPGzKRhgaknmdM5uVWInWPJmeg==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-initial": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-4.0.1.tgz", - "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==", - "dev": true, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-js": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-2.0.3.tgz", - "integrity": "sha512-zS59pAk3deu6dVHyrGqmC3oDXBdNdajk4k1RyxeVXCrcEDBUBHoIhE4QTsmhxgzXxsaqFDAkUZfmMa5f/N/79w==", - "dev": true, - "dependencies": { - "camelcase-css": "^2.0.1", - "postcss": "^7.0.18" - } - }, - "node_modules/postcss-js/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-js/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-lab-function": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-5.2.3.tgz", - "integrity": "sha512-fi32AYKzji5/rvgxo5zXHFvAYBw0u0OzELbeCNjEZVLUir18Oj+9RmNphtM8QdLUaUnrfx8zy8vVYLmFLkdmrQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/css-color-parser": "^1.2.0", - "@csstools/css-parser-algorithms": "^2.1.1", - "@csstools/css-tokenizer": "^2.1.1", - "@csstools/postcss-progressive-custom-properties": "^2.3.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-loader": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz", - "integrity": "sha512-YgO/yhtevGO/vJePCQmTxiaEwER94LABZN0ZMT4A0vsak9TpO+RvKRs7EmJ8peIlB9xfXCsS7M8LjqncsUZ5HA==", - "dev": true, - "dependencies": { - "cosmiconfig": "^8.2.0", - "jiti": "^1.18.2", - "semver": "^7.3.8" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "postcss": "^7.0.0 || ^8.0.1", - "webpack": "^5.0.0" - } - }, - "node_modules/postcss-loader/node_modules/cosmiconfig": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", - "integrity": "sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==", - "dev": true, - "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - } - }, - "node_modules/postcss-loader/node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/postcss-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-loader/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/postcss-loader/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-loader/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/postcss-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/postcss-logical": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-6.2.0.tgz", - "integrity": "sha512-aqlfKGaY0nnbgI9jwUikp4gJKBqcH5noU/EdnIVceghaaDPYhZuyJVxlvWNy55tlTG5tunRKCTAX9yljLiFgmw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "dependencies": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-longhand/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-merge-longhand/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-merge-longhand/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-merge-rules/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-merge-rules/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-font-values/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-minify-font-values/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-minify-font-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-gradients/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-minify-gradients/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-minify-gradients/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-params/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-minify-params/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-minify-params/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-minify-selectors/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-minify-selectors/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", - "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-nested": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-4.2.3.tgz", - "integrity": "sha512-rOv0W1HquRCamWy2kFl3QazJMMe1ku6rCFoAAH+9AcxdbpDeBr6k968MLWuLjvjMcGEip01ak09hKOEgpK9hvw==", - "dev": true, - "dependencies": { - "postcss": "^7.0.32", - "postcss-selector-parser": "^6.0.2" - } - }, - "node_modules/postcss-nested/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-nested/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-nesting": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-11.3.0.tgz", - "integrity": "sha512-JlS10AQm/RzyrUGgl5irVkAlZYTJ99mNueUl+Qab+TcHhVedLiylWVkKBhRale+rS9yWIJK48JVzQlq3LcSdeA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/selector-specificity": "^2.0.0", - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-charset/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-charset/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-display-values/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-display-values/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-display-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-positions/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-positions/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-positions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-repeat-style/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-repeat-style/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-repeat-style/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "dependencies": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-string/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-string/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-string/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-timing-functions/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-timing-functions/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-timing-functions/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-unicode/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-unicode/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-unicode/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "dependencies": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-url/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-url/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-url/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-normalize-whitespace/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-normalize-whitespace/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-normalize-whitespace/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-opacity-percentage": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-opacity-percentage/-/postcss-opacity-percentage-2.0.0.tgz", - "integrity": "sha512-lyDrCOtntq5Y1JZpBFzIWm2wG9kbEdujpNt4NLannF+J9c8CgFIzPa80YQfdza+Y+yFfzbYj/rfoOsYsooUWTQ==", - "dev": true, - "funding": [ - { - "type": "kofi", - "url": "https://ko-fi.com/mrcgrtz" - }, - { - "type": "liberapay", - "url": "https://liberapay.com/mrcgrtz" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.2" - } - }, - "node_modules/postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "dependencies": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-ordered-values/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-ordered-values/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-ordered-values/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-overflow-shorthand": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-4.0.1.tgz", - "integrity": "sha512-HQZ0qi/9iSYHW4w3ogNqVNr2J49DHJAl7r8O2p0Meip38jsdnRPgiDW7r/LlLrrMBMe3KHkvNtAV2UmRVxzLIg==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-page-break": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz", - "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==", - "dev": true, - "peerDependencies": { - "postcss": "^8" - } - }, - "node_modules/postcss-place": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/postcss-place/-/postcss-place-8.0.1.tgz", - "integrity": "sha512-Ow2LedN8sL4pq8ubukO77phSVt4QyCm35ZGCYXKvRFayAwcpgB0sjNJglDoTuRdUL32q/ZC1VkPBo0AOEr4Uiw==", - "dev": true, - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-preset-env": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-8.5.1.tgz", - "integrity": "sha512-qhWnJJjP6ArLUINWJ38t6Aftxnv9NW6cXK0NuwcLCcRilbuw72dSFLkCVUJeCfHGgJiKzX+pnhkGiki0PEynWg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/postcss-cascade-layers": "^3.0.1", - "@csstools/postcss-color-function": "^2.2.3", - "@csstools/postcss-color-mix-function": "^1.0.3", - "@csstools/postcss-font-format-keywords": "^2.0.2", - "@csstools/postcss-gradients-interpolation-method": "^3.0.6", - "@csstools/postcss-hwb-function": "^2.2.2", - "@csstools/postcss-ic-unit": "^2.0.4", - "@csstools/postcss-is-pseudo-class": "^3.2.1", - "@csstools/postcss-logical-float-and-clear": "^1.0.1", - "@csstools/postcss-logical-resize": "^1.0.1", - "@csstools/postcss-logical-viewport-units": "^1.0.3", - "@csstools/postcss-media-minmax": "^1.0.4", - "@csstools/postcss-media-queries-aspect-ratio-number-values": "^1.0.4", - "@csstools/postcss-nested-calc": "^2.0.2", - "@csstools/postcss-normalize-display-values": "^2.0.1", - "@csstools/postcss-oklab-function": "^2.2.3", - "@csstools/postcss-progressive-custom-properties": "^2.3.0", - "@csstools/postcss-relative-color-syntax": "^1.0.2", - "@csstools/postcss-scope-pseudo-class": "^2.0.2", - "@csstools/postcss-stepped-value-functions": "^2.1.1", - "@csstools/postcss-text-decoration-shorthand": "^2.2.4", - "@csstools/postcss-trigonometric-functions": "^2.1.1", - "@csstools/postcss-unset-value": "^2.0.1", - "autoprefixer": "^10.4.14", - "browserslist": "^4.21.9", - "css-blank-pseudo": "^5.0.2", - "css-has-pseudo": "^5.0.2", - "css-prefers-color-scheme": "^8.0.2", - "cssdb": "^7.6.0", - "postcss-attribute-case-insensitive": "^6.0.2", - "postcss-clamp": "^4.1.0", - "postcss-color-functional-notation": "^5.1.0", - "postcss-color-hex-alpha": "^9.0.2", - "postcss-color-rebeccapurple": "^8.0.2", - "postcss-custom-media": "^9.1.5", - "postcss-custom-properties": "^13.2.0", - "postcss-custom-selectors": "^7.1.3", - "postcss-dir-pseudo-class": "^7.0.2", - "postcss-double-position-gradients": "^4.0.4", - "postcss-focus-visible": "^8.0.2", - "postcss-focus-within": "^7.0.2", - "postcss-font-variant": "^5.0.0", - "postcss-gap-properties": "^4.0.1", - "postcss-image-set-function": "^5.0.2", - "postcss-initial": "^4.0.1", - "postcss-lab-function": "^5.2.3", - "postcss-logical": "^6.2.0", - "postcss-nesting": "^11.3.0", - "postcss-opacity-percentage": "^2.0.0", - "postcss-overflow-shorthand": "^4.0.1", - "postcss-page-break": "^3.0.4", - "postcss-place": "^8.0.1", - "postcss-pseudo-class-any-link": "^8.0.2", - "postcss-replace-overflow-wrap": "^4.0.0", - "postcss-selector-not": "^7.0.1", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-pseudo-class-any-link": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-8.0.2.tgz", - "integrity": "sha512-FYTIuRE07jZ2CW8POvctRgArQJ43yxhr5vLmImdKUvjFCkR09kh8pIdlCwdx/jbFm7MiW4QP58L4oOUv3grQYA==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-initial/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-reduce-initial/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "dependencies": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-reduce-transforms/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-reduce-transforms/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-reduce-transforms/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-replace-overflow-wrap": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz", - "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==", - "dev": true, - "peerDependencies": { - "postcss": "^8.0.3" - } - }, - "node_modules/postcss-selector-not": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-7.0.1.tgz", - "integrity": "sha512-1zT5C27b/zeJhchN7fP0kBr16Cc61mu7Si9uWWLoA3Px/D9tIJPKchJCkUH3tPO5D0pCFmGeApAv8XpXBQJ8SQ==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-svgo": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", - "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", - "dev": true, - "dependencies": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-svgo/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-svgo/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-svgo/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "dependencies": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/postcss-unique-selectors/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/postcss-unique-selectors/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "optional": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-error": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", - "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==", - "dev": true, - "dependencies": { - "lodash": "^4.17.20", - "renderkid": "^3.0.0" - } - }, - "node_modules/pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "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==", - "dev": true - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/purgecss": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-2.3.0.tgz", - "integrity": "sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ==", - "dev": true, - "dependencies": { - "commander": "^5.0.0", - "glob": "^7.0.0", - "postcss": "7.0.32", - "postcss-selector-parser": "^6.0.2" - }, - "bin": { - "purgecss": "bin/purgecss" - } - }, - "node_modules/purgecss/node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/purgecss/node_modules/postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", - "dev": true, - "dependencies": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - } - }, - "node_modules/purgecss/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", - "dev": true, - "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/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==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "dependencies": { - "pify": "^2.3.0" - } - }, - "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==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/reduce-css-calc": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz", - "integrity": "sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg==", - "dev": true, - "dependencies": { - "css-unit-converter": "^1.1.1", - "postcss-value-parser": "^3.3.0" - } - }, - "node_modules/reduce-css-calc/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", - "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", - "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexpu-core": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", - "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", - "dev": true, - "dependencies": { - "@babel/regjsgen": "^0.8.0", - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsparser": "^0.9.1", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/renderkid": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", - "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==", - "dev": true, - "dependencies": { - "css-select": "^4.1.3", - "dom-converter": "^0.2.0", - "htmlparser2": "^6.1.0", - "lodash": "^4.17.21", - "strip-ansi": "^6.0.1" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/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, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha512-gDK5mkALDFER2YLqH6imYvK6g02gpNGM4ILDZ472EwWfXZnC2ZEpoB2ECXTyOVUKuk/bPJZMzwQPBYICzP+D3w==", - "dev": true - }, - "node_modules/rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha512-zgn5OjNQXLUTdq8m17KdaicF6w89TZs8ZU8y0AYENIU6wG8GG6LLm0yLSiPY8DmaYmHdgRW8rnApjoT0fQRfMg==", - "dev": true - }, - "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, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true - }, - "node_modules/selfsigned": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", - "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", - "dev": true, - "dependencies": { - "node-forge": "^1" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/serve-index/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/serve-index/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "node_modules/serve-index/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - }, - "node_modules/sockjs": { - "version": "0.3.24", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", - "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", - "dev": true, - "dependencies": { - "faye-websocket": "^0.11.3", - "uuid": "^8.3.2", - "websocket-driver": "^0.7.4" - } - }, - "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==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-loader": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", - "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", - "dev": true, - "dependencies": { - "abab": "^2.0.6", - "iconv-lite": "^0.6.3", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.72.1" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", - "dev": true - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", - "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", - "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", - "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.20.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "dependencies": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/stylehacks/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/stylehacks/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/stylehacks/node_modules/postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svgo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", - "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", - "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.", - "dev": true, - "dependencies": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/svgo/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/svgo/node_modules/css-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", - "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "node_modules/svgo/node_modules/css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/svgo/node_modules/domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/svgo/node_modules/domutils/node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/svgo/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/svgo/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==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/svgo/node_modules/nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "dependencies": { - "boolbase": "~1.0.0" - } - }, - "node_modules/tailwindcss": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.9.6.tgz", - "integrity": "sha512-nY8WYM/RLPqGsPEGEV2z63riyQPcHYZUJpAwdyBzVpxQHOHqHE+F/fvbCeXhdF1+TA5l72vSkZrtYCB9hRcwkQ==", - "dev": true, - "dependencies": { - "@fullhuman/postcss-purgecss": "^2.1.2", - "autoprefixer": "^9.4.5", - "browserslist": "^4.12.0", - "bytes": "^3.0.0", - "chalk": "^3.0.0 || ^4.0.0", - "color": "^3.1.2", - "detective": "^5.2.0", - "fs-extra": "^8.0.0", - "html-tags": "^3.1.0", - "lodash": "^4.17.20", - "node-emoji": "^1.8.1", - "normalize.css": "^8.0.1", - "object-hash": "^2.0.3", - "postcss": "^7.0.11", - "postcss-functions": "^3.0.0", - "postcss-js": "^2.0.0", - "postcss-nested": "^4.1.1", - "postcss-selector-parser": "^6.0.0", - "postcss-value-parser": "^4.1.0", - "pretty-hrtime": "^1.0.3", - "reduce-css-calc": "^2.1.6", - "resolve": "^1.14.2" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/tailwindcss/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==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/tailwindcss/node_modules/autoprefixer": { - "version": "9.8.8", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.8.tgz", - "integrity": "sha512-eM9d/swFopRt5gdJ7jrpCwgvEMIayITpojhkkSMRsFHYuH5bkSQ4p/9qTEHtmNudUZh22Tehu7I6CxAW0IXTKA==", - "dev": true, - "dependencies": { - "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001109", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "picocolors": "^0.2.1", - "postcss": "^7.0.32", - "postcss-value-parser": "^4.1.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - } - }, - "node_modules/tailwindcss/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "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/tailwindcss/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, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/tailwindcss/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/tailwindcss/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/tailwindcss/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/tailwindcss/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/tailwindcss/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==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.18.1.tgz", - "integrity": "sha512-j1n0Ao919h/Ai5r43VAnfV/7azUYW43GPxK7qSATzrsERfW7+y2QW9Cp9ufnRF5CQUWbnLSo7UJokSWCqg4tsQ==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/terser/node_modules/acorn": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", - "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true - }, - "node_modules/timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/ts-loader": { - "version": "9.4.3", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.3.tgz", - "integrity": "sha512-n3hBnm6ozJYzwiwt5YRiJZkzktftRpMiBApHaJPoWLA+qetQBAXkHqCLM6nwSdRDimqVtA5ocIkcTRLMTt7yzA==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-loader/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==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ts-loader/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "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/ts-loader/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, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/ts-loader/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/ts-loader/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/ts-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-loader/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-loader/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==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true - }, - "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==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", - "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", - "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", - "dev": true - }, - "node_modules/uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha512-mZdDpf3vBV5Efh29kMw5tXoup/buMgxLzOt/XKFKcVmi+15ManNQWr6HfZ2aiZTYlYixbdNJ0KFmIZIv52tHSQ==", - "dev": true - }, - "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==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==", - "dev": true - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", - "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", - "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/vue": { - "version": "2.7.14", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.14.tgz", - "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==", - "dependencies": { - "@vue/compiler-sfc": "2.7.14", - "csstype": "^3.1.0" - } - }, - "node_modules/vue-hot-reload-api": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", - "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", - "dev": true - }, - "node_modules/vue-loader": { - "version": "15.10.1", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz", - "integrity": "sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==", - "dev": true, - "dependencies": { - "@vue/component-compiler-utils": "^3.1.0", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - }, - "peerDependencies": { - "css-loader": "*", - "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0" - }, - "peerDependenciesMeta": { - "cache-loader": { - "optional": true - }, - "vue-template-compiler": { - "optional": true - } - } - }, - "node_modules/vue-loader/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/vue-loader/node_modules/loader-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", - "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/vue-material-design-icons": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/vue-material-design-icons/-/vue-material-design-icons-4.13.0.tgz", - "integrity": "sha512-TwaWrvh4J49VdkV9Uzcbr/p3FBRiBthRkIrg6SUh7ogFUljdA2ySNoAYD9dTU+mJkANIn1A6MoD/PnyLONnkWg==" - }, - "node_modules/vue-router": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", - "integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==" - }, - "node_modules/vue-style-loader": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", - "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", - "dev": true, - "dependencies": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - } - }, - "node_modules/vue-style-loader/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/vue-style-loader/node_modules/loader-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", - "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/vue-template-compiler": { - "version": "2.7.14", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz", - "integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==", - "dev": true, - "dependencies": { - "de-indent": "^1.0.2", - "he": "^1.2.0" - } - }, - "node_modules/vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", - "dev": true - }, - "node_modules/vue2-ace-editor": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/vue2-ace-editor/-/vue2-ace-editor-0.0.15.tgz", - "integrity": "sha512-e3TR9OGXc71cGpvYcW068lNpRcFt3+OONCC81oxHL/0vwl/V3OgqnNMw2/RRolgQkO/CA5AjqVHWmANWKOtNnQ==", - "dependencies": { - "brace": "^0.11.0" - } - }, - "node_modules/vuex": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", - "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==", - "peerDependencies": { - "vue": "^2.0.0" - } - }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/webpack": { - "version": "5.88.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.0.tgz", - "integrity": "sha512-O3jDhG5e44qIBSi/P6KpcCcH7HD+nYIHVBhdWFxcLOcIGN8zGo5nqF3BjyNCxIh4p1vFdNnreZv2h2KkoAw3lw==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", - "dev": true, - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.3", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/webpack-dev-server": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", - "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", - "dev": true, - "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/serve-static": "^1.13.10", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.5", - "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.0.11", - "chokidar": "^3.5.3", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^2.0.0", - "default-gateway": "^6.0.3", - "express": "^4.17.3", - "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.3", - "ipaddr.js": "^2.0.1", - "launch-editor": "^2.6.0", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "rimraf": "^3.0.2", - "schema-utils": "^4.0.0", - "selfsigned": "^2.1.1", - "serve-index": "^1.9.1", - "sockjs": "^0.3.24", - "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.1", - "ws": "^8.13.0" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - }, - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-merge": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", - "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", - "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack/node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/webpack/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } -} diff --git a/dashboard/src/components/dashboard/GuildAccess.vue b/dashboard/src/components/dashboard/GuildAccess.vue index c4aa9b9d4..a28ddd1bf 100644 --- a/dashboard/src/components/dashboard/GuildAccess.vue +++ b/dashboard/src/components/dashboard/GuildAccess.vue @@ -100,7 +100,7 @@ diff --git a/dashboard/src/components/docs/DocsLayout.vue b/dashboard/src/components/docs/DocsLayout.vue index 48c461831..be7e8e5e9 100644 --- a/dashboard/src/components/docs/DocsLayout.vue +++ b/dashboard/src/components/docs/DocsLayout.vue @@ -5,7 +5,7 @@