diff --git a/bot/bot.js b/bot/bot.js index 43fb30e..14e5d28 100644 --- a/bot/bot.js +++ b/bot/bot.js @@ -4,30 +4,16 @@ const Discord = require('discord.js'); // Load config! let config = require('config'); -config = config.get('bot'); +let botConfig = config.get('bot'); +let commands = {}; -var aliases; -try { - aliases = require('./alias.json'); -} catch (e) { - //No aliases defined - aliases = { - test: { - process: function(bot, msg) { - msg.channel.send('test'); - } - } - }; -} -var commands = {}; - -var bot = new Discord.Client(); +const bot = new Discord.Client(); bot.on('ready', function() { - console.log('Logged in! Serving in ' + bot.guilds.array().length + ' servers'); + console.log(`Logged in! Serving in ${bot.guilds.array().length} servers`); require('./plugins.js').init(); - console.log('type ' + config.prefix + 'help in Discord for a commands list.'); - bot.user.setGame(config.prefix + 'tip'); + console.log(`type ${botConfig.prefix}help in Discord for a commands list.`); + bot.user.setActivity(botConfig.prefix + 'tip'); }); bot.on('disconnected', function() { @@ -35,35 +21,29 @@ bot.on('disconnected', function() { process.exit(1); //exit node.js with an error }); -function checkMessageForCommand(msg, isEdit) { +function checkMessageForCommand(msg) { //check if message is a command - if (msg.author.id != bot.user.id && msg.content.startsWith(config.prefix)) { - console.log('treating ' + msg.content + ' from ' + msg.author + ' as command'); - var cmdTxt = msg.content.split(' ')[0].substring(config.prefix.length); - var suffix = msg.content.substring(cmdTxt.length + config.prefix.length + 1); //add one for the ! and one for the space + if (msg.author.id !== bot.user.id && msg.content.startsWith(botConfig.prefix)) { + console.log(`treating ${msg.content} from ${msg.author} as command`); + let cmdTxt = msg.content.split(' ')[0].substring(botConfig.prefix.length); + let suffix = msg.content.substring(cmdTxt.length + botConfig.prefix.length + 1); //add one for the ! and one for the space if (msg.isMentioned(bot.user)) { try { cmdTxt = msg.content.split(' ')[1]; - suffix = msg.content.substring(bot.user.mention().length + cmdTxt.length + config.prefix.length + 1); + suffix = msg.content.substring(bot.user.mention().length + cmdTxt.length + botConfig.prefix.length + 1); } catch (e) { //no command - msg.channel.send('Yes?'); - return; + return msg.channel.send('Yes?'); } } - let alias = aliases[cmdTxt]; - if (alias) { - var cmd = alias; - } else { - var cmd = commands[cmdTxt]; - } + let cmd = commands[cmdTxt]; if (cmd) { // Add permission check here later on ;) try { - cmd.process(bot, msg, suffix, isEdit); + cmd.process(bot, msg, suffix); } catch (e) { - var msgTxt = 'command ' + cmdTxt + ' failed :('; - if (config.debug) { + let msgTxt = `command ${cmdTxt} failed :(`; + if (botConfig.debug) { msgTxt += '\n' + e.stack; } msg.channel.send(msgTxt); @@ -72,21 +52,17 @@ function checkMessageForCommand(msg, isEdit) { } else { //message isn't a command or is from us //drop our own messages to prevent feedback loops - if (msg.author == bot.user) { + if (msg.author === bot.user) { return; } - if (msg.author != bot.user && msg.isMentioned(bot.user)) { + if (msg.author !== bot.user && msg.isMentioned(bot.user)) { msg.channel.send('yes?'); //using a mention here can lead to looping - } else { } } } -bot.on('message', msg => checkMessageForCommand(msg, false)); -/*bot.on("messageUpdate", (oldMessage, newMessage) => { - checkMessageForCommand(newMessage, true); -});*/ +bot.on('message', msg => checkMessageForCommand(msg)); exports.addCommand = function(commandName, commandObject) { try { @@ -106,4 +82,4 @@ exports.commandCount = function() { return Object.keys(commands).length; }; -bot.login(config.token); +bot.login(botConfig.token); diff --git a/bot/modules/tipbot.js b/bot/modules/tipbot.js index 3d0112c..9882dcf 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -1,109 +1,152 @@ 'use strict'; const bitcoin = require('bitcoin'); -let config = require('config'), - spamchannel = config.get('moderation').botspamchannel, - regex = require('regex'); -config = config.get('lbrycrd'); -const lbry = new bitcoin.Client(config); +let config = require('config'); +let spamchannel = config.get('sandboxchannel'); +let regex = require('regex'); +let lbrycrdConfig = config.get('lbrycrd'); +const lbry = new bitcoin.Client(lbrycrdConfig); -exports.commands = [ - "tip", - "multitip", - "roletip", - "tipcommands" -] +exports.commands = ['tip', 'multitip', 'roletip', 'tipcommands']; exports.tip = { - usage: "", + usage: '', description: 'Tip a given user with an amount of LBC or perform wallet specific operations.', - process: async function (bot, msg, suffix) { + process: async function(bot, msg, suffix) { let tipper = msg.author.id.replace('!', ''), - words = msg.content.trim().split(' ').filter(function (n) { return n !== ""; }), + words = msg.content + .trim() + .split(' ') + .filter(function(n) { + return n !== ''; + }), subcommand = words.length >= 2 ? words[1] : 'help', - helpmsgparts = [['[help]', 'Get this message.'], - ['balance', 'Get your balance.'], - ['deposit', 'Get address for your deposits.'], - ['withdraw ADDRESS AMOUNT', 'Withdraw AMOUNT credits to ADDRESS'], - ['[private] ', 'Mention a user with @ and then the amount to tip them, or put private before the user to tip them privately.']], - helpmsg = { "embed" : { - "description": formatDescriptions(helpmsgparts) + - '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value.', - "color": 1109218, - "author": { "name": "!tip" } } }, - channelwarning = 'Please use <'+ spamchannel + '> or DMs to talk to bots.'; + helpmsgparts = [ + ['[help]', 'Get this message.'], + ['balance', 'Get your balance.'], + ['deposit', 'Get address for your deposits.'], + ['withdraw ADDRESS AMOUNT', 'Withdraw AMOUNT credits to ADDRESS'], + ['[private] ', 'Mention a user with @ and then the amount to tip them, or put private before the user to tip them privately.'] + ], + helpmsg = { + embed: { + description: formatDescriptions(helpmsgparts) + '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value.', + color: 1109218, + author: { name: '!tip' } + } + }, + channelwarning = 'Please use <' + spamchannel + '> or DMs to talk to bots.'; switch (subcommand) { - case 'help': privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); break; - case 'balance': doBalance(msg, tipper); break; - case 'deposit': privateOrSandboxOnly(msg, channelwarning, doDeposit, [tipper]); break; - case 'withdraw': privateOrSandboxOnly(msg, channelwarning, doWithdraw, [tipper, words, helpmsg]); break; - default: doTip(msg, tipper, words, helpmsg); + case 'help': + privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); + break; + case 'balance': + doBalance(msg, tipper); + break; + case 'deposit': + privateOrSandboxOnly(msg, channelwarning, doDeposit, [tipper]); + break; + case 'withdraw': + privateOrSandboxOnly(msg, channelwarning, doWithdraw, [tipper, words, helpmsg]); + break; + default: + doTip(msg, tipper, words, helpmsg); } } -} +}; exports.multitip = { - usage: "", + usage: '', description: 'Tip multiple users simultaneously for the same amount of LBC each.', - process: async function (bot, msg, suffix) { + process: async function(bot, msg, suffix) { let tipper = msg.author.id.replace('!', ''), - words = msg.content.trim().split(' ').filter(function (n) { return n !== ""; }), - subcommand = words.length >= 2 ? words[1] : 'help', - helpmsgparts = [['[help]', 'Get this message.'], - ['+ ', 'Mention one or more users in a row, seperated by spaces, then an amount that each mentioned user will receive.'], - ['private + ','Put private before the user list to have each user tipped privately, without revealing other users tipped.']], - helpmsg = { "embed" : { - "description": formatDescriptions(helpmsgparts) + - '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value, + : Value can be repeated for multiple entries.', - "color": 1109218, - "author": { "name": "!multitip" } } }, - channelwarning = 'Please use <'+ spamchannel + '> or DMs to talk to bots.'; - switch(subcommand) { - case 'help': privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); break; - default: doMultiTip(msg, tipper, words, helpmsg); break; + words = msg.content + .trim() + .split(' ') + .filter(function(n) { + return n !== ''; + }), + subcommand = words.length >= 2 ? words[1] : 'help', + helpmsgparts = [ + ['[help]', 'Get this message.'], + ['+ ', 'Mention one or more users in a row, seperated by spaces, then an amount that each mentioned user will receive.'], + ['private + ', 'Put private before the user list to have each user tipped privately, without revealing other users tipped.'] + ], + helpmsg = { + embed: { + description: formatDescriptions(helpmsgparts) + '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value, + : Value can be repeated for multiple entries.', + color: 1109218, + author: { name: '!multitip' } + } + }, + channelwarning = 'Please use <' + spamchannel + '> or DMs to talk to bots.'; + switch (subcommand) { + case 'help': + privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); + break; + default: + doMultiTip(msg, tipper, words, helpmsg); + break; } } -} - +}; exports.roletip = { - usage: "", + usage: '', description: 'Tip every user in a given role the same amount of LBC.', - process: async function (bot, msg, suffix) { + process: async function(bot, msg, suffix) { let tipper = msg.author.id.replace('!', ''), - words = msg.content.trim().split(' ').filter(function (n) { return n !== ""; }), - subcommand = words.length >= 2 ? words[1] : 'help', - helpmsgparts = [['[help]', 'Get this message'], - [' ', 'Mention a single role, then an amount that each user in that role will receive.'], - ['private ','Put private before the role to have each user tipped privately, without revealing other users tipped.']], - helpmsg = { "embed" : { - "description": formatDescriptions(helpmsgparts) + - '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value.', - "color": 1109218, - "author": { "name": "!roletip" } } }, - channelwarning = 'Please use <'+ spamchannel + '> or DMs to talk to bots.'; - switch(subcommand) { - case 'help': privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); break; - default: doRoleTip(msg, tipper, words, helpmsg); break; + words = msg.content + .trim() + .split(' ') + .filter(function(n) { + return n !== ''; + }), + subcommand = words.length >= 2 ? words[1] : 'help', + helpmsgparts = [ + ['[help]', 'Get this message'], + [' ', 'Mention a single role, then an amount that each user in that role will receive.'], + ['private ', 'Put private before the role to have each user tipped privately, without revealing other users tipped.'] + ], + helpmsg = { + embed: { + description: formatDescriptions(helpmsgparts) + '\nKey: [] : Optionally include contained keyword, <> : Replace with appropriate value.', + color: 1109218, + author: { name: '!roletip' } + } + }, + channelwarning = `Please use <${spamchannel}> or DMs to talk to bots.`; + switch (subcommand) { + case 'help': + privateOrSandboxOnly(msg, channelwarning, doHelp, [helpmsg]); + break; + default: + doRoleTip(msg, tipper, words, helpmsg); + break; } } -} +}; exports.tipcommands = { - usage: "", + usage: '', description: 'Lists all available tipbot commands with brief descriptions for each one.', - process: async function (bot, msg, suffix) { - let helpmsgparts = [['!tip', 'Tip a given user with an amount of LBC or perform wallet specific operations.'], - ['!multitip', 'Tip multiple users simultaneously for the same amount of LBC each.'], - ['!roletip','Tip every user in a given role the same amount of LBC.'], - ['!tipcommands', 'Lists all available tipbot commands with brief descriptions for each one.']], - helpmsg = { "embed" : { - "description": "These are all the commands that TipBot currently supports. Use `! help` for usage instructions.\n" + - formatDescriptions(helpmsgparts), - "color": 1109218, - "author": { "name": "Tipbot Commands" } } }; + process: async function(bot, msg, suffix) { + let helpmsgparts = [ + ['!tip', 'Tip a given user with an amount of LBC or perform wallet specific operations.'], + ['!multitip', 'Tip multiple users simultaneously for the same amount of LBC each.'], + ['!roletip', 'Tip every user in a given role the same amount of LBC.'], + ['!tipcommands', 'Lists all available tipbot commands with brief descriptions for each one.'] + ], + helpmsg = { + embed: { + description: `These are all the commands that TipBot currently supports. Use \`! help\` for usage instructions. +${formatDescriptions(helpmsgparts)}`, + color: 1109218, + author: { name: 'Tipbot Commands' } + } + }; msg.reply(helpmsg); } -} +}; function privateOrSandboxOnly(message, wrongchannelmsg, fn, args) { if (!inPrivateOrBotSandbox(message)) { @@ -113,69 +156,59 @@ function privateOrSandboxOnly(message, wrongchannelmsg, fn, args) { fn.apply(null, [message, ...args]); } - function doHelp(message, helpmsg) { message.author.send(helpmsg); } - function doBalance(message, tipper) { - lbry.getBalance(tipper, 1, function (err, balance) { + lbry.getBalance(tipper, 1, function(err, balance) { if (err) { message.reply('Error getting balance.').then(message => message.delete(5000)); - } - else { - message.reply('You have *' + balance + '* LBC'); + } else { + message.reply(`You have *${balance}* LBC`); } }); } - function doDeposit(message, tipper) { - getAddress(tipper, function (err, address) { + getAddress(tipper, function(err, address) { if (err) { message.reply('Error getting your deposit address.').then(message => message.delete(5000)); - } - else { - message.reply('Your address is ' + address); + } else { + message.reply(`Your address is ${address}`); } }); } - function doWithdraw(message, tipper, words, helpmsg) { if (words.length < 4) { - doHelp(message, helpmsg); - return; + return doHelp(message, helpmsg); } - var address = words[2], - amount = getValidatedAmount(words[3]); + let address = words[2], + amount = getValidatedAmount(words[3]); if (amount === null) { - message.reply('I dont know how to withdraw that many coins...').then(message => message.delete(5000)); + message.reply("I don't know how to withdraw that many credits...").then(message => message.delete(5000)); return; } - lbry.sendFrom(tipper, address, amount, function (err, txId) { + lbry.sendFrom(tipper, address, amount, function(err, txId) { if (err) { - message.reply(err.message).then(message => message.delete(5000)); - } - else { - message.reply('You withdrew ' + amount + ' LBC to ' + address + '.\n' + txLink(txId)); + return message.reply(err.message).then(message => message.delete(5000)); } + message.reply(`You withdrew ${amount} LBC to ${address}. +${txLink(txId)}`); }); } - function doTip(message, tipper, words, helpmsg) { if (words.length < 3 || !words) { - doHelp(message, helpmsg); - return; + return doHelp(message, helpmsg); } - var prv = false; - var amountOffset = 2; + let prv = false; + let amountOffset = 2; if (words.length >= 4 && words[1] === 'private') { prv = true; amountOffset = 3; @@ -184,19 +217,15 @@ function doTip(message, tipper, words, helpmsg) { let amount = getValidatedAmount(words[amountOffset]); if (amount === null) { - message.reply('I dont know how to tip that many coins...').then(message => message.delete(5000)); - return; + return message.reply("I don't know how to tip that many credits...").then(message => message.delete(5000)); } if (message.mentions.users.first().id) { - sendLBC(message, tipper, message.mentions.users.first().id.replace('!', ''), amount, prv); - } - else { - message.reply('Sorry, I could not find a user in your tip...').then(message => message.delete(5000)); + return sendLbc(message, tipper, message.mentions.users.first().id.replace('!', ''), amount, prv); } + message.reply('Sorry, I could not find a user in your tip...'); } - function doMultiTip(message, tipper, words, helpmsg) { if (!words) { doHelp(message, helpmsg); @@ -206,128 +235,117 @@ function doMultiTip(message, tipper, words, helpmsg) { doTip(message, tipper, words, helpmsg); return; } - var prv = false; + let prv = false; if (words.length >= 5 && words[1] === 'private') { prv = true; } let [userIDs, amount] = findUserIDsAndAmount(message, words, prv); if (amount == null) { - message.reply('I don\'t know how to tip that many coins...').then(message => message.delete(5000)); + message.reply("I don't know how to tip that many coins...").then(message => message.delete(5000)); return; } if (!userIDs) { message.reply('Sorry, I could not find a user in your tip...').then(message => message.delete(5000)); return; } - for (var i = 0; i < userIDs.length; i++) { + for (let i = 0; i < userIDs.length; i++) { sendLBC(message, tipper, userIDs[i].toString(), amount, prv); } } - function doRoleTip(message, tipper, words, helpmsg) { if (!words || words.length < 3) { doHelp(message, helpmsg); return; } - var prv = false; - var amountOffset = 2; + let prv = false; + let amountOffset = 2; if (words.length >= 4 && words[1] === 'private') { prv = true; amountOffset = 3; } let amount = getValidatedAmount(words[amountOffset]); if (amount == null) { - message.reply('I don\'t know how to tip that many coins...').then(message => message.delete(5000)); + message.reply("I don't know how to tip that many coins...").then(message => message.delete(5000)); return; } if (message.mentions.roles.first().id) { if (message.mentions.roles.first().members.first().id) { let userIDs = message.mentions.roles.first().members.map(member => member.user.id.replace('!', '')); - for (var i = 0; i < userIDs; i++) { + for (let i = 0; i < userIDs; i++) { sendLBC(message, tipper, userIDs[i], amount, prv); } - return; - } - else { + } else { message.reply('Sorry, I could not find any users to tip in that role...').then(message => message.delete(5000)); - return; } - } - else { + } else { message.reply('Sorry, I could not find any roles in your tip...').then(message => message.delete(5000)); - return; } } - function findUserIDsAndAmount(message, words, prv) { - var idList = []; - var amount = null; - var count = 0; - var startOffset = 1; + let idList = []; + let amount = null; + let count = 0; + let startOffset = 1; if (prv) startOffset = 2; - var regex = new RegExp(/<@!?[0-9]+>/) - for (var i = startOffset; i < words.length; i++) { + let regex = new RegExp(/<@!?[0-9]+>/); + for (let i = startOffset; i < words.length; i++) { if (regex.test(words[i])) { count++; idList.push(words[i].match(/[0-9]+/)); } else { - amount = getValidatedAmount(words[Number(count)+1]); + amount = getValidatedAmount(words[Number(count) + 1]); break; } } return [idList, amount]; } - function sendLBC(message, tipper, recipient, amount, privacyFlag) { - getAddress(recipient.toString(), function (err, address) { + getAddress(recipient.toString(), function(err, address) { if (err) { message.reply(err.message).then(message => message.delete(5000)); - } - else { - lbry.sendFrom(tipper, address, Number(amount), 1, null, null, function (err, txId) { + } else { + lbry.sendFrom(tipper, address, Number(amount), 1, null, null, function(err, txId) { if (err) { message.reply(err.message).then(message => message.delete(5000)); - } - else { - var tx = txLink(txId); - var msgtail = '\nDM me with `' + message.content.split(" ", 1)[0] + '` for command specific instructions or with `!tipcommands` for all available commands'; + } else { + let tx = txLink(txId); + let msgtail = ` +DM me with \`${message.content.split(' ', 1)[0]}\` for command specific instructions or with \`!tipcommands\` for all available commands`; if (privacyFlag) { - var authmsg = 'You have just privately tipped <@' + recipient + '> ' + amount + ' LBC.\n' + tx + msgtail; + let authmsg = `You have just privately tipped <@${recipient}> ${amount} LBC. +${tx}${msgtail}`; message.author.send(authmsg); - if (message.author.id != message.mentions.users.first().id) { - var usr = message.guild.members.find('id', recipient).user; - var recipientmsg = 'You have just been privately tipped ' + amount + ' LBC by <@' + tipper + '>.\n' + tx + msgtail; + if (message.author.id !== message.mentions.users.first().id) { + let usr = message.guild.members.find('id', recipient).user; + let recipientmsg = `You have just been privately tipped ${amount} LBC by <@${tipper}>. +${tx}${msgtail}`; usr.send(recipientmsg); } } else { - var generalmsg = - 'Wubba lubba dub dub! <@' + tipper + '> tipped <@' + recipient + '> ' + amount + ' LBC.\n' + tx + msgtail; + let generalmsg = `Wubba lubba dub dub! <@${tipper}> tipped <@${recipient}> ${amount} LBC. +${tx}${msgtail}`; message.reply(generalmsg); } } }); } }); -}; - +} function getAddress(userId, cb) { - lbry.getAddressesByAccount(userId, function (err, addresses) { + lbry.getAddressesByAccount(userId, function(err, addresses) { if (err) { cb(err); - } - else if (addresses.length > 0) { + } else if (addresses.length > 0) { cb(null, addresses[0]); - } - else { - lbry.getNewAddress(userId, function (err, address) { + } else { + lbry.getNewAddress(userId, function(err, address) { if (err) { cb(err); - } - else { + } else { cb(null, address); } }); @@ -335,16 +353,10 @@ function getAddress(userId, cb) { }); } - function inPrivateOrBotSandbox(msg) { - if ((msg.channel.type == 'dm') || (msg.channel.id === spamchannel)) { - return true; - } else { - return false; - } + return msg.channel.type === 'dm' || msg.channel.id === spamchannel; } - function getValidatedAmount(amount) { amount = amount.trim(); if (amount.toLowerCase().endsWith('lbc')) { @@ -353,13 +365,16 @@ function getValidatedAmount(amount) { return amount.match(/^[0-9]+(\.[0-9]+)?$/) ? amount : null; } - function txLink(txId) { - return ""; + return ''; } - function formatDescriptions(msgparts) { - return msgparts.map(elem => '\t**' + elem[0] + '**\n\t\t' + elem[1] + '\n') - .join(''); + return msgparts + .map( + elem => `\t**${elem[0]}** +\t\t${elem[1]} +` + ) + .join(''); } diff --git a/package-lock.json b/package-lock.json index 888bce0..0d08b0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -95,6 +95,11 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "augment": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/augment/-/augment-3.2.1.tgz", + "integrity": "sha1-7F2elFYUDvqxEQ/ds1LL5U5/sxw=" + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -559,6 +564,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -609,9 +615,9 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "config": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/config/-/config-1.28.1.tgz", - "integrity": "sha1-diXSoeTJDxMdinM0eYLZPDhzKC0=", + "version": "1.29.4", + "resolved": "https://registry.npmjs.org/config/-/config-1.29.4.tgz", + "integrity": "sha1-G0J1LthrNj/EAllgVp/XSXiGKpI=", "requires": { "json5": "0.4.0", "os-homedir": "1.0.2" @@ -687,15 +693,15 @@ } }, "discord.js": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.2.1.tgz", - "integrity": "sha512-8Mor+IREVWHinjRd6Bu6OwRfT+ET/WEoLWMl8crFvBVcTFmaO/TSwP39C8QIGCB2YMVMYMdljjX/w17AUMemqg==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.3.0.tgz", + "integrity": "sha512-xM3ydvb4urHjCP3N+Mgpw53a7ZGtmPwllwVgwPqdF2SHNPvTDr4So/+55VVx76s5eO9IMrOWpczsEuIr0/MAgQ==", "requires": { "long": "3.2.0", "prism-media": "0.0.1", - "snekfetch": "3.6.1", + "snekfetch": "3.6.4", "tweetnacl": "1.0.0", - "ws": "3.3.2" + "ws": "4.0.0" } }, "ebnf-parser": { @@ -865,6 +871,795 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + } + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1201,6 +1996,11 @@ "is-buffer": "1.1.6" } }, + "lex": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/lex/-/lex-1.7.4.tgz", + "integrity": "sha1-M91muYCjjXemxCTXFz5vQNYCwMU=" + }, "lex-parser": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/lex-parser/-/lex-parser-0.1.4.tgz", @@ -1295,12 +2095,12 @@ "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" }, "mongodb": { - "version": "2.2.33", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.33.tgz", - "integrity": "sha1-tTfEcdNKZlG0jzb9vyl1A0Dgi1A=", + "version": "2.2.34", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.34.tgz", + "integrity": "sha1-o09Zu+thdUrsQy3nLD/iFSakTBo=", "requires": { "es6-promise": "3.2.1", - "mongodb-core": "2.1.17", + "mongodb-core": "2.1.18", "readable-stream": "2.2.7" }, "dependencies": { @@ -1321,25 +2121,25 @@ } }, "mongodb-core": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.17.tgz", - "integrity": "sha1-pBizN6FKFJkPtRC5I97mqBMXPfg=", + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.18.tgz", + "integrity": "sha1-TEYTm986HwMt7ZHbSfOO7AFlkFA=", "requires": { "bson": "1.0.4", "require_optional": "1.0.1" } }, "mongoose": { - "version": "4.13.7", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.7.tgz", - "integrity": "sha512-3VPcGQWaTzT/OVK+TpE9dGpNHBnEqFX2RmbFr1XvbsKmxPsL9kaRBSHqaQ8QEMd6CUeOYMRdH1pKRrlnCenRsg==", + "version": "4.13.11", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.11.tgz", + "integrity": "sha512-OgXmFc3vzXwq4zWp41XfSBDnKZLqnBc4Kh7mwwGjBE5iWH5tfkixaPK0uFtpEuzDzUvAIg33bgniyTsmc00olA==", "requires": { "async": "2.1.4", "bson": "1.0.4", "hooks-fixed": "2.0.2", "kareem": "1.5.0", "lodash.get": "4.4.2", - "mongodb": "2.2.33", + "mongodb": "2.2.34", "mpath": "0.3.0", "mpromise": "0.5.5", "mquery": "2.3.3", @@ -1387,6 +2187,12 @@ "resolved": "https://registry.npmjs.org/muri/-/muri-1.3.0.tgz", "integrity": "sha512-FiaFwKl864onHFFUV/a2szAl7X0fxVlSKNdhTf+BM8i8goEgYut8u5P9MqQqIYwvaMxjzVESsoEm/2kfkFH1rg==" }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "optional": true + }, "node-config": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/node-config/-/node-config-0.0.2.tgz", @@ -1606,6 +2412,38 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" }, + "regex": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/regex/-/regex-0.1.1.tgz", + "integrity": "sha1-BYCZXRhGxTdqdiudNYuDBo0geu8=", + "requires": { + "augment": "3.2.1", + "jison": "0.4.4", + "lex": "1.7.4", + "statemachines": "0.1.0" + }, + "dependencies": { + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + }, + "jison": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jison/-/jison-0.4.4.tgz", + "integrity": "sha1-hrA7Ze/sAHqR9JPs6r5W+QqmtDk=", + "requires": { + "JSONSelect": "0.4.0", + "ebnf-parser": "0.1.10", + "escodegen": "0.0.21", + "esprima": "1.0.4", + "jison-lex": "0.2.1", + "lex-parser": "0.1.4", + "nomnom": "1.5.2" + } + } + } + }, "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", @@ -1679,7 +2517,7 @@ "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", "requires": { "resolve-from": "2.0.0", - "semver": "5.4.1" + "semver": "5.5.0" } }, "resolve-from": { @@ -1693,9 +2531,9 @@ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" }, "set-immediate-shim": { "version": "1.0.1", @@ -1714,9 +2552,9 @@ "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" }, "snekfetch": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.1.tgz", - "integrity": "sha512-aLEvf1YR440pINb0LEo/SL2Q2s/A26+YEqPlx09A0XpGH7qWp8iqIFFolVILHn2yudWXJne9QWyQu+lzDp+ksQ==" + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", + "integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw==" }, "sntp": { "version": "2.1.0", @@ -1726,6 +2564,11 @@ "hoek": "4.2.0" } }, + "sorted-array": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/sorted-array/-/sorted-array-1.1.0.tgz", + "integrity": "sha1-YamDJeQSu5CZm0usGN/tXzVkEC0=" + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -1762,6 +2605,15 @@ } } }, + "statemachines": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/statemachines/-/statemachines-0.1.0.tgz", + "integrity": "sha1-tUX9PYpVKA8wK4aW8ZwKEcTjOt4=", + "requires": { + "augment": "3.2.1", + "sorted-array": "1.1.0" + } + }, "static-eval": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.3.tgz", @@ -1898,9 +2750,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.2.tgz", - "integrity": "sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-4.0.0.tgz", + "integrity": "sha512-QYslsH44bH8O7/W2815u5DpnCpXWpEK44FmaHffNwgJI4JMaSZONgPBTOfrxJ29mXKbXak+LsJ2uAkDTYq2ptQ==", "requires": { "async-limiter": "1.0.0", "safe-buffer": "5.1.1", diff --git a/package.json b/package.json index 8e3d3e0..c66b836 100644 --- a/package.json +++ b/package.json @@ -4,22 +4,23 @@ "babel-preset-node8": "^1.2.0", "bitcoin": "^3.0.1", "chrono-node": "^1.3.5", - "config": "^1.27.0", - "discord.js": "^11.2.1", + "config": "^1.29.4", + "discord.js": "^11.3.0", "embed-creator": "^1.1.4", "jsonpath": "^0.2.12", "moment": "^2.20.1", - "mongoose": "^4.13.7", + "mongoose": "^4.13.11", "node-config": "^0.0.2", "numeral": "^2.0.6", + "regex": "^0.1.1", "request": "^2.83.0" }, "scripts": { - "prettier": "prettier * --write", + "prettier": "prettier --write '{bot,.}/**/*.{js,json}' --single-quote --print-width 240", "build": "babel bot -d dist", "prod": "babel bot -d dist & node dist/bot.js", - "lint": "prettier --write bot/**/*.js", - "precommit": "prettier --write bot/**/*.js" + "lint": "prettier --write '{bot,.}/**/*.{js,json}' --single-quote --print-width 240", + "precommit": "prettier --write '{bot,.}/**/*.{js,json}' --single-quote --print-width 240" }, "devDependencies": { "prettier": "1.7.4"