diff --git a/.gitignore b/.gitignore index 33ba78a..ce4ad53 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ old.eslintrc.json logs # Client settings - private -options.json \ No newline at end of file +options.json +emojis.json +Pornhubify.js +fonts \ No newline at end of file diff --git a/package.json b/package.json index 5efd212..15cf841 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "homepage": "https://github.com/Navy-gif/New-GBot#readme", "dependencies": { + "canvas": "^2.6.1", "chalk": "^4.0.0", "common-tags": "^1.8.0", "discord.js": "^12.4.1", diff --git a/structure/client/components/commands/administration/Permissions.js b/structure/client/components/commands/administration/Permissions.js index 32210cb..76dc6c6 100644 --- a/structure/client/components/commands/administration/Permissions.js +++ b/structure/client/components/commands/administration/Permissions.js @@ -2,7 +2,7 @@ const { Role, MessageAttachment } = require('discord.js'); const { Command } = require('../../../../interfaces/'); const { Util, Emojis } = require('../../../../../util/'); -const { stripIndents } = require('common-tags'); +// const { stripIndents } = require('common-tags'); const Constants = { pageSize: 9 diff --git a/structure/client/components/commands/developer/Evaluate.js b/structure/client/components/commands/developer/Evaluate.js index ce60e58..0a959e2 100644 --- a/structure/client/components/commands/developer/Evaluate.js +++ b/structure/client/components/commands/developer/Evaluate.js @@ -1,7 +1,7 @@ const { inspect } = require('util'); const { username } = require('os').userInfo(); -const { Util } = require('../../../../../util'); +const { Util } = require('../../../../../util'); //eslint-disable-line no-unused-vars // eslint-disable-next-line no-unused-vars const moment = require('moment'); @@ -43,21 +43,20 @@ class Evaluate extends Command { } ], showUsage: true, - keepQuotes: true, guarded: true, archivable: false }); } - async execute(message, { params, args }) { + async execute(message, { qParams, args }) { - params = params.join(' '); - if (args.async) params = `(async () => {${params}})()`; + qParams = qParams.join(' '); + if (args.async) qParams = `(async () => {${qParams}})()`; const { guild, author, member, client } = message; //eslint-disable-line no-unused-vars try { - let evaled = eval(params); //eslint-disable-line no-eval + let evaled = eval(qParams); //eslint-disable-line no-eval if(evaled instanceof Promise) await evaled; if(typeof evaled !== 'string') evaled = inspect(evaled); diff --git a/structure/client/components/commands/moderation/Addrole.js b/structure/client/components/commands/moderation/Addrole.js index 1852d34..2ea59df 100644 --- a/structure/client/components/commands/moderation/Addrole.js +++ b/structure/client/components/commands/moderation/Addrole.js @@ -52,6 +52,8 @@ class AddroleCommand extends Command { .handleInfraction(AddRole, message, { targets: members, data: { + roleIds: roles.map((r) => r.id), + roleNames: roles.map((r) => r.display), roles }, reason: parameters.join(' ') diff --git a/structure/client/components/commands/moderation/Ban.js b/structure/client/components/commands/moderation/Ban.js index 176c7d1..1747163 100644 --- a/structure/client/components/commands/moderation/Ban.js +++ b/structure/client/components/commands/moderation/Ban.js @@ -18,7 +18,6 @@ class BanCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 24h raiding the server" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -78,9 +77,9 @@ class BanCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver), this.client.resolver.resolveUser.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Case.js b/structure/client/components/commands/moderation/Case.js index 4c9819c..1c8378d 100644 --- a/structure/client/components/commands/moderation/Case.js +++ b/structure/client/components/commands/moderation/Case.js @@ -14,7 +14,6 @@ class CaseCommand extends Command { '23', '23 --verbose' ], - keepQuotes: true, arguments: [ { name: 'verbose', @@ -44,12 +43,12 @@ class CaseCommand extends Command { } - async execute(message, { params, args }) { + async execute(message, { qParams, args }) { const { guild } = message; - let [caseID] = params; + let [caseID] = qParams; caseID = parseInt(caseID); - if (isNaN(caseID) || caseID < 0) return message.formattedRespond('C_CASE_INVALID', { params: { caseID: params[0] } }); + if (isNaN(caseID) || caseID < 0) return message.formattedRespond('C_CASE_INVALID', { params: { caseID: qParams[0] } }); const infraction = await this.client.storageManager.mongodb.infractions.findOne({ id: `${guild.id}:${caseID}` @@ -59,7 +58,7 @@ class CaseCommand extends Command { if (args.raw) return message.respond(`\`\`\`js\n${inspect(infraction)}\n\`\`\``); if (args.changes) return message.embed(await this._listChanges(message, infraction)); - const target = infraction.targetType === 'user' ? await this.client.resolver.resolveUser(infraction.target) : await guild.resolveChannel(infraction.target); + const target = infraction.targetType === 'USER' ? await this.client.resolver.resolveUser(infraction.target) : await guild.resolveChannel(infraction.target); const staff = await this.client.resolver.resolveUser(infraction.executor); let index = 'C_CASE_TEMPLATE', @@ -84,7 +83,7 @@ class CaseCommand extends Command { unix: Math.floor(infraction.timestamp/1000), relativeTime: this.client.resolver.timeAgo(Math.floor((Date.now() - infraction.timestamp) / 1000)), relativeTimeSeconds: Math.floor((Date.now() - infraction.timestamp) / 1000), - target: infraction.targetType === 'user' ? message.format(targetUserIndex, { target: target.tag, targetID: target.id }) : message.format(targetChannelIndex, { target: target.name, targetID: target.id }), + target: infraction.targetType === 'USER' ? message.format(targetUserIndex, { target: target.tag, targetID: target.id }) : message.format(targetChannelIndex, { target: target.name, targetID: target.id }), staff: staff.tag, staffID: staff.id, nrChanges: infraction.changes?.length || 0, diff --git a/structure/client/components/commands/moderation/History.js b/structure/client/components/commands/moderation/History.js index 208b75b..6740119 100644 --- a/structure/client/components/commands/moderation/History.js +++ b/structure/client/components/commands/moderation/History.js @@ -6,7 +6,7 @@ const moment = require('moment'); const { UploadLimit } = require('../../../../../util/Constants.js'); const { Util } = require('../../../../../util/'); -const { InfractionResolves } = require('../../../../../util/Constants.js'); +const { InfractionResolves, InfractionProperCase } = require('../../../../../util/Constants.js'); const Constants = { PageSize: 5, @@ -97,7 +97,8 @@ class HistoryCommand extends Command { async execute(message, { params, args }) { - if(args.export) return this._exportLogs(message, Boolean(args.private)); + const priv = Boolean(args.private); + if(args.export) return this._exportLogs(message, priv); const query = { guild: message.guild.id @@ -180,17 +181,26 @@ class HistoryCommand extends Command { for(let i = 0; i `<@&${r}>`).join(' ') + })}`; + } + if(infraction.duration) string += `\n**Duration:** ${Util.duration(infraction.duration)}`; if(infraction.points) string += `\n**Points:** ${infraction.points}`; @@ -207,17 +217,23 @@ class HistoryCommand extends Command { if(long) embed.footer.text += ` • To see the full reason, use the ${message.guild.prefix}case command.`; const type = message.format('C_HISTORY_SUCCESSTYPE', { old: Boolean(args.oldest) }, true); - message.respond(message.format('C_HISTORY_SUCCESS', { - targets: parsed.length > 0 ? message.format('C_HISTORY_SUCCESSTARGETS', { - plural: parsed.length === 1 ? '' : 's', - targets: parsed.map((p) => `**${Util.escapeMarkdown(p.display)}**`).join(' ') - }) : '', - type - }), { - emoji: 'success', - embed, - dm: Boolean(args.private) - }); + try { + message.respond(message.format('C_HISTORY_SUCCESS', { + targets: parsed.length > 0 ? message.format('C_HISTORY_SUCCESSTARGETS', { + plural: parsed.length === 1 ? '' : 's', + targets: parsed.map((p) => `**${Util.escapeMarkdown(p.display)}**`).join(' ') + }) : '', + type + }), { + emoji: 'success', + embed, + dm: Boolean(args.private) + }); + } catch(e) { //eslint-disable-line no-unused-vars + message.respond(message.format('C_HISTORY_FAILTOOLONG'), { + emoji: 'failure' + }); + } } diff --git a/structure/client/components/commands/moderation/Kick.js b/structure/client/components/commands/moderation/Kick.js index 5707733..a0c36fc 100644 --- a/structure/client/components/commands/moderation/Kick.js +++ b/structure/client/components/commands/moderation/Kick.js @@ -14,7 +14,6 @@ class KickCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 breaking the rules" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -74,9 +73,9 @@ class KickCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Lockdown.js b/structure/client/components/commands/moderation/Lockdown.js new file mode 100644 index 0000000..4dde710 --- /dev/null +++ b/structure/client/components/commands/moderation/Lockdown.js @@ -0,0 +1,75 @@ +const { Command } = require('../../../../interfaces/'); +const { Lockdown } = require('../../../../moderation/infractions/'); + +class LockdownCommand extends Command { + + constructor(client) { + + super(client, { + name: 'lockdown', + module: 'moderation', + usage: "[channel..] [duration] [reason..]", + aliases: [ + 'lock' + ], + clientPermissions: ['MANAGE_CHANNELS'], + memberPermissions: ['MANAGE_CHANNELS'], + examples: [ + "#general #off-topic raid", + "" + ], + guildOnly: true, + showUsage: true, + throttling: { + usages: 2, + duration: 10 + } + }); + } + + async execute(message, { qParams }) { + + let { parsed, parameters } = await this.client.resolver.infinite(qParams, [ //eslint-disable-line prefer-const + this.client.resolver.resolveChannel.bind(this.client.resolver) + ], true, message.guild); + + if(parsed.length === 0) { + parsed = [ message.channel ]; + } + + + if(parameters.length === 0) return message.respond(message.format('C_PRUNE_INTEGERINVALID'), { + emoji: 'failure' + }); + + let int = parseInt(parameters[0]); + if(Number.isNaN(int)) { + return message.respond(message.format('C_PRUNE_INTEGERINVALID'), { + emoji: 'failure' + }); + } + + if(int < 1 || int > 300) { + return message.respond(message.format('C_PRUNE_INTEGEREXCEPTION'), { + emoji: 'failure' + }); + } + + if(int % 100 > 0) int++; //Increase amount by one (to delete command message) ONLY IF indivisible by 100, this is to save a message fetch call. + + const reason = parameters.slice(1).join(' '); + + return this.client.moderationManager + .handleInfraction(Lockdown, message, { + targets: parsed, + data: { + amount: int + }, + reason + }); + + } + +} + +module.exports = LockdownCommand; \ No newline at end of file diff --git a/structure/client/components/commands/moderation/Mute.js b/structure/client/components/commands/moderation/Mute.js index 9069f42..5cadfa3 100644 --- a/structure/client/components/commands/moderation/Mute.js +++ b/structure/client/components/commands/moderation/Mute.js @@ -17,7 +17,6 @@ class MuteCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 1h spamming the chat" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -74,9 +73,9 @@ class MuteCommand extends Command { }); } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Note.js b/structure/client/components/commands/moderation/Note.js index 47b24b6..12c49b5 100644 --- a/structure/client/components/commands/moderation/Note.js +++ b/structure/client/components/commands/moderation/Note.js @@ -13,7 +13,6 @@ class NoteCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 they might be spamming" ], - keepQuotes: true, arguments: [ { name: 'silent', @@ -31,9 +30,9 @@ class NoteCommand extends Command { }); } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Prune.js b/structure/client/components/commands/moderation/Prune.js index e6d0a51..adeaccf 100644 --- a/structure/client/components/commands/moderation/Prune.js +++ b/structure/client/components/commands/moderation/Prune.js @@ -18,7 +18,6 @@ class PruneCommand extends Command { "50 -u @nolan#2887 @Navy#1998 they were spamming", "10 bot spam -b" ], - keepQuotes: true, arguments: [ { name: 'users', @@ -166,9 +165,9 @@ class PruneCommand extends Command { }); } - async execute(message, { params }) { + async execute(message, { qParams }) { - let { parsed, parameters } = await this.client.resolver.infinite(params, [ //eslint-disable-line prefer-const + let { parsed, parameters } = await this.client.resolver.infinite(qParams, [ //eslint-disable-line prefer-const this.client.resolver.resolveChannel.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Slowmode.js b/structure/client/components/commands/moderation/Slowmode.js index d507856..98bc985 100644 --- a/structure/client/components/commands/moderation/Slowmode.js +++ b/structure/client/components/commands/moderation/Slowmode.js @@ -15,7 +15,6 @@ class SlowmodeCommand extends Command { "#general #off-topic 5s influx of new users", "10 raid" ], - keepQuotes: true, arguments: [ { name: 'silent', @@ -36,9 +35,9 @@ class SlowmodeCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - let { parsed, parameters } = await this.client.resolver.infinite(params, [ //eslint-disable-line prefer-const + let { parsed, parameters } = await this.client.resolver.infinite(qParams, [ //eslint-disable-line prefer-const this.client.resolver.resolveChannel.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Softban.js b/structure/client/components/commands/moderation/Softban.js index d5e3366..2984b7b 100644 --- a/structure/client/components/commands/moderation/Softban.js +++ b/structure/client/components/commands/moderation/Softban.js @@ -14,7 +14,6 @@ class SoftbanCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 spamming the chat" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -74,9 +73,9 @@ class SoftbanCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver), this.client.resolver.resolveUser.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Unban.js b/structure/client/components/commands/moderation/Unban.js index 4149f00..316749e 100644 --- a/structure/client/components/commands/moderation/Unban.js +++ b/structure/client/components/commands/moderation/Unban.js @@ -18,7 +18,6 @@ class UnbanCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 appealed their ban" ], - keepQuotes: true, arguments: [ { name: 'silent', @@ -39,9 +38,9 @@ class UnbanCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver), this.client.resolver.resolveUser.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Unlockdown.js b/structure/client/components/commands/moderation/Unlockdown.js new file mode 100644 index 0000000..5fb37c9 --- /dev/null +++ b/structure/client/components/commands/moderation/Unlockdown.js @@ -0,0 +1,75 @@ +const { Command } = require('../../../../interfaces/'); +const { Unlockdown } = require('../../../../moderation/infractions/'); + +class UnlockdownCommand extends Command { + + constructor(client) { + + super(client, { + name: 'unlockdown', + module: 'moderation', + usage: "[channel..] [duration] [reason..]", + aliases: [ + 'lock' + ], + clientPermissions: ['MANAGE_CHANNELS'], + memberPermissions: ['MANAGE_CHANNELS'], + examples: [ + "#general #off-topic raid", + "" + ], + guildOnly: true, + showUsage: true, + throttling: { + usages: 2, + duration: 10 + } + }); + } + + async execute(message, { qParams }) { + + let { parsed, parameters } = await this.client.resolver.infinite(qParams, [ //eslint-disable-line prefer-const + this.client.resolver.resolveChannel.bind(this.client.resolver) + ], true, message.guild); + + if(parsed.length === 0) { + parsed = [ message.channel ]; + } + + + if(parameters.length === 0) return message.respond(message.format('C_PRUNE_INTEGERINVALID'), { + emoji: 'failure' + }); + + let int = parseInt(parameters[0]); + if(Number.isNaN(int)) { + return message.respond(message.format('C_PRUNE_INTEGERINVALID'), { + emoji: 'failure' + }); + } + + if(int < 1 || int > 300) { + return message.respond(message.format('C_PRUNE_INTEGEREXCEPTION'), { + emoji: 'failure' + }); + } + + if(int % 100 > 0) int++; //Increase amount by one (to delete command message) ONLY IF indivisible by 100, this is to save a message fetch call. + + const reason = parameters.slice(1).join(' '); + + return this.client.moderationManager + .handleInfraction(Unlockdown, message, { + targets: parsed, + data: { + amount: int + }, + reason + }); + + } + +} + +module.exports = UnlockdownCommand; \ No newline at end of file diff --git a/structure/client/components/commands/moderation/Unmute.js b/structure/client/components/commands/moderation/Unmute.js index ff19f3c..955c7c4 100644 --- a/structure/client/components/commands/moderation/Unmute.js +++ b/structure/client/components/commands/moderation/Unmute.js @@ -17,7 +17,6 @@ class UnmuteCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 they apologized" ], - keepQuotes: true, arguments: [ { name: 'silent', @@ -35,9 +34,9 @@ class UnmuteCommand extends Command { }); } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Vckick.js b/structure/client/components/commands/moderation/Vckick.js index 6f91be7..7858ba9 100644 --- a/structure/client/components/commands/moderation/Vckick.js +++ b/structure/client/components/commands/moderation/Vckick.js @@ -14,7 +14,6 @@ class VckickCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 mic spamming" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -74,9 +73,9 @@ class VckickCommand extends Command { } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/commands/moderation/Warn.js b/structure/client/components/commands/moderation/Warn.js index e67786d..4719677 100644 --- a/structure/client/components/commands/moderation/Warn.js +++ b/structure/client/components/commands/moderation/Warn.js @@ -13,7 +13,6 @@ class WarnCommand extends Command { examples: [ "@nolan#2887 @Navy.gif#1998 being rude" ], - keepQuotes: true, arguments: [ { name: 'points', @@ -70,9 +69,9 @@ class WarnCommand extends Command { }); } - async execute(message, { params }) { + async execute(message, { qParams }) { - const { parsed, parameters } = await this.client.resolver.infinite(params, [ + const { parsed, parameters } = await this.client.resolver.infinite(qParams, [ this.client.resolver.resolveMember.bind(this.client.resolver) ], true, message.guild); diff --git a/structure/client/components/observers/Automoderation.js b/structure/client/components/observers/Automoderation.js index 8a21ebf..cf380ad 100644 --- a/structure/client/components/observers/Automoderation.js +++ b/structure/client/components/observers/Automoderation.js @@ -450,10 +450,7 @@ module.exports = class AutoModeration extends Observer { } - async filterMentions(message) { - - - + async filterMentions(message) { //eslint-disable-line } }; \ No newline at end of file diff --git a/structure/client/components/observers/CommandHandler.js b/structure/client/components/observers/CommandHandler.js index 8c9b365..7c9cea1 100644 --- a/structure/client/components/observers/CommandHandler.js +++ b/structure/client/components/observers/CommandHandler.js @@ -57,11 +57,8 @@ class CommandHandler extends Observer { return this.handleError(message, { type: 'argument', ...response }); } - if(command.keepQuotes) { - message.parameters = response.parameters.map(([param, isQuote]) => isQuote ? `"${param}"` : param); - } else { - message.parameters = response.parameters.map((p) => p[0]); - } + message.quotedParameters = response.parameters.map(([param, isQuote]) => isQuote ? `"${param}"` : param); + message.parameters = response.parameters.map((p) => p[0]); // const timestamp2 = new Date().getTime(); // this.client.logger.debug(`Client took ${timestamp2-timestamp1}ms to parse arguments.`); diff --git a/structure/extensions/Message.js b/structure/extensions/Message.js index 0195d8e..b695379 100644 --- a/structure/extensions/Message.js +++ b/structure/extensions/Message.js @@ -13,7 +13,9 @@ const Message = Structures.extend('Message', (Message) => { this.command = null; //Will set to command if the message induces a command. this.arguments = null; + this.parameters = null; + this.quotedParameters = null; this._pending = null; @@ -44,10 +46,11 @@ const Message = Structures.extend('Message', (Message) => { try { const resolved = this.command.execute(this, { params: this.parameters, + qParams: this.quotedParameters, args: this.arguments }); - this.command._invokes.success++; if(resolved instanceof Promise) await resolved; + this.command._invokes.success++; return { error: false }; } catch (error) { this.command._invokes.fail++; @@ -158,8 +161,7 @@ const Message = Structures.extend('Message', (Message) => { const embed = { author: { name: `${component.name}${component.module ? ` (${component.module.resolveable})` : ''}`, - // eslint-disable-next-line camelcase - icon_url: this.client.user.displayAvatarURL() + icon_url: this.client.user.displayAvatarURL() //eslint-disable-line camelcase }, description: stripIndents`\`${prefix}${component.name}${component.usage ? ` ${component.usage}` : ''}\`${component.guildOnly ? ' *(guild-only)*' : ''} ${this.format(component.description)}`, diff --git a/structure/interfaces/Command.js b/structure/interfaces/Command.js index b83c48c..0167884 100644 --- a/structure/interfaces/Command.js +++ b/structure/interfaces/Command.js @@ -32,7 +32,6 @@ class Command extends Component { this.archivable = opts.archivable === undefined ? true : Boolean(opts.archivable); this.arguments = opts.arguments || []; - this.keepQuotes = Boolean(opts.keepQuotes); this.clientPermissions = opts.clientPermissions || []; this.memberPermissions = opts.memberPermissions || []; diff --git a/structure/language/languages/en_us/en_us_commands.lang b/structure/language/languages/en_us/en_us_commands.lang index b2d2234..8a97a6a 100644 --- a/structure/language/languages/en_us/en_us_commands.lang +++ b/structure/language/languages/en_us/en_us_commands.lang @@ -448,6 +448,9 @@ switch({old}) { [C_HISTORY_SUCCESS] Fetched the {type} moderation cases{targets}. +[C_HISTORY_FAILTOOLONG] +Failed to display cases in one embed, try a smaller page size. + [C_HISTORY_SUCCESSTARGETS] for target{plural}: {targets} diff --git a/structure/moderation/ModerationManager.js b/structure/moderation/ModerationManager.js index 38d63c4..8576d4c 100644 --- a/structure/moderation/ModerationManager.js +++ b/structure/moderation/ModerationManager.js @@ -119,7 +119,7 @@ class ModerationManager { continue; } - if(infraction.targetType === 'user') { + if(infraction.targetType === 'USER') { const userTarget = target instanceof User ? target : target.user; const oldPoints = await userTarget.totalPoints(message.guild); @@ -171,7 +171,6 @@ class ModerationManager { } responses.push(await infraction.execute()); - } const success = Boolean(responses.some((r) => !r.error)); @@ -187,24 +186,24 @@ class ModerationManager { const successes = {}; const fails = {}; for(const response of responses) { - const { type, targetName } = response.infraction; + const { type, target } = response.infraction; if(!response.error) { if(!silent) { if(successes[type]) { - successes[type].targets.push(targetName); + successes[type].targets.push(target.display); } else { successes[type] = { - targets: [targetName], + targets: [target.display], infraction: response.infraction }; } } } else { if(fails[type]) { - fails[type].targets.push(targetName); + fails[type].targets.push(target.display); } else { fails[type] = { - targets: [targetName], + targets: [target.display], infraction: response.infraction, reason: response.reason }; @@ -222,7 +221,7 @@ class ModerationManager { const reason = type === original ? Util.escapeMarkdown(data.infraction.reason) : message.format('INFRACTION_ESCALATIONREASON'); const str = `${Emojis.success} ${message.format('INFRACTION_SUCCESS', { infraction: dictionary.past, - targetType: `${targetType}${data.targets.length === 1 ? '' : 's'}`, + targetType: `${targetType.toLowerCase()}${data.targets.length === 1 ? '' : 's'}`, target: data.targets.map((t) => `**${Util.escapeMarkdown(t)}**`).join(' '), text: type === original ? ` ${reason.length > 120 ? `for: \`${reason.substring(0, 117)}...\`` : `for: \`${reason}\``}` : ` because \`${reason}\`` })}`; @@ -235,7 +234,7 @@ class ModerationManager { const { dictionary, targetType } = data.infraction; const str = `${Emojis.failure} ${message.format('INFRACTION_FAIL', { infraction: dictionary.present, - targetType: `${targetType}${data.targets.length === 1 ? '' : 's'}`, + targetType: `${targetType.toLowerCase()}${data.targets.length === 1 ? '' : 's'}`, target: data.targets.map((t) => `**${Util.escapeMarkdown(t)}**`).join(' '), reason: message.format(data.reason) })}`; @@ -385,7 +384,7 @@ class ModerationManager { await guild.settings(); //just incase let target = null; - if(i.targetType === 'user') { + if(i.targetType === 'USER') { target = await guild.members.resolve(i.target); if(!target) { try { @@ -397,7 +396,7 @@ class ModerationManager { } catch(e) {} //eslint-disable-line no-empty } } - } else if(i.targetType === 'channel') { + } else if(i.targetType === 'CHANNEL') { target = guild.channels.resolve(i.target); } diff --git a/structure/moderation/infractions/Addrole.js b/structure/moderation/infractions/Addrole.js index 0fc7e40..ddc6be3 100644 --- a/structure/moderation/infractions/Addrole.js +++ b/structure/moderation/infractions/Addrole.js @@ -7,21 +7,16 @@ class AddroleInfraction extends Infraction { super(client, { type: 'ADDROLE', - targetType: 'user', - message: opts.message, - executor: opts.executor.user, - target: opts.target.user, - reason: opts.reason || 'N/A', + targetType: 'USER', guild: opts.guild, channel: opts.channel, + message: opts.message, + target: opts.target.user, + executor: opts.executor.user, + reason: opts.reason, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0xff3333, - dictionary: { - past: 'added role to', - present: 'add role to' - }, points: opts.points, expiration: opts.expiration, data: opts.data @@ -36,11 +31,13 @@ class AddroleInfraction extends Infraction { async execute() { try { - await this.member.roles.add(this.data.roles, this._reason); + await this.member.roles.add(this.data.roleIds, this._reason); } catch(error) { return this._fail('INFRACTION_ERROR'); } + delete this.data.roles; //before it saves to db. + await this.handle(); return this._succeed(); @@ -69,6 +66,13 @@ class AddroleInfraction extends Infraction { } + description(dm) { + return `\n${this.guild.format('INFRACTION_DESCRIPTIONROLES', { + plural: this.data.roleIds.length === 1 ? '' : 's', + roles: dm ? this.data.roleNames.join(', ') : this.data.roleIds.map((r) => `<@&${r}>`).join(' ') + })}`; + } + } module.exports = AddroleInfraction; \ No newline at end of file diff --git a/structure/moderation/infractions/Ban.js b/structure/moderation/infractions/Ban.js index e5f8f4e..4b9505a 100644 --- a/structure/moderation/infractions/Ban.js +++ b/structure/moderation/infractions/Ban.js @@ -8,21 +8,16 @@ class BanInfraction extends Infraction { super(client, { type: 'BAN', - targetType: 'user', + targetType: 'USER', + guild: opts.guild, + channel: opts.channel, message: opts.message, executor: opts.executor.user, target: opts.target instanceof GuildMember ? opts.target.user : opts.target, - reason: opts.reason || 'N/A', - guild: opts.guild, - channel: opts.channel, + reason: opts.reason, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0xff3333, - dictionary: { - past: 'banned', - present: 'ban' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Kick.js b/structure/moderation/infractions/Kick.js index 6a9a47d..53a1794 100644 --- a/structure/moderation/infractions/Kick.js +++ b/structure/moderation/infractions/Kick.js @@ -6,20 +6,15 @@ class KickInfraction extends Infraction { super(client, { type: 'KICK', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, - color: 0xff7a33, - dictionary: { - past: 'kicked', - present: 'kick' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Lockdown.js b/structure/moderation/infractions/Lockdown.js new file mode 100644 index 0000000..81a5465 --- /dev/null +++ b/structure/moderation/infractions/Lockdown.js @@ -0,0 +1,49 @@ +const { Infraction } = require('../interfaces/'); + +class LockdownInfraction extends Infraction { + + constructor(client, opts = {}) { + + super(client, { + type: 'LOCKDOWN', + targetType: 'USER', + message: opts.message, + executor: opts.executor.user, + target: opts.target.user, + reason: opts.reason, + guild: opts.guild, + channel: opts.channel, + arguments: opts.arguments, + silent: opts.silent, + points: opts.points, + expiration: opts.expiration, + data: opts.data + }); + + this.client = client; + this.member = opts.target; + + } + + async execute() { + + // try { + // await this.member.kick(this._reason); + // } catch(error) { + // return this._fail('INFRACTION_ERROR'); + // } + + await this.handle(); + return this._succeed(); + + } + + async verify() { + + return super._verify(); + + } + +} + +module.exports = LockdownInfraction; \ No newline at end of file diff --git a/structure/moderation/infractions/Mute.js b/structure/moderation/infractions/Mute.js index 255daba..0a7a932 100644 --- a/structure/moderation/infractions/Mute.js +++ b/structure/moderation/infractions/Mute.js @@ -7,21 +7,16 @@ class MuteInfraction extends Infraction { super(client, { type: 'MUTE', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0x1f75ff, - dictionary: { - past: 'muted', - present: 'mute' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Nickname.js b/structure/moderation/infractions/Nickname.js index e7e253d..4280517 100644 --- a/structure/moderation/infractions/Nickname.js +++ b/structure/moderation/infractions/Nickname.js @@ -14,18 +14,13 @@ class NicknameInfraction extends Infraction { super(client, { type: 'NICKNAME', - targetType: 'user', + targetType: 'USER', executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, - color: 0xEBEBEB, silent: opts.silent, - dictionary: { - past: 'nicknamed', - present: 'nickname' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Note.js b/structure/moderation/infractions/Note.js index 1bf7468..93c81c3 100644 --- a/structure/moderation/infractions/Note.js +++ b/structure/moderation/infractions/Note.js @@ -6,18 +6,13 @@ class NoteInfraction extends Infraction { super(client, { type: 'NOTE', - targetType: 'user', + targetType: 'USER', executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, - color: 0xEBEBEB, silent: opts.silent, - dictionary: { - past: 'noted', - present: 'note' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Prune.js b/structure/moderation/infractions/Prune.js index 6271ec7..5740979 100644 --- a/structure/moderation/infractions/Prune.js +++ b/structure/moderation/infractions/Prune.js @@ -9,20 +9,15 @@ class PruneInfraction extends Infraction { super(client, { type: 'PRUNE', - targetType: 'channel', + targetType: 'CHANNEL', message: opts.message, arguments: opts.arguments, executor: opts.executor.user, target: opts.target, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, silent: opts.silent, - color: 0xdb36fc, - dictionary: { - past: 'pruned', - present: 'prune' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Removerole.js b/structure/moderation/infractions/Removerole.js index 5907978..f8a9e7e 100644 --- a/structure/moderation/infractions/Removerole.js +++ b/structure/moderation/infractions/Removerole.js @@ -7,21 +7,16 @@ class RemoveroleInfraction extends Infraction { super(client, { type: 'REMOVEROLE', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0xff3333, - dictionary: { - past: 'removed role from', - present: 'remove role from' - }, points: opts.points, expiration: opts.expiration, data: opts.data @@ -60,6 +55,13 @@ class RemoveroleInfraction extends Infraction { } + description(dm) { + return `\n${this.guild.format('INFRACTION_DESCRIPTIONROLES', { + plural: this.data.roleIds.length === 1 ? '' : 's', + roles: dm ? this.data.roleNames.join(', ') : this.data.roleIds.map((r) => `<@&${r}>`).join(' ') + })}`; + } + } module.exports = RemoveroleInfraction; \ No newline at end of file diff --git a/structure/moderation/infractions/Slowmode.js b/structure/moderation/infractions/Slowmode.js index 0b9b53f..282b5a8 100644 --- a/structure/moderation/infractions/Slowmode.js +++ b/structure/moderation/infractions/Slowmode.js @@ -7,21 +7,16 @@ class SlowmodeInfraction extends Infraction { super(client, { type: 'SLOWMODE', - targetType: 'channel', + targetType: 'CHANNEL', message: opts.message, executor: opts.executor.user, target: opts.target, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0xff3333, - dictionary: { - past: 'set slowmode in', - present: 'slowmode' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Softban.js b/structure/moderation/infractions/Softban.js index 7f1c3df..4e89e84 100644 --- a/structure/moderation/infractions/Softban.js +++ b/structure/moderation/infractions/Softban.js @@ -7,20 +7,15 @@ class SoftbanInfraction extends Infraction { super(client, { type: 'SOFTBAN', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target instanceof GuildMember ? opts.target.user : opts.target, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, - color: 0xdb36fc, - dictionary: { - past: 'softbanned', - present: 'softban' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Unban.js b/structure/moderation/infractions/Unban.js index e8401b6..c416c5d 100644 --- a/structure/moderation/infractions/Unban.js +++ b/structure/moderation/infractions/Unban.js @@ -7,21 +7,16 @@ class UnbanInfraction extends Infraction { super(client, { type: 'UNBAN', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0xff5c5c, - dictionary: { - past: 'unbanned', - present: 'unban' - }, hyperlink: opts.hyperlink, points: opts.points, expiration: opts.expiration, diff --git a/structure/moderation/infractions/Unlockdown.js b/structure/moderation/infractions/Unlockdown.js new file mode 100644 index 0000000..1dcd44d --- /dev/null +++ b/structure/moderation/infractions/Unlockdown.js @@ -0,0 +1,49 @@ +const { Infraction } = require('../interfaces/'); + +class UnlockdownInfraction extends Infraction { + + constructor(client, opts = {}) { + + super(client, { + type: 'UNLOCKDOWN', + targetType: 'USER', + message: opts.message, + executor: opts.executor.user, + target: opts.target.user, + reason: opts.reason, + guild: opts.guild, + channel: opts.channel, + arguments: opts.arguments, + silent: opts.silent, + points: opts.points, + expiration: opts.expiration, + data: opts.data + }); + + this.client = client; + this.member = opts.target; + + } + + async execute() { + + // try { + // await this.member.kick(this._reason); + // } catch(error) { + // return this._fail('INFRACTION_ERROR'); + // } + + await this.handle(); + return this._succeed(); + + } + + async verify() { + + return super._verify(); + + } + +} + +module.exports = UnlockdownInfraction; \ No newline at end of file diff --git a/structure/moderation/infractions/Unmute.js b/structure/moderation/infractions/Unmute.js index 7cffc2c..1eaa22d 100644 --- a/structure/moderation/infractions/Unmute.js +++ b/structure/moderation/infractions/Unmute.js @@ -7,21 +7,16 @@ class MuteInfraction extends Infraction { super(client, { type: 'UNMUTE', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, duration: opts.duration, - color: 0x5c9aff, - dictionary: { - past: 'unmuted', - present: 'unmute' - }, hyperlink: opts.hyperlink, points: opts.points, expiration: opts.expiration, diff --git a/structure/moderation/infractions/Vckick.js b/structure/moderation/infractions/Vckick.js index 0f5b79e..d27cdf9 100644 --- a/structure/moderation/infractions/Vckick.js +++ b/structure/moderation/infractions/Vckick.js @@ -6,20 +6,15 @@ class VckickInfraction extends Infraction { super(client, { type: 'VCKICK', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, arguments: opts.arguments, silent: opts.silent, - color: 0xF9DC5C, - dictionary: { - past: 'vckicked', - present: 'vckick' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/infractions/Warn.js b/structure/moderation/infractions/Warn.js index d8b2ea5..7b3f1d1 100644 --- a/structure/moderation/infractions/Warn.js +++ b/structure/moderation/infractions/Warn.js @@ -6,19 +6,14 @@ class WarnInfraction extends Infraction { super(client, { type: 'WARN', - targetType: 'user', + targetType: 'USER', message: opts.message, executor: opts.executor.user, target: opts.target.user, - reason: opts.reason || 'N/A', + reason: opts.reason, guild: opts.guild, channel: opts.channel, silent: opts.silent, - color: 0xffe15c, - dictionary: { - past: 'warned', - present: 'warn' - }, points: opts.points, expiration: opts.expiration, data: opts.data diff --git a/structure/moderation/interfaces/Infraction.js b/structure/moderation/interfaces/Infraction.js index b739472..bb6b357 100644 --- a/structure/moderation/interfaces/Infraction.js +++ b/structure/moderation/interfaces/Infraction.js @@ -1,3 +1,9 @@ +const { + InfractionTargetTypes, + InfractionDictionary, + InfractionColors +} = require('../../../util/Constants.js'); + const { Util } = require('../../../util/'); const Constants = { @@ -7,85 +13,107 @@ const Constants = { class Infraction { - constructor(client, opts = {}) { + constructor(client, data = {}) { this.client = client; - this.message = opts.message; //NOT REQUIRED - this.arguments = opts.arguments || {}; + this.type = data.type || null; + this.id = null; + this.case = null; + + this.message = data.message; //NOT REQUIRED + this.arguments = data.arguments || {}; + + this.guildId = data.guild ? data.guild.id : null; + this.guild = data.guild || null; + + this.channelId = data.channel ? data.channel.id : null; + this.channel = data.channel || null; + + this.messageId = data.message ? data.message.id : null; + this.message = data.message || null; + + this.targetId = data.target ? data.target.id : null; + this.target = data.target || []; + + this.executorId = data.executor ? data.executor.id : null; + this.executor = data.executor || null; + + this.targetType = data.targetType && InfractionTargetTypes.includes(data.targetType) ? data.targetType : 'USER'; - this.target = opts.target; //User or channel being targeted. User object, not GuildMember. - this.targetType = opts.targetType; // 'user' or 'channel'. - this.executor = opts.executor; //Whoever executed the command. User object, not GuildMember. this.resolved = false; - - this.guild = opts.guild; - this.channel = opts.channel; - this.case = null; - this.type = opts.type; //What type of infraction (mute, kick, etc.) + this.duration = isNaN(data.duration) ? null : data.duration; //How long the action will last. Must be in milliseconds. + this.callback = isNaN(data.duration) ? null : Date.now() + data.duration * 1000; //At what epoch(?) time it will callback. + + this.reason = data.reason.length ? data.reason : 'N/A'; + + this.points = data.points || 0; + this.totalPoints = 0; + this.expiration = data.expiration || 0; + + this.data = data.data || {}; //Miscellaneous data that may need to be saved for future use. + this.flags = data.arguments ? Object.keys(data.arguments) : []; + this.hyperlink = data.hyperlink || null; // To overwrite hyperlink (if it's from a callback) + + this.modlogMessageId = null; + this.dmlogMessageId = null; + this.modlogId = null; + + this.changes = []; this.timestamp = Date.now(); - this.duration = isNaN(opts.duration) ? null : opts.duration; //How long the action will last. Must be in milliseconds. - this.callback = isNaN(opts.duration) ? null : Date.now() + opts.duration * 1000; //At what epoch(?) time it will callback. - this.reason = opts.reason.length ? opts.reason : 'N/A'; + this._callbacked = Boolean(data._callbacked); + this._fetched = Boolean(data); - this.silent = opts.silent; - - this.points = opts.points || 0; - this.totalPoints = 0; - this.expiration = opts.expiration || 0; - - this.data = opts.data || {}; //Miscellaneous data that may need to be saved for future use. - this.color = opts.color; //Infraction-defined hexadecimal value to dictate what color the embed is. - this.dictionary = opts.dictionary || {}; // { past: 'banned', present: 'ban' } Infraction-defined object for the correct spellings. - this.hyperlink = opts.hyperlink || null; // To overwrite hyperlink (if it's from a callback) - - this._logMessage = null; //The message embed sent in the moderation-log. Full message, not the ID. - this._moderationLog = null; //Moderation log channel - - this.changes = []; } async handle() { - const { moderationLog } = this.guild._settings; + const { moderationLog, dmInfraction } = await this.guild.settings(); + //Increment CaseId, should only be called if making a new infraction. this.guild._settings.caseId++; this.case = this.guild._settings.caseId; await this.guild._updateSettings({ caseId: this.case - }); - + }); /* Logging */ - + if(moderationLog.channel) { if(moderationLog.infractions.includes(this.type)) { this._moderationLog = await this.client.resolver.resolveChannel(moderationLog.channel, true, this.guild); if(!this._moderationLog) return undefined; - this._logMessage = await this._moderationLog.send('', { embed: this.embed() }); + this.modlogId = this._moderationLog.id; + try { + this._logMessage = await this._moderationLog.send('', { embed: this._embed() }); + this.modlogMessageId = this._logMessage.id; + } catch(e) { + console.error(e); + } //eslint-disable-line no-empty } else { this.client.logger.debug(`Did not log infraction ${this.type} because it is not in the infractions.`); } } - if(this.guild._settings.dmInfraction.enabled - && this.targetType === 'user' - && this.type !== 'NOTE') { - let message = this.guild._settings.dmInfraction.messages[this.type] || this.guild._settings.dmInfraction.messages.default; - if(!message) message = ""; - message = message - .replace(/\{(guild|server)\}/ugim, this.guild.name) - .replace(/\{user\}/ugim, this.target.tag) - .replace(/\{infraction\}/ugim, this.dictionary.past) - .replace(/\{from\|on\}/ugim, Constants.RemovedInfractions.includes(this.type) ? 'from' : 'on'); //add more if you want i should probably add a better system for this... - try { - this.target.send(message, { - embed: this.embed(true) - }); - } catch(e) {} //eslint-disable-line no-empty + if(dmInfraction.enabled) { + if(this.targetType === 'USER') { + let message = dmInfraction.messages[this.type] || dmInfraction.messages.default; + if(!message) message = ''; + message = message + .replace(/\{(guild|server)\}/ugim, this.guild.name) + .replace(/\{user\}/ugim, this.target.tag) + .replace(/\{infraction\}/ugim, this.dictionary.past) + .replace(/\{from\|on\}/ugim, Constants.RemovedInfractions.includes(this.type) ? 'from' : 'on'); //add more if you want i should probably add a better system for this... + try { + const logMessage = await this.target.send(message, { + embed: this._embed(true) + }); + this.dmlogMessageId = logMessage.id; + } catch(e) {} //eslint-disable-line no-empty + } } if(this.duration) { @@ -94,7 +122,9 @@ class Infraction { /* LMAOOOO PLEASE DONT JUDGE ME */ if(this.data.roles && this.data.roles.length > 0) { - this.data.roles = this.data.roles.map((r) => r.id); + this.data.roleIds = this.data.roles.map((r) => r.id); + this.data.roleNames = this.data.roles.map((r) => r.name); + delete this.data.roles; } return this.save(); @@ -108,52 +138,67 @@ class Infraction { }); } - embed(dm = false) { + hyperlink(bool = false) { + if(bool) return `https://discord.com/channels/${this.guildId}/${this.modlogId}/${this.modlogMessageId}`; + return `https://discord.com/channels/${this.guildId}/${this.channelId}/${this.messageId}`; + } - let description = this.guild.format('INFRACTION_DESCRIPTION', { + _embed(dm) { + let description = ""; + + description += `${this.guild.format('INFRACTION_DESCRIPTION', { type: this.dictionary.past.toUpperCase(), moderator: `${Util.escapeMarkdown(this.executor.tag)}`, reason: Util.escapeMarkdown(this.reason.length > Constants.MaxCharacters ? `${this.reason.substring(0, Constants.MaxCharacters-3)}...` : this.reason, { italic: false, underline: false, strikethrough: false }) - }); - + })}`; + if(this.duration) { description += `\n${this.guild.format('INFRACTION_DESCRIPTIONDURATION', { duration: Util.duration(this.duration) })}`; } - if(this.points > 0) { - description += `\n${this.guild.format('INFRACTION_DESCRIPTIONPOINTS', { points: this.points, total: this.totalPoints })}`; + if(this.points && this.points > 0) { //TODO: Add expiration to INFRACTION_DESCRIPTIONPOINTS + description += `\n${this.guild.format('INFRACTION_DESCRIPTIONPOINTS', { points: this.points, total: this.pointsTotal, expires: Util.duration(this.pointsExpiration) })}`; } if(this.description && this.description instanceof Function) { description += this.description(dm); } - if(!this.silent && (this.message || this.hyperlink) && (dm && !Constants.RemovedInfractions.includes(this.type))) { - description += `\n${this.guild.format('INFRACTION_DESCRIPTIONJUMPTO', { name: this.hyperlink ? 'Case' : 'Message', link: this.hyperlink ? this.hyperlink : `https://discord.com/channels/${this.guild.id}/${this.channel.id}/${this.message.id}` })}`; + if(!this.silent && + (this.message || this.hyperlink) + && (dm && !Constants.RemovedInfractions.includes(this.type))) { + description += `\n${this.guild.format('INFRACTION_DESCRIPTIONJUMPTO', { name: this.hyperlink ? 'Case' : 'Message', link: this.hyperlink ? this.hyperlink : `https://discord.com/channels/${this.guildId}/${this.channelId}/${this.messageId}` })}`; } + - return { + const blah = { author: { - name: `${this.targetName} (${this.target.id})`, - icon_url: this.targetIcon //eslint-disable-line camelcase + name: `${this.target.display} (${this.targetId})`, + icon_url: this.target.displayAvatarURL() //eslint-disable-line camelcase }, - timestamp: new Date(), + timestamp: this.timestamp, color: this.color, footer: { text: `》 Case ${this.case}` }, description }; + + return blah; + } get json() { return { - id: `${this.guild.id}:${this.case}`, - guild: this.guild.id, - channel: this.channel ? this.channel.id : null, - message: this.message ? this.message.id : null, - executor: this.executor.id, - target: this.target.id, + id: `${this.guildId}:${this.case}`, + guild: this.guildId, + channel: this.channelId, + channelName: this.channel.display, + message: this.messageId, + executor: this.executorId, + executorTag: this.executor.display, + target: this.targetId, + targetTag: this.target.display, targetType: this.targetType, type: this.type, case: this.case, @@ -161,26 +206,19 @@ class Infraction { duration: this.duration, callback: this.callback, reason: this.reason, - points: this.points, - expiration: this.expiration, data: this.data, - actions: this.actions, - logMessage: this._logMessage ? this._logMessage.id : null, //the message id sent in modlog channel - moderationLog: this._moderationLog ? this._moderationLog.id : null, - callbacked: false, + flags: this.flags, + modLogMessage: this.modLogMessageId, + dmLogMessage: this.dmlogMessageId, + modLogChannel: this.modlogId, resolved: this.resolved, - changes: this.changes + changes: this.changes, + _callbacked: this._callbacked || false }; } - get targetName() { - return this.targetType === 'user' - ? this.target.tag - : `#${this.target.name}`; - } - get targetIcon() { - return this.targetType === 'user' + return this.targetType === 'USER' ? this.target.displayAvatarURL() : this.guild.iconURL(); } @@ -198,6 +236,14 @@ class Infraction { if(str.length > 512) str = `${this.reason.substring(0, 509)}...`; return str; } + + get dictionary() { + return InfractionDictionary[this.type]; + } + + get color() { + return InfractionColors[this.type]; + } //Super Functions _succeed() { @@ -222,7 +268,7 @@ class Infraction { async _verify() { if (this.executor.id === this.guild.ownerID) return this._succeed(); - if (this.guild && this.guild._settings.protection.enabled && this.targetType === 'user') { + if (this.guild && this.guild._settings.protection.enabled && this.targetType === 'USER') { //Idk what the thought process here has been, but the user object does not have roles, and the executor is a user object const executor = await this.guild.members.fetch(this.executor.id).catch(); const target = await this.guild.members.fetch(this.target.id).catch(); @@ -236,6 +282,69 @@ class Infraction { return this._succeed(); } + // async fetch() { //Data from Mongodb (id-based data) + // const data = await this.client.storageManager.mongodb.infractions.findOne({ id: this.id }); + // if(!data) { + // this.client.logger.error(`Case ${this.id} is missing infraction data in database.`); + // return null; + // } + + // if(data.guild) { + // let guild = null; + // try { + // guild = await this.client.guilds.fetch(data.guild); + // } catch(error) { + // this.client.logger.error(`Unable to fetch guild: ${data.guild}\n${error.stack || error}`); + // guild = null; + // } + // if(!guild) return null; + // if(data.targets) { + // this.targetIds = data.targets; + // for(const target of data.targets) { + // const fetchedTarget = await this._fetchTarget(target); + // if(fetchedTarget) this.targets.push(fetchedTarget); + // } + // } + // if(data.executor) { + // this.executorId = data.executor; + // const fetchedExecutor = await this._fetchTarget(data.executor, 'USER'); + // if(fetchedExecutor) this.executor = fetchedExecutor; + // } + // } + + // this.type = data.type; + // this.timestamp = data.timestamp; + // this.duration = data.duration; + // this.reason = data.reason; + // this.channelId = data.channel; + // this.resolved = data.resolved; + // this._callbacked = data._callbacked; + + // this.dictionary = InfractionDictionary[this.type]; + // this.color = InfractionColors[this.type]; + + // this.modlogMessageId = data.modlogMessageId; + // this.dmlogMessageId = data.dmlogMessageId; + + // this._fetched = Boolean(data._fetched); + // return this; + + // } + + // async _fetchTarget(target, type = null) { + // type = type || this.targetType; + // let fetched = null; + // if(type === 'CHANNEL') { + // fetched = await this.client.resolver.resolveChannel(target, true, this.guild); + // } else if (type) { + // fetched = await this.client.resolver.resolveMember(target, true, this.guild); + // if(!fetched) { + // fetched = await this.client.resolver.resolveUser(target, true); + // } + // } + // return fetched || null; + // } + } module.exports = Infraction; \ No newline at end of file diff --git a/util/Constants.js b/util/Constants.js index 0db7239..f32e4ca 100644 --- a/util/Constants.js +++ b/util/Constants.js @@ -71,4 +71,132 @@ exports.InfractionResolves = { NICKNAME: ['nickname', 'nicknames', 'dehoist', 'dehoists'], LOCKDOWN: ['lockdown', 'lockdowns'], UNLOCKDOWN: ['unlockdown', 'unlockdowns'] +}; + +exports.InfractionTargetTypes = [ + 'USER', + 'CHANNEL' +]; + +exports.InfractionDictionary = { + NOTE: { + past: 'noted', + present: 'note' + }, + WARN: { + past: 'warned', + present: 'warn' + }, + MUTE: { + past: 'muted', + present: 'mute' + }, + UNMUTE: { + past: 'unmuted', + present: 'unmute' + }, + KICK: { + past: 'kicked', + present: 'kick' + }, + SOFTBAN: { + past: 'softbanned', + present: 'softban' + }, + BAN: { + past: 'banned', + present: 'ban' + }, + UNBAN: { + past: 'unbanned', + present: 'unban' + }, + VCMUTE: { + past: 'voicemuted', + present: 'voicemute' + }, + VCUNMUTE: { + past: 'unvoicemuted', + present: 'unvoicemute' + }, + VCKICK: { + past: 'vckicked', + present: 'vckick' + }, + VCBAN: { + past: 'voicebanned', + present: 'voiceban' + }, + VCUNBAN: { + past: 'unvoicebanned', + present: 'unvoiceban' + }, + PRUNE: { + past: 'pruned', + present: 'prune' + }, + SLOWMODE: { + past: 'set slowmode in', + present: 'slowmode' + }, + ADDROLE: { + past: 'added role to', + present: 'add role to' + }, + REMOVEROLE: { + past: 'removed role from', + present: 'remove role from' + }, + NICKNAME: { + past: 'nicknamed', + present: 'nickname' + }, + LOCKDOWN: { + past: 'enabled lockdown in', + present: 'lockdown' + }, + UNLOCKDOWN: { + past: 'disabled lockdown in', + present: 'unlockdown' + } +}; + +exports.InfractionColors = { + NOTE: 0xEBEBEB, + WARN: 0xffe15c, + MUTE: 0x1f75ff, + UNMUTE: 0x5c9aff, + KICK: 0xff7a33, + SOFTBAN: 0xdb36fc, + BAN: 0xff3333, + UNBAN: 0xff5c5c, + VCMUTE: 0x1f75ff, + VCUNMUTE: 0x5c9aff, + VCKICK: 0xF9DC5C, + VCBAN: 0xff3333, + VCUNBAN: 0xff5c5c, + PRUNE: 0xdb36fc, + SLOWMODE: 0xff3333, + ADDROLE: 0xff3333, + REMOVEROLE: 0xff3333, + NICKNAME: 0xEBEBEB, + LOCKDOWN: 0xff3333, + UNLOCKDOWN: 0xff5c5c +}; + +exports.InfractionProperCase = { + NOTE: 'Note', + WARN: 'Warn', + UNMUTE: 'Unmute', + MUTE: 'Mute', + KICK: 'Kick', + SOFTBAN: 'Softban', + UNBAN: 'Unban', + BAN: 'Ban', + PRUNE: 'Prune', + VCKICK: 'Vckick', + SLOWMODE: 'Slowmode', + NICKNAME: 'Nickname', + ADDROLE: 'AddRole', + REMOVEROLE: 'RemoveRole' }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ae92f42..aa410a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -151,6 +151,11 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -239,6 +244,16 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -264,6 +279,7 @@ ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +<<<<<<< Updated upstream anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -279,6 +295,20 @@ anymatch@~3.1.1: dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" +======= +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" +>>>>>>> Stashed changes argparse@^1.0.7: version "1.0.10" @@ -569,10 +599,21 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +<<<<<<< Updated upstream camelcase@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= +======= +canvas@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.6.1.tgz#0d087dd4d60f5a5a9efa202757270abea8bef89e" + integrity sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA== + dependencies: + nan "^2.14.0" + node-pre-gyp "^0.11.0" + simple-get "^3.0.3" +>>>>>>> Stashed changes caseless@~0.12.0: version "0.12.0" @@ -643,10 +684,22 @@ chokidar@^3.3.0: optionalDependencies: fsevents "~2.1.2" +<<<<<<< Updated upstream class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== +======= +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== +>>>>>>> Stashed changes dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -710,6 +763,11 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -805,6 +863,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +<<<<<<< Updated upstream continuation-local-storage@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/continuation-local-storage/-/continuation-local-storage-3.2.1.tgz#11f613f74e914fe9b34c92ad2d28fe6ae1db7ffb" @@ -817,6 +876,12 @@ copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +======= +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= +>>>>>>> Stashed changes core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -851,6 +916,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +<<<<<<< Updated upstream data-uri-to-buffer@1: version "1.2.0" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" @@ -883,12 +949,23 @@ debug@4, debug@^4.1.1: ms "2.1.2" debug@4.1.1, debug@^4.0.1, debug@~4.1.1: +======= +debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.1: +>>>>>>> Stashed changes version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" +<<<<<<< Updated upstream debug@^3.0, debug@^3.1.0, debug@^3.2.6, debug@~3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -949,6 +1026,21 @@ deep-equal@~0.2.1: integrity sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0= deep-is@^0.1.3, deep-is@~0.1.3: +======= +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3: +>>>>>>> Stashed changes version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= @@ -1001,15 +1093,27 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + denque@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/denque/-/denque-1.4.1.tgz#6744ff7641c148c3f8a69c307e51235c1f4a37cf" integrity sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ== +<<<<<<< Updated upstream depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= +======= +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= +>>>>>>> Stashed changes diagnostics@^1.1.1: version "1.1.1" @@ -1556,6 +1660,7 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +<<<<<<< Updated upstream fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -1567,6 +1672,14 @@ from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +======= +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" +>>>>>>> Stashed changes fs.realpath@^1.0.0: version "1.0.0" @@ -1604,6 +1717,7 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +<<<<<<< Updated upstream get-uri@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.4.tgz#d4937ab819e218d4cb5ae18e4f5962bef169cc6a" @@ -1620,6 +1734,21 @@ get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +======= +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" +>>>>>>> Stashed changes getpass@^0.1.1: version "0.1.7" @@ -1698,6 +1827,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +<<<<<<< Updated upstream has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" @@ -1759,6 +1889,12 @@ http-proxy-agent@^2.1.0: dependencies: agent-base "4" debug "3.1.0" +======= +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +>>>>>>> Stashed changes http-signature@~1.2.0: version "1.2.0" @@ -1769,6 +1905,7 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +<<<<<<< Updated upstream https-proxy-agent@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" @@ -1783,12 +1920,22 @@ i@0.3.x: integrity sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0= iconv-lite@0.4.24, iconv-lite@^0.4.4: +======= +iconv-lite@^0.4.24, iconv-lite@^0.4.4: +>>>>>>> Stashed changes version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -1820,6 +1967,7 @@ inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +<<<<<<< Updated upstream ini@1.x.x, ini@^1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -1853,6 +2001,31 @@ is-arguments@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== +======= +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" +>>>>>>> Stashed changes is-arrayish@^0.3.1: version "0.3.2" @@ -2308,6 +2481,11 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -2320,6 +2498,7 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +<<<<<<< Updated upstream minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" @@ -2334,6 +2513,24 @@ mixin-deep@^1.2.0: is-extendable "^1.0.1" mkdirp@0.x.x, mkdirp@^0.5.1, mkdirp@^0.5.5: +======= +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp@^0.5.0, mkdirp@^0.5.1: +>>>>>>> Stashed changes version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -2405,11 +2602,16 @@ mysql@^2.18.1: safe-buffer "5.1.2" sqlstring "2.3.1" +<<<<<<< Updated upstream nan@^2.12.1: +======= +nan@^2.14.0: +>>>>>>> Stashed changes version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +<<<<<<< Updated upstream nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -2427,10 +2629,13 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +======= +>>>>>>> Stashed changes natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +<<<<<<< Updated upstream nconf@0.6.9: version "0.6.9" @@ -2570,8 +2775,94 @@ object.pick@^1.3.0: integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" +======= -once@^1.3.0: +needle@^2.2.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.5.0.tgz#e6fc4b3cc6c25caed7554bd613a5cf0bac8c31c0" + integrity sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +node-fetch@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + +node-pre-gyp@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054" + integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +npm-bundled@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-packlist@^1.1.6: + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== +>>>>>>> Stashed changes + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +once@^1.3.0, once@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= @@ -2615,6 +2906,7 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +<<<<<<< Updated upstream os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" @@ -2646,6 +2938,25 @@ pac-resolver@^3.0.0: ip "^1.1.5" netmask "^1.0.6" thunkify "^2.1.2" +======= +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +>>>>>>> Stashed changes + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" parent-module@^1.0.0: version "1.0.1" @@ -2890,6 +3201,7 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +<<<<<<< Updated upstream raw-body@^2.2.0: version "2.4.1" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" @@ -2918,6 +3230,19 @@ readable-stream@1.1.x: string_decoder "~0.10.x" readable-stream@2, readable-stream@2.3.7, readable-stream@^2.0.2, readable-stream@^2.3.5, readable-stream@^2.3.6: +======= +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@2.3.7, readable-stream@^2.0.6, readable-stream@^2.3.5, readable-stream@^2.3.6: +>>>>>>> Stashed changes version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -3080,10 +3405,29 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" +<<<<<<< Updated upstream rimraf@2.x.x: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== +======= +rimraf@^2.6.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +rxjs@^6.5.3: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== +>>>>>>> Stashed changes dependencies: glob "^7.1.3" @@ -3126,6 +3470,7 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +<<<<<<< Updated upstream secure-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/secure-keys/-/secure-keys-1.0.0.tgz#f0c82d98a3b139a8776a8808050b824431087fca" @@ -3137,6 +3482,9 @@ semver@6.3.0: integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^5.1.0, semver@^5.3.0, semver@^5.5.0: +======= +semver@^5.1.0, semver@^5.3.0: +>>>>>>> Stashed changes version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -3146,6 +3494,7 @@ semver@^7.2, semver@^7.2.1: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +<<<<<<< Updated upstream semver@~7.2.0: version "7.2.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.2.3.tgz#3641217233c6382173c76bf2c7ecd1e1c16b0d8a" @@ -3160,6 +3509,12 @@ set-value@^2.0.0, set-value@^2.0.1: is-extendable "^0.1.1" is-plain-object "^2.0.3" split-string "^3.0.1" +======= +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +>>>>>>> Stashed changes setimmediate@^1.0.5: version "1.0.5" @@ -3183,6 +3538,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +<<<<<<< Updated upstream shimmer@^1.1.0, shimmer@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" @@ -3205,6 +3561,9 @@ side-channel@^1.0.2: object-inspect "^1.8.0" signal-exit@^3.0.3: +======= +signal-exit@^3.0.0, signal-exit@^3.0.2: +>>>>>>> Stashed changes version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== @@ -3216,6 +3575,20 @@ similarity@^1.2.1: dependencies: levenshtein-edit-distance "^2.0.0" +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" + integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + simple-swizzle@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" @@ -3373,6 +3746,7 @@ stack-trace@0.0.x: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= +<<<<<<< Updated upstream static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -3393,6 +3767,8 @@ stream-combiner@~0.0.4: dependencies: duplexer "~0.1.1" +======= +>>>>>>> Stashed changes string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3402,6 +3778,17 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +<<<<<<< Updated upstream +======= +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +>>>>>>> Stashed changes string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -3453,6 +3840,16 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +<<<<<<< Updated upstream +======= +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +>>>>>>> Stashed changes strip-ansi@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -3472,6 +3869,7 @@ strip-json-comments@^3.1.0: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== +<<<<<<< Updated upstream strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -3481,6 +3879,12 @@ strip-json-comments@~0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-0.1.3.tgz#164c64e370a8a3cc00c9e01b539e569823f0ee54" integrity sha1-Fkxk43Coo8wAyeAbU55WmCPw7lQ= +======= +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +>>>>>>> Stashed changes supports-color@^5.3.0: version "5.5.0" @@ -3511,6 +3915,7 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" +<<<<<<< Updated upstream tape@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/tape/-/tape-2.3.3.tgz#2e7ce0a31df09f8d6851664a71842e0ca5057af7" @@ -3522,6 +3927,20 @@ tape@~2.3.2: jsonify "~0.0.0" resumer "~0.0.0" through "~2.3.4" +======= +tar@^4: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" +>>>>>>> Stashed changes text-hex@1.0.x: version "1.0.0" @@ -3789,10 +4208,19 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +<<<<<<< Updated upstream window-size@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" integrity sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY= +======= +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" +>>>>>>> Stashed changes winston-transport@^4.3.0: version "4.3.0" @@ -3872,6 +4300,7 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +<<<<<<< Updated upstream ws@^6.0.0: version "6.2.1" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" @@ -3929,3 +4358,14 @@ yargs@^3.19.0, yargs@^3.32.0: string-width "^1.0.1" window-size "^0.1.4" y18n "^3.2.0" +======= +ws@^7.2.1: + version "7.3.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.0.tgz#4b2f7f219b3d3737bc1a2fbf145d825b94d38ffd" + integrity sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w== + +yallist@^3.0.0, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +>>>>>>> Stashed changes