diff --git a/config/index.js b/config/index.js index 290d63c0..40297381 100644 --- a/config/index.js +++ b/config/index.js @@ -663,33 +663,23 @@ var conf = convict({ format: Boolean, env: 'SMS_USE_MOCK' }, - apiKey: { - doc: 'API key for the SMS service', - default: 'YOU MUST CHANGE ME', - format: String, - env: 'SMS_API_KEY' - }, - apiSecret: { - doc: 'API secret for the SMS service', - default: 'YOU MUST CHANGE ME', - format: String, - env: 'SMS_API_SECRET' - }, isStatusGeoEnabled: { doc: 'Indicates whether the status endpoint should do geo-ip lookup', default: true, format: Boolean, env: 'SMS_STATUS_GEO_ENABLED' }, - senderIds: { - doc: 'Sender ids keyed by the ISO 3166-1 alpha-2 country code (region) they apply to', - default: { - CA: '16474909977', - GB: 'Firefox', - US: '15036789977' - }, - format: Object, - env: 'SMS_SENDER_IDS' + apiRegion: { + doc: 'AWS region', + default: 'us-east-1', + format: String, + env: 'SMS_API_REGION' + }, + countryCodes: { + doc: 'Allow sending SMS to these ISO 3166-1 alpha-2 country codes', + default: ['CA', 'GB', 'US'], + format: Array, + env: 'SMS_COUNTRY_CODES' }, installFirefoxLink: { doc: 'Link for the installFirefox SMS template', diff --git a/lib/routes/sms.js b/lib/routes/sms.js index 995f4813..caa3e38d 100644 --- a/lib/routes/sms.js +++ b/lib/routes/sms.js @@ -22,8 +22,7 @@ module.exports = (log, db, config, customs, sms) => { } const getGeoData = require('../geodb')(log) - const SENDER_IDS = config.sms.senderIds - const REGIONS = new Set(Object.keys(SENDER_IDS)) + const REGIONS = new Set(config.sms.countryCodes) const IS_STATUS_GEO_ENABLED = config.sms.isStatusGeoEnabled return [ @@ -52,12 +51,12 @@ module.exports = (log, db, config, customs, sms) => { const templateName = TEMPLATE_NAMES.get(request.payload.messageId) const acceptLanguage = request.app.acceptLanguage - let phoneNumberUtil, parsedPhoneNumber, senderId + let phoneNumberUtil, parsedPhoneNumber customs.check(request, sessionToken.email, 'connectDeviceSms') .then(parsePhoneNumber) .then(validatePhoneNumber) - .then(getRegionSpecificSenderId) + .then(validateRegion) .then(createSigninCode) .then(sendMessage) .then(logSuccess) @@ -75,12 +74,11 @@ module.exports = (log, db, config, customs, sms) => { } } - function getRegionSpecificSenderId () { + function validateRegion () { const region = phoneNumberUtil.getRegionCodeForNumber(parsedPhoneNumber) request.emitMetricsEvent(`sms.region.${region}`) - senderId = SENDER_IDS[region] - if (! senderId) { + if (! REGIONS.has(region)) { throw error.invalidRegion(region) } } @@ -92,7 +90,7 @@ module.exports = (log, db, config, customs, sms) => { } function sendMessage (signinCode) { - return sms.send(phoneNumber, senderId, templateName, acceptLanguage, signinCode) + return sms.send(phoneNumber, templateName, acceptLanguage, signinCode) } function logSuccess () { diff --git a/lib/senders/sms.js b/lib/senders/sms.js index 19fd3a70..a53d36e4 100644 --- a/lib/senders/sms.js +++ b/lib/senders/sms.js @@ -4,28 +4,27 @@ 'use strict' -var Nexmo = require('nexmo') -var MockNexmo = require('../mock-nexmo') +var AWS = require('aws-sdk') +var MockSNS = require('../../test/mock-sns') var P = require('bluebird') var error = require('../error') module.exports = function (log, translator, templates, config) { var smsConfig = config.sms - var nexmo = smsConfig.useMock ? new MockNexmo(log, config) : new Nexmo({ - apiKey: smsConfig.apiKey, - apiSecret: smsConfig.apiSecret - }) - - var sendSms = promisify('sendSms', nexmo.message) - var NEXMO_ERRORS = new Map([ - [ '1', error.tooManyRequests(smsConfig.throttleWaitTime) ] - ]) + var smsOptions = { + region: smsConfig.apiRegion + } + var SNS + if (smsConfig.useMock) { + SNS = new MockSNS(smsOptions, config) + } else { + SNS = new AWS.SNS(smsOptions) + } return { - send: function (phoneNumber, senderId, templateName, acceptLanguage, signinCode) { + send: function (phoneNumber, templateName, acceptLanguage, signinCode) { log.trace({ op: 'sms.send', - senderId: senderId, templateName: templateName, acceptLanguage: acceptLanguage }) @@ -33,43 +32,51 @@ module.exports = function (log, translator, templates, config) { return P.resolve() .then(function () { var message = getMessage(templateName, acceptLanguage, signinCode) - - return sendSms(senderId, phoneNumber, message.trim()) - }) - .then(function (result) { - var resultCount = result.messages && result.messages.length - if (resultCount !== 1) { - // I don't expect this condition to be entered, certainly I haven't - // seen it in testing. But because I'm making an assumption about - // the result format, I want to log an error if my assumption proves - // to be wrong in production. - log.error({ op: 'sms.send.error', err: new Error('Unexpected result count'), resultCount: resultCount }) + var params = { + Message: message.trim(), + MessageAttributes: { + 'AWS.SNS.SMS.MaxPrice': { + // The maximum amount in USD that you are willing to spend to send the SMS message. + DataType: 'String', + StringValue: '1.0' + }, + 'AWS.SNS.SMS.SenderID': { + // Up to 11 alphanumeric characters, including at least one letter and no spaces + DataType: 'String', + StringValue: 'Firefox' + }, + 'AWS.SNS.SMS.SMSType': { + // 'Promotional' for cheap marketing messages, 'Transactional' for critical transactions + DataType: 'String', + StringValue: 'Promotional' + } + }, + PhoneNumber: phoneNumber } - result = result.messages[0] - var status = result.status - - // https://docs.nexmo.com/messaging/sms-api/api-reference#status-codes - if (status === '0') { - log.info({ - op: 'sms.send.success', - senderId: senderId, - templateName: templateName, - acceptLanguage: acceptLanguage + return SNS.publish(params).promise() + .then(function (result) { + log.info({ + op: 'sms.send.success', + templateName: templateName, + acceptLanguage: acceptLanguage, + messageId: result.MessageId + }) + }) + .catch(function (sendError) { + log.error({ + op: 'sms.send.error', + message: sendError.message, + code: sendError.code, + statusCode: sendError.statusCode + }) + + throw error.messageRejected(sendError.message, sendError.code) }) - } else { - var reason = result['error-text'] - log.error({ op: 'sms.send.error', reason: reason, status: status }) - throw NEXMO_ERRORS.get(status) || error.messageRejected(reason, status) - } }) } } - function promisify (methodName, object) { - return P.promisify(object[methodName], { context: object }) - } - function getMessage (templateName, acceptLanguage, signinCode) { var template = templates['sms.' + templateName] diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 1453c6da..62225c2a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -32,24 +32,80 @@ } }, "aws-sdk": { - "version": "2.2.10", - "from": "aws-sdk@2.2.10", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.2.10.tgz", + "version": "2.77.0", + "from": "aws-sdk@2.77.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.77.0.tgz", "dependencies": { + "buffer": { + "version": "5.0.6", + "from": "buffer@5.0.6", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.6.tgz", + "dependencies": { + "base64-js": { + "version": "1.2.1", + "from": "base64-js@>=1.0.2 <2.0.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz" + }, + "ieee754": { + "version": "1.1.8", + "from": "ieee754@>=1.1.4 <2.0.0", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" + } + } + }, + "crypto-browserify": { + "version": "1.0.9", + "from": "crypto-browserify@1.0.9", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz" + }, + "jmespath": { + "version": "0.15.0", + "from": "jmespath@0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz" + }, + "querystring": { + "version": "0.2.0", + "from": "querystring@0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" + }, "sax": { - "version": "0.5.3", - "from": "sax@0.5.3", - "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.3.tgz" + "version": "1.2.1", + "from": "sax@1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz" + }, + "url": { + "version": "0.10.3", + "from": "url@0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "dependencies": { + "punycode": { + "version": "1.3.2", + "from": "punycode@1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" + } + } + }, + "uuid": { + "version": "3.0.1", + "from": "uuid@3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" }, "xml2js": { - "version": "0.2.8", - "from": "xml2js@0.2.8", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.8.tgz" + "version": "0.4.17", + "from": "xml2js@0.4.17", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz" }, "xmlbuilder": { - "version": "0.4.2", - "from": "xmlbuilder@0.4.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz" + "version": "4.2.1", + "from": "xmlbuilder@4.2.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "dependencies": { + "lodash": { + "version": "4.17.4", + "from": "lodash@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" + } + } } } }, @@ -65,7 +121,7 @@ "dependencies": { "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.3 <3.0.0", + "from": "inherits@>=2.0.1 <2.1.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "typedarray": { @@ -272,9 +328,9 @@ "resolved": "git+https://github.com/mozilla/eslint-plugin-fxa.git#41504c9dd30e8b52900c15b524946aa0428aef95" }, "fxa-auth-db-mysql": { - "version": "1.87.0", - "from": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#master", - "resolved": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#0441ea95afc63c1e87adec46c8d6201a40d05586", + "version": "1.89.3", + "from": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#train-89", + "resolved": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#9a4c473d8ea533cb7ba7243eba358fe779894aec", "dependencies": { "base64url": { "version": "2.0.0", @@ -971,18 +1027,18 @@ "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.23.tgz" }, "lru-cache": { - "version": "4.0.2", + "version": "4.1.1", "from": "lru-cache@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "dependencies": { "pseudomap": { "version": "1.0.2", - "from": "pseudomap@>=1.0.1 <2.0.0", + "from": "pseudomap@>=1.0.2 <2.0.0", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" }, "yallist": { "version": "2.1.2", - "from": "yallist@>=2.0.0 <3.0.0", + "from": "yallist@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" } } @@ -1171,9 +1227,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz", "dependencies": { "async": { - "version": "2.4.1", + "version": "2.5.0", "from": "async@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.4.1.tgz", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", "dependencies": { "lodash": { "version": "4.17.4", @@ -1348,9 +1404,9 @@ } }, "sshpk": { - "version": "1.13.0", + "version": "1.13.1", "from": "sshpk@>=1.7.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "dependencies": { "asn1": { "version": "0.2.3", @@ -1382,11 +1438,6 @@ "from": "tweetnacl@>=0.14.0 <0.15.0", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" }, - "jodid25519": { - "version": "1.0.2", - "from": "jodid25519@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz" - }, "ecc-jsbn": { "version": "0.1.1", "from": "ecc-jsbn@>=0.1.1 <0.2.0", @@ -1430,7 +1481,7 @@ }, "node-uuid": { "version": "1.4.8", - "from": "node-uuid@>=1.4.1 <2.0.0", + "from": "node-uuid@>=1.4.7 <1.5.0", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz" }, "oauth-sign": { @@ -1490,9 +1541,9 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "dependencies": { "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" } } } @@ -1635,14 +1686,14 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" }, "normalize-package-data": { - "version": "2.3.8", - "from": "normalize-package-data@>=2.3.5 <3.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.8.tgz", + "version": "2.4.0", + "from": "normalize-package-data@>=2.3.4 <3.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "dependencies": { "hosted-git-info": { - "version": "2.4.2", + "version": "2.5.0", "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz" }, "is-builtin-module": { "version": "1.0.0", @@ -2095,9 +2146,9 @@ } }, "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" }, "js-yaml": { "version": "3.5.5", @@ -2129,14 +2180,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -2212,7 +2263,7 @@ }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.0 <3.0.0", + "from": "inherits@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "minimatch": { @@ -2221,14 +2272,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -2291,7 +2342,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "from": "chalk@>=1.0.0 <2.0.0", + "from": "chalk@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "dependencies": { "ansi-styles": { @@ -2349,7 +2400,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "from": "chalk@>=1.0.0 <2.0.0", + "from": "chalk@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "dependencies": { "ansi-styles": { @@ -2409,9 +2460,9 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" }, "readable-stream": { - "version": "2.2.10", + "version": "2.3.2", "from": "readable-stream@>=2.2.2 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", "dependencies": { "core-util-is": { "version": "1.0.2", @@ -2429,14 +2480,14 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "safe-buffer": { - "version": "5.1.0", - "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "version": "5.1.1", + "from": "safe-buffer@>=5.1.0 <5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "string_decoder": { - "version": "1.0.1", + "version": "1.0.3", "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" }, "util-deprecate": { "version": "1.0.2", @@ -2702,9 +2753,9 @@ "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", "dependencies": { "text-extensions": { - "version": "1.4.0", + "version": "1.5.0", "from": "text-extensions@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.4.0.tgz" + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.5.0.tgz" } } }, @@ -2952,9 +3003,9 @@ } }, "get-pkg-repo": { - "version": "1.3.0", + "version": "1.4.0", "from": "get-pkg-repo@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", "dependencies": { "parse-github-repo-url": { "version": "1.4.0", @@ -2962,9 +3013,9 @@ "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz" }, "hosted-git-info": { - "version": "2.4.2", + "version": "2.5.0", "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz" }, "meow": { "version": "3.7.0", @@ -3390,14 +3441,14 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" }, "normalize-package-data": { - "version": "2.3.8", - "from": "normalize-package-data@>=2.3.5 <3.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.8.tgz", + "version": "2.4.0", + "from": "normalize-package-data@>=2.3.4 <3.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "dependencies": { "hosted-git-info": { - "version": "2.4.2", + "version": "2.5.0", "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz" + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz" }, "is-builtin-module": { "version": "1.0.0", @@ -3575,9 +3626,9 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "dependencies": { "readable-stream": { - "version": "2.2.10", + "version": "2.3.2", "from": "readable-stream@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", "dependencies": { "core-util-is": { "version": "1.0.2", @@ -3586,7 +3637,7 @@ }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <3.0.0", + "from": "inherits@>=2.0.3 <2.1.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "isarray": { @@ -3600,14 +3651,14 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "safe-buffer": { - "version": "5.1.0", - "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "version": "5.1.1", + "from": "safe-buffer@>=5.1.0 <5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "string_decoder": { - "version": "1.0.1", + "version": "1.0.3", "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" }, "util-deprecate": { "version": "1.0.2", @@ -3714,7 +3765,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "from": "chalk@>=1.0.0 <2.0.0", + "from": "chalk@>=1.1.1 <2.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "dependencies": { "ansi-styles": { @@ -3791,9 +3842,9 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" }, "readable-stream": { - "version": "2.2.10", + "version": "2.3.2", "from": "readable-stream@>=2.2.2 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", "dependencies": { "core-util-is": { "version": "1.0.2", @@ -3811,14 +3862,14 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "safe-buffer": { - "version": "5.1.0", - "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "version": "5.1.1", + "from": "safe-buffer@>=5.1.0 <5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "string_decoder": { - "version": "1.0.1", + "version": "1.0.3", "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" }, "util-deprecate": { "version": "1.0.2", @@ -3869,9 +3920,9 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz" }, "es5-ext": { - "version": "0.10.22", + "version": "0.10.23", "from": "es5-ext@>=0.10.14 <0.11.0", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.22.tgz" + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz" }, "es6-iterator": { "version": "2.0.1", @@ -3906,9 +3957,9 @@ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz" }, "es5-ext": { - "version": "0.10.22", + "version": "0.10.23", "from": "es5-ext@>=0.10.14 <0.11.0", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.22.tgz" + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz" }, "es6-iterator": { "version": "2.0.1", @@ -3923,15 +3974,10 @@ } }, "esrecurse": { - "version": "4.1.0", + "version": "4.2.0", "from": "esrecurse@>=4.1.0 <5.0.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", "dependencies": { - "estraverse": { - "version": "4.1.1", - "from": "estraverse@>=4.1.0 <4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" - }, "object-assign": { "version": "4.1.1", "from": "object-assign@>=4.0.1 <5.0.0", @@ -4112,14 +4158,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -4150,9 +4196,9 @@ } }, "globals": { - "version": "9.17.0", + "version": "9.18.0", "from": "globals@>=9.14.0 <10.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.17.0.tgz" + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz" }, "ignore": { "version": "3.3.3", @@ -4490,9 +4536,9 @@ } }, "shelljs": { - "version": "0.7.7", + "version": "0.7.8", "from": "shelljs@>=0.7.5 <0.8.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.7.tgz", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", "dependencies": { "interpret": { "version": "1.0.3", @@ -4558,9 +4604,9 @@ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz" }, "string-width": { - "version": "2.0.0", + "version": "2.1.0", "from": "string-width@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", "dependencies": { "is-fullwidth-code-point": { "version": "2.0.0", @@ -4568,14 +4614,14 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" }, "strip-ansi": { - "version": "3.0.1", - "from": "strip-ansi@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "version": "4.0.0", + "from": "strip-ansi@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "dependencies": { "ansi-regex": { - "version": "2.1.1", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + "version": "3.0.0", + "from": "ansi-regex@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" } } } @@ -4652,14 +4698,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -4710,17 +4756,17 @@ "dependencies": { "ansi-styles": { "version": "2.2.1", - "from": "ansi-styles@2.2.1", + "from": "ansi-styles@>=2.2.1 <3.0.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" }, "escape-string-regexp": { "version": "1.0.5", - "from": "escape-string-regexp@1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" }, "has-ansi": { "version": "2.0.0", - "from": "has-ansi@2.0.0", + "from": "has-ansi@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "dependencies": { "ansi-regex": { @@ -4732,7 +4778,7 @@ }, "strip-ansi": { "version": "3.0.1", - "from": "strip-ansi@3.0.1", + "from": "strip-ansi@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "dependencies": { "ansi-regex": { @@ -4744,7 +4790,7 @@ }, "supports-color": { "version": "2.0.0", - "from": "supports-color@2.0.0", + "from": "supports-color@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" } } @@ -5016,9 +5062,42 @@ } }, "randomatic": { - "version": "1.1.6", + "version": "1.1.7", "from": "randomatic@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz" + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "dependencies": { + "is-number": { + "version": "3.0.0", + "from": "is-number@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "dependencies": { + "kind-of": { + "version": "3.2.2", + "from": "kind-of@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.5", + "from": "is-buffer@>=1.1.5 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz" + } + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "from": "kind-of@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "dependencies": { + "is-buffer": { + "version": "1.1.5", + "from": "is-buffer@>=1.1.5 <2.0.0", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz" + } + } + } + } }, "repeat-string": { "version": "1.6.1", @@ -5086,9 +5165,9 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "dependencies": { "remove-trailing-separator": { - "version": "1.0.1", + "version": "1.0.2", "from": "remove-trailing-separator@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz" } } }, @@ -5214,14 +5293,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -5233,9 +5312,9 @@ } }, "readable-stream": { - "version": "2.2.10", + "version": "2.3.2", "from": "readable-stream@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", "dependencies": { "core-util-is": { "version": "1.0.2", @@ -5253,14 +5332,14 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "safe-buffer": { - "version": "5.1.0", - "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "version": "5.1.1", + "from": "safe-buffer@>=5.1.0 <5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "string_decoder": { - "version": "1.0.1", + "version": "1.0.3", "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" }, "util-deprecate": { "version": "1.0.2", @@ -5277,9 +5356,9 @@ } }, "fsevents": { - "version": "1.1.1", + "version": "1.1.2", "from": "fsevents@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", "dependencies": { "nan": { "version": "2.6.2", @@ -5287,523 +5366,503 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz" }, "node-pre-gyp": { - "version": "0.6.33", - "from": "node-pre-gyp@>=0.6.29 <0.7.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz" + "version": "0.6.36", + "from": "node-pre-gyp@^0.6.36", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz" }, "abbrev": { "version": "1.1.0", - "from": "abbrev@>=1.0.0 <2.0.0", + "from": "abbrev@1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz" }, + "ajv": { + "version": "4.11.8", + "from": "ajv@4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz" + }, "ansi-regex": { "version": "2.1.1", - "from": "ansi-regex@>=2.0.0 <3.0.0", + "from": "ansi-regex@2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" }, - "ansi-styles": { - "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, "aproba": { "version": "1.1.1", - "from": "aproba@>=1.0.3 <2.0.0", + "from": "aproba@1.1.1", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz" }, "are-we-there-yet": { - "version": "1.1.2", - "from": "are-we-there-yet@>=1.1.2 <1.2.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz" + "version": "1.1.4", + "from": "are-we-there-yet@1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz" }, "asn1": { "version": "0.2.3", - "from": "asn1@>=0.2.3 <0.3.0", + "from": "asn1@0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz" }, "assert-plus": { "version": "0.2.0", - "from": "assert-plus@>=0.2.0 <0.3.0", + "from": "assert-plus@0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" }, "asynckit": { "version": "0.4.0", - "from": "asynckit@>=0.4.0 <0.5.0", + "from": "asynckit@0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" }, "aws-sign2": { "version": "0.6.0", - "from": "aws-sign2@>=0.6.0 <0.7.0", + "from": "aws-sign2@0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" }, "aws4": { "version": "1.6.0", - "from": "aws4@>=1.2.1 <2.0.0", + "from": "aws4@1.6.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz" }, "balanced-match": { "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", + "from": "balanced-match@0.4.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" }, "bcrypt-pbkdf": { "version": "1.0.1", - "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0", + "from": "bcrypt-pbkdf@1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz" }, "block-stream": { "version": "0.0.9", - "from": "block-stream@*", + "from": "block-stream@0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" }, "boom": { "version": "2.10.1", - "from": "boom@>=2.0.0 <3.0.0", + "from": "boom@2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" }, "brace-expansion": { - "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + "version": "1.1.7", + "from": "brace-expansion@1.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz" }, "buffer-shims": { "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", + "from": "buffer-shims@1.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" }, "caseless": { - "version": "0.11.0", - "from": "caseless@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz" + "version": "0.12.0", + "from": "caseless@0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" }, - "chalk": { - "version": "1.1.3", - "from": "chalk@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" + "co": { + "version": "4.6.0", + "from": "co@4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz" }, "code-point-at": { "version": "1.1.0", - "from": "code-point-at@>=1.0.0 <2.0.0", + "from": "code-point-at@1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" }, "combined-stream": { "version": "1.0.5", - "from": "combined-stream@>=1.0.5 <1.1.0", + "from": "combined-stream@1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz" }, - "commander": { - "version": "2.9.0", - "from": "commander@>=2.9.0 <3.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" - }, - "console-control-strings": { - "version": "1.1.0", - "from": "console-control-strings@>=1.1.0 <1.2.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - }, - "core-util-is": { - "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, "concat-map": { "version": "0.0.1", "from": "concat-map@0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" }, + "console-control-strings": { + "version": "1.1.0", + "from": "console-control-strings@1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" + }, + "core-util-is": { + "version": "1.0.2", + "from": "core-util-is@1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, "cryptiles": { "version": "2.0.5", - "from": "cryptiles@>=2.0.0 <3.0.0", + "from": "cryptiles@2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" }, "debug": { - "version": "2.2.0", - "from": "debug@>=2.2.0 <2.3.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" + "version": "2.6.8", + "from": "debug@2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" }, "deep-extend": { - "version": "0.4.1", - "from": "deep-extend@>=0.4.0 <0.5.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz" + "version": "0.4.2", + "from": "deep-extend@0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz" + }, + "delayed-stream": { + "version": "1.0.0", + "from": "delayed-stream@1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" }, "delegates": { "version": "1.0.0", - "from": "delegates@>=1.0.0 <2.0.0", + "from": "delegates@1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" }, "ecc-jsbn": { "version": "0.1.1", - "from": "ecc-jsbn@>=0.1.1 <0.2.0", + "from": "ecc-jsbn@0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz" }, - "delayed-stream": { - "version": "1.0.0", - "from": "delayed-stream@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - }, - "escape-string-regexp": { - "version": "1.0.5", - "from": "escape-string-regexp@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - }, "extend": { - "version": "3.0.0", - "from": "extend@>=3.0.0 <3.1.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz" - }, - "forever-agent": { - "version": "0.6.1", - "from": "forever-agent@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + "version": "3.0.1", + "from": "extend@3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" }, "extsprintf": { "version": "1.0.2", "from": "extsprintf@1.0.2", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" }, + "forever-agent": { + "version": "0.6.1", + "from": "forever-agent@0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" + }, "form-data": { - "version": "2.1.2", - "from": "form-data@>=2.1.1 <2.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz" + "version": "2.1.4", + "from": "form-data@2.1.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz" }, "fs.realpath": { "version": "1.0.0", - "from": "fs.realpath@>=1.0.0 <2.0.0", + "from": "fs.realpath@1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" }, "fstream": { - "version": "1.0.10", - "from": "fstream@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz" + "version": "1.0.11", + "from": "fstream@1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz" }, "fstream-ignore": { "version": "1.0.5", - "from": "fstream-ignore@>=1.0.5 <1.1.0", + "from": "fstream-ignore@1.0.5", "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz" }, "gauge": { - "version": "2.7.3", - "from": "gauge@>=2.7.1 <2.8.0", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz" - }, - "generate-function": { - "version": "2.0.0", - "from": "generate-function@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" - }, - "generate-object-property": { - "version": "1.2.0", - "from": "generate-object-property@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" + "version": "2.7.4", + "from": "gauge@2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" }, "glob": { - "version": "7.1.1", - "from": "glob@>=7.0.5 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" - }, - "graceful-readlink": { - "version": "1.0.1", - "from": "graceful-readlink@>=1.0.0", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + "version": "7.1.2", + "from": "glob@7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" }, "graceful-fs": { "version": "4.1.11", - "from": "graceful-fs@>=4.1.2 <5.0.0", + "from": "graceful-fs@4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" }, - "har-validator": { - "version": "2.0.6", - "from": "har-validator@>=2.0.6 <2.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz" + "har-schema": { + "version": "1.0.5", + "from": "har-schema@1.0.5", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz" }, - "has-ansi": { - "version": "2.0.0", - "from": "has-ansi@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" + "har-validator": { + "version": "4.2.1", + "from": "har-validator@4.2.1", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz" }, "has-unicode": { "version": "2.0.1", - "from": "has-unicode@>=2.0.0 <3.0.0", + "from": "has-unicode@2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" }, "hawk": { "version": "3.1.3", - "from": "hawk@>=3.1.3 <3.2.0", + "from": "hawk@3.1.3", "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" }, "hoek": { "version": "2.16.3", - "from": "hoek@>=2.0.0 <3.0.0", + "from": "hoek@2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" }, "http-signature": { "version": "1.1.1", - "from": "http-signature@>=1.1.0 <1.2.0", + "from": "http-signature@1.1.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" }, "inflight": { "version": "1.0.6", - "from": "inflight@>=1.0.4 <2.0.0", + "from": "inflight@1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", + "from": "inherits@2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "ini": { "version": "1.3.4", - "from": "ini@>=1.3.0 <1.4.0", + "from": "ini@1.3.4", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" }, - "is-my-json-valid": { - "version": "2.15.0", - "from": "is-my-json-valid@>=2.12.4 <3.0.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz" - }, "is-fullwidth-code-point": { "version": "1.0.0", - "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", + "from": "is-fullwidth-code-point@1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" }, + "isstream": { + "version": "0.1.2", + "from": "isstream@0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" + }, "is-typedarray": { "version": "1.0.0", - "from": "is-typedarray@>=1.0.0 <1.1.0", + "from": "is-typedarray@1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" }, "isarray": { "version": "1.0.0", - "from": "isarray@>=1.0.0 <1.1.0", + "from": "isarray@1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" }, - "is-property": { - "version": "1.0.2", - "from": "is-property@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - }, - "isstream": { - "version": "0.1.2", - "from": "isstream@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - }, "jodid25519": { "version": "1.0.2", - "from": "jodid25519@>=1.0.0 <2.0.0", + "from": "jodid25519@1.0.2", "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz" }, + "jsbn": { + "version": "0.1.1", + "from": "jsbn@0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" + }, "json-schema": { "version": "0.2.3", "from": "json-schema@0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" }, - "jsbn": { - "version": "0.1.1", - "from": "jsbn@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" + "json-stable-stringify": { + "version": "1.0.1", + "from": "json-stable-stringify@1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" }, "json-stringify-safe": { "version": "5.0.1", - "from": "json-stringify-safe@>=5.0.1 <5.1.0", + "from": "json-stringify-safe@5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" }, - "jsonpointer": { - "version": "4.0.1", - "from": "jsonpointer@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz" - }, - "jsprim": { - "version": "1.3.1", - "from": "jsprim@>=1.2.2 <2.0.0", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz" + "jsonify": { + "version": "0.0.0", + "from": "jsonify@0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" }, "mime-db": { - "version": "1.26.0", - "from": "mime-db@>=1.26.0 <1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz" + "version": "1.27.0", + "from": "mime-db@1.27.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz" }, "mime-types": { - "version": "2.1.14", - "from": "mime-types@>=2.1.7 <2.2.0", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz" - }, - "minimatch": { - "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" + "version": "2.1.15", + "from": "mime-types@2.1.15", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz" }, "minimist": { "version": "0.0.8", "from": "minimist@0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" }, + "minimatch": { + "version": "3.0.4", + "from": "minimatch@3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + }, "mkdirp": { "version": "0.5.1", - "from": "mkdirp@>=0.5.1 <0.6.0", + "from": "mkdirp@0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" }, "ms": { - "version": "0.7.1", - "from": "ms@0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" + "version": "2.0.0", + "from": "ms@2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" }, "nopt": { - "version": "3.0.6", - "from": "nopt@>=3.0.6 <3.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" + "version": "4.0.1", + "from": "nopt@4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz" }, "npmlog": { - "version": "4.0.2", - "from": "npmlog@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz" + "version": "4.1.0", + "from": "npmlog@4.1.0", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.0.tgz" }, "number-is-nan": { "version": "1.0.1", - "from": "number-is-nan@>=1.0.0 <2.0.0", + "from": "number-is-nan@1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" }, "oauth-sign": { "version": "0.8.2", - "from": "oauth-sign@>=0.8.1 <0.9.0", + "from": "oauth-sign@0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" }, - "once": { - "version": "1.4.0", - "from": "once@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - }, "object-assign": { "version": "4.1.1", - "from": "object-assign@>=4.1.0 <5.0.0", + "from": "object-assign@4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" }, + "once": { + "version": "1.4.0", + "from": "once@1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "os-homedir": { + "version": "1.0.2", + "from": "os-homedir@1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" + }, + "os-tmpdir": { + "version": "1.0.2", + "from": "os-tmpdir@1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "osenv": { + "version": "0.1.4", + "from": "osenv@0.1.4", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz" + }, "path-is-absolute": { "version": "1.0.1", - "from": "path-is-absolute@>=1.0.0 <2.0.0", + "from": "path-is-absolute@1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" }, - "pinkie": { - "version": "2.0.4", - "from": "pinkie@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, - "pinkie-promise": { - "version": "2.0.1", - "from": "pinkie-promise@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" + "performance-now": { + "version": "0.2.0", + "from": "performance-now@0.2.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz" }, "process-nextick-args": { "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", + "from": "process-nextick-args@1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "punycode": { "version": "1.4.1", - "from": "punycode@>=1.4.1 <2.0.0", + "from": "punycode@1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" }, "qs": { - "version": "6.3.1", - "from": "qs@>=6.3.0 <6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz" + "version": "6.4.0", + "from": "qs@6.4.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" }, "readable-stream": { - "version": "2.2.2", - "from": "readable-stream@>=2.0.0 <3.0.0||>=1.1.13 <2.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz" + "version": "2.2.9", + "from": "readable-stream@2.2.9", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz" }, "rimraf": { - "version": "2.5.4", - "from": "rimraf@>=2.5.4 <2.6.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz" + "version": "2.6.1", + "from": "rimraf@2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz" }, "request": { - "version": "2.79.0", - "from": "request@>=2.79.0 <3.0.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz" + "version": "2.81.0", + "from": "request@2.81.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz" + }, + "safe-buffer": { + "version": "5.0.1", + "from": "safe-buffer@5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz" }, "semver": { "version": "5.3.0", - "from": "semver@>=5.3.0 <5.4.0", + "from": "semver@5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" }, - "signal-exit": { - "version": "3.0.2", - "from": "signal-exit@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" - }, "set-blocking": { "version": "2.0.0", - "from": "set-blocking@>=2.0.0 <2.1.0", + "from": "set-blocking@2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" }, + "signal-exit": { + "version": "3.0.2", + "from": "signal-exit@3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" + }, "sntp": { "version": "1.0.9", - "from": "sntp@>=1.0.0 <2.0.0", + "from": "sntp@1.0.9", "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, "string-width": { "version": "1.0.2", - "from": "string-width@>=1.0.1 <2.0.0", + "from": "string-width@1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" }, + "string_decoder": { + "version": "1.0.1", + "from": "string_decoder@1.0.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + }, "stringstream": { "version": "0.0.5", - "from": "stringstream@>=0.0.4 <0.1.0", + "from": "stringstream@0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz" }, "strip-ansi": { "version": "3.0.1", - "from": "strip-ansi@>=3.0.1 <4.0.0", + "from": "strip-ansi@3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" }, "strip-json-comments": { "version": "2.0.1", - "from": "strip-json-comments@>=2.0.1 <2.1.0", + "from": "strip-json-comments@2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" }, - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, "tar": { "version": "2.2.1", - "from": "tar@>=2.2.1 <2.3.0", + "from": "tar@2.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" }, + "tar-pack": { + "version": "3.4.0", + "from": "tar-pack@3.4.0", + "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz" + }, + "tunnel-agent": { + "version": "0.6.0", + "from": "tunnel-agent@0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" + }, "tough-cookie": { "version": "2.3.2", - "from": "tough-cookie@>=2.3.0 <2.4.0", + "from": "tough-cookie@2.3.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz" }, - "tunnel-agent": { - "version": "0.4.3", - "from": "tunnel-agent@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" - }, "tweetnacl": { "version": "0.14.5", - "from": "tweetnacl@>=0.14.0 <0.15.0", + "from": "tweetnacl@0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" }, "uid-number": { "version": "0.0.6", - "from": "uid-number@>=0.0.6 <0.1.0", + "from": "uid-number@0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" }, "util-deprecate": { "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", + "from": "util-deprecate@1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" }, "uuid": { "version": "3.0.1", - "from": "uuid@>=3.0.0 <4.0.0", + "from": "uuid@3.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" }, "verror": { @@ -5812,84 +5871,74 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz" }, "wide-align": { - "version": "1.1.0", - "from": "wide-align@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz" + "version": "1.1.2", + "from": "wide-align@1.1.2", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz" }, "wrappy": { "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", + "from": "wrappy@1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" }, - "xtend": { - "version": "4.0.1", - "from": "xtend@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, "dashdash": { "version": "1.14.1", - "from": "dashdash@>=1.12.0 <2.0.0", + "from": "dashdash@1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "dependencies": { "assert-plus": { "version": "1.0.0", - "from": "assert-plus@>=1.0.0 <2.0.0", + "from": "assert-plus@1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" } } }, "getpass": { - "version": "0.1.6", - "from": "getpass@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "version": "0.1.7", + "from": "getpass@0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "dependencies": { "assert-plus": { "version": "1.0.0", - "from": "assert-plus@>=1.0.0 <2.0.0", + "from": "assert-plus@1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" + } + } + }, + "jsprim": { + "version": "1.4.0", + "from": "jsprim@1.4.0", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz", + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "from": "assert-plus@1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" } } }, "rc": { - "version": "1.1.7", - "from": "rc@>=1.1.6 <1.2.0", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz", + "version": "1.2.1", + "from": "rc@1.2.1", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", "dependencies": { "minimist": { "version": "1.2.0", - "from": "minimist@>=1.2.0 <2.0.0", + "from": "minimist@1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" } } }, "sshpk": { - "version": "1.10.2", - "from": "sshpk@>=1.7.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", + "version": "1.13.0", + "from": "sshpk@1.13.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", "dependencies": { "assert-plus": { "version": "1.0.0", - "from": "assert-plus@>=1.0.0 <2.0.0", + "from": "assert-plus@1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" } } - }, - "tar-pack": { - "version": "3.3.0", - "from": "tar-pack@>=3.3.0 <3.4.0", - "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz", - "dependencies": { - "once": { - "version": "1.3.3", - "from": "once@>=1.3.3 <1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" - }, - "readable-stream": { - "version": "2.1.5", - "from": "readable-stream@>=2.1.4 <2.2.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz" - } - } } } } @@ -5912,7 +5961,7 @@ "dependencies": { "strip-ansi": { "version": "3.0.1", - "from": "strip-ansi@>=3.0.0 <4.0.0", + "from": "strip-ansi@>=3.0.1 <4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "dependencies": { "ansi-regex": { @@ -6045,9 +6094,9 @@ } }, "uglify-js": { - "version": "2.8.27", + "version": "2.8.29", "from": "uglify-js@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.27.tgz", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", "dependencies": { "source-map": { "version": "0.5.6", @@ -6231,9 +6280,9 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.1.0.tgz" }, "joi": { - "version": "10.5.2", + "version": "10.6.0", "from": "joi@>=10.0.0 <11.0.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-10.5.2.tgz", + "resolved": "https://registry.npmjs.org/joi/-/joi-10.6.0.tgz", "dependencies": { "isemail": { "version": "2.2.1", @@ -6272,9 +6321,9 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-5.1.0.tgz" }, "joi": { - "version": "10.5.2", + "version": "10.6.0", "from": "joi@>=10.0.0 <11.0.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-10.5.2.tgz", + "resolved": "https://registry.npmjs.org/joi/-/joi-10.6.0.tgz", "dependencies": { "isemail": { "version": "2.2.1", @@ -6335,9 +6384,9 @@ "resolved": "https://registry.npmjs.org/shot/-/shot-3.4.2.tgz", "dependencies": { "joi": { - "version": "10.5.2", + "version": "10.6.0", "from": "joi@>=10.0.0 <11.0.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-10.5.2.tgz", + "resolved": "https://registry.npmjs.org/joi/-/joi-10.6.0.tgz", "dependencies": { "isemail": { "version": "2.2.1", @@ -6619,9 +6668,9 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "dependencies": { "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" } } } @@ -6643,9 +6692,9 @@ "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-1.2.1.tgz" }, "clean-css": { - "version": "3.4.26", + "version": "3.4.27", "from": "clean-css@>=3.1.9 <4.0.0", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.26.tgz", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.27.tgz", "dependencies": { "commander": { "version": "2.8.1", @@ -6782,9 +6831,9 @@ } }, "uglify-js": { - "version": "2.8.27", + "version": "2.8.29", "from": "uglify-js@>=2.4.19 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.27.tgz", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", "dependencies": { "source-map": { "version": "0.5.6", @@ -7143,9 +7192,9 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "dependencies": { "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" } } } @@ -7278,14 +7327,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -7412,9 +7461,9 @@ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz" }, "safe-buffer": { - "version": "5.1.0", + "version": "5.1.1", "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" } } } @@ -7463,14 +7512,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -7551,9 +7600,9 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "dependencies": { "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" } } }, @@ -7653,7 +7702,7 @@ }, "escape-string-regexp": { "version": "1.0.5", - "from": "escape-string-regexp@1.0.5", + "from": "escape-string-regexp@>=1.0.2 <2.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" }, "glob": { @@ -7689,14 +7738,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -8090,9 +8139,9 @@ } }, "safe-buffer": { - "version": "5.1.0", + "version": "5.1.1", "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" } } }, @@ -8187,9 +8236,9 @@ "resolved": "https://registry.npmjs.org/propagate/-/propagate-0.4.0.tgz" }, "qs": { - "version": "6.4.0", + "version": "6.5.0", "from": "qs@>=6.0.2 <7.0.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz" } } }, @@ -8271,7 +8320,7 @@ "uap-core": { "version": "0.5.0", "from": "git://github.com/ua-parser/uap-core.git", - "resolved": "git://github.com/ua-parser/uap-core.git#f249dde6c17d9f0e07214c6791c3dd8a6a1e977f" + "resolved": "git://github.com/ua-parser/uap-core.git#6ba43604ec629f2bb3a126da8f93dea51b226149" }, "uap-ref-impl": { "version": "0.2.0", @@ -8683,16 +8732,16 @@ "from": "append-transform@>=0.3.0 <0.4.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.3.0.tgz" }, - "arr-diff": { - "version": "2.0.0", - "from": "arr-diff@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" - }, "arr-flatten": { "version": "1.0.1", "from": "arr-flatten@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" }, + "arr-diff": { + "version": "2.0.0", + "from": "arr-diff@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" + }, "array-unique": { "version": "0.2.1", "from": "array-unique@>=0.2.1 <0.3.0", @@ -8703,16 +8752,16 @@ "from": "async@>=1.4.2 <2.0.0", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" }, - "babel-code-frame": { - "version": "6.16.0", - "from": "babel-code-frame@>=6.16.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.16.0.tgz" - }, "babel-generator": { "version": "6.18.0", "from": "babel-generator@>=6.18.0 <7.0.0", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.18.0.tgz" }, + "babel-code-frame": { + "version": "6.16.0", + "from": "babel-code-frame@>=6.16.0 <7.0.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.16.0.tgz" + }, "babel-messages": { "version": "6.8.0", "from": "babel-messages@>=6.8.0 <7.0.0", @@ -8748,16 +8797,16 @@ "from": "balanced-match@>=0.4.1 <0.5.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" }, - "brace-expansion": { - "version": "1.1.6", - "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" - }, "braces": { "version": "1.8.5", "from": "braces@>=1.8.2 <2.0.0", "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz" }, + "brace-expansion": { + "version": "1.1.6", + "from": "brace-expansion@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, "builtin-modules": { "version": "1.1.1", "from": "builtin-modules@>=1.0.0 <2.0.0", @@ -8903,6 +8952,11 @@ "from": "has-ansi@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" }, + "hosted-git-info": { + "version": "2.1.5", + "from": "hosted-git-info@>=2.1.4 <3.0.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz" + }, "has-flag": { "version": "1.0.0", "from": "has-flag@>=1.0.0 <2.0.0", @@ -8913,11 +8967,6 @@ "from": "imurmurhash@>=0.1.4 <0.2.0", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" }, - "hosted-git-info": { - "version": "2.1.5", - "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz" - }, "inflight": { "version": "1.0.6", "from": "inflight@>=1.0.4 <2.0.0", @@ -8958,16 +9007,16 @@ "from": "is-dotfile@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" }, - "is-equal-shallow": { - "version": "0.1.3", - "from": "is-equal-shallow@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" - }, "is-extendable": { "version": "0.1.1", "from": "is-extendable@>=0.1.1 <0.2.0", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" }, + "is-equal-shallow": { + "version": "0.1.3", + "from": "is-equal-shallow@>=0.1.3 <0.2.0", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" + }, "is-extglob": { "version": "1.0.0", "from": "is-extglob@>=1.0.0 <2.0.0", @@ -9003,16 +9052,16 @@ "from": "is-primitive@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" }, - "isarray": { - "version": "1.0.0", - "from": "isarray@1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, "is-utf8": { "version": "0.2.1", "from": "is-utf8@>=0.2.0 <0.3.0", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" }, + "isarray": { + "version": "1.0.0", + "from": "isarray@1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, "isexe": { "version": "1.1.2", "from": "isexe@>=1.1.1 <2.0.0", @@ -9098,16 +9147,16 @@ "from": "normalize-package-data@>=2.3.2 <3.0.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz" }, - "number-is-nan": { - "version": "1.0.1", - "from": "number-is-nan@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - }, "normalize-path": { "version": "2.0.1", "from": "normalize-path@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" }, + "number-is-nan": { + "version": "1.0.1", + "from": "number-is-nan@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" + }, "object-assign": { "version": "4.1.0", "from": "object-assign@>=4.1.0 <5.0.0", @@ -9138,16 +9187,16 @@ "from": "os-locale@>=1.4.0 <2.0.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz" }, - "parse-json": { - "version": "2.2.0", - "from": "parse-json@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz" - }, "parse-glob": { "version": "3.0.4", "from": "parse-glob@>=3.0.4 <4.0.0", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz" }, + "parse-json": { + "version": "2.2.0", + "from": "parse-json@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz" + }, "path-exists": { "version": "2.1.0", "from": "path-exists@>=2.0.0 <3.0.0", @@ -9213,16 +9262,16 @@ "from": "read-pkg-up@>=1.0.1 <2.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz" }, - "regex-cache": { - "version": "0.4.3", - "from": "regex-cache@>=0.4.2 <0.5.0", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" - }, "regenerator-runtime": { "version": "0.9.5", "from": "regenerator-runtime@>=0.9.5 <0.10.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz" }, + "regex-cache": { + "version": "0.4.3", + "from": "regex-cache@>=0.4.2 <0.5.0", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" + }, "repeat-element": { "version": "1.1.2", "from": "repeat-element@>=1.1.2 <2.0.0", @@ -9293,16 +9342,16 @@ "from": "string-width@>=1.0.2 <2.0.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" }, - "strip-bom": { - "version": "2.0.0", - "from": "strip-bom@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" - }, "strip-ansi": { "version": "3.0.1", "from": "strip-ansi@>=3.0.0 <4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" }, + "strip-bom": { + "version": "2.0.0", + "from": "strip-bom@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" + }, "supports-color": { "version": "2.0.0", "from": "supports-color@>=2.0.0 <3.0.0", @@ -9461,9 +9510,9 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "dependencies": { "iconv-lite": { - "version": "0.4.17", + "version": "0.4.18", "from": "iconv-lite@>=0.4.13 <0.5.0", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" } } } @@ -9735,9 +9784,9 @@ } }, "sshpk": { - "version": "1.13.0", + "version": "1.13.1", "from": "sshpk@>=1.7.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.0.tgz", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "dependencies": { "asn1": { "version": "0.2.3", @@ -9769,11 +9818,6 @@ "from": "tweetnacl@>=0.14.0 <0.15.0", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" }, - "jodid25519": { - "version": "1.0.2", - "from": "jodid25519@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz" - }, "ecc-jsbn": { "version": "0.1.1", "from": "ecc-jsbn@>=0.1.1 <0.2.0", @@ -9848,9 +9892,9 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz" }, "uuid": { - "version": "3.0.1", + "version": "3.1.0", "from": "uuid@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz" + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" } } }, @@ -9882,9 +9926,9 @@ "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.10.tgz", "dependencies": { "dtrace-provider": { - "version": "0.8.2", + "version": "0.8.3", "from": "dtrace-provider@>=0.8.0 <0.9.0", - "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.2.tgz", + "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.3.tgz", "dependencies": { "nan": { "version": "2.6.2", @@ -9936,14 +9980,14 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "dependencies": { "brace-expansion": { - "version": "1.1.7", + "version": "1.1.8", "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "dependencies": { "balanced-match": { - "version": "0.4.2", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" }, "concat-map": { "version": "0.0.1", @@ -10037,18 +10081,18 @@ "resolved": "https://registry.npmjs.org/keep-alive-agent/-/keep-alive-agent-0.0.1.tgz" }, "lru-cache": { - "version": "4.0.2", + "version": "4.1.1", "from": "lru-cache@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", "dependencies": { "pseudomap": { "version": "1.0.2", - "from": "pseudomap@>=1.0.1 <2.0.0", + "from": "pseudomap@>=1.0.2 <2.0.0", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" }, "yallist": { "version": "2.1.2", - "from": "yallist@>=2.0.0 <3.0.0", + "from": "yallist@>=2.1.2 <3.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" } } @@ -10081,9 +10125,9 @@ } }, "qs": { - "version": "6.4.0", + "version": "6.5.0", "from": "qs@>=6.2.1 <7.0.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz" + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz" }, "semver": { "version": "4.3.6", @@ -10118,9 +10162,9 @@ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" }, "safe-buffer": { - "version": "5.1.0", + "version": "5.1.1", "from": "safe-buffer@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" }, "select-hose": { "version": "2.0.0", @@ -10155,9 +10199,9 @@ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.1.tgz" }, "readable-stream": { - "version": "2.2.10", + "version": "2.3.2", "from": "readable-stream@>=2.2.9 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", "dependencies": { "core-util-is": { "version": "1.0.2", @@ -10166,7 +10210,7 @@ }, "inherits": { "version": "2.0.3", - "from": "inherits@>=2.0.1 <2.1.0", + "from": "inherits@>=2.0.3 <2.1.0", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" }, "isarray": { @@ -10180,9 +10224,9 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "string_decoder": { - "version": "1.0.1", + "version": "1.0.3", "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz" + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz" }, "util-deprecate": { "version": "1.0.2", @@ -10366,9 +10410,9 @@ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", "dependencies": { "bn.js": { - "version": "4.11.6", + "version": "4.11.7", "from": "bn.js@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.7.tgz" }, "inherits": { "version": "2.0.3", diff --git a/package.json b/package.json index e634f9dc..a526ae04 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "readmeFilename": "README.md", "dependencies": { "ajv": "4.1.7", - "aws-sdk": "2.2.10", + "aws-sdk": "2.77.0", "base64url": "1.0.6", "binary-split": "0.1.2", "bluebird": "3.4.7", @@ -76,7 +76,7 @@ "acorn": "5.0.3", "commander": "2.9.0", "eslint-plugin-fxa": "git+https://github.com/mozilla/eslint-plugin-fxa#master", - "fxa-auth-db-mysql": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#master", + "fxa-auth-db-mysql": "git+https://github.com/mozilla/fxa-auth-db-mysql.git#train-89", "fxa-conventional-changelog": "1.1.0", "grunt": "1.0.1", "grunt-bump": "0.8.0", diff --git a/scripts/sms/balance.js b/scripts/sms/balance.js deleted file mode 100755 index cf37bbd6..00000000 --- a/scripts/sms/balance.js +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -'use strict' - -const config = require('../../config').getProperties() -const NOT_SET = 'YOU MUST CHANGE ME' - -if (config.sms.apiKey === NOT_SET || config.sms.apiSecret === NOT_SET) { - fail('Come back and try again when you\'ve set SMS_API_KEY and SMS_API_SECRET.') -} - -const log = require('../../lib/log')(config.log.level, 'sms-balance') - -require('../../lib/senders/translator')(config.i18n.supportedLanguages, config.i18n.defaultLanguage) - .then(translator => { - return require('../../lib/senders')(log, config, {}, null, translator) - }) - .then(senders => { - return senders.sms.balance() - }) - .then(result => { - console.log(result) - }) - .catch(error => { - fail(error.stack || error.message) - }) - -function fail (message) { - console.error(message) - process.exit(1) -} - diff --git a/scripts/sms/send.js b/scripts/sms/send.js index 5e04363d..99a94a5e 100755 --- a/scripts/sms/send.js +++ b/scripts/sms/send.js @@ -7,11 +7,6 @@ 'use strict' const config = require('../../config').getProperties() -const NOT_SET = 'YOU MUST CHANGE ME' - -if (config.sms.apiKey === NOT_SET || config.sms.apiSecret === NOT_SET) { - fail('Come back and try again when you\'ve set SMS_API_KEY and SMS_API_SECRET.') -} const args = parseArgs() const log = require('../../lib/log')(config.log.level, 'send-sms') @@ -42,28 +37,25 @@ function fail (message) { } function parseArgs () { - let acceptLanguage, messageId, senderId, phoneNumber + let acceptLanguage, messageName, phoneNumber switch (process.argv.length) { /* eslint-disable indent, no-fallthrough */ - case 6: - acceptLanguage = process.argv[5] case 5: - messageId = process.argv[4] + acceptLanguage = process.argv[5] case 4: - senderId = process.argv[3] + messageName = process.argv[4] case 3: phoneNumber = process.argv[2] break default: - fail(`Usage: ${process.argv[1]} phoneNumber [senderId] [messageId] [acceptLanguage]`) + fail(`Usage: ${process.argv[1]} phoneNumber [messageName] [acceptLanguage]`) /* eslint-enable indent, no-fallthrough */ } return [ phoneNumber, - senderId || 'Firefox', - messageId || 1, + messageName || 'installFirefox', acceptLanguage || 'en' ] } diff --git a/test/local/mock-nexmo.js b/test/local/mock-nexmo.js deleted file mode 100644 index ab4cd012..00000000 --- a/test/local/mock-nexmo.js +++ /dev/null @@ -1,81 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -'use strict' - -const assert = require('insist') -// noPreserveCache is needed to prevent the mock mailer from -// being used for all future tests that include mock-nexmo. -const proxyquire = require('proxyquire').noPreserveCache() -const sinon = require('sinon') -const config = require('../../config').getProperties() - -describe('mock-nexmo', () => { - let log - let mailer - let mockNexmo - - const MockNexmo = proxyquire('../../lib/mock-nexmo', { - nodemailer: { - createTransport: () => mailer - } - }) - - before(() => { - mailer = { - sendMail: sinon.spy((config, callback) => callback()) - } - log = { - info: sinon.spy() - } - mockNexmo = new MockNexmo(log, config) - }) - - afterEach(() => { - mailer.sendMail.reset() - log.info.reset() - }) - - it('constructor creates an instance', () => { - assert.ok(mockNexmo) - }) - - describe('message.sendSms', () => { - it('returns status: 0 with options, callback', (done) => { - mockNexmo.message.sendSms('senderid', '+019999999999', 'message', {}, (err, resp) => { - assert.strictEqual(err, null) - assert.equal(resp.messages.length, 1) - assert.strictEqual(resp.messages[0].status, '0') - assert.equal(log.info.callCount, 1) - - assert.equal(mailer.sendMail.callCount, 1) - const sendConfig = mailer.sendMail.args[0][0] - assert.equal(sendConfig.from, config.smtp.sender) - assert.equal(sendConfig.to, 'sms.+019999999999@restmail.net') - assert.equal(sendConfig.subject, 'MockNexmo.message.sendSms') - assert.equal(sendConfig.text, 'message') - - done() - }) - }) - - it('returns status: 0 without options, only callback', (done) => { - mockNexmo.message.sendSms('senderid', '+019999999999', 'message', (err, resp) => { - assert.strictEqual(err, null) - assert.equal(resp.messages.length, 1) - assert.strictEqual(resp.messages[0].status, '0') - assert.equal(log.info.callCount, 1) - - assert.equal(mailer.sendMail.callCount, 1) - const sendConfig = mailer.sendMail.args[0][0] - assert.equal(sendConfig.from, config.smtp.sender) - assert.equal(sendConfig.to, 'sms.+019999999999@restmail.net') - assert.equal(sendConfig.subject, 'MockNexmo.message.sendSms') - assert.equal(sendConfig.text, 'message') - - done() - }) - }) - }) -}) diff --git a/test/local/mock-sns.js b/test/local/mock-sns.js new file mode 100644 index 00000000..537cb26b --- /dev/null +++ b/test/local/mock-sns.js @@ -0,0 +1,62 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +'use strict' + +const assert = require('insist') +// noPreserveCache is needed to prevent the mock mailer from +// being used for all future tests that include mock-nexmo. +const proxyquire = require('proxyquire').noPreserveCache() +const sinon = require('sinon') +const config = require('../../config').getProperties() + +describe('mock-sns', () => { + let mailer + let mockSNS + + const MockSNS = proxyquire('../../test/mock-sns', { + nodemailer: { + createTransport: () => mailer + } + }) + + before(() => { + mailer = { + sendMail: sinon.spy((config, callback) => callback()) + } + mockSNS = new MockSNS(null, config) + }) + + afterEach(() => { + mailer.sendMail.reset() + }) + + it('constructor creates an instance', () => { + assert.ok(mockSNS) + }) + + describe('message.sendSms', () => { + let result + + beforeEach(() => { + return mockSNS.publish({ + PhoneNumber: '+019999999999', + Message: 'message' + }).promise().then(r => result = r) + }) + + it('returns message id', () => { + assert.deepEqual(result, { MessageId: 'fake message id' }) + }) + + it('calls mailer.sendMail correctly', () => { + assert.equal(mailer.sendMail.callCount, 1) + const sendConfig = mailer.sendMail.args[0][0] + assert.equal(sendConfig.from, config.smtp.sender) + assert.equal(sendConfig.to, 'sms.+019999999999@restmail.net') + assert.equal(sendConfig.subject, 'MockSNS.publish') + assert.equal(sendConfig.text, 'message') + }) + }) +}) diff --git a/test/local/routes/sms.js b/test/local/routes/sms.js index c40c6f63..65e6be64 100644 --- a/test/local/routes/sms.js +++ b/test/local/routes/sms.js @@ -45,11 +45,7 @@ describe('/sms with the signinCodes feature included in the payload', () => { config = { sms: { enabled: true, - senderIds: { - CA: '16474909977', - GB: 'Firefox', - US: '15036789977' - }, + countryCodes: [ 'CA', 'GB', 'US' ], isStatusGeoEnabled: true } } @@ -107,12 +103,11 @@ describe('/sms with the signinCodes feature included in the payload', () => { it('called sms.send correctly', () => { assert.equal(sms.send.callCount, 1) const args = sms.send.args[0] - assert.equal(args.length, 5) + assert.equal(args.length, 4) assert.equal(args[0], '+18885083401') - assert.equal(args[1], '15036789977') - assert.equal(args[2], 'installFirefox') - assert.equal(args[3], 'en-US') - assert.equal(args[4], signinCode) + assert.equal(args[1], 'installFirefox') + assert.equal(args[2], 'en-US') + assert.equal(args[3], signinCode) }) it('called log.flowEvent correctly', () => { @@ -152,7 +147,6 @@ describe('/sms with the signinCodes feature included in the payload', () => { assert.equal(sms.send.callCount, 1) const args = sms.send.args[0] assert.equal(args[0], '+14168483114') - assert.equal(args[1], '16474909977') }) it('called log.flowEvent correctly', () => { @@ -183,7 +177,6 @@ describe('/sms with the signinCodes feature included in the payload', () => { assert.equal(sms.send.callCount, 1) const args = sms.send.args[0] assert.equal(args[0], '+442078553000') - assert.equal(args[1], 'Firefox') }) it('called log.flowEvent correctly', () => { @@ -323,11 +316,7 @@ describe('/sms without the signinCodes feature included in the payload', () => { config = { sms: { enabled: true, - senderIds: { - CA: '16474909977', - GB: 'Firefox', - US: '15036789977' - }, + countryCodes: [ 'CA', 'GB', 'US' ], isStatusGeoEnabled: true } } @@ -402,7 +391,7 @@ describe('/sms/status', () => { config = { sms: { enabled: true, - senderIds: { 'US': '18005551212' }, + countryCodes: [ 'US' ], isStatusGeoEnabled: true } } @@ -550,7 +539,7 @@ describe('/sms/status with disabled geo-ip lookup', () => { config = { sms: { enabled: true, - senderIds: { 'US': '18005551212' }, + countryCodes: [ 'US' ], isStatusGeoEnabled: false } } @@ -603,7 +592,7 @@ describe('/sms/status with query param and enabled geo-ip lookup', () => { config = { sms: { enabled: true, - senderIds: { 'RO': '0215555111' }, + countryCodes: [ 'RO' ], isStatusGeoEnabled: true } } @@ -648,7 +637,7 @@ describe('/sms/status with query param and disabled geo-ip lookup', () => { config = { sms: { enabled: true, - senderIds: { 'GB': '03456000000' }, + countryCodes: [ 'GB' ], isStatusGeoEnabled: false } } diff --git a/test/local/senders/sms.js b/test/local/senders/sms.js index 0e7268da..4e36a080 100644 --- a/test/local/senders/sms.js +++ b/test/local/senders/sms.js @@ -17,31 +17,20 @@ const log = { trace: sinon.spy() } -let nexmoStatus = '0' -const sendSms = sinon.spy((from, to, message, callback) => { - callback(null, { - message_count: '1', - messages: [ - { - to: to.substr(1), - 'message-id': 'foo', - status: nexmoStatus, - 'error-text': 'bar', - 'remaining-balance': '42', - 'message-price': '1', - 'network': 'baz' - } - ] - }) +let snsResult = P.resolve({ + MessageId: 'foo' }) -function Nexmo () {} -Nexmo.prototype.message = { sendSms } +const publish = sinon.spy(params => ({ + promise: () => snsResult +})) +function SNS () {} +SNS.prototype.publish = publish let mockConstructed = false -function MockNexmo () { +function MockSNS () { mockConstructed = true } -MockNexmo.prototype = Nexmo.prototype +MockSNS.prototype = SNS.prototype describe('lib/senders/sms:', () => { let sms @@ -52,7 +41,7 @@ describe('lib/senders/sms:', () => { require(`${ROOT_DIR}/lib/senders/templates`)() ]).spread((translator, templates) => { sms = proxyquire(`${ROOT_DIR}/lib/senders/sms`, { - nexmo: Nexmo + 'aws-sdk': { SNS } })(log, translator, templates, { sms: { apiKey: 'foo', @@ -66,7 +55,7 @@ describe('lib/senders/sms:', () => { }) afterEach(() => { - sendSms.reset() + publish.reset() log.error.reset() log.info.reset() log.trace.reset() @@ -75,27 +64,39 @@ describe('lib/senders/sms:', () => { it('interface is correct', () => { assert.equal(typeof sms.send, 'function', 'sms.send is function') - assert.equal(sms.send.length, 5, 'sms.send expects 5 arguments') + assert.equal(sms.send.length, 4, 'sms.send expects 4 arguments') assert.equal(Object.keys(sms).length, 1, 'sms has no other methods') }) it('sends a valid sms without a signinCode', () => { - return sms.send('+442078553000', 'Firefox', 'installFirefox', 'en') + return sms.send('+442078553000', 'installFirefox', 'en') .then(() => { - assert.equal(sendSms.callCount, 1, 'nexmo.message.sendSms was called once') - const args = sendSms.args[0] - assert.equal(args.length, 4, 'nexmo.message.sendSms was passed four arguments') - assert.equal(args[0], 'Firefox', 'nexmo.message.sendSms was passed the correct sender id') - assert.equal(args[1], '+442078553000', 'nexmo.message.sendSms was passed the correct phone number') - assert.equal(args[2], 'As requested, here is a link to install Firefox on your mobile device: https://baz/qux', 'nexmo.message.sendSms was passed the correct message') - assert.equal(typeof args[3], 'function', 'nexmo.message.sendSms was passed a callback function') + assert.equal(publish.callCount, 1, 'AWS.SNS.publish was called once') + assert.equal(publish.args[0].length, 1, 'AWS.SNS.publish was passed one argument') + assert.deepEqual(publish.args[0][0], { + Message: 'As requested, here is a link to install Firefox on your mobile device: https://baz/qux', + MessageAttributes: { + 'AWS.SNS.SMS.MaxPrice': { + DataType: 'String', + StringValue: '1.0' + }, + 'AWS.SNS.SMS.SenderID': { + DataType: 'String', + StringValue: 'Firefox' + }, + 'AWS.SNS.SMS.SMSType': { + DataType: 'String', + StringValue: 'Promotional' + } + }, + PhoneNumber: '+442078553000' + }, 'AWS.SNS.publish was passed the correct argument') assert.equal(log.trace.callCount, 1, 'log.trace was called once') assert.equal(log.trace.args[0].length, 1, 'log.trace was passed one argument') assert.deepEqual(log.trace.args[0][0], { op: 'sms.send', - senderId: 'Firefox', templateName: 'installFirefox', acceptLanguage: 'en' }, 'log.trace was passed the correct data') @@ -104,9 +105,9 @@ describe('lib/senders/sms:', () => { assert.equal(log.info.args[0].length, 1, 'log.info was passed one argument') assert.deepEqual(log.info.args[0][0], { op: 'sms.send.success', - senderId: 'Firefox', templateName: 'installFirefox', - acceptLanguage: 'en' + acceptLanguage: 'en', + messageId: 'foo' }, 'log.info was passed the correct data') assert.equal(log.error.callCount, 0, 'log.error was not called') @@ -114,10 +115,10 @@ describe('lib/senders/sms:', () => { }) it('sends a valid sms with a signinCode', () => { - return sms.send('+442078553000', 'Firefox', 'installFirefox', 'en', Buffer.from('++//ff0=', 'base64')) + return sms.send('+442078553000', 'installFirefox', 'en', Buffer.from('++//ff0=', 'base64')) .then(() => { - assert.equal(sendSms.callCount, 1, 'nexmo.message.sendSms was called once') - assert.equal(sendSms.args[0][2], 'As requested, here is a link to install Firefox on your mobile device: https://wibble/--__ff0', 'nexmo.message.sendSms was passed the correct message') + assert.equal(publish.callCount, 1, 'AWS.SNS.publish was called once') + assert.equal(publish.args[0][0].Message, 'As requested, here is a link to install Firefox on your mobile device: https://wibble/--__ff0', 'AWS.SNS.publish was passed the correct message') assert.equal(log.trace.callCount, 1, 'log.trace was called once') assert.equal(log.info.callCount, 1, 'log.info was called once') @@ -127,7 +128,7 @@ describe('lib/senders/sms:', () => { }) it('fails to send an sms with an invalid template name', () => { - return sms.send('+442078553000', 'Firefox', 'wibble', 'en', Buffer.from('++//ff0=', 'base64')) + return sms.send('+442078553000', 'wibble', 'en', Buffer.from('++//ff0=', 'base64')) .then(() => assert.fail('sms.send should have rejected')) .catch(error => { assert.equal(error.errno, 131, 'error.errno was set correctly') @@ -142,55 +143,44 @@ describe('lib/senders/sms:', () => { templateName: 'wibble' }, 'log.error was passed the correct data') - assert.equal(sendSms.callCount, 0, 'nexmo.message.sendSms was not called') - }) - }) - - it('fails to send an sms that is throttled by the network provider', () => { - nexmoStatus = '1' - return sms.send('+442078553000', 'Firefox', 'installFirefox', 'en', Buffer.from('++//ff0=', 'base64')) - .then(() => assert.fail('sms.send should have rejected')) - .catch(error => { - assert.equal(error.errno, 114, 'error.errno was set correctly') - assert.equal(error.message, 'Client has sent too many requests', 'error.message was set correctly') - - assert.equal(log.trace.callCount, 1, 'log.trace was called once') - assert.equal(log.info.callCount, 0, 'log.info was not called') - - assert.equal(sendSms.callCount, 1, 'nexmo.message.sendSms was called once') + assert.equal(publish.callCount, 0, 'AWS.SNS.publish was not called') }) }) it('fails to send an sms that is rejected by the network provider', () => { - nexmoStatus = '2' - return sms.send('+442078553000', 'Firefox', 'installFirefox', 'en', Buffer.from('++//ff0=', 'base64')) + snsResult = P.reject({ + statusCode: 400, + code: 42, + message: 'this is an error' + }) + return sms.send('+442078553000', 'installFirefox', 'en', Buffer.from('++//ff0=', 'base64')) .then(() => assert.fail('sms.send should have rejected')) .catch(error => { assert.equal(error.errno, 132, 'error.errno was set correctly') assert.equal(error.message, 'Message rejected', 'error.message was set correctly') - assert.equal(error.output.payload.reason, 'bar', 'error.reason was set correctly') - assert.equal(error.output.payload.reasonCode, '2', 'error.reasonCode was set correctly') + assert.equal(error.output.payload.reason, 'this is an error', 'error.reason was set correctly') + assert.equal(error.output.payload.reasonCode, 42, 'error.reasonCode was set correctly') assert.equal(log.trace.callCount, 1, 'log.trace was called once') assert.equal(log.info.callCount, 0, 'log.info was not called') - assert.equal(sendSms.callCount, 1, 'nexmo.message.sendSms was called once') + assert.equal(publish.callCount, 1, 'AWS.SNS.publish was called once') }) }) - it('uses the Nexmo constructor if `useMock: false`', () => { + it('uses the SNS constructor if `useMock: false`', () => { assert.equal(mockConstructed, false) }) - it('uses the NexmoMock constructor if `useMock: true`', () => { + it('uses the MockSNS constructor if `useMock: true`', () => { return P.all([ require(`${ROOT_DIR}/lib/senders/translator`)(['en'], 'en'), require(`${ROOT_DIR}/lib/senders/templates`)() ]).spread((translator, templates) => { sms = proxyquire(`${ROOT_DIR}/lib/senders/sms`, { - nexmo: Nexmo, - '../mock-nexmo': MockNexmo + 'aws-sdk': { SNS }, + '../../test/mock-sns': MockSNS })(log, translator, templates, { sms: { apiKey: 'foo', diff --git a/lib/mock-nexmo.js b/test/mock-sns.js similarity index 52% rename from lib/mock-nexmo.js rename to test/mock-sns.js index a76e6809..da7ef67e 100644 --- a/lib/mock-nexmo.js +++ b/test/mock-sns.js @@ -4,11 +4,11 @@ 'use strict' -/** - * Mock out Nexmo for functional tests. `sendSms` always succeeds. - */ +const P = require('../lib/promise') -function MockNexmo(log, config) { +module.exports = MockSNS + +function MockSNS (options, config) { const mailerOptions = { host: config.smtp.host, secure: config.smtp.secure, @@ -24,33 +24,24 @@ function MockNexmo(log, config) { const mailer = require('nodemailer').createTransport(mailerOptions) return { - message: { - /** - * Drop message on the ground, call callback with `0` (send-OK) status. - */ - sendSms: function sendSms (senderId, phoneNumber, message, options, callback) { - // this is the same as how the Nexmo version works. - if (! callback) { - callback = options - options = {} - } - - log.info({ op: 'sms.send.mock' }) - + publish (params) { + const promise = new P(resolve => { // HACK: Enable remote tests to see what was sent mailer.sendMail({ from: config.smtp.sender, - to: `sms.${phoneNumber}@restmail.net`, - subject: 'MockNexmo.message.sendSms', - text: message + to: `sms.${params.PhoneNumber}@restmail.net`, + subject: 'MockSNS.publish', + text: params.Message }, () => { - callback(null, { - messages: [{ status: '0' }] + resolve({ + MessageId: 'fake message id' }) }) + }) + return { + promise: () => promise } } } } -module.exports = MockNexmo