diff --git a/bot.js b/bot.js index 93894e8..00acd96 100644 --- a/bot.js +++ b/bot.js @@ -1,137 +1,132 @@ -const token = process.env.DISCORD_TOKEN; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const Discord = require("discord.js"); -const client = new Discord.Client(); -const logger = require("./log.js").logger -const constant = require("./constant.js") -const sendHelp = require("./commands/help").sendHelp +'use strict' +const token = process.env.DISCORD_TOKEN +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const Discord = require('discord.js') +const client = new Discord.Client() +const logger = require('./log.js').logger +const constant = require('./constant.js') +const sendHelp = require('./commands/help').sendHelp const sendActionLog = require('./helper/actionLog.js').sendActionLog -const fs = require("fs"); -const swearjar = require('swearjar'); -const R = require('ramda'); -const alexID = process.env.ALEX_ID; -function exitHandler(options) { +const fs = require('fs') +const swearjar = require('swearjar') +const R = require('ramda') +const alexID = process.env.ALEX_ID +function exitHandler (options) { // const nclient = new Discord.Client(); // nclient.login(token); - try{ - logger.info("Cleaning and Exiting"); - if (process.env.NODE_ENV == "production") { - client.user.setActivity(`${botTriggerCommand} is unavailable`, { - type: 'Playing' - }) - client.user.setStatus("offline").then(res => { - logger.info("Status Changed", res) - process.exit(); - }).catch(err => { - logger.error("Cleanup Error", err) - }) - } - else { - process.exit(); + try { + logger.info('Cleaning and Exiting') + if (process.env.NODE_ENV === 'production') { + client.user.setActivity(`${botTriggerCommand} is unavailable`, { + type: 'Playing' + }) + client.user.setStatus('offline').then(res => { + logger.info('Status Changed', res) + process.exit() + }).catch(err => { + logger.error('Cleanup Error', err) + }) + } else { + process.exit() + } + } catch (e) { + logger.error(e) + process.exit() } } -catch(e){ - logger.error(e); - process.exit(); -} -} -//do something when app is closing +// do something when app is closing // process.on('exit', exitHandler); -process.stdin.resume(); -process.on('SIGTERM', exitHandler); -//catches ctrl+c event -process.on('SIGINT', exitHandler); - -//catches uncaught exceptions -process.on('uncaughtException', exitHandler); +process.stdin.resume() +process.on('SIGTERM', exitHandler) +// catches ctrl+c event +process.on('SIGINT', exitHandler) +// catches uncaught exceptions +process.on('uncaughtException', exitHandler) - -const Sentry = require('@sentry/node'); +const Sentry = require('@sentry/node') Sentry.init({ dsn: process.env.SENTRY_DSN -}); +}) -client.commands = new Discord.Collection(); -client.config = new Discord.Collection(); -fs.readdir("./commands/", (err, files) => { +client.commands = new Discord.Collection() +client.config = new Discord.Collection() +fs.readdir('./commands/', (err, files) => { if (err) logger.error(err) - let jsfile = files.filter(f => f.split(".").pop() === "js") + const jsfile = files.filter(f => f.split('.').pop() === 'js') if (jsfile.length <= 0) { - return logger.warn("[LOGS] Couldn't Find Commands!"); + return logger.warn("[LOGS] Couldn't Find Commands!") } jsfile.forEach((f, i) => { - let pull = require(`./commands/${f}`); - client.commands.set(pull.config.name, pull); - client.config.set(pull.config.name, pull.config); - }); -}); + const pull = require(`./commands/${f}`) + client.commands.set(pull.config.name, pull) + client.config.set(pull.config.name, pull.config) + }) +}) -client.on("ready", () => { - logger.info(constant.botReady(botTriggerCommand)) - if (process.env.NODE_ENV == "production") { - client.user.setStatus("online") +client.on('ready', () => { + logger.info(constant.botReady(botTriggerCommand)) + if (process.env.NODE_ENV === 'production') { + client.user.setStatus('online') client.user.setActivity(`${botTriggerCommand} usage`, { type: 'Playing' }) } -}); +}) -client.on("message", (message) => { - logger.verbose(message.content); - let isAlex = R.path(["member","id"],message) === alexID - if(swearjar.profane(message.content) && isAlex){ - message.channel.send(`${message.member} Language`).then(m=>m.delete(3000)); - message.channel.send(message.member+" said "+ swearjar.censor(message.content)) - message.delete(); +client.on('message', (message) => { + logger.verbose(message.content) + const isAlex = R.path(['member', 'id'], message) === alexID + if (swearjar.profane(message.content) && isAlex) { + message.channel.send(`${message.member} Language`).then(m => m.delete(3000)) + message.channel.send(message.member + ' said ' + swearjar.censor(message.content)) + message.delete() } - let messageArray = message.content.split(" ").filter(x => x !== ""); - if (messageArray.length == 0) return; - let trigger = messageArray[0].toLowerCase(); - if (trigger !== botTriggerCommand) return; - logger.verbose(messageArray); - let cmd = messageArray.length > 1 ? messageArray[1].toLowerCase() : null; - logger.info(message.author.username + " is executing " + cmd); - if ((message.author.bot || message.channel.type === "dm") && !(cmd === "verify" || cmd === "non-htb")) return; - let args = messageArray.slice(2); - if (cmd == null) { - message.channel.send(constant.default(botTriggerCommand)).then(m => m.delete(2000)); - return; + const messageArray = message.content.split(' ').filter(x => x !== '') + if (messageArray.length === 0) return + const trigger = messageArray[0].toLowerCase() + if (trigger !== botTriggerCommand) return + logger.verbose(messageArray) + const cmd = messageArray.length > 1 ? messageArray[1].toLowerCase() : null + logger.info(message.author.username + ' is executing ' + cmd) + if ((message.author.bot || message.channel.type === 'dm') && !(cmd === 'verify' || cmd === 'non-htb')) return + const args = messageArray.slice(2) + if (cmd === null) { + message.channel.send(constant.default(botTriggerCommand)).then(m => m.delete(2000)) + return } - let commandFile = client.commands.get(cmd); + const commandFile = client.commands.get(cmd) if (commandFile) { - let config = client.config.get(cmd); + const config = client.config.get(cmd) if (args.length < config.minargs) { message.delete(2000) - message.channel.send("Usage: ```" + config.usage + "```").then(m => m.delete(2000)) + message.channel.send('Usage: ```' + config.usage + '```').then(m => m.delete(2000)) } else { - commandFile.run(client, message, args); + commandFile.run(client, message, args) } } else { - message.channel.send("Invalid command.").then(m => m.delete(2000)) + message.channel.send('Invalid command.').then(m => m.delete(2000)) } }) // Start and login the bot client.on('guildMemberAdd', member => { - logger.info(member.displayName + " joined the server.") - let embed = new Discord.RichEmbed() - .setColor("#5780cd") - .setTitle("Member Joined.") + logger.info(member.displayName + ' joined the server.') + const embed = new Discord.RichEmbed() + .setColor('#5780cd') + .setTitle('Member Joined.') .setDescription(`${member} joined the server`) - sendActionLog(client,embed) - member.send("Welcome to the server!"); - sendHelp(member, client.channels.find(channel => channel.name === "bot-spam")) - -}); + sendActionLog(client, embed) + member.send('Welcome to the server!') + sendHelp(member, client.channels.find(channel => channel.name === 'bot-spam')) +}) client.on('guildMemberRemove', member => { - logger.info(member.displayName + " left the server.") - let embed = new Discord.RichEmbed() - .setColor("#F14517") - .setTitle("Member Left.") + logger.info(member.displayName + ' left the server.') + const embed = new Discord.RichEmbed() + .setColor('#F14517') + .setTitle('Member Left.') .setDescription(`${member} left the server.`) - sendActionLog(client,embed) - -}); + sendActionLog(client, embed) +}) -client.login(token); +client.login(token) diff --git a/commands/ban.js b/commands/ban.js index dba035b..8bae623 100644 --- a/commands/ban.js +++ b/commands/ban.js @@ -1,52 +1,46 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; +'use strict' +const logger = require('../log.js').logger +const Discord = require('discord.js') +const actionLog = process.env.ACTION_LOG || 'action-log' +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); - if (!message.member.hasPermission(["BAN_MEMBERS"])) return message.channel.send("You do not have permission to perform this command!") - let banMember = message.mentions.members.first() || message.guild.members.get(args[0]) - if (!banMember) return message.channel.send("Please provide a user to ban!") - let reason = args.slice(1).join(" "); - if (!reason) reason = "No reason given!" - logger.verbose("Ban Reason" + reason); - if (banMember.id === message.author.id) return message.channel.send('You can\'t ban yourself').then(m => m.delete(5000)); // Check if the user mention or the entered userID is the message author himsmelf - if (!message.guild.member(banMember).bannable) return message.reply(`You can\'t ban this user. because ${botTriggerCommand} doesnot have sufficient permissions!`).then(m => m.delete(5000)); // Check if the user is bannable with the bot's permissions - if (!message.guild.me.hasPermission(["BAN_MEMBERS"])) return message.channel.send("I dont have permission to perform this command").then(m => m.delete(5000)) - let embed = new Discord.RichEmbed() - .setColor("#bc0000") + message.delete(2000) + if (!message.member.hasPermission(['BAN_MEMBERS'])) return message.channel.send('You do not have permission to perform this command!') + const banMember = message.mentions.members.first() || message.guild.members.get(args[0]) + if (!banMember) return message.channel.send('Please provide a user to ban!') + let reason = args.slice(1).join(' ') + if (!reason) reason = 'No reason given!' + logger.verbose('Ban Reason' + reason) + if (banMember.id === message.author.id) return message.channel.send('You can\'t ban yourself').then(m => m.delete(5000)) // Check if the user mention or the entered userID is the message author himsmelf + if (!message.guild.member(banMember).bannable) return message.reply(`You can't ban this user. because ${botTriggerCommand} doesnot have sufficient permissions!`).then(m => m.delete(5000)) // Check if the user is bannable with the bot's permissions + if (!message.guild.me.hasPermission(['BAN_MEMBERS'])) return message.channel.send('I dont have permission to perform this command').then(m => m.delete(5000)) + const embed = new Discord.RichEmbed() + .setColor('#bc0000') .setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL) - .addField("Moderation:", "ban") - .addField("Moderator:", message.author.username) - .addField("User: ", banMember.displayName) - .addField("Reason:", reason) - .addField("Date:", message.createdAt.toLocaleString()) - let sChannel = message.guild.channels.find(c => c.name === actionLog) + .addField('Moderation:', 'ban') + .addField('Moderator:', message.author.username) + .addField('User: ', banMember.displayName) + .addField('Reason:', reason) + .addField('Date:', message.createdAt.toLocaleString()) + const sChannel = message.guild.channels.find(c => c.name === actionLog) banMember.send(`Hello, you have been banned from ${message.guild.name} for: ${reason}`).then(() => message.guild.ban(banMember, { days: 1, reason: reason - })).then(msg =>{ - message.channel.send(`**${banMember.user.tag}** has been banned`).then(m => m.delete(5000)) - sChannel.send(embed) - }).catch(err =>{ + })).then(msg => { + message.channel.send(`**${banMember.user.tag}** has been banned`).then(m => m.delete(5000)) + sChannel.send(embed) + }).catch(err => { logger.error(err) - message.channel.send(`Unable to ban **${banMember.user.tag}**`).then(m => m.delete(5000)) + message.channel.send(`Unable to ban **${banMember.user.tag}**`).then(m => m.delete(5000)) }) } module.exports.config = { - name: "ban", - description: "Bans a user from the guild!", + name: 'ban', + description: 'Bans a user from the guild!', usage: `${botTriggerCommand} ban `, minargs: 1, - minPermission: "BAN_MEMBERS" + minPermission: 'BAN_MEMBERS' } diff --git a/commands/clean.js b/commands/clean.js index 26a9ecf..e56808a 100644 --- a/commands/clean.js +++ b/commands/clean.js @@ -1,31 +1,20 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const sendHelp = require("./help").sendHelp; -const ignoreList = process.env.REMIND_IGNORE_LIST; -const guildId = process.env.GUILD_ID; -const gracePeriod = process.env.DEAD_ACCOUNT_GRACE_PERIOD || 90; -const remindPeriod = process.env.REMIND_INTERVAL || 24; -const redis = require("../services/redis.js") +'use strict' +const logger = require('../log.js').logger +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const ignoreList = process.env.REMIND_IGNORE_LIST +const guildId = process.env.GUILD_ID +const gracePeriod = process.env.DEAD_ACCOUNT_GRACE_PERIOD || 90 module.exports.run = async (bot, message, args) => { - message.delete(2000); - const date = new Date(); + message.delete(2000) + const date = new Date() date.setDate(date.getDate() - gracePeriod) // get 30 days old date. - let deadRole = message.guild.roles.find(r => r.name === "DeadAccount") + let deadRole = message.guild.roles.find(r => r.name === 'DeadAccount') if (!deadRole) { try { deadRole = await message.guild.createRole({ - name: "DeadAccount", - color: "#514f48", + name: 'DeadAccount', + color: '#514f48', permissions: [] }) message.guild.channels.forEach(async (channel, id) => { @@ -38,27 +27,27 @@ module.exports.run = async (bot, message, args) => { }) }) } catch (e) { - console.log(e.stack); + console.log(e.stack) } } - if (!message.member.hasPermission(["ADMINISTRATOR"])) return message.channel.send("You do not have permission to perform this command!").then(m => m.delete()) + if (!message.member.hasPermission(['ADMINISTRATOR'])) return message.channel.send('You do not have permission to perform this command!').then(m => m.delete()) try { - let ignoreListArray = ignoreList.trim().split(",") - let guild = await (bot.guilds.array().find(x => x.id === guildId).fetchMembers()) - let unVerifedMembers = guild.members.filter(member => !member.user.bot) - .filter(function(member) { + const ignoreListArray = ignoreList.trim().split(',') + const guild = await (bot.guilds.array().find(x => x.id === guildId).fetchMembers()) + const unVerifedMembers = guild.members.filter(member => !member.user.bot) + .filter(function (member) { return member.joinedAt < date }) .filter(member => !ignoreListArray.includes(member.user.username)).filter((member, result) => { - let hasRole = member.roles.map(role => role.name) + const hasRole = member.roles.map(role => role.name) return (hasRole.length === 1) }) - logger.info("Cleaning account: " + unVerifedMembers.size + " members") - for (member of unVerifedMembers) { + logger.info('Cleaning account: ' + unVerifedMembers.size + ' members') + for (const member of unVerifedMembers) { try { await (member.addRole(deadRole.id)) } catch (error) { - logger.warn(member + " : " + error) + logger.warn(member + ' : ' + error) } } @@ -71,9 +60,9 @@ module.exports.run = async (bot, message, args) => { } module.exports.config = { - name: "clean", - description: "Add DeadAaccount role for account not verifed in 60 days.", + name: 'clean', + description: 'Add DeadAaccount role for account not verifed in 60 days.', usage: `${botTriggerCommand} clean`, minargs: 0, - minPermission: "ADMINISTRATOR" + minPermission: 'ADMINISTRATOR' } diff --git a/commands/help.js b/commands/help.js index c9c4a3e..4c32034 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,63 +1,55 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const assignRole = process.env.ASSIGN_ROLE; +'use strict' +const Discord = require('discord.js') +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - help(message.author, bot.channels.find(x => x.name === "bot-spam")) + help(message.author, bot.channels.find(x => x.name === 'bot-spam')) } const help = async (user, channel) => { - let welcome = new Discord.RichEmbed() - .setColor("#1a85f0") + const welcome = new Discord.RichEmbed() + .setColor('#1a85f0') .setTitle(`Welcome! ${user.username || user.displayName}. Lets get you verified`) - let step1 = new Discord.RichEmbed() - .setColor("#1a85f0") - .setTitle("Step 1: Log in to your HackTheBox Account") - .setDescription("Go to https://hackthebox.eu/home/settings") - - let step2 = new Discord.RichEmbed() - .setColor("#1a85f0") - .setTitle("Step 2: Locate the identification key") - .attachFiles(["./images/ai.png"]) + const step1 = new Discord.RichEmbed() + .setColor('#1a85f0') + .setTitle('Step 1: Log in to your HackTheBox Account') + .setDescription('Go to https://hackthebox.eu/home/settings') + + const step2 = new Discord.RichEmbed() + .setColor('#1a85f0') + .setTitle('Step 2: Locate the identification key') + .attachFiles(['./images/ai.png']) .setImage('attachment://ai.png') - .setDescription("In the Settings tab, you should be able to identify a field called \"Accont identifier\",click on the green button to copt the string.") + .setDescription('In the Settings tab, you should be able to identify a field called "Accont identifier",click on the green button to copt the string.') - let step3 = new Discord.RichEmbed() - .setColor("#1a85f0") - .setTitle("Step 3: Verify ") + const step3 = new Discord.RichEmbed() + .setColor('#1a85f0') + .setTitle('Step 3: Verify ') .setDescription(`Procced to send the bot your account identification string by: \`${botTriggerCommand} verify \``) - let step4 = new Discord.RichEmbed() - .setColor("#1a85f0") - .setTitle("Step 4:Enjoy") - .setDescription("If we are able to verify the token properly we will give you the role :)") + const step4 = new Discord.RichEmbed() + .setColor('#1a85f0') + .setTitle('Step 4:Enjoy') + .setDescription('If we are able to verify the token properly we will give you the role :)') - let step5 = new Discord.RichEmbed() - .setColor("#1a85f0") - .setTitle("If your not an HTB Member.") + const step5 = new Discord.RichEmbed() + .setColor('#1a85f0') + .setTitle('If your not an HTB Member.') .setDescription(`Even if your not an HTB Member, You can enjoy in our server, just type \`${botTriggerCommand} non-htb\` but... If you decided to be Non-HTB, You don't have access to HTB Discussion or Hints, Anyways you can directly be HTB-Verified When ever you want, All you need to do is, Just follow above Steps`) - - await (user.send(welcome)); - await (user.send(step1)); - await (user.send(step2)); - await (user.send(step3)); - await (user.send(step4)); - await (user.send(step5)); + await (user.send(welcome)) + await (user.send(step1)) + await (user.send(step2)) + await (user.send(step3)) + await (user.send(step4)) + await (user.send(step5)) } module.exports.config = { - name: "help", - description: "Send Help About bot", + name: 'help', + description: 'Send Help About bot', usage: `${botTriggerCommand} help`, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } -module.exports.sendHelp = help; +module.exports.sendHelp = help diff --git a/commands/mute.js b/commands/mute.js index 83b95df..24ccc53 100644 --- a/commands/mute.js +++ b/commands/mute.js @@ -1,41 +1,36 @@ -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const logger = require("../log.js").logger -const actionLog = process.env.ACTION_LOG || "action-log"; +'use strict' +const Discord = require('discord.js') +const assignRole = process.env.ASSIGN_ROLE +const logger = require('../log.js').logger +const actionLog = process.env.ACTION_LOG || 'action-log' const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); + message.delete(2000) // check if the command caller has permission to use the command - if (!message.member.hasPermission("MANAGE_ROLES") || !message.guild.owner) return message.channel.send("You dont have permission to use this command."); + if (!message.member.hasPermission('MANAGE_ROLES') || !message.guild.owner) return message.channel.send('You dont have permission to use this command.') - if (!message.guild.me.hasPermission(["MANAGE_ROLES"])) return message.channel.send("I don't have permission to add roles!") + if (!message.guild.me.hasPermission(['MANAGE_ROLES'])) return message.channel.send("I don't have permission to add roles!") - //define the reason and mutee - let mutee = message.mentions.members.first() || message.guild.members.get(args[0]); - if (!mutee) return message.channel.send("Please supply a user to be muted!"); + // define the reason and mutee + const mutee = message.mentions.members.first() || message.guild.members.get(args[0]) + if (!mutee) return message.channel.send('Please supply a user to be muted!') - let reason = args.slice(1).join(" "); - logger.verbose("Mute Reason" + reason); - if (!reason) reason = "No reason given" - let muteRoleName = "Muted"; - let muteVRole = mutee.roles.find(r => r.name === assignRole) + let reason = args.slice(1).join(' ') + logger.verbose('Mute Reason' + reason) + if (!reason) reason = 'No reason given' + let muteRoleName = 'Muted' + const muteVRole = mutee.roles.find(r => r.name === assignRole) if (muteVRole) { - muteRoleName = "VerifedMuted"; + muteRoleName = 'VerifedMuted' } - //define mute role and if the mute role doesnt exist then create one + // define mute role and if the mute role doesnt exist then create one let muterole = message.guild.roles.find(r => r.name === muteRoleName) if (!muterole) { try { muterole = await message.guild.createRole({ name: muteRoleName, - color: "#514f48", + color: '#514f48', permissions: [] }) message.guild.channels.forEach(async (channel, id) => { @@ -48,39 +43,39 @@ module.exports.run = async (bot, message, args) => { }) }) } catch (e) { - console.log(e.stack); + console.log(e.stack) } } - //add role to the mentioned user and also send the user a dm explaing where and why they were muted + // add role to the mentioned user and also send the user a dm explaing where and why they were muted mutee.addRole(muterole.id).then(() => { - if (muteRoleName === "VerifedMuted") { + if (muteRoleName === 'VerifedMuted') { mutee.removeRole(muteVRole.id) } mutee.send(`Hello, you have been muted in ${message.guild.name} for: ${reason}`).catch(err => console.log(err)) message.channel.send(`${mutee.user.username} was successfully muted.`) }) - //send an embed to the modlogs channel - let embed = new Discord.RichEmbed() - .setColor("RED") + // send an embed to the modlogs channel + const embed = new Discord.RichEmbed() + .setColor('RED') .setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL) - .addField("Moderation:", "mute") - .addField("Mutee:", mutee.user.username) - .addField("Moderator:", message.author.username) - .addField("Reason:", reason) - .addField("Date:", message.createdAt.toLocaleString()) + .addField('Moderation:', 'mute') + .addField('Mutee:', mutee.user.username) + .addField('Moderator:', message.author.username) + .addField('Reason:', reason) + .addField('Date:', message.createdAt.toLocaleString()) - let sChannel = message.guild.channels.find(c => c.name === actionLog) + const sChannel = message.guild.channels.find(c => c.name === actionLog) sChannel.send(embed).catch((err) => { console.log(err) - }); + }) } module.exports.config = { - name: "mute", - description: "Mutes a member in the discord!", + name: 'mute', + description: 'Mutes a member in the discord!', usage: `${botTriggerCommand} mute `, minargs: 1, - minPermission: "MANAGE_ROLES" + minPermission: 'MANAGE_ROLES' } diff --git a/commands/non-htb-verify.js b/commands/non-htb-verify.js index 123c9cf..bef1f8e 100644 --- a/commands/non-htb-verify.js +++ b/commands/non-htb-verify.js @@ -1,56 +1,45 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; +'use strict' +const logger = require('../log.js').logger +const constant = require('../constant.js') +const assignRole = process.env.ASSIGN_ROLE const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND -const guildId = process.env.GUILD_ID; -const nonHTBRole = process.env.NON_HTB_ROLE || "Non-HTB Verified" +const guildId = process.env.GUILD_ID +const nonHTBRole = process.env.NON_HTB_ROLE || 'Non-HTB Verified' -const getUserData = (token) => { - logger.verbose(token) - logger.verbose(constant.htburl + token) - return axios.get(constant.htburl + token) -}; - - -const giveRole = function(member, author, channel, hasRole, defaultRole) { +const giveRole = async function (member, author, channel, hasRole, defaultRole) { if (!hasRole) { - let memberRole = member.roles.find(r => r.name === "Member"); + const memberRole = member.roles.find(r => r.name === 'Member') if (memberRole) { await (member.removeRole(memberRole.id)) } - let deadRole = member.roles.find(r => r.name === "DeadAccount"); + const deadRole = member.roles.find(r => r.name === 'DeadAccount') if (deadRole) { await (member.removeRole(deadRole.id)) } member.addRoles([defaultRole]).then(r => { channel.send(constant.success(author)) }).catch((e) => { - logger.error("Error:" + e); + logger.error('Error:' + e) channel.send(constant.unableToaddRole(author)) - }); + }) } else { - logger.verbose(author.username + " already have the role."); - await (channel.send(constant.alreadyVerified(author))); + logger.verbose(author.username + ' already have the role.') + await (channel.send(constant.alreadyVerified(author))) } } -const newVerifyUser = async (function(msg, guild) { +const newVerifyUser = async function (msg, guild) { try { - let author = msg.author; + const author = msg.author await (guild.fetchMembers()) - let member = guild.members.find(x => x.user.id == author.id) - let channel = msg.channel; + const member = guild.members.find(x => x.user.id === author.id) + const channel = msg.channel let nonHTBRoleObj = guild.roles.find(r => r.name === nonHTBRole) if (!nonHTBRoleObj) { try { nonHTBRoleObj = await (guild.createRole({ name: nonHTBRole, - color: "#514f48", + color: '#514f48', permissions: [] })) guild.channels.forEach(async (channel, id) => { @@ -63,41 +52,38 @@ const newVerifyUser = async (function(msg, guild) { }) }) } catch (e) { - console.log(e.stack); + console.log(e.stack) } } - let hasRole = member.roles.find(role => role.name == nonHTBRole); - let htbVerified = member.roles.find(role => role.name == assignRole); - logger.verbose("HasRole: " + (hasRole != null ? hasRole.name : null)) - logger.verbose("htbVerified: " + (htbVerified != null ? htbVerified.name : null)) + const hasRole = member.roles.find(role => role.name === nonHTBRole) + const htbVerified = member.roles.find(role => role.name === assignRole) + logger.verbose('HasRole: ' + (hasRole != null ? hasRole.name : null)) + logger.verbose('htbVerified: ' + (htbVerified != null ? htbVerified.name : null)) if (!htbVerified) { - giveRole(member, author, channel, hasRole, nonHTBRoleObj); + giveRole(member, author, channel, hasRole, nonHTBRoleObj) } else { - await (channel.send(constant.notUpdatedNonHTB(author))); + await (channel.send(constant.notUpdatedNonHTB(author))) } } catch (err) { - logger.error("New Verify Error:" + err); + logger.error('New Verify Error:' + err) } -}) - - +} module.exports.run = async (bot, message, args) => { - logger.verbose("Executing non-htb"); - if (message.channel.type === "dm") { + logger.verbose('Executing non-htb') + if (message.channel.type === 'dm') { newVerifyUser(message, bot.guilds.array().find(x => x.id === guildId)) } else { - message.delete(2000); - message.channel.send("Please verify from bot dm").then(m => m.delete(2000)).catch(e => logger.error(e)); + message.delete(2000) + message.channel.send('Please verify from bot dm').then(m => m.delete(2000)).catch(e => logger.error(e)) // verifyUser(message, token[0]) } } - module.exports.config = { - name: "non-htb", - description: "Verify a non-htb member User", + name: 'non-htb', + description: 'Verify a non-htb member User', usage: `${botTriggerCommand} non-htb`, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/purge.js b/commands/purge.js index 8bb3c7c..a319c0f 100644 --- a/commands/purge.js +++ b/commands/purge.js @@ -1,38 +1,30 @@ -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const logger = require("../log.js").logger +'use strict' +const Discord = require('discord.js') +const logger = require('../log.js').logger const sendActionLog = require('../helper/actionLog.js').sendActionLog const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - if (!message.member.hasPermission("MANAGE_ROLES") || !message.guild.owner) - return message.channel.send("You dont have permission to use this command."); - let count = parseInt(args[0]) || 1 - if (count > 99) return message.channel.send("You can only delete 99 messages at a time.").then(m => m.delete(2000)); + if (!message.member.hasPermission('MANAGE_ROLES') || !message.guild.owner) { return message.channel.send('You dont have permission to use this command.') } + const count = parseInt(args[0]) || 1 + if (count > 99) return message.channel.send('You can only delete 99 messages at a time.').then(m => m.delete(2000)) return message.channel.bulkDelete(count + 1) .then(messages => { - let embed = new Discord.RichEmbed() - .setColor("#006ce5") - .setTitle("Channel Purged") + const embed = new Discord.RichEmbed() + .setColor('#006ce5') + .setTitle('Channel Purged') .setDescription(`${message.author} purged ${messages.size} messages from ${message.channel.name}`) sendActionLog(bot, embed) - logger.info(`Bulk deleted ${messages.size} messages`); + logger.info(`Bulk deleted ${messages.size} messages`) }) - .catch(logger.error); + .catch(logger.error) } - module.exports.config = { - name: "purge", - description: "Purge a channel with number of messages", + name: 'purge', + description: 'Purge a channel with number of messages', usage: `${botTriggerCommand} purge `, minargs: 1, - minPermission: "MANAGE_ROLES" + minPermission: 'MANAGE_ROLES' } diff --git a/commands/remind.js b/commands/remind.js index f888094..3f0df0a 100644 --- a/commands/remind.js +++ b/commands/remind.js @@ -1,88 +1,78 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const sendHelp = require("./help").sendHelp; -const ignoreList = process.env.REMIND_IGNORE_LIST; -const guildId = process.env.GUILD_ID; -const gracePeriod = process.env.GRACE_PERIOD || 30; -const remindPeriod = process.env.REMIND_INTERVAL || 24; -const redis = require("../services/redis.js") +'use strict' +const logger = require('../log.js').logger +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const sendHelp = require('./help').sendHelp +const ignoreList = process.env.REMIND_IGNORE_LIST +const guildId = process.env.GUILD_ID +const gracePeriod = process.env.GRACE_PERIOD || 30 +const remindPeriod = process.env.REMIND_INTERVAL || 24 +const redis = require('../services/redis.js') module.exports.run = async (bot, message, args) => { - message.delete(2000); - const date = new Date(); + message.delete(2000) + const date = new Date() date.setDate(date.getDate() - gracePeriod) // get 30 days old date. - if (!message.member.hasPermission(["ADMINISTRATOR"])) return message.channel.send("You do not have permission to perform this command!").then(m => m.delete()) - let remindMember = message.mentions.members.first() || message.guild.members.get(args[0]); + if (!message.member.hasPermission(['ADMINISTRATOR'])) return message.channel.send('You do not have permission to perform this command!').then(m => m.delete()) + const remindMember = message.mentions.members.first() || message.guild.members.get(args[0]) if (!remindMember) { try { - let ignoreListArray = ignoreList.trim().split(",") - logger.verbose(ignoreListArray); - let guild = await (bot.guilds.array().find(x => x.id === guildId).fetchMembers()) - logger.verbose(guild); - let unVerifedMembers = guild.members.filter(member => !member.user.bot) - .filter(function(member) { + const ignoreListArray = ignoreList.trim().split(',') + logger.verbose(ignoreListArray) + const guild = await (bot.guilds.array().find(x => x.id === guildId).fetchMembers()) + logger.verbose(guild) + const unVerifedMembers = guild.members.filter(member => !member.user.bot) + .filter(function (member) { return member.joinedAt < date }) .filter(member => !ignoreListArray.includes(member.user.username)).filter((member, result) => { - let hasRole = member.roles.map(role => role.name) + const hasRole = member.roles.map(role => role.name) return (hasRole.length === 1) - }); - logger.verbose(unVerifedMembers); - remindMembers(message, unVerifedMembers, false); + }) + logger.verbose(unVerifedMembers) + remindMembers(message, unVerifedMembers, false) } catch (error) { - logger.error("unVerifed: " + error) + logger.error('unVerifed: ' + error) } } else { try { - remindMembers(message, [remindMember], true); + remindMembers(message, [remindMember], true) } catch (error) { - logger.error("remindMember: " + error) + logger.error('remindMember: ' + error) } } } -function remindMembers(message, unVerifedMembers, status) { - unVerifedMembers.map(async (member => { +function remindMembers (message, unVerifedMembers, status) { + unVerifedMembers.map(async (member) => { try { - let shouldRemind = await (redis.get("REMIND_" + member.id)); - logger.verbose("Should Remind" + member.displayName + " is " + shouldRemind); + const shouldRemind = await (redis.get('REMIND_' + member.id)) + logger.verbose('Should Remind' + member.displayName + ' is ' + shouldRemind) if (!shouldRemind) { - let redisSet = await (redis.setex("REMIND_" + member.id, "REMIND", remindPeriod * 3600)) - logger.info("Sending Reminder to : " + member.displayName); - await (member.send("This is a gentle reminder to verify yourself on this server.")); - await (member.send("You can follow these steps to verify yourself.")); - await (sendHelp(member, message.guild.channels.find(channel => channel.name === "bot-spam"))) - await (member.send("*Note:* Please verify yourself to not get this message again.")); + await (redis.setex('REMIND_' + member.id, 'REMIND', remindPeriod * 3600)) + logger.info('Sending Reminder to : ' + member.displayName) + await (member.send('This is a gentle reminder to verify yourself on this server.')) + await (member.send('You can follow these steps to verify yourself.')) + await (sendHelp(member, message.guild.channels.find(channel => channel.name === 'bot-spam'))) + await (member.send('*Note:* Please verify yourself to not get this message again.')) if (status) { - message.channel.send("Successfully reminded " + member.displayName).then(m => m.delete(2000)).catch(errr => {}) + message.channel.send('Successfully reminded ' + member.displayName).then(m => m.delete(2000)).catch(errr => {}) } - } else { - logger.verbose("Skipping: " + member.displayName); + logger.verbose('Skipping: ' + member.displayName) if (status) { - message.channel.send("Skipping reminder to " + member.displayName).then(m => m.delete(2000)).catch(errr => {}) + message.channel.send('Skipping reminder to ' + member.displayName).then(m => m.delete(2000)).catch(errr => {}) } } } catch (error) { - logger.warn(member + " : " + error) + logger.warn(member + ' : ' + error) } - })); + }) } - module.exports.config = { - name: "remind", - description: "Remind users to Verify!", + name: 'remind', + description: 'Remind users to Verify!', usage: `${botTriggerCommand} remind`, minargs: 0, - minPermission: "ADMINISTRATOR" + minPermission: 'ADMINISTRATOR' } diff --git a/commands/report.js b/commands/report.js index 9ea2b37..f3669cb 100644 --- a/commands/report.js +++ b/commands/report.js @@ -1,44 +1,37 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const reportChannel = process.env.REPORT_CHANNEL; -const nonHTBRole = process.env.NON_HTB_ROLE || "Non-HTB Verified" +'use strict' +const logger = require('../log.js').logger +const Discord = require('discord.js') +const assignRole = process.env.ASSIGN_ROLE +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const reportChannel = process.env.REPORT_CHANNEL +const nonHTBRole = process.env.NON_HTB_ROLE || 'Non-HTB Verified' module.exports.run = async (bot, message, args) => { - message.delete(2000); - let defaultRole = message.member.guild.roles.find(r => r.name === assignRole); - let hasRole = message.member.roles.find(role => role.name == defaultRole.name || role.name == nonHTBRole); + message.delete(2000) + const defaultRole = message.member.guild.roles.find(r => r.name === assignRole) + const hasRole = message.member.roles.find(role => role.name === defaultRole.name || role.name === nonHTBRole) if (!hasRole) return message.channel.send("You don't have permission to Report other users.").then(m => m.delete(5000)) - let reportMember = message.mentions.members.first() || message.guild.members.get(args[0]) - if (message.author.username == reportMember.displayName) return message.channel.send("You cannot report yourself.").then(m => m.delete(5000)) - let reason = args.slice(1).join(" "); - if (!reason) return message.channel.send("You must provide a reason for report.").then(m => m.delete(5000)) - logger.verbose("Report Reason" + reason); + const reportMember = message.mentions.members.first() || message.guild.members.get(args[0]) + if (message.author.username === reportMember.displayName) return message.channel.send('You cannot report yourself.').then(m => m.delete(5000)) + const reason = args.slice(1).join(' ') + if (!reason) return message.channel.send('You must provide a reason for report.').then(m => m.delete(5000)) + logger.verbose('Report Reason' + reason) message.channel.send(`**${reportMember.user.tag}** has been Reported`).then(m => m.delete(5000)) - let embed = new Discord.RichEmbed() - .setColor("#bc0000") + const embed = new Discord.RichEmbed() + .setColor('#bc0000') .setAuthor(`${message.guild.name}`, message.guild.iconURL) - .addField("Reported By:", message.author.username) - .addField("User: ", reportMember.displayName) - .addField("Reason:", reason) - .addField("Date:", message.createdAt.toLocaleString()) - let sChannel = message.guild.channels.find(c => c.name === reportChannel) + .addField('Reported By:', message.author.username) + .addField('User: ', reportMember.displayName) + .addField('Reason:', reason) + .addField('Date:', message.createdAt.toLocaleString()) + const sChannel = message.guild.channels.find(c => c.name === reportChannel) sChannel.send(embed) - } module.exports.config = { - name: "report", - description: "Report a user to guild staffs.", + name: 'report', + description: 'Report a user to guild staffs.', usage: `${botTriggerCommand} report `, minargs: 2, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/serverinfo.js b/commands/serverinfo.js index e435263..86cc29f 100644 --- a/commands/serverinfo.js +++ b/commands/serverinfo.js @@ -1,69 +1,64 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const uptime = require("./uptime.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const nonHTBRole = process.env.NON_HTB_ROLE || "Non-HTB Verified" -const listRole = process.env.LIST_ROLE || "STAFF"; +'use strict' +const logger = require('../log.js').logger +const Discord = require('discord.js') +const uptime = require('./uptime.js') +const assignRole = process.env.ASSIGN_ROLE +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const nonHTBRole = process.env.NON_HTB_ROLE || 'Non-HTB Verified' +const listRole = process.env.LIST_ROLE || 'STAFF' module.exports.run = async (bot, message, args) => { - message.delete(2000); + message.delete(2000) try { - let banNumbers = await message.guild.fetchBans() - let embed = new Discord.RichEmbed() - .setColor("#5780cd") - .setTitle("Server Info") + const banNumbers = await message.guild.fetchBans() + const embed = new Discord.RichEmbed() + .setColor('#5780cd') + .setTitle('Server Info') .setThumbnail(message.guild.iconURL) .setAuthor(`${message.guild.name} Info`, message.guild.iconURL) - .addField("**Guild Name:**", `${message.guild.name}`, true) - .addField("**Guild Owner:**", `${message.guild.owner}`, true) - .addField("**Guild Region:**", `${message.guild.region}`, true) - .addField("**Guild Verified:**", `${message.guild.verified}`, true) - .addField("**Member Count:**", `${message.guild.memberCount}`, true) - .addField(`**${assignRole} Count:**`, `${message.guild.members.filter(member =>{ - let hasRole = member.roles.find(role => role.name == assignRole); + .addField('**Guild Name:**', `${message.guild.name}`, true) + .addField('**Guild Owner:**', `${message.guild.owner}`, true) + .addField('**Guild Region:**', `${message.guild.region}`, true) + .addField('**Guild Verified:**', `${message.guild.verified}`, true) + .addField('**Member Count:**', `${message.guild.memberCount}`, true) + .addField(`**${assignRole} Count:**`, `${message.guild.members.filter(member => { + const hasRole = member.roles.find(role => role.name === assignRole) return hasRole }).size}`, true) - .addField(`**${nonHTBRole} Member Count:**`, `${message.guild.members.filter(member =>{ - let hasRole = member.roles.find(role => role.name == nonHTBRole); + .addField(`**${nonHTBRole} Member Count:**`, `${message.guild.members.filter(member => { + const hasRole = member.roles.find(role => role.name === nonHTBRole) return hasRole }).size}`, true) - .addField("**Dead Account Member Count:**", `${message.guild.members.filter(member =>{ - let hasRole = member.roles.find(role => role.name == "DeadAccount"); + .addField('**Dead Account Member Count:**', `${message.guild.members.filter(member => { + const hasRole = member.roles.find(role => role.name === 'DeadAccount') return hasRole }).size}`, true) - .addField(`**${listRole} Count:**`, `${message.guild.members.filter((member,result) =>{ - let hasRole = member.roles.find(role => role.name == listRole); + .addField(`**${listRole} Count:**`, `${message.guild.members.filter((member, result) => { + const hasRole = member.roles.find(role => role.name === listRole) return hasRole }).size}`, true) - .addField(`**${listRole} List:**`, `${message.guild.members.filter((member,result) =>{ - let hasRole = member.roles.find(role => role.name == listRole); + .addField(`**${listRole} List:**`, `${message.guild.members.filter((member, result) => { + const hasRole = member.roles.find(role => role.name === listRole) return hasRole }).map(member => member.displayName)}`, true) - .addField("**Channels Count:**", `${message.guild.channels.size}`, true) - .addField("**Role Count:**", `${message.guild.roles.size}`, true) - .addField("**Role List:**", `${message.guild.roles.map(role=>role.name)}`, true) - .addField("**Ban Members Size**", `${banNumbers.size}`, true) - .setFooter(`${botTriggerCommand}`, bot.user.displayAvatarURL); + .addField('**Channels Count:**', `${message.guild.channels.size}`, true) + .addField('**Role Count:**', `${message.guild.roles.size}`, true) + .addField('**Role List:**', `${message.guild.roles.map(role => role.name)}`, true) + .addField('**Ban Members Size**', `${banNumbers.size}`, true) + .setFooter(`${botTriggerCommand}`, bot.user.displayAvatarURL) await (message.channel.send({ embed - })); - await (uptime.run(bot, message, args)); + })) + await (uptime.run(bot, message, args)) } catch (err) { - logger.error(err); + logger.error(err) } } module.exports.config = { - name: "serverinfo", - description: "Get Server Info.", + name: 'serverinfo', + description: 'Get Server Info.', usage: `${botTriggerCommand} serverinfo`, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/softban.js b/commands/softban.js index 49d5131..f8447e8 100644 --- a/commands/softban.js +++ b/commands/softban.js @@ -1,51 +1,45 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; +'use strict' +const logger = require('../log.js').logger +const Discord = require('discord.js') +const actionLog = process.env.ACTION_LOG || 'action-log' const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); + message.delete(2000) logger.verbose(message.member.hasPermission(['BAN_MEMBERS'])) - if (!message.member.hasPermission(["BAN_MEMBERS"])) return message.channel.send("You do not have permission to perform this command!") - let banMember = message.mentions.members.first() || message.guild.members.get(args[0]) - if (!banMember) return message.channel.send("Please provide a user to ban!") - if (banMember.id === message.author.id) return message.channel.send('You can\'t ban yourself').then(m => m.delete(5000)); // Check if the user mention or the entered userID is the message author himsmelf - if (!message.guild.member(banMember).bannable) return message.reply(`You can\'t ban this user. because ${botTriggerCommand} doesnot have sufficient permissions!`).then(m => m.delete(5000)); // Check if the user is bannable with the bot's permissions - let reason = args.slice(1).join(" "); - if (!reason) reason = "No reason given!" - logger.verbose("Softban Reason" + reason); - if (!message.guild.me.hasPermission(["BAN_MEMBERS"])) return message.channel.send("I dont have permission to perform this command") + if (!message.member.hasPermission(['BAN_MEMBERS'])) return message.channel.send('You do not have permission to perform this command!') + const banMember = message.mentions.members.first() || message.guild.members.get(args[0]) + if (!banMember) return message.channel.send('Please provide a user to ban!') + if (banMember.id === message.author.id) return message.channel.send('You can\'t ban yourself').then(m => m.delete(5000)) // Check if the user mention or the entered userID is the message author himsmelf + if (!message.guild.member(banMember).bannable) return message.reply(`You can't ban this user. because ${botTriggerCommand} doesnot have sufficient permissions!`).then(m => m.delete(5000)) // Check if the user is bannable with the bot's permissions + let reason = args.slice(1).join(' ') + if (!reason) reason = 'No reason given!' + logger.verbose('Softban Reason' + reason) + if (!message.guild.me.hasPermission(['BAN_MEMBERS'])) return message.channel.send('I dont have permission to perform this command') banMember.send(`Hello, you have been banned from ${message.guild.name} for: ${reason}`).then(() => message.guild.ban(banMember, { days: 1, reason: reason })).then(() => message.guild.unban(banMember.id, { - reason: "Softban" + reason: 'Softban' })).catch(err => console.log(err)) message.channel.send(`**${banMember.user.tag}** has been banned`).then(m => m.delete(5000)) - let embed = new Discord.RichEmbed() - .setColor("#f0d31a") + const embed = new Discord.RichEmbed() + .setColor('#f0d31a') .setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL) - .addField("Moderation:", "SoftBan") - .addField("Moderator:", message.author.username) - .addField("User: ", banMember.displayName) - .addField("Reason:", reason) - .addField("Date:", message.createdAt.toLocaleString()) - let sChannel = message.guild.channels.find(c => c.name === actionLog) + .addField('Moderation:', 'SoftBan') + .addField('Moderator:', message.author.username) + .addField('User: ', banMember.displayName) + .addField('Reason:', reason) + .addField('Date:', message.createdAt.toLocaleString()) + const sChannel = message.guild.channels.find(c => c.name === actionLog) sChannel.send(embed) } module.exports.config = { - name: "softban", - description: "SoftBans a user from the guild!", + name: 'softban', + description: 'SoftBans a user from the guild!', usage: `${botTriggerCommand} softban `, minargs: 1, - minPermission: "BAN_MEMBERS" + minPermission: 'BAN_MEMBERS' } diff --git a/commands/unmute.js b/commands/unmute.js index 00ff9df..c5fd2c2 100644 --- a/commands/unmute.js +++ b/commands/unmute.js @@ -1,59 +1,50 @@ -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const logger = require("../log.js").logger; -const actionLog = process.env.ACTION_LOG || "action-log"; +'use strict' +const Discord = require('discord.js') +const assignRole = process.env.ASSIGN_ROLE +const actionLog = process.env.ACTION_LOG || 'action-log' const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); - if (!message.member.hasPermission("MANAGE_ROLES") || !message.guild.owner) return message.channel.send("You dont have permission to use this command."); - if (!message.guild.me.hasPermission(["MANAGE_ROLES"])) return message.channel.send("I don't have permission to add roles!") - //define the reason and unmutee - let mutee = message.mentions.members.first() || message.guild.members.get(args[0]); - if (!mutee) return message.channel.send("Please supply a user to be muted!"); - let reason = args.slice(1).join(" "); - if (!reason) reason = "No reason given" - //define mute role and if the mute role doesnt exist then send a message - let muterole = mutee.roles.find(r => r.name === "VerifedMuted") + message.delete(2000) + if (!message.member.hasPermission('MANAGE_ROLES') || !message.guild.owner) return message.channel.send('You dont have permission to use this command.') + if (!message.guild.me.hasPermission(['MANAGE_ROLES'])) return message.channel.send("I don't have permission to add roles!") + // define the reason and unmutee + const mutee = message.mentions.members.first() || message.guild.members.get(args[0]) + if (!mutee) return message.channel.send('Please supply a user to be muted!') + let reason = args.slice(1).join(' ') + if (!reason) reason = 'No reason given' + // define mute role and if the mute role doesnt exist then send a message + let muterole = mutee.roles.find(r => r.name === 'VerifedMuted') if (!muterole) { - muterole = mutee.roles.find(r => r.name === "Muted") - if (!muterole) - return message.channel.send("There is no mute role to remove!") + muterole = mutee.roles.find(r => r.name === 'Muted') + if (!muterole) { return message.channel.send('There is no mute role to remove!') } } - //remove role to the mentioned user and also send the user a dm explaing where and why they were unmuted + // remove role to the mentioned user and also send the user a dm explaing where and why they were unmuted mutee.removeRole(muterole.id).then(() => { - if (muterole.name === "VerifedMuted") { - let defaultRole = message.guild.roles.find(r => r.name === assignRole) + if (muterole.name === 'VerifedMuted') { + const defaultRole = message.guild.roles.find(r => r.name === assignRole) mutee.addRole(defaultRole.id) } mutee.send(`Hello, you have been unmuted in ${message.guild.name} for: ${reason}`).catch(err => console.log(err)) message.channel.send(`${mutee.user.username} was unmuted!`) }) - //send an embed to the modlogs channel - let embed = new Discord.RichEmbed() - .setColor("RED") + // send an embed to the modlogs channel + const embed = new Discord.RichEmbed() + .setColor('RED') .setAuthor(`${message.guild.name} Modlogs`, message.guild.iconURL) - .addField("Moderation:", "unmute") - .addField("Mutee:", mutee.user.username) - .addField("Moderator:", message.author.username) - .addField("Reason:", reason) - .addField("Date:", message.createdAt.toLocaleString()) - let sChannel = message.guild.channels.find(c => c.name === actionLog) + .addField('Moderation:', 'unmute') + .addField('Mutee:', mutee.user.username) + .addField('Moderator:', message.author.username) + .addField('Reason:', reason) + .addField('Date:', message.createdAt.toLocaleString()) + const sChannel = message.guild.channels.find(c => c.name === actionLog) sChannel.send(embed) - } - module.exports.config = { - name: "unmute", - description: "Unmutes a member in the discord!", + name: 'unmute', + description: 'Unmutes a member in the discord!', usage: `${botTriggerCommand} unmute `, minargs: 1, - minPermission: "MANAGE_ROLES" + minPermission: 'MANAGE_ROLES' } diff --git a/commands/uptime.js b/commands/uptime.js index f20e3cb..5eb4a2f 100644 --- a/commands/uptime.js +++ b/commands/uptime.js @@ -1,28 +1,19 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; +'use strict' +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); - let uptime = bot.uptime; - let epoch = (new Date).getTime(); - let d = new Date(0); // The 0 there is the key, which sets the date to the epoch - d.setMilliseconds(epoch - uptime); + message.delete(2000) + const uptime = bot.uptime + const epoch = (new Date()).getTime() + const d = new Date(0) // The 0 there is the key, which sets the date to the epoch + d.setMilliseconds(epoch - uptime) message.channel.send(`${botTriggerCommand} is up since ` + d.toUTCString()) } module.exports.config = { - name: "uptime", - description: "Get Uptime of the bot", + name: 'uptime', + description: 'Get Uptime of the bot', usage: `${botTriggerCommand} uptime`, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/usage.js b/commands/usage.js index 822caba..e378d5c 100644 --- a/commands/usage.js +++ b/commands/usage.js @@ -1,33 +1,25 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const actionLog = process.env.ACTION_LOG || "action-log"; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; +'use strict' +const Discord = require('discord.js') +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND module.exports.run = async (bot, message, args) => { - message.delete(2000); - let highestRole = message.member.highestRole; - let configs = bot.config.array(); + message.delete(2000) + const highestRole = message.member.highestRole + let configs = bot.config.array() configs = configs.filter(x => highestRole.hasPermission([x.minPermission])) - let embed = new Discord.RichEmbed() + const embed = new Discord.RichEmbed() .setTitle(`Usage for ${botTriggerCommand} `) - .setColor("#1a85f0") - for (config of configs) { + .setColor('#1a85f0') + for (const config of configs) { embed.addField(config.name, config.usage) } message.channel.send(embed) } module.exports.config = { - name: "usage", - description: "Get Usage for the bot", + name: 'usage', + description: 'Get Usage for the bot', usage: `${botTriggerCommand} usage`, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/userVerify.js b/commands/userVerify.js index 22b282c..0107c87 100644 --- a/commands/userVerify.js +++ b/commands/userVerify.js @@ -1,41 +1,38 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const Discord = require("discord.js"); +'use strict' +const logger = require('../log.js').logger +const axios = require('axios') +const R = require('ramda') +const constant = require('../constant.js') + +const Discord = require('discord.js') const sendActionLog = require('../helper/actionLog.js').sendActionLog -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; +const profilePostChannel = process.env.PROFILE_CHANNEL +const assignRole = process.env.ASSIGN_ROLE const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND -const guildId = process.env.GUILD_ID; +const guildId = process.env.GUILD_ID const getUserData = (token) => { logger.verbose(token) logger.verbose(constant.htburl + token) return axios.get(constant.htburl + token) -}; - +} -const giveRole = async (function(bot, member, author, channel, hasDefaultRole, defaultRole, result, rank, htbprofile) { - let deadRole = member.roles.find(r => r.name === "DeadAccount") +const giveRole = async function (bot, member, author, channel, hasDefaultRole, defaultRole, result, rank, htbprofile) { + const deadRole = member.roles.find(r => r.name === 'DeadAccount') if (deadRole) { await (member.removeRole(deadRole.id)) } - let htbrole = member.guild.roles.find(role => role.name.toLowerCase().includes(rank.toLowerCase().replace(/\s/gi, ""))) - logger.info(author.username + " htb rank is " + rank + " and giving it role " + defaultRole.name); + const htbrole = member.guild.roles.find(role => role.name.toLowerCase().includes(rank.toLowerCase().replace(/\s/gi, ''))) + logger.info(author.username + ' htb rank is ' + rank + ' and giving it role ' + defaultRole.name) if (htbrole) { - let hasHTBRole = member.roles.find(role => htbrole.name == role.name); - if (hasHTBRole) - await (member.removeRoles([htbrole])) + const hasHTBRole = member.roles.find(role => htbrole.name === role.name) + if (hasHTBRole) { await (member.removeRoles([htbrole])) } } - if (hasDefaultRole) - await (member.removeRoles([defaultRole])) + if (hasDefaultRole) { await (member.removeRoles([defaultRole])) } try { - let embed = new Discord.RichEmbed() - .setColor("#00E500") - .setTitle("Member Verified:") + const embed = new Discord.RichEmbed() + .setColor('#00E500') + .setTitle('Member Verified:') .setDescription(`${member} has verified with ${rank} htb rank.`) sendActionLog(bot, embed) await (member.addRoles([defaultRole, htbrole])) @@ -43,93 +40,89 @@ const giveRole = async (function(bot, member, author, channel, hasDefaultRole, d htbprofile.send(constant.profile(author, result.user_id)).catch(err => console.error(err)) channel.send(constant.success(author)) } else { - logger.verbose(author.username + " already have the role."); - await (channel.send(constant.alreadyVerified(author))); + logger.verbose(author.username + ' already have the role.') + await (channel.send(constant.alreadyVerified(author))) } } catch (e) { - logger.error("Error:" + e); + logger.error('Error:' + e) channel.send(constant.unableToaddRole(author)) } -}); +} -const getHTBRankDetails = async (function(channel, author, token) { +const getHTBRankDetails = async function (channel, author, token) { try { - return await (getUserData(token)).data; + return await (getUserData(token)).data } catch (error) { - logger.error("Axios Error:" + error); - if (R.path(["response", "status"], error) === 404) { + logger.error('Axios Error:' + error) + if (R.path(['response', 'status'], error) === 404) { channel.send(constant.invalidToken(author)) } else { channel.send(constant.htbFailure(author)) } } -}); +} -const verifyUser = async (function(bot, msg, token) { +const verifyUser = async function (bot, msg, token) { try { - let author = msg.author; - let member = msg.member; - let channel = msg.channel; - let result = await (getHTBRankDetails(channel, author, token)); + const author = msg.author + const member = msg.member + const channel = msg.channel + const result = await (getHTBRankDetails(channel, author, token)) if (result != null) { - let rank = result.rank; - let htbprofile = msg.guild.channels.find(channel => channel.name === profilePostChannel) - let defaultRole = member.guild.roles.find(r => r.name === assignRole); - let hasRole = member.roles.find(role => role.name == defaultRole.name); - logger.verbose("API Respone: " + JSON.stringify(result)); - logger.verbose("HasRole: " + (hasRole != null ? hasRole.name : null)) - logger.verbose(rank); + const rank = result.rank + const htbprofile = msg.guild.channels.find(channel => channel.name === profilePostChannel) + const defaultRole = member.guild.roles.find(r => r.name === assignRole) + const hasRole = member.roles.find(role => role.name === defaultRole.name) + logger.verbose('API Respone: ' + JSON.stringify(result)) + logger.verbose('HasRole: ' + (hasRole != null ? hasRole.name : null)) + logger.verbose(rank) giveRole(bot, member, author, channel, hasRole, defaultRole, result, rank, htbprofile) } } catch (error) { - logger.error("adding verify:" + error); - msg.author.send(constant.dmFailure("#bot-spam")); + logger.error('adding verify:' + error) + msg.author.send(constant.dmFailure('#bot-spam')) } -}); - +} -const newVerifyUser = async (function(bot, msg, guild, token) { +const newVerifyUser = async function (bot, msg, guild, token) { try { - let author = msg.author; + const author = msg.author await (guild.fetchMembers()) - let member = guild.members.find(x => x.user.id == author.id) - let channel = msg.channel; - let result = await (getHTBRankDetails(channel, author, token)); + const member = guild.members.find(x => x.user.id === author.id) + const channel = msg.channel + const result = await (getHTBRankDetails(channel, author, token)) if (result != null) { - let rank = result.rank; - let htbprofile = guild.channels.find(channel => channel.name === profilePostChannel) - let defaultRole = guild.roles.find(r => r.name === assignRole); - let hasRole = member.roles.find(role => role.name == defaultRole.name); - logger.verbose("API Respone: " + JSON.stringify(result)); - logger.verbose("HasRole: " + (hasRole != null ? hasRole.name : null)) - logger.verbose(rank); - await (giveRole(bot, member, author, channel, hasRole, defaultRole, result, rank, htbprofile)); + const rank = result.rank + const htbprofile = guild.channels.find(channel => channel.name === profilePostChannel) + const defaultRole = guild.roles.find(r => r.name === assignRole) + const hasRole = member.roles.find(role => role.name === defaultRole.name) + logger.verbose('API Respone: ' + JSON.stringify(result)) + logger.verbose('HasRole: ' + (hasRole != null ? hasRole.name : null)) + logger.verbose(rank) + await (giveRole(bot, member, author, channel, hasRole, defaultRole, result, rank, htbprofile)) } } catch (err) { - logger.error("New Verify Error:" + err); + logger.error('New Verify Error:' + err) } -}) - - +} module.exports.run = async (bot, message, args) => { - let token = args.filter(arg => arg.length > 20); - if (token.length == 0) { - message.channel.send(constant.invalidToken(message.author)); + const token = args.filter(arg => arg.length > 20) + if (token.length === 0) { + message.channel.send(constant.invalidToken(message.author)) } - if (message.channel.type === "dm") { + if (message.channel.type === 'dm') { newVerifyUser(bot, message, bot.guilds.array().find(x => x.id === guildId), token[0]) } else { - message.delete(2000); + message.delete(2000) verifyUser(bot, message, token[0]) } } - module.exports.config = { - name: "verify", - description: "Verify a User", + name: 'verify', + description: 'Verify a User', usage: `${botTriggerCommand} verify `, minargs: 1, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/commands/xkcd.js b/commands/xkcd.js index ecfc8dc..d0d86e9 100644 --- a/commands/xkcd.js +++ b/commands/xkcd.js @@ -1,57 +1,49 @@ -const logger = require("../log.js").logger -const axios = require("axios"); -const R = require('ramda'); -const Discord = require("discord.js"); -const constant = require("../constant.js"); -const async = require('asyncawait/async'); -const await = require('asyncawait/await'); -const profilePostChannel = process.env.PROFILE_CHANNEL; -const assignRole = process.env.ASSIGN_ROLE; -const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND; -const xkcd = require('xkcd-api'); +'use strict' +const logger = require('../log.js').logger +const Discord = require('discord.js') +const botTriggerCommand = process.env.BOT_TRIGGER_COMMAND +const xkcd = require('xkcd-api') module.exports.run = async (bot, message, args) => { - message.delete(2000); - let msg = await message.channel.send("Generating...") - let method = args[0]; - var body = null; + message.delete(2000) + const msg = await message.channel.send('Generating...') + const method = args[0] if (method === 'random') { - xkcd.random(function(error, response) { + xkcd.random(function (error, response) { if (error) { - logger.error("xkcd Error" + error); - message.channel.send("I broke! Try again.") + logger.error('xkcd Error' + error) + message.channel.send('I broke! Try again.') } else { - sendxkcd(bot, message, msg, response); + sendxkcd(bot, message, msg, response) } - }); + }) } else { - xkcd.latest(function(error, response) { + xkcd.latest(function (error, response) { if (error) { - logger.error("xkcd Error" + error); - message.channel.send("I broke! Try again.") + logger.error('xkcd Error' + error) + message.channel.send('I broke! Try again.') } else { - sendxkcd(bot, message, msg, response); + sendxkcd(bot, message, msg, response) } - }); + }) } } -function sendxkcd(bot, message, msg, body) { - let mEmbed = new Discord.RichEmbed() - .setColor("#1a85f0") +function sendxkcd (bot, message, msg, body) { + const mEmbed = new Discord.RichEmbed() + .setColor('#1a85f0') .setImage(body.img) .setTimestamp() message.channel.send({ embed: mEmbed }) - msg.delete(); + msg.delete() } - module.exports.config = { - name: "xkcd", - description: "Send the latest xkcd comic!", + name: 'xkcd', + description: 'Send the latest xkcd comic!', usage: `${botTriggerCommand} xkcd `, minargs: 0, - minPermission: "SEND_MESSAGES" + minPermission: 'SEND_MESSAGES' } diff --git a/constant.js b/constant.js index 5fc2ce7..0b80b56 100644 --- a/constant.js +++ b/constant.js @@ -1,11 +1,12 @@ -exports.botReady = (bot) =>`${bot} is Ready.` -exports.default = (bot) =>`type \`\`${bot} help\`\` to see how to use` -exports.unkown = "Invalid! Command, Please try with a proper command" +'use strict' +exports.botReady = (bot) => `${bot} is Ready.` +exports.default = (bot) => `type \`\`${bot} help\`\` to see how to use` +exports.unkown = 'Invalid! Command, Please try with a proper command' exports.htburl = 'https://www.hackthebox.eu/api/users/identifier/' exports.dmFailure = (channel) => `Send the badger verify in the ${channel}` exports.htbFailure = (author) => `Unable to connect to HTB server ${author}` exports.invalidToken = (author) => `Invalid token ${author} Please try with the proper one.` -exports.profile = (author,userid) => `${author} HTB Profile: https://www.hackthebox.eu/home/users/profile/${userid}` +exports.profile = (author, userid) => `${author} HTB Profile: https://www.hackthebox.eu/home/users/profile/${userid}` exports.success = (author) => `Congratulation! ${author} you are verified now :thumbsup: .` exports.unableToaddRole = (author) => `Unable to add role ${author}. Please try again later.` exports.alreadyVerified = (author) => `Roles Updated for ${author} :thumbsup:.` diff --git a/helper/actionLog.js b/helper/actionLog.js index d481ef8..ef883fc 100644 --- a/helper/actionLog.js +++ b/helper/actionLog.js @@ -1,8 +1,7 @@ -const actionLog = process.env.ACTION_LOG || "action-log"; +'use strict' +const actionLog = process.env.ACTION_LOG || 'action-log' - - -module.exports.sendActionLog = function(bot, message) { - let sChannel = bot.channels.find(c => c.name === actionLog) +module.exports.sendActionLog = function (bot, message) { + const sChannel = bot.channels.find(c => c.name === actionLog) sChannel.send(message) } diff --git a/log.js b/log.js index 43308d4..68cb076 100644 --- a/log.js +++ b/log.js @@ -1,12 +1,13 @@ -const winston = require('winston'); -const level = process.env.LOG_LEVEL || "verbose"; -const os = require("os") +'use strict' +const winston = require('winston') +const level = process.env.LOG_LEVEL || 'verbose' +const os = require('os') const { combine, timestamp, label, printf -} = winston.format; +} = winston.format const myFormat = printf(({ level, @@ -14,10 +15,9 @@ const myFormat = printf(({ label, timestamp }) => { - if (typeof message) - message = JSON.stringify(message); - return `${timestamp} ${label} ${level}: ${message}`; -}); + if (typeof message === 'object') { message = JSON.stringify(message) } + return `${timestamp} ${label} ${level}: ${message}` +}) module.exports.logger = winston.createLogger({ level: level, format: combine( @@ -39,4 +39,4 @@ module.exports.logger = winston.createLogger({ ) }) ] -}); +}) diff --git a/package-lock.json b/package-lock.json index 706bd78..7227ad0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,26 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, "@sentry/core": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.6.1.tgz", @@ -65,6 +85,18 @@ "tslib": "^1.9.3" } }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, "agent-base": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", @@ -84,6 +116,46 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -97,6 +169,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", @@ -144,6 +222,12 @@ "is-buffer": "^2.0.2" } }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -157,11 +241,59 @@ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" }, + "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, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", @@ -220,6 +352,18 @@ "delayed-stream": "~1.0.0" } }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", @@ -230,6 +374,27 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -253,6 +418,49 @@ } } }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "deglob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-4.0.1.tgz", + "integrity": "sha512-/g+RDZ7yf2HvoW+E5Cy+K94YhgcFgr6C8LuHZD1O5HoNPkf3KY6RfXJ0DBGlB/NkLi5gml+G9zqRzk9S0mHZCg==", + "dev": true, + "requires": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^5.0.0", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -295,6 +503,15 @@ } } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dotenv": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.1.0.tgz", @@ -315,6 +532,12 @@ "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "enabled": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", @@ -328,6 +551,52 @@ "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==" }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + } + } + }, + "es-abstract": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", + "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.0", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.1.0", + "string.prototype.trimright": "^2.1.0" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -341,11 +610,348 @@ "es6-promise": "^4.0.3" } }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.4.0.tgz", + "integrity": "sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.4.1", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-config-standard": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", + "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", + "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-es": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", + "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", + "dev": true, + "requires": { + "eslint-utils": "^1.4.2", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", + "read-pkg-up": "^2.0.0", + "resolve": "^1.11.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", + "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", + "dev": true, + "requires": { + "eslint-plugin-es": "^2.0.0", + "eslint-utils": "^1.4.2", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.1.0", + "object.entries": "^1.1.0", + "object.fromentries": "^2.0.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "resolve": "^1.10.1" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-standard": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", + "dev": true + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "dev": true, + "requires": { + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "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 + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -361,6 +967,12 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, "fast-safe-stringify": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", @@ -376,6 +988,56 @@ "resolved": "https://registry.npmjs.org/fibers/-/fibers-2.0.2.tgz", "integrity": "sha512-HfVRxhYG7C8Jl9FqtrlElMR2z/8YiLQVDKf67MLY25Ic+ILx3ecmklfT1v3u+7P5/4vEFjuxaAFXhr2/Afwk5g==" }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, "follow-redirects": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", @@ -404,6 +1066,30 @@ "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", "integrity": "sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs=" }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-stdin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -412,6 +1098,41 @@ "assert-plus": "^1.0.0" } }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "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 + }, + "graceful-fs": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", + "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -426,10 +1147,37 @@ "har-schema": "^2.0.0" } }, - "http": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz", - "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I=" + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "http": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz", + "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I=" }, "http-signature": { "version": "1.2.0", @@ -450,11 +1198,73 @@ "debug": "^3.1.0" } }, + "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, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "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" + } + }, "is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", @@ -465,11 +1275,68 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -480,16 +1347,44 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "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 + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -500,6 +1395,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -516,6 +1417,16 @@ "verror": "1.10.0" } }, + "jsx-ast-utils": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", + "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" + } + }, "kuler": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", @@ -524,6 +1435,38 @@ "colornames": "^1.1.1" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.14", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", @@ -546,6 +1489,15 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -564,31 +1516,396 @@ "mime-db": "1.40.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "dev": true + }, + "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 + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.fromentries": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.1.tgz", + "integrity": "sha512-PUQv8Hbg3j2QX0IQYv3iAGCbGcu4yY4KQ92/dhA4sFSixBmSmp13UpDLs6jGK8rBtbmhNNIK99LD2k293jpiGA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.15.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, "one-time": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "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, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pkg-conf": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", + "dev": true, + "requires": { + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "requires": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "prism-media": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.3.tgz", @@ -599,6 +1916,23 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, "psl": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", @@ -619,6 +1953,33 @@ "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.26.1.tgz", "integrity": "sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ==" }, + "react-is": { + "version": "16.10.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.10.2.tgz", + "integrity": "sha512-INBT1QEgtcCCgvccr5/86CfD71fw9EPmDxgiJX4I2Ddr6ZsV6iFXsuby+qWJPtmNuMY0zByTsG4468P7nHuNWA==", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, "readable-stream": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", @@ -649,6 +2010,12 @@ "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -676,6 +2043,64 @@ "uuid": "^3.3.2" } }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "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 + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -686,6 +2111,33 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -694,11 +2146,60 @@ "is-arrayish": "^0.3.1" } }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "snekfetch": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", "integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw==" }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -720,6 +2221,76 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "standard": { + "version": "14.3.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-14.3.1.tgz", + "integrity": "sha512-TUQwU7znlZLfgKH1Zwn/D84FitWZkUTfbxSiz/vFx+4c9GV+clSfG/qLiLZOlcdyzhw3oF5/pZydNjbNDfHPEw==", + "dev": true, + "requires": { + "eslint": "~6.4.0", + "eslint-config-standard": "14.1.0", + "eslint-config-standard-jsx": "8.1.0", + "eslint-plugin-import": "~2.18.0", + "eslint-plugin-node": "~10.0.0", + "eslint-plugin-promise": "~4.2.1", + "eslint-plugin-react": "~7.14.2", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "^12.0.0" + } + }, + "standard-engine": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-12.0.0.tgz", + "integrity": "sha512-gJIIRb0LpL7AHyGbN9+hJ4UJns37lxmNTnMGRLC8CFrzQ+oB/K60IQjKNgPBCB2VP60Ypm6f8DFXvhVWdBOO+g==", + "dev": true, + "requires": { + "deglob": "^4.0.0", + "get-stdin": "^7.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^3.1.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + } + }, "string_decoder": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", @@ -728,16 +2299,100 @@ "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "swearjar": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/swearjar/-/swearjar-0.2.0.tgz", "integrity": "sha1-w/Gje/zXye+z1mY8mNTBAqnjyj0=" }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, "text-hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -777,6 +2432,27 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -795,6 +2471,22 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -805,6 +2497,15 @@ "extsprintf": "^1.2.0" } }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, "winston": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", @@ -854,6 +2555,27 @@ } } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "xkcd-api": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xkcd-api/-/xkcd-api-1.0.1.tgz", @@ -862,6 +2584,12 @@ "minimist": "^1.2.0", "request": "^2.74.0" } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true } } } diff --git a/package.json b/package.json index 0bde6b7..9c57600 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "xkcd-api": "^1.0.1" }, "devDependencies": { - "dotenv": "^8.1.0" + "dotenv": "^8.1.0", + "standard": "^14.3.1" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/services/redis.js b/services/redis.js index f591da4..0b149d9 100644 --- a/services/redis.js +++ b/services/redis.js @@ -1,24 +1,25 @@ -const redisURL = process.env.REDIS_URL; -const redis = require("redis"); -const bluebird = require("bluebird"); -bluebird.promisifyAll(redis); -const client = redis.createClient(redisURL); +'use strict' +const redisURL = process.env.REDIS_URL +const redis = require('redis') +const bluebird = require('bluebird') +bluebird.promisifyAll(redis) +const client = redis.createClient(redisURL) -const set = function(key, value) { - return client.set(key, value, redis.print); +const set = function (key, value) { + return client.set(key, value, redis.print) } -const setex = function (key,value,ttl){ -return client.set(key, value, 'EX', ttl); +const setex = function (key, value, ttl) { + return client.set(key, value, 'EX', ttl) } -const get = function(key) { - return client.getAsync(key); +const get = function (key) { + return client.getAsync(key) } -const clean = () =>{ - return client.end(true); +const clean = () => { + return client.end(true) } -exports.redis = client; -exports.set = set; -exports.get = get; -exports.setex = setex; -exports.clean = clean; +exports.redis = client +exports.set = set +exports.get = get +exports.setex = setex +exports.clean = clean