From 37e57a19da5e443f15abe17a74ef1405bae46b78 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 12:04:53 -0700 Subject: [PATCH 01/36] Adds check for broadcast field to avoid errors for draft entries --- lib/helpers/broadcast.js | 7 ++++++- test/lib/lib-helpers/broadcast.test.js | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 12390c43..f37b4da8 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -65,13 +65,15 @@ function getById(broadcastId, resetCache = false) { * @return {Object} */ function parseBroadcastInfoFromContentfulEntry(contentfulEntry) { - return { + const result = { id: contentful.getContentfulIdFromContentfulEntry(contentfulEntry), name: contentful.getNameTextFromContentfulEntry(contentfulEntry), type: contentful.getContentTypeFromContentfulEntry(contentfulEntry), createdAt: contentfulEntry.sys.createdAt, updatedAt: contentfulEntry.sys.updatedAt, }; + logger.debug('parseBroadcastInfoFromContentfulEntry', { result }); + return result; } /** @@ -134,6 +136,9 @@ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { */ function parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { const broadcastMessageEntry = contentfulEntry.fields.broadcast; + if (!broadcastMessageEntry) { + return null; + } return helpers.contentfulEntry .getMessageTemplateFromContentfulEntryAndTemplateName(broadcastMessageEntry, templateName); } diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index 7673ea3e..fac65a08 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -130,6 +130,13 @@ test('getById returns fetchById if resetCache arg is true', async () => { result.should.deep.equal(broadcast); }); +// parseBroadcastMessageFromContentfulEntryAndTemplateName +test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns null if contentfulEntry does not have broadcast set', (t) => { + const result = broadcastHelper + .parseBroadcastMessageFromContentfulEntryAndTemplateName(broadcastEntry); + t.is(result, null); +}); + // parseLegacyBroadcastFromContentfulEntry test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', async (t) => { sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') From 438800ed525ff4e4b0a046aa74e6270099056717 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 12:24:23 -0700 Subject: [PATCH 02/36] Adds factories for autoReplyBroadcast, message contentful types --- test/lib/lib-helpers/broadcast.test.js | 13 +++++++ .../contentful/autoReplyBroadcast.js | 26 ++++++++++++++ test/utils/factories/contentful/message.js | 34 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 test/utils/factories/contentful/autoReplyBroadcast.js create mode 100644 test/utils/factories/contentful/message.js diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index fac65a08..dc44c6b0 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -10,6 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const helpers = require('../../../lib/helpers'); const stubs = require('../../utils/stubs'); +const autoReplyBroadcastEntryFactory = require('../../utils/factories/contentful/autoReplyBroadcast'); const broadcastEntryFactory = require('../../utils/factories/contentful/broadcast'); const broadcastFactory = require('../../utils/factories/broadcast'); @@ -137,6 +138,18 @@ test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns null if co t.is(result, null); }); +test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessageTemplateFromContentfulEntryAndTemplateName', () => { + const autoReplyBroadcast = autoReplyBroadcastEntryFactory.getValidAutoReplyBroadcast(); + const templateName = stubs.getRandomWord(); + const messageTemplate = { text: stubs.getRandomMessageText(), template: templateName }; + sandbox.stub(helpers.contentfulEntry, 'getMessageTemplateFromContentfulEntryAndTemplateName') + .returns(messageTemplate); + + const result = broadcastHelper + .parseBroadcastMessageFromContentfulEntryAndTemplateName(autoReplyBroadcast, templateName); + result.should.equal(messageTemplate); +}); + // parseLegacyBroadcastFromContentfulEntry test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', async (t) => { sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') diff --git a/test/utils/factories/contentful/autoReplyBroadcast.js b/test/utils/factories/contentful/autoReplyBroadcast.js new file mode 100644 index 00000000..e1ebe5df --- /dev/null +++ b/test/utils/factories/contentful/autoReplyBroadcast.js @@ -0,0 +1,26 @@ +'use strict'; + +const stubs = require('../../stubs'); +const messageFactory = require('./message'); + +function getValidAutoReplyBroadcast() { + const data = { + sys: { + id: stubs.getContentfulId(), + contentType: { + sys: { + id: 'autoReplyBroadcast', + }, + }, + }, + fields: { + broadcast: messageFactory.getValidMessage(), + autoReply: messageFactory.getValidMessage(), + }, + }; + return data; +} + +module.exports = { + getValidAutoReplyBroadcast, +}; diff --git a/test/utils/factories/contentful/message.js b/test/utils/factories/contentful/message.js new file mode 100644 index 00000000..5e00ce6c --- /dev/null +++ b/test/utils/factories/contentful/message.js @@ -0,0 +1,34 @@ +'use strict'; + +const stubs = require('../../stubs'); + +function getValidMessage() { + const data = { + sys: { + id: stubs.getContentfulId(), + contentType: { + sys: { + id: 'message', + }, + }, + }, + fields: { + text: stubs.getRandomMessageText(), + attachments: [ + { + sys: { + id: stubs.getContentfulId(), + }, + fields: { + file: stubs.getAttachment(), + }, + }, + ], + }, + }; + return data; +} + +module.exports = { + getValidMessage, +}; From 74889f22bb8f50a94f1081b3e7d9edcce283cba4 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:45:53 -0500 Subject: [PATCH 03/36] Bump Node to 8.11.3 --- .nvmrc | 2 +- wercker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.nvmrc b/.nvmrc index 2f769729..dba04c1e 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.11.1 +8.11.3 diff --git a/wercker.yml b/wercker.yml index 4a123d0e..cab2469c 100644 --- a/wercker.yml +++ b/wercker.yml @@ -1,4 +1,4 @@ -box: node:8.11.1 +box: node:8.11.3 services: - id: mongo - id: redis From 0faf06f7962d8a6853a62cd8cc569a205f7f5814 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:47:44 -0500 Subject: [PATCH 04/36] Bump Node version to 8.11.3. Add express-sslify --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a6a16ce9..01e952d8 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ] }, "engines": { - "node": "8.11.1", + "node": "8.11.3", "npm": "5.7.1" }, "dependencies": { @@ -55,6 +55,7 @@ "contentful": "^3.8.0", "date-fns": "^1.29.0", "express": "^4.10.2", + "express-sslify": "^1.2.0", "file-exists": "^4.0.0", "html-entities": "^1.1.1", "mongoose": "4.6.8", From 1ecc3d3a5195abe8db975e2a87558c204f43da0b Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:48:18 -0500 Subject: [PATCH 05/36] added production config override --- config/env/production.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/env/production.js diff --git a/config/env/production.js b/config/env/production.js new file mode 100644 index 00000000..d1d89009 --- /dev/null +++ b/config/env/production.js @@ -0,0 +1,7 @@ +'use strict'; + +const configVars = { + forceHttps: true, +}; + +module.exports = configVars; From e7f39a1af497ad439a4fe663910e23b2ea3b86f9 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:56:07 -0500 Subject: [PATCH 06/36] package-lock.json --- package-lock.json | 3272 +++++++++++++++------------------------------ 1 file changed, 1051 insertions(+), 2221 deletions(-) diff --git a/package-lock.json b/package-lock.json index c71fe4b0..6cc0c5f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gambit-campaigns", - "version": "5.5.3", + "version": "5.11.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -88,23 +88,9 @@ "requires": { "@babel/types": "7.0.0-beta.44", "jsesc": "2.5.1", - "lodash": "4.17.5", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", - "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - } } }, "@babel/helper-function-name": { @@ -142,46 +128,9 @@ "integrity": "sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==", "dev": true, "requires": { - "chalk": "2.3.2", + "chalk": "2.4.1", "esutils": "2.0.2", "js-tokens": "3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } - } } }, "@babel/template": { @@ -193,21 +142,7 @@ "@babel/code-frame": "7.0.0-beta.44", "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", - "lodash": "4.17.5" - }, - "dependencies": { - "babylon": { - "version": "7.0.0-beta.44", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", - "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - } + "lodash": "4.17.10" } }, "@babel/traverse": { @@ -223,38 +158,9 @@ "@babel/types": "7.0.0-beta.44", "babylon": "7.0.0-beta.44", "debug": "3.1.0", - "globals": "11.4.0", + "globals": "11.7.0", "invariant": "2.2.4", - "lodash": "4.17.5" - }, - "dependencies": { - "babylon": { - "version": "7.0.0-beta.44", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", - "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "lodash": "4.17.10" } }, "@babel/types": { @@ -264,22 +170,8 @@ "dev": true, "requires": { "esutils": "2.0.2", - "lodash": "4.17.5", + "lodash": "4.17.10", "to-fast-properties": "2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - } } }, "@concordance/react": { @@ -297,13 +189,13 @@ "integrity": "sha512-VWeMrdsdJ0ojYEqBIPOVQ3H9OTEtT6fgqWevoEkN1VMKnpaMImktuwYD26B/08fl1dElXWMA86rbycegrOqChQ==", "dev": true, "requires": { - "babel-eslint": "8.2.2", + "babel-eslint": "8.2.6", "eslint": "4.19.1", "eslint-config-airbnb": "15.1.0", - "eslint-plugin-import": "2.10.0", + "eslint-plugin-import": "2.13.0", "eslint-plugin-jsx-a11y": "5.1.1", - "eslint-plugin-prettier": "2.6.0", - "eslint-plugin-react": "7.7.0" + "eslint-plugin-prettier": "2.6.2", + "eslint-plugin-react": "7.10.0" } }, "@dosomething/gateway": { @@ -313,10 +205,10 @@ "requires": { "date-fns": "1.29.0", "lodash": "4.17.10", - "simple-oauth2": "1.5.2", + "simple-oauth2": "1.6.0", "superagent": "3.8.3", "superagent-use": "0.1.0", - "winston": "2.4.2" + "winston": "2.4.3" }, "dependencies": { "async": { @@ -324,50 +216,27 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, "superagent": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", "requires": { "component-emitter": "1.2.1", - "cookiejar": "2.1.1", + "cookiejar": "2.1.2", "debug": "3.1.0", - "extend": "3.0.1", + "extend": "3.0.2", "form-data": "2.3.2", "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", - "qs": "6.5.1", + "qs": "6.5.2", "readable-stream": "2.3.6" } }, "winston": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.2.tgz", - "integrity": "sha512-4S/Ad4ZfSNl8OccCLxnJmNISWcm2joa6Q0YGDxlxMzH0fgSwWsjMt+SmlNwCqdpaPg3ev1HKkMBsIiXeSUwpbA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.3.tgz", + "integrity": "sha512-GYKuysPz2pxYAVJD2NPsDLP5Z79SDEzPm9/j4tCjkF/n89iBNGBMJcR+dMUqxgPNgoSs6fVygPi+Vl2oxIpBuw==", "requires": { "async": "1.0.0", "colors": "1.0.3", @@ -426,25 +295,20 @@ } }, "@newrelic/koa": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@newrelic/koa/-/koa-1.0.2.tgz", - "integrity": "sha1-eZleh2vdz5Cic/h9tjoLuAvTc3w=" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@newrelic/koa/-/koa-1.0.5.tgz", + "integrity": "sha512-1zTojq9gW2mi0YblGrS86gCyL56+gbCn6o2+1UJJL3pFmBgp8IAMzZ93PkHHtdrbL3BnVMBrD2Q2WR32FbhIAg==", + "requires": { + "methods": "1.1.2" + } }, "@newrelic/native-metrics": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@newrelic/native-metrics/-/native-metrics-2.2.0.tgz", - "integrity": "sha1-wv5JnOf++eiyp56doEBpx74gILY=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@newrelic/native-metrics/-/native-metrics-2.4.0.tgz", + "integrity": "sha512-6Pv2Z9vkinr0MTnH1BORBs/SFOdKei43tQo2z30h9NtTc1pmWb/n5VWjgp7ReZ7FwzTI2oIhjbgnk2gZzpl6bw==", "optional": true, "requires": { "nan": "2.10.0" - }, - "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "optional": true - } } }, "@risingstack/node-pre-gyp": { @@ -455,48 +319,12 @@ "mkdirp": "0.5.1", "nopt": "4.0.1", "npmlog": "4.1.2", - "rc": "1.2.6", - "request": "2.85.0", + "rc": "1.2.8", + "request": "2.87.0", "rimraf": "2.6.2", "semver": "5.5.0", "tar": "2.2.1", "tar-pack": "3.4.1" - }, - "dependencies": { - "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - } } }, "@risingstack/v8-profiler": { @@ -506,18 +334,11 @@ "requires": { "@risingstack/node-pre-gyp": "0.6.35", "nan": "2.10.0" - }, - "dependencies": { - "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" - } } }, "@sinonjs/formatio": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", "dev": true, "requires": { @@ -534,29 +355,14 @@ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { - "mime-types": "2.1.18", + "mime-types": "2.1.19", "negotiator": "0.6.1" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - } } }, "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha1-9HPdR+AnegjijpvsWu6wR1HwuMk=", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", + "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", "dev": true }, "acorn-jsx": { @@ -585,7 +391,6 @@ "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, "requires": { "co": "4.6.0", "fast-deep-equal": "1.1.0", @@ -606,6 +411,39 @@ "dev": true, "requires": { "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "ansi-escapes": { @@ -620,10 +458,13 @@ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.2" + } }, "anymatch": { "version": "1.3.2", @@ -641,9 +482,9 @@ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "requires": { "delegates": "1.0.0", "readable-stream": "2.3.6" @@ -652,7 +493,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "1.0.3" @@ -671,7 +512,7 @@ "dev": true, "requires": { "ast-types-flow": "0.0.7", - "commander": "2.15.1" + "commander": "2.17.0" } }, "arr-diff": { @@ -719,7 +560,7 @@ "dev": true, "requires": { "define-properties": "1.1.2", - "es-abstract": "1.11.0" + "es-abstract": "1.12.0" } }, "array-union": { @@ -749,16 +590,13 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true - }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "2.1.2" + } }, "assert-plus": { "version": "1.0.0", @@ -778,18 +616,11 @@ "dev": true }, "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha1-YaKau2/MAm/qd+VtHG7FOnlZUfQ=", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", "requires": { - "lodash": "4.17.5" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - } + "lodash": "4.17.10" } }, "async-each": { @@ -804,9 +635,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "auto-bind": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.0.tgz", - "integrity": "sha512-Zw7pZp7tztvKnWWtoII4AmqH5a2PV3ZN5F0BPRTGcc1kpRm4b6QXQnPU7Znbl6BfPfqOVOV29g4JeMqZQaqqOA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-1.2.1.tgz", + "integrity": "sha512-/W9yj1yKmBLwpexwAujeD9YHwYmRuWFGV8HWE7smQab797VeHa4/cnE2NFeDhA+E+5e/OGBI8763EhLjfZ/MXA==", "dev": true }, "ava": { @@ -826,7 +657,7 @@ "array-union": "1.0.2", "array-uniq": "1.0.3", "arrify": "1.0.1", - "auto-bind": "1.2.0", + "auto-bind": "1.2.1", "ava-init": "0.2.1", "babel-core": "6.26.3", "babel-generator": "6.26.1", @@ -873,23 +704,23 @@ "lodash.flatten": "4.4.0", "loud-rejection": "1.6.0", "make-dir": "1.3.0", - "matcher": "1.1.0", + "matcher": "1.1.1", "md5-hex": "2.0.0", "meow": "3.7.0", - "ms": "2.1.1", + "ms": "2.0.0", "multimatch": "2.1.0", "observable-to-promise": "0.5.0", "option-chain": "1.0.0", "package-hash": "2.0.0", "pkg-conf": "2.1.0", "plur": "2.1.2", - "pretty-ms": "3.1.0", + "pretty-ms": "3.2.0", "require-precompiled": "0.1.0", "resolve-cwd": "2.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "semver": "5.5.0", "slash": "1.0.0", - "source-map-support": "0.5.5", + "source-map-support": "0.5.6", "stack-utils": "1.0.1", "strip-ansi": "4.0.0", "strip-bom-buf": "1.0.0", @@ -906,43 +737,6 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", @@ -950,34 +744,18 @@ "dev": true, "requires": { "array-union": "1.0.2", - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "glob": "7.1.2", "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1" } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, - "source-map-support": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", - "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", - "dev": true, - "requires": { - "buffer-from": "1.0.0", - "source-map": "0.6.1" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -986,23 +764,6 @@ "requires": { "ansi-regex": "3.0.0" } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - } - } } } }, @@ -1016,7 +777,7 @@ "execa": "0.7.0", "has-yarn": "1.0.0", "read-pkg-up": "2.0.0", - "write-pkg": "3.1.0" + "write-pkg": "3.2.0" } }, "aws-sdk": { @@ -1033,6 +794,13 @@ "uuid": "3.0.0", "xml2js": "0.4.15", "xmlbuilder": "2.6.2" + }, + "dependencies": { + "uuid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", + "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=" + } } }, "aws-sign2": { @@ -1041,9 +809,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "axobject-query": { "version": "0.1.0", @@ -1063,6 +831,33 @@ "chalk": "1.1.3", "esutils": "2.0.2", "js-tokens": "3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } } }, "babel-core": { @@ -1098,14 +893,20 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "debug": { @@ -1116,34 +917,13 @@ "requires": { "ms": "2.0.0" } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "1.1.11" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "babel-eslint": { - "version": "8.2.2", - "resolved": "http://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz", - "integrity": "sha512-Qt2lz2egBxNYWqN9JIO2z4NOOf8i4b5JS6CFoYrOZZTDssueiV1jH/jsefyg+86SeNY3rB361/mi3kE1WK2WYQ==", + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.6.tgz", + "integrity": "sha512-aCdHjhzcILdP8c9lej7hvXKvQieyRt20SF102SIGyY4cUIiw6UaAtK4j2o3dXX74jEmy0TJ0CEhv4fTIM3SzcA==", "dev": true, "requires": { "@babel/code-frame": "7.0.0-beta.44", @@ -1152,20 +932,12 @@ "babylon": "7.0.0-beta.44", "eslint-scope": "3.7.1", "eslint-visitor-keys": "1.0.0" - }, - "dependencies": { - "babylon": { - "version": "7.0.0-beta.44", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", - "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==", - "dev": true - } } }, "babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA=", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "6.23.0", @@ -1173,7 +945,7 @@ "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" }, @@ -1184,14 +956,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "jsesc": { @@ -1199,12 +971,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true } } }, @@ -1225,14 +991,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1255,14 +1021,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1284,14 +1050,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1315,14 +1081,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1343,14 +1109,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1371,14 +1137,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1400,20 +1166,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", - "dev": true - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1437,14 +1197,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1465,14 +1225,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1492,20 +1252,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1525,14 +1279,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1546,16 +1300,22 @@ "babel-generator": "6.26.1", "babylon": "6.18.0", "call-matcher": "1.0.1", - "core-js": "2.5.6", + "core-js": "2.5.7", "espower-location-detector": "1.0.0", - "espurify": "1.7.0", + "espurify": "1.8.1", "estraverse": "4.2.0" }, "dependencies": { + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1601,14 +1361,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1628,14 +1388,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1657,14 +1417,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1687,14 +1447,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1719,14 +1479,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1746,14 +1506,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1775,14 +1535,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1804,14 +1564,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1833,14 +1593,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1861,14 +1621,14 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -1879,125 +1639,39 @@ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-core": "6.26.0", + "babel-core": "6.26.3", "babel-runtime": "6.26.0", - "core-js": "2.5.4", + "core-js": "2.5.7", "home-or-tmp": "2.0.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "mkdirp": "0.5.1", - "source-map-support": "0.4.15" + "source-map-support": "0.4.18" }, "dependencies": { - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-core": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", - "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", - "dev": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-generator": "6.26.1", - "babel-helpers": "6.24.1", - "babel-messages": "6.23.0", - "babel-register": "6.26.0", - "babel-runtime": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "convert-source-map": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "debug": "2.6.9", - "json5": "0.5.1", - "lodash": "4.17.5", - "minimatch": "3.0.4", - "path-is-absolute": "1.0.1", - "private": "0.1.8", - "slash": "1.0.0", - "source-map": "0.5.7" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "convert-source-map": { - "version": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha512-6q8sJj3dAkO4VXQNpkykQf5ZWMZPHi1xxTYE8BlbbIgQ8Gx8iHzRqaytIuuR4HRSH5Yz0EdrwdRgOHHrJ0xZqQ==", - "dev": true - }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "source-map": "0.5.7" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -2007,13 +1681,6 @@ "integrity": "sha1-8ttpbDyMN5iB4qU2ZeAhhwdNxoE=", "requires": { "core-js": "1.2.7" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - } } }, "babel-template": { @@ -2026,7 +1693,7 @@ "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "lodash": "4.17.5" + "lodash": "4.17.10" }, "dependencies": { "babel-runtime": { @@ -2035,22 +1702,10 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.5", - "to-fast-properties": "1.0.3" - } - }, "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", @@ -2058,21 +1713,9 @@ "dev": true }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -2091,42 +1734,19 @@ "debug": "2.6.9", "globals": "9.18.0", "invariant": "2.2.4", - "lodash": "4.17.5" + "lodash": "4.17.10" }, "dependencies": { - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.5", - "to-fast-properties": "1.0.3" - } - }, "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", @@ -2134,9 +1754,9 @@ "dev": true }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "debug": { @@ -2153,24 +1773,6 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true } } }, @@ -2182,7 +1784,7 @@ "requires": { "babel-runtime": "6.26.0", "esutils": "2.0.2", - "lodash": "4.17.5", + "lodash": "4.17.10", "to-fast-properties": "1.0.3" }, "dependencies": { @@ -2192,28 +1794,28 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.4", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" } }, "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", "dev": true } } }, "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", + "version": "7.0.0-beta.44", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz", + "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==", "dev": true }, "balanced-match": { @@ -2222,14 +1824,14 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base64-js": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz", - "integrity": "sha1-+xNmgjPZYUz1+0vOlam6QJbN+AE=" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { "tweetnacl": "0.14.5" @@ -2255,19 +1857,19 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" }, "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", "requires": { "bytes": "3.0.0", "content-type": "1.0.4", "debug": "2.6.9", "depd": "1.1.2", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", "on-finished": "2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", + "qs": "6.5.2", + "raw-body": "2.3.3", "type-is": "1.6.16" }, "dependencies": { @@ -2278,27 +1880,9 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" } } }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.1" - } - }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -2314,14 +1898,11 @@ "widest-line": "2.0.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, "camelcase": { "version": "4.1.0", @@ -2329,30 +1910,29 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "has-flag": "3.0.0" + "ansi-regex": "3.0.0" } } } @@ -2360,7 +1940,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "1.0.0", "concat-map": "0.0.1" @@ -2393,22 +1973,15 @@ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { - "base64-js": "1.2.3", - "ieee754": "1.1.11", + "base64-js": "1.3.0", + "ieee754": "1.1.12", "isarray": "1.0.0" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - } } }, "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha1-TLiDLSNhJYmwQG6eKVbBfwb99TE=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-shims": { "version": "1.0.0", @@ -2431,23 +2004,23 @@ "resolved": "https://registry.npmjs.org/cacheman/-/cacheman-2.2.1.tgz", "integrity": "sha1-NRDA3vEkKdYbeAEo/xj50oS7Arg=", "requires": { - "cacheman-memory": "1.0.2", + "cacheman-memory": "1.1.0", "ms": "0.7.3" + }, + "dependencies": { + "ms": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", + "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" + } } }, "cacheman-memory": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cacheman-memory/-/cacheman-memory-1.0.2.tgz", - "integrity": "sha1-OMebgPASsQO/qoNG1u10cwp+3pw=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cacheman-memory/-/cacheman-memory-1.1.0.tgz", + "integrity": "sha512-jZ/Sg/LdgkN+T3G0BV3ekYzCAswKwZRBOvOmZ/VYwdhSTtMz6irMOt1JppBGZ7zVdjcBeku9tfOzb49KbXIT2w==", "requires": { - "lru-cache": "2.7.3" - }, - "dependencies": { - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - } + "lru-cache": "4.1.3" } }, "cacheman-redis": { @@ -2498,16 +2071,16 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.6", + "core-js": "2.5.7", "deep-equal": "1.0.1", - "espurify": "1.7.0", + "espurify": "1.8.1", "estraverse": "4.2.0" }, "dependencies": { "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -2598,16 +2171,14 @@ } }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "2.2.1", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "supports-color": "5.4.0" } }, "chance": { @@ -2636,7 +2207,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.2.3", + "fsevents": "1.2.4", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -2698,6 +2269,39 @@ "requires": { "slice-ansi": "1.0.0", "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "cli-width": { @@ -2709,8 +2313,7 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "co-with-promise": { "version": "4.6.0", @@ -2753,67 +2356,30 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.1.tgz", - "integrity": "sha512-0TjnXrbvcPzAkRPv/Y5D8aZju/M5adkFxShRyMMgDReB8EV9nF4XMERXs6ajgLA1di9LUFW2tgePDQd2JPWy7g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", + "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", "dev": true, "requires": { "argv": "0.0.2", - "request": "2.85.0", + "ignore-walk": "3.0.1", + "request": "2.87.0", "urlgrey": "0.4.4" - }, - "dependencies": { - "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", - "dev": true, - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true - } } }, "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "1.1.1" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, "colors": { @@ -2830,9 +2396,9 @@ } }, "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.0.tgz", + "integrity": "sha512-477o1hdVORiFlZxw8wgsXYCef3lh0zl/OV0FTftqiDxJSWw6dPQ2ipS4k20J2qBcsmsmLKSyr2iFrf9e3JGi4w==", "dev": true }, "common-path-prefix": { @@ -2861,9 +2427,8 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, "requires": { - "buffer-from": "1.0.0", + "buffer-from": "1.1.1", "inherits": "2.0.3", "readable-stream": "2.3.6", "typedarray": "0.0.6" @@ -2918,17 +2483,10 @@ "resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.9.0.tgz", "integrity": "sha1-vCcyaxIhA3FL6/oNlYurM/ZSLjo=", "requires": { - "http-errors": "1.6.2", + "http-errors": "1.6.3", "ms": "2.0.0", "on-finished": "2.3.0", "on-headers": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } } }, "console-control-strings": { @@ -2950,7 +2508,7 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=" + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "contentful": { "version": "3.8.1", @@ -2963,11 +2521,6 @@ "lodash": "4.2.1" }, "dependencies": { - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, "lodash": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.2.1.tgz", @@ -2982,20 +2535,8 @@ "requires": { "babel-runtime": "6.3.19", "follow-redirects": "0.0.7", - "lodash": "4.17.5", - "qs": "6.5.1" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - } + "lodash": "4.17.10", + "qs": "6.5.2" } }, "convert-source-map": { @@ -3021,9 +2562,9 @@ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" }, "core-assert": { "version": "0.2.1", @@ -3038,8 +2579,7 @@ "core-js": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", - "dev": true + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" }, "core-util-is": { "version": "1.0.2", @@ -3061,27 +2601,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.2", + "lru-cache": "4.1.3", "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha1-XdnabuOl8wIHdDYpDLcX0/SlTgI=", - "requires": { - "hoek": "4.2.1" - } - } + "which": "1.3.1" } }, "crypto-browserify": { @@ -3126,7 +2648,7 @@ "date-fns": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha1-EuYJzcuTUScxHQTTMzTilgoqVOY=" + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" }, "date-time": { "version": "0.1.1", @@ -3135,11 +2657,11 @@ "dev": true }, "debug": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.6.tgz", - "integrity": "sha1-qfpvvpykPPHnn3O3XAGJy7fW21o=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { - "ms": "0.7.3" + "ms": "2.0.0" } }, "decamelize": { @@ -3164,9 +2686,9 @@ "dev": true }, "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, "deep-is": { "version": "0.1.3", @@ -3190,7 +2712,7 @@ "dev": true, "requires": { "foreach": "2.0.5", - "object-keys": "1.0.11" + "object-keys": "1.0.12" } }, "del": { @@ -3246,7 +2768,7 @@ "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "2.0.2" @@ -3279,12 +2801,13 @@ "dev": true }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "0.1.1", + "safer-buffer": "2.1.2" } }, "ee-first": { @@ -3305,13 +2828,13 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "2.5.6" + "core-js": "2.5.7" }, "dependencies": { "core-js": { - "version": "2.5.6", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz", - "integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } @@ -3321,30 +2844,13 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "dev": true, - "requires": { - "iconv-lite": "0.4.19" - } - }, "enhance-visitors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/enhance-visitors/-/enhance-visitors-1.0.0.tgz", "integrity": "sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo=", "dev": true, "requires": { - "lodash": "4.17.5" - }, - "dependencies": { - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - } + "lodash": "4.17.10" } }, "equal-length": { @@ -3354,24 +2860,24 @@ "dev": true }, "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "0.2.1" } }, "es-abstract": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", - "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "dev": true, "requires": { "es-to-primitive": "1.1.1", "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", + "has": "1.0.3", + "is-callable": "1.1.4", "is-regex": "1.0.4" } }, @@ -3381,7 +2887,7 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", + "is-callable": "1.1.4", "is-date-object": "1.0.1", "is-symbol": "1.0.1" } @@ -3416,7 +2922,7 @@ "requires": { "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "2.3.2", + "chalk": "2.4.1", "concat-stream": "1.6.2", "cross-spawn": "5.1.0", "debug": "3.1.0", @@ -3424,28 +2930,28 @@ "eslint-scope": "3.7.1", "eslint-visitor-keys": "1.0.0", "espree": "3.5.4", - "esquery": "1.0.0", + "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.4.0", - "ignore": "3.3.7", + "globals": "11.7.0", + "ignore": "3.3.10", "imurmurhash": "0.1.4", "inquirer": "3.3.0", "is-resolvable": "1.1.0", - "js-yaml": "3.11.0", + "js-yaml": "3.12.0", "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", - "lodash": "4.17.5", - "minimatch": "3.0.3", + "lodash": "4.17.10", + "minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", - "regexpp": "1.0.1", + "regexpp": "1.1.0", "require-uncached": "1.0.3", "semver": "5.5.0", "strip-ansi": "4.0.0", @@ -3460,115 +2966,6 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "4.1.2", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "requires": { - "acorn": "5.5.3", - "acorn-jsx": "3.0.1" - } - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "1.1.11" - } - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", - "dev": true, - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -3577,15 +2974,6 @@ "requires": { "ansi-regex": "3.0.0" } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } } } }, @@ -3614,7 +3002,7 @@ "dev": true, "requires": { "debug": "2.6.9", - "resolve": "1.7.0" + "resolve": "1.8.1" }, "dependencies": { "debug": { @@ -3625,12 +3013,6 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -3649,70 +3031,44 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "requires": { + "ms": "2.0.0" + } } } }, "eslint-plugin-ava": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-4.5.1.tgz", - "integrity": "sha1-pRuJowbf1bL5EYXig4N66t5vnlw=", + "integrity": "sha512-V0+QZkTYoEXAp8fojaoD85orqNgGfyHWpwQEUqVIRGCRsX9BFnKbG2eX875NgciF3Aouq7smOZcLYqQKgAyH7w==", "dev": true, "requires": { "arrify": "1.0.1", "deep-strict-equal": "0.2.0", "enhance-visitors": "1.0.0", - "espree": "3.4.2", - "espurify": "1.7.0", + "espree": "3.5.4", + "espurify": "1.8.1", "import-modules": "1.1.0", "multimatch": "2.1.0", "pkg-up": "2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "2.1.0" - } - } } }, "eslint-plugin-import": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.10.0.tgz", - "integrity": "sha1-+gkIPVp1KI35xsfQn+EiVZhWVec=", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.13.0.tgz", + "integrity": "sha512-t6hGKQDMIt9N8R7vLepsYXgDfeuhp6ZJSgtrLEDxonpSubyxUZHjhm6LsAaZX8q6GYVxkbT3kTsV9G5mBCFR6A==", "dev": true, "requires": { - "builtin-modules": "1.1.1", "contains-path": "0.1.0", "debug": "2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "0.3.2", "eslint-module-utils": "2.2.0", - "has": "1.0.1", - "lodash": "4.17.5", - "minimatch": "3.0.3", - "read-pkg-up": "2.0.0" + "has": "1.0.3", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "read-pkg-up": "2.0.0", + "resolve": "1.8.1" }, "dependencies": { "debug": { @@ -3733,18 +3089,6 @@ "esutils": "2.0.2", "isarray": "1.0.0" } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, @@ -3764,9 +3108,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz", + "integrity": "sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og==", "dev": true, "requires": { "fast-diff": "1.1.2", @@ -3774,15 +3118,15 @@ } }, "eslint-plugin-react": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", - "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz", + "integrity": "sha512-18rzWn4AtbSUxFKKM7aCVcj5LXOhOKdwBino3KKWy4psxfPW0YtIbE8WNRDUdyHFL50BeLb6qFd4vpvNYyp7hw==", "dev": true, "requires": { "doctrine": "2.1.0", - "has": "1.0.1", + "has": "1.0.3", "jsx-ast-utils": "2.0.1", - "prop-types": "15.6.1" + "prop-types": "15.6.2" }, "dependencies": { "jsx-ast-utils": { @@ -3808,7 +3152,7 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.1.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, @@ -3831,63 +3175,54 @@ } }, "espree": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.2.tgz", - "integrity": "sha1-ONve2+3JW4lhofvwRzSo9qnIxZI=", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { - "acorn": "5.5.3", + "acorn": "5.7.1", "acorn-jsx": "3.0.1" } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "espurify": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.7.0.tgz", - "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", + "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", "dev": true, "requires": { - "core-js": "2.5.4" + "core-js": "2.5.7" }, "dependencies": { "core-js": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.4.tgz", - "integrity": "sha1-8si/GB8qgLkvNgEhQpzmOi8K6uA=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true } } }, "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { "estraverse": "4.2.0" } }, "esrecurse": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz", - "integrity": "sha1-RxO2U2rffyrE8yfVWed1a/9kgiA=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.1.1", - "object-assign": "4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz", - "integrity": "sha1-9srKcokzqFDvkGYdDheYK6RxEaI=", - "dev": true - } + "estraverse": "4.2.0" } }, "estraverse": { @@ -3964,7 +3299,7 @@ "on-finished": "2.3.0", "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "2.0.3", + "proxy-addr": "2.0.4", "qs": "6.5.1", "range-parser": "1.2.0", "safe-buffer": "5.1.1", @@ -3977,6 +3312,23 @@ "vary": "1.1.2" }, "dependencies": { + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.2", + "http-errors": "1.6.3", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.16" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -3985,51 +3337,80 @@ "ms": "2.0.0" } }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, "qs": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.4.0" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=" - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=" + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, + "express-sslify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/express-sslify/-/express-sslify-1.2.0.tgz", + "integrity": "sha1-MOhLzu0VV+sYdnK74UMKCioQDZw=" + }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.19", + "iconv-lite": "0.4.23", "tmp": "0.0.33" } }, @@ -4074,21 +3455,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "fbjs": { - "version": "0.8.16", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", - "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", - "dev": true, - "requires": { - "core-js": "1.2.7", - "isomorphic-fetch": "2.2.1", - "loose-envify": "1.3.1", - "object-assign": "4.1.1", - "promise": "7.3.1", - "setimmediate": "1.0.5", - "ua-parser-js": "0.7.17" - } - }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", @@ -4104,7 +3470,7 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.2.2", + "flat-cache": "1.3.0", "object-assign": "4.1.1" } }, @@ -4135,7 +3501,7 @@ "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha1-7r9O2EAHnIP0JJA4ydcDAIMBsQU=", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", "encodeurl": "1.0.2", @@ -4154,15 +3520,10 @@ "ms": "2.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=" + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, @@ -4208,9 +3569,9 @@ } }, "flat-cache": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", - "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { "circular-json": "0.3.3", @@ -4241,11 +3602,6 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -4282,7 +3638,7 @@ "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "2.1.19" } }, "formidable": { @@ -4306,14 +3662,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", - "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", "dev": true, "optional": true, "requires": { "nan": "2.10.0", - "node-pre-gyp": "0.9.1" + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -4394,7 +3750,7 @@ } }, "deep-extend": { - "version": "0.4.2", + "version": "0.5.1", "bundled": true, "dev": true, "optional": true @@ -4572,7 +3928,7 @@ } }, "node-pre-gyp": { - "version": "0.9.1", + "version": "0.10.0", "bundled": true, "dev": true, "optional": true, @@ -4583,7 +3939,7 @@ "nopt": "4.0.1", "npm-packlist": "1.1.10", "npmlog": "4.1.2", - "rc": "1.2.6", + "rc": "1.2.7", "rimraf": "2.6.2", "semver": "5.5.0", "tar": "4.4.1" @@ -4681,12 +4037,12 @@ "optional": true }, "rc": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.5.1", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -4853,16 +4209,6 @@ "fstream": "1.0.11", "inherits": "2.0.3", "minimatch": "3.0.4" - }, - "dependencies": { - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - } } }, "function-bind": { @@ -4895,27 +4241,7 @@ "signal-exit": "3.0.2", "string-width": "1.0.2", "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } + "wide-align": "1.1.3" } }, "get-func-name": { @@ -4951,13 +4277,14 @@ } }, "glob": { - "version": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-mRyN/EsN2SyNhKWykF3eEGhDpeNplMWaW18Bmh76tnOqk5TbELAVwFAYOCmKVssOYFrYvvLMguiA+NXO3ZTuVA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", "inherits": "2.0.3", - "minimatch": "3.0.3", + "minimatch": "3.0.4", "once": "1.4.0", "path-is-absolute": "1.0.1" } @@ -4991,9 +4318,9 @@ } }, "globals": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", - "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, "globby": { @@ -5004,7 +4331,7 @@ "requires": { "array-union": "1.0.2", "arrify": "1.0.1", - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "glob": "7.1.2", "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1" @@ -5023,7 +4350,7 @@ "is-retry-allowed": "1.1.0", "is-stream": "1.1.0", "lowercase-keys": "1.0.1", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "timed-out": "4.0.1", "unzip-response": "2.0.1", "url-parse-lax": "1.0.0" @@ -5046,30 +4373,12 @@ "requires": { "ajv": "5.5.2", "har-schema": "2.0.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - } } }, "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "1.1.1" @@ -5091,9 +4400,9 @@ "dev": true }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "has-unicode": { @@ -5107,21 +4416,10 @@ "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", "dev": true }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha1-r02RTrBl+bXOTZ0RwcshJu7MMDg=", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.1", - "sntp": "2.1.0" - } - }, "hoek": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha1-ljRQKqEsRF3Vp8VzS1cruHOKrLs=" + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, "home-or-tmp": { "version": "2.0.0", @@ -5131,14 +4429,6 @@ "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" - }, - "dependencies": { - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - } } }, "hooks-fixed": { @@ -5147,9 +4437,9 @@ "integrity": "sha1-DSdy1NfWhf+SRHJKnwtbJVmqyWs=" }, "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "html-entities": { @@ -5158,26 +4448,14 @@ "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" }, "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { - "depd": "1.1.1", + "depd": "1.1.2", "inherits": "2.0.3", - "setprototypeof": "1.0.3", + "setprototypeof": "1.1.0", "statuses": "1.5.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } } }, "http-signature": { @@ -5187,7 +4465,7 @@ "requires": { "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.14.1" + "sshpk": "1.14.2" } }, "https-proxy-agent": { @@ -5196,14 +4474,17 @@ "integrity": "sha1-cT+jjl01P1DrFKNC/r4pAz7RYZs=", "requires": { "agent-base": "1.0.2", - "debug": "2.6.6", - "extend": "3.0.1" + "debug": "2.6.9", + "extend": "3.0.2" }, "dependencies": { - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } } } }, @@ -5226,7 +4507,7 @@ "package-hash": "2.0.0", "pkg-dir": "2.0.0", "resolve-from": "3.0.0", - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" }, "dependencies": { "find-up": { @@ -5256,19 +4537,22 @@ } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=" + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": "2.1.2" + } }, "ieee754": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", - "integrity": "sha1-wWOE/+APW3g1gk5ntvK9RKUilFU=" + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha1-YSKJv7PCIOGGpYEYYY1b6MG6sCE=", + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, "ignore-by-default": { @@ -5277,6 +4561,15 @@ "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", "dev": true }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "requires": { + "minimatch": "3.0.4" + } + }, "import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", @@ -5338,16 +4631,6 @@ "requires": { "once": "1.4.0", "wrappy": "1.0.2" - }, - "dependencies": { - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - } } }, "inherits": { @@ -5358,7 +4641,7 @@ "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=" + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { "version": "3.3.0", @@ -5367,12 +4650,12 @@ "dev": true, "requires": { "ansi-escapes": "3.1.0", - "chalk": "2.3.2", + "chalk": "2.4.1", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.1.0", + "external-editor": "2.2.0", "figures": "2.0.0", - "lodash": "4.17.5", + "lodash": "4.17.10", "mute-stream": "0.0.7", "run-async": "2.3.0", "rx-lite": "4.0.8", @@ -5388,44 +4671,22 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -5434,31 +4695,22 @@ "requires": { "ansi-regex": "3.0.0" } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } } } }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "1.4.0" } }, "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" }, "irregular-plurals": { "version": "1.4.0", @@ -5497,9 +4749,9 @@ } }, "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, "is-ci": { @@ -5560,10 +4812,12 @@ } }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } }, "is-generator-fn": { "version": "1.0.0", @@ -5680,7 +4934,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "1.0.3" } }, "is-resolvable": { @@ -5730,18 +4984,11 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isemail": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.1.2.tgz", - "integrity": "sha512-zfRhJn9rFSGhzU5tGZqepRSAj3+g6oTOHxMGGriWNJZzyLPUK8H7VHpqKntegnW8KLyGA9zwuNaCoopl40LTpg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.1.3.tgz", + "integrity": "sha512-5xbsG5wYADIcB+mfLsd+nst1V/D+I7EU7LEZPo2GOIMu4JzfcRs5yQoypP4avA7QtUqgxYLKBYNv4IdzBmbhdw==", "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - } + "punycode": "2.1.1" } }, "isexe": { @@ -5759,16 +5006,6 @@ "isarray": "1.0.0" } }, - "isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "dev": true, - "requires": { - "node-fetch": "1.7.3", - "whatwg-fetch": "2.0.4" - } - }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -5791,7 +5028,7 @@ "integrity": "sha512-z0FNlV4NGgjQN1fdtHYXf5kmgludM65fG/JlXzU6+rwkt9U5UWuXVYnXa2FpK0u6+qBuCmrm5byPNuiiddAHvQ==", "requires": { "hoek": "4.2.1", - "isemail": "3.1.2", + "isemail": "3.1.3", "topo": "2.0.2" } }, @@ -5808,13 +5045,13 @@ "dev": true }, "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "dev": true, "requires": { "argparse": "1.0.10", - "esprima": "4.0.0" + "esprima": "4.0.1" } }, "jsbn": { @@ -5824,9 +5061,9 @@ "optional": true }, "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", "dev": true }, "json-parse-better-errors": { @@ -5937,14 +5174,6 @@ "parse-json": "2.2.0", "pify": "2.3.0", "strip-bom": "3.0.0" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - } } }, "locate-path": { @@ -5966,9 +5195,9 @@ } }, "lodash": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz", - "integrity": "sha1-Gbs/TVEnjwuMgY7RRcdOz5/kDm0=" + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, "lodash.clonedeep": { "version": "4.5.0", @@ -6030,15 +5259,15 @@ "dev": true }, "lolex": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.4.2.tgz", - "integrity": "sha512-92IC6/K6abCQqmaBhFt4OYLSkpOkqUULeazKiEna96om4o87vLGmwTmrsZ5mK+4F6kZ8dS1w8VnFbdhFJF8sJw==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { "js-tokens": "3.0.2" @@ -6061,10 +5290,9 @@ "dev": true }, "lru-cache": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", - "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", - "dev": true, + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" @@ -6093,9 +5321,9 @@ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" }, "matcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.0.tgz", - "integrity": "sha512-aZGv6JBTHqfqAd09jmAlbKnAICTfIvb5Z8gXVxPB5WZtFfHMaAMdACL7tQflD2V+6/8KNcY8s6DYtWLgpJP5lA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", + "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", "dev": true, "requires": { "escape-string-regexp": "1.0.5" @@ -6239,36 +5467,33 @@ } }, "mime": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", - "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", - "dev": true + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha1-bzI/YKg9ERRvgx/xH9ZuL+VQO7g=", + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "requires": { - "mime-db": "1.33.0" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - } + "mime-db": "1.35.0" } }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI=", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, "minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "1.1.11" } @@ -6296,10 +5521,10 @@ "readable-stream": "2.1.5" }, "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "readable-stream": { "version": "2.1.5", @@ -6355,14 +5580,9 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.1.2.tgz", "integrity": "sha1-YSpKtF70KnDN6Aa62G7m2wR+g4U=", "requires": { - "lodash": "4.17.5" + "lodash": "4.17.10" } }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, "ms": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", @@ -6417,9 +5637,9 @@ } }, "ms": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.3.tgz", - "integrity": "sha1-cIFVpeROM/X9D8U+gdDUCpG+H/8=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multimatch": { "version": "2.1.0", @@ -6430,7 +5650,7 @@ "array-differ": "1.0.0", "array-union": "1.0.2", "arrify": "1.0.1", - "minimatch": "3.0.3" + "minimatch": "3.0.4" } }, "muri": { @@ -6447,9 +5667,7 @@ "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true, - "optional": true + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, "natural-compare": { "version": "1.4.0", @@ -6473,90 +5691,25 @@ "resolved": "https://registry.npmjs.org/newrelic/-/newrelic-3.2.0.tgz", "integrity": "sha1-eMSmFrLPRYT9v7M7gH+rbdLAsMA=", "requires": { - "@newrelic/koa": "1.0.2", - "@newrelic/native-metrics": "2.2.0", - "async": "2.6.0", + "@newrelic/koa": "1.0.5", + "@newrelic/native-metrics": "2.4.0", + "async": "2.6.1", "concat-stream": "1.6.2", "https-proxy-agent": "0.3.6", "json-stringify-safe": "5.0.1", - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "semver": "5.5.0" - }, - "dependencies": { - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "1.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.5", - "typedarray": "0.0.6" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - } } }, "nise": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.3.tgz", - "integrity": "sha512-v1J/FLUB9PfGqZLGDBhQqODkbLotP0WtLo9R4EJY2PPu5f5Xg4o0rA8FDlmrjFSv9vBBKcfnOSpfYYuu5RTHqg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", "dev": true, "requires": { "@sinonjs/formatio": "2.0.0", "just-extend": "1.1.27", - "lolex": "2.4.2", + "lolex": "2.7.1", "path-to-regexp": "1.7.0", "text-encoding": "0.6.4" }, @@ -6579,9 +5732,9 @@ } }, "nock": { - "version": "9.2.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-9.2.5.tgz", - "integrity": "sha512-ciCpyEq72Ws6/yhdayDfd0mAb3eQ7/533xKmFlBQZ5CDwrL0/bddtSicfL7R07oyvPAuegQrR+9ctrlPEp0EjQ==", + "version": "9.4.4", + "resolved": "https://registry.npmjs.org/nock/-/nock-9.4.4.tgz", + "integrity": "sha512-HrF96ecwONEv7tW8bk79kwc9mshxWAw8WfEPv5LStc0X25bsoWgescTtmevFSetu3gdjOypnUtniubYSz+5DNA==", "dev": true, "requires": { "chai": "4.1.2", @@ -6591,47 +5744,14 @@ "lodash": "4.17.10", "mkdirp": "0.5.1", "propagate": "1.0.0", - "qs": "6.5.1", + "qs": "6.5.2", "semver": "5.5.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dev": true, - "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" } }, "node-mocks-http": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.6.7.tgz", - "integrity": "sha1-ifMcElhlhcOBLmvXJdQXcQ12MuM=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/node-mocks-http/-/node-mocks-http-1.7.0.tgz", + "integrity": "sha512-AX1jGG87itK38N9UZif1CFYjJDibCOj07d0YGpUsxzglVWJjyJ3R7fxtuK7l6RVCKZteLiQyaTo9UR8rIEESgw==", "dev": true, "requires": { "accepts": "1.3.5", @@ -6639,7 +5759,7 @@ "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "1.1.2", - "mime": "1.3.4", + "mime": "1.6.0", "net": "1.0.2", "parseurl": "1.3.2", "range-parser": "1.2.0", @@ -6661,10 +5781,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", + "hosted-git-info": "2.7.1", "is-builtin-module": "1.0.0", "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "validate-npm-package-license": "3.0.4" } }, "normalize-path": { @@ -6690,7 +5810,7 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { - "are-we-there-yet": "1.1.4", + "are-we-there-yet": "1.1.5", "console-control-strings": "1.1.0", "gauge": "2.7.4", "set-blocking": "2.0.0" @@ -6702,9 +5822,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", - "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.9.0.tgz", + "integrity": "sha512-w8OdJAhXL5izerzZMdqzYKMj/pgHJyY3qEPYBjLLxrhcVoHEY9pU5ENIiZyCgG9OR7x3VcUMoD40o6PtVpfR4g==", "dev": true, "requires": { "archy": "1.0.0", @@ -9342,9 +8462,9 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, "object.omit": { @@ -9462,9 +8582,9 @@ "dev": true }, "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha1-DpK2vty1nwIsE9DxlJ3ILRWQnxw=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { "p-try": "1.0.0" @@ -9476,7 +8596,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.2.0" + "p-limit": "1.3.0" } }, "p-try": { @@ -9527,7 +8647,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "1.3.2" } }, "parse-ms": { @@ -9578,9 +8698,9 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "path-to-regexp": { @@ -9666,7 +8786,7 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.1", + "error-ex": "1.3.2", "json-parse-better-errors": "1.0.2" } }, @@ -9687,6 +8807,26 @@ "find-up": "1.1.2" } }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, "plur": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", @@ -9721,13 +8861,12 @@ "dev": true }, "pretty-ms": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.1.0.tgz", - "integrity": "sha1-6crJx2v27lL+lC3ZxsQhMVOxKIE=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", + "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", "dev": true, "requires": { - "parse-ms": "1.0.1", - "plur": "2.1.2" + "parse-ms": "1.0.1" }, "dependencies": { "parse-ms": { @@ -9741,13 +8880,13 @@ "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "progress": { "version": "2.0.0", @@ -9755,23 +8894,13 @@ "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "requires": { - "asap": "2.0.6" - } - }, "prop-types": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", - "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", "dev": true, "requires": { - "fbjs": "0.8.16", - "loose-envify": "1.3.1", + "loose-envify": "1.4.0", "object-assign": "4.1.1" } }, @@ -9782,29 +8911,28 @@ "dev": true }, "proxy-addr": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.3.tgz", - "integrity": "sha1-NV8mJQWmIWRrMTCnKOtkfiIFU0E=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", "requires": { "forwarded": "0.1.2", - "ipaddr.js": "1.6.0" + "ipaddr.js": "1.8.0" } }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "querystring": { "version": "0.2.0", @@ -9842,22 +8970,22 @@ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", "requires": { "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", "unpipe": "1.0.0" } }, "rc": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.6.tgz", - "integrity": "sha1-6xiYnG1PTxYsOZ953dKfODVWgJI=", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "requires": { - "deep-extend": "0.4.2", + "deep-extend": "0.6.0", "ini": "1.3.5", "minimist": "1.2.0", "strip-json-comments": "2.0.1" @@ -9879,68 +9007,6 @@ "load-json-file": "2.0.0", "normalize-package-data": "2.4.0", "path-type": "2.0.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "dev": true, - "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" - } - } } }, "read-pkg-up": { @@ -9973,24 +9039,9 @@ "inherits": "2.0.3", "isarray": "1.0.0", "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", + "safe-buffer": "5.1.2", "string_decoder": "1.1.1", "util-deprecate": "1.0.2" - }, - "dependencies": { - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "5.1.1" - } - } } }, "readdirp": { @@ -10000,7 +9051,7 @@ "dev": true, "requires": { "graceful-fs": "4.1.11", - "minimatch": "3.0.3", + "minimatch": "3.0.4", "readable-stream": "2.3.6", "set-immediate-shim": "1.0.1" } @@ -10029,7 +9080,7 @@ "redis": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha1-ICKI4/WMSfYHnZevehDhMDrhSwI=", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", "requires": { "double-ended-queue": "2.1.0-0", "redis-commands": "1.3.5", @@ -10039,7 +9090,7 @@ "redis-commands": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", - "integrity": "sha1-RJWIlBTx6IYmEYCxRC5ylWAtg6I=" + "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==" }, "redis-parser": { "version": "2.6.0", @@ -10047,15 +9098,15 @@ "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" }, "regenerate": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", - "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", "dev": true }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", "dev": true }, "regex-cache": { @@ -10073,9 +9124,9 @@ "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" }, "regexpp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.0.1.tgz", - "integrity": "sha512-8Ph721maXiOYSLtaDGKVmDn5wdsNaF6Px85qFNeMPQq0r8K5Y10tgP6YuR65Ws35n4DvzFcCxEnRNBIXQunzLw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "dev": true }, "regexpu-core": { @@ -10084,7 +9135,7 @@ "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "dev": true, "requires": { - "regenerate": "1.3.3", + "regenerate": "1.4.0", "regjsgen": "0.2.0", "regjsparser": "0.1.5" } @@ -10095,8 +9146,8 @@ "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "rc": "1.2.6", - "safe-buffer": "5.1.1" + "rc": "1.2.8", + "safe-buffer": "5.1.2" } }, "registry-url": { @@ -10105,7 +9156,7 @@ "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { - "rc": "1.2.6" + "rc": "1.2.8" } }, "regjsgen": { @@ -10121,6 +9172,14 @@ "dev": true, "requires": { "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } } }, "release-zalgo": { @@ -10159,6 +9218,33 @@ "is-finite": "1.0.2" } }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.8.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.2", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.19", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.3.2" + } + }, "require-precompiled": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz", @@ -10186,19 +9272,19 @@ "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", "requires": { "resolve-from": "2.0.0", "semver": "5.5.0" } }, "resolve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.0.tgz", - "integrity": "sha512-QdgZ5bjR1WAlpLaO5yHepFvC+o3rCr6wpfE2tpJNMkXdulf2jKomQBdNRQITF3ZKHNlT71syG98yQP03gasgnA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "1.0.6" } }, "resolve-cwd": { @@ -10247,7 +9333,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" + "glob": "7.1.2" } }, "run-async": { @@ -10260,9 +9346,9 @@ } }, "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "dev": true }, "rx-lite-aggregates": { @@ -10271,7 +9357,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "3.1.2" + "rx-lite": "4.0.8" } }, "s3-upload-stream": { @@ -10280,9 +9366,14 @@ "integrity": "sha1-4/gCUxQcVp8QWmKqUMqbRXYOSB0=" }, "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "samsam": { "version": "1.3.0", @@ -10298,7 +9389,7 @@ "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs=" + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" }, "semver-diff": { "version": "2.1.0", @@ -10312,7 +9403,7 @@ "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { "debug": "2.6.9", "depd": "1.1.2", @@ -10321,7 +9412,7 @@ "escape-html": "1.0.3", "etag": "1.8.1", "fresh": "0.5.2", - "http-errors": "1.6.2", + "http-errors": "1.6.3", "mime": "1.4.1", "ms": "2.0.0", "on-finished": "2.3.0", @@ -10342,15 +9433,10 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=" + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, @@ -10376,13 +9462,18 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" } } }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { "encodeurl": "1.0.2", "escape-html": "1.0.3", @@ -10401,16 +9492,10 @@ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "dev": true }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "shebang-command": { "version": "1.2.0", @@ -10433,87 +9518,15 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "simple-oauth2": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/simple-oauth2/-/simple-oauth2-1.5.2.tgz", - "integrity": "sha512-ZTk6Atw+3FlRHpFtPMavE3NhP70ibgmIuI6z7NF05HYDVRc6dwt/+Q7dV2XT/RpGvFl6SzdecMVDxhEnwnlFfA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/simple-oauth2/-/simple-oauth2-1.6.0.tgz", + "integrity": "sha512-nSfa5lIJbf89k+VpWrZTzChH4B0/a/DRD3+NlEqyto8qgQ/FWX8eWzZs4KnkvnTMAB2Lph/V46ikoqk7UrjjEg==", "requires": { "bluebird": "3.5.1", "date-fns": "1.29.0", "debug": "3.1.0", "joi": "12.0.0", - "request": "2.85.0" - }, - "dependencies": { - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.3.2", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "requires": { - "punycode": "1.4.1" - } - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - } + "request": "2.87.0" } }, "sinon": { @@ -10525,33 +9538,16 @@ "@sinonjs/formatio": "2.0.0", "diff": "3.5.0", "lodash.get": "4.4.2", - "lolex": "2.4.2", - "nise": "1.3.3", + "lolex": "2.7.1", + "nise": "1.4.2", "supports-color": "5.4.0", "type-detect": "4.0.8" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } - } } }, "sinon-chai": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.0.0.tgz", - "integrity": "sha512-+cqeKiuMZjZs800fRf4kjJR/Pp4p7bYY3ciZHClFNS8tSzJoAcWni/ZUZD8TrfZ+oFRyLiKWX3fTClDATGy5vQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.2.0.tgz", + "integrity": "sha512-Z72B4a0l0IQe5uWi9yzcqX/Ml6K9e1Hp03NmkjJnRG3gDsKTX7KvLFZsVUmCaz0eqeXLLK089mwTsP1P1W+DUQ==", "dev": true }, "slash": { @@ -10567,6 +9563,14 @@ "dev": true, "requires": { "is-fullwidth-code-point": "2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } } }, "sliced": { @@ -10580,14 +9584,6 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha1-LGzsFP7cIiJznK+bXD2F0cxaLMg=", - "requires": { - "hoek": "4.2.1" - } - }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -10604,12 +9600,21 @@ "dev": true }, "source-map-support": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", - "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { - "source-map": "0.5.7" + "buffer-from": "1.1.1", + "source-map": "0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "spdx-correct": { @@ -10625,7 +9630,7 @@ "spdx-exceptions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha1-LHrmEFbHFKW5ubKyr30xHvXHj+k=", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, "spdx-expression-parse": { @@ -10651,17 +9656,18 @@ "dev": true }, "sshpk": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", - "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "0.2.3", + "asn1": "0.2.4", "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", + "bcrypt-pbkdf": "1.0.2", "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", + "ecc-jsbn": "0.1.2", "getpass": "0.1.7", "jsbn": "0.1.1", + "safer-buffer": "2.1.2", "tweetnacl": "0.14.5" } }, @@ -10689,48 +9695,26 @@ "stream-consume": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz", - "integrity": "sha1-0721mMK9CugrjKx6xQsRB6eZbEg=" + "integrity": "sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==" }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "3.0.0" - } - } + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "5.1.2" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -10780,15 +9764,15 @@ "integrity": "sha1-cDUpoHFOV+EjlZ3e+84ZOy5Q0RU=", "requires": { "component-emitter": "1.2.1", - "cookiejar": "2.1.1", + "cookiejar": "2.1.2", "debug": "2.6.9", - "extend": "3.0.1", + "extend": "3.0.2", "form-data": "1.0.0-rc4", "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" + "qs": "6.5.2", + "readable-stream": "2.3.6" }, "dependencies": { "async": { @@ -10796,16 +9780,6 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -10821,56 +9795,7 @@ "requires": { "async": "1.5.2", "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "mime-types": "2.1.19" } } } @@ -10880,7 +9805,7 @@ "resolved": "https://registry.npmjs.org/superagent-use/-/superagent-use-0.1.0.tgz", "integrity": "sha1-0o27v1c7qYAym0ZFiXYIvJlQHP8=", "requires": { - "extend": "3.0.1", + "extend": "3.0.2", "methods": "1.1.2" } }, @@ -10892,7 +9817,7 @@ "requires": { "arrify": "1.0.1", "indent-string": "3.2.0", - "js-yaml": "3.11.0", + "js-yaml": "3.12.0", "serialize-error": "2.1.0", "strip-ansi": "4.0.0" }, @@ -10915,36 +9840,15 @@ } }, "supertest": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.0.0.tgz", - "integrity": "sha1-jUu2j9GDDuBwM7HFpamkAhyWUpY=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-3.1.0.tgz", + "integrity": "sha512-O44AMnmJqx294uJQjfUmEyYOg7d9mylNFsMw/Wkz4evKd1njyPrtCN+U6ZIC7sKtfEVQhfTqFFijlXx8KP/Czw==", "dev": true, "requires": { "methods": "1.1.2", "superagent": "3.8.2" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "superagent": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", @@ -10952,24 +9856,27 @@ "dev": true, "requires": { "component-emitter": "1.2.1", - "cookiejar": "2.1.1", + "cookiejar": "2.1.2", "debug": "3.1.0", - "extend": "3.0.1", + "extend": "3.0.2", "form-data": "2.3.2", "formidable": "1.2.1", "methods": "1.1.2", "mime": "1.6.0", - "qs": "6.5.1", + "qs": "6.5.2", "readable-stream": "2.3.6" } } } }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } }, "symbol-observable": { "version": "1.2.0", @@ -10985,60 +9892,41 @@ "requires": { "ajv": "5.5.2", "ajv-keywords": "2.1.1", - "chalk": "2.3.2", - "lodash": "4.17.5", + "chalk": "2.4.1", + "lodash": "4.17.10", "slice-ansi": "1.0.0", "string-width": "2.1.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "has-flag": { + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "has-flag": "3.0.0" + "ansi-regex": "3.0.0" } } } @@ -11075,11 +9963,6 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -11147,20 +10030,12 @@ "dev": true, "requires": { "os-tmpdir": "1.0.2" - }, - "dependencies": { - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - } } }, "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "topo": { @@ -11209,14 +10084,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - } + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -11243,25 +10111,10 @@ "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha1-+JzjQVQcZysl7nrjxz3uOyvlAZQ=", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { "media-typer": "0.3.0", - "mime-types": "2.1.18" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - } + "mime-types": "2.1.19" } }, "typedarray": { @@ -11269,12 +10122,6 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "ua-parser-js": { - "version": "0.7.17", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", - "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", - "dev": true - }, "uid-number": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", @@ -11287,9 +10134,9 @@ "dev": true }, "underscore": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.0.tgz", - "integrity": "sha512-4IV1DSSxC1QK48j9ONFK1MoIAKKkbE8i7u55w2R6IqBqbT7A/iG7aZBCR2Bi8piF0Uz+i/MG1aeqLwl/5vqF+A==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" }, "unique-string": { "version": "1.0.0", @@ -11338,43 +10185,6 @@ "latest-version": "3.1.0", "semver-diff": "2.1.0", "xdg-basedir": "3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } - } } }, "url": { @@ -11384,6 +10194,13 @@ "requires": { "punycode": "1.3.2", "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } } }, "url-parse-lax": { @@ -11412,14 +10229,14 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.0.tgz", - "integrity": "sha1-Zyj8BFnEUNeWqZwxg3VpvfZy1yg=" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "3.0.0", @@ -11447,47 +10264,21 @@ "integrity": "sha1-c8eK6Bp3Jqj6WY4ogIAcixYiVRg=", "dev": true }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", - "dev": true - }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "2.0.0" } }, "wide-align": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "requires": { "string-width": "1.0.2" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } } }, "widest-line": { @@ -11497,6 +10288,39 @@ "dev": true, "requires": { "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "winston": { @@ -11579,9 +10403,9 @@ } }, "write-pkg": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz", - "integrity": "sha1-AwqZlMyZk9JbTnWp8aGSNgcpHOk=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", "dev": true, "requires": { "sort-keys": "2.0.0", @@ -11609,6 +10433,13 @@ "integrity": "sha1-+Rb20Q1F3BcbG+Lm5nP7bgzDXQo=", "requires": { "lodash": "3.5.0" + }, + "dependencies": { + "lodash": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.5.0.tgz", + "integrity": "sha1-Gbs/TVEnjwuMgY7RRcdOz5/kDm0=" + } } }, "xtend": { @@ -11620,8 +10451,7 @@ "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" } } } From 03e6b475b9689f6f811e3aba067ed97122c35e75 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:58:00 -0500 Subject: [PATCH 07/36] pass the forceHttps property through app.locals --- app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.js b/app.js index 02cfe6c6..73effb38 100644 --- a/app.js +++ b/app.js @@ -1,11 +1,18 @@ 'use strict'; +const config = require('./config'); const express = require('express'); const favicon = require('serve-favicon'); const path = require('path'); const bodyParser = require('body-parser'); const app = express(); +/** + * Set app locals + * @see https://expressjs.com/en/4x/api.html#app.locals + */ +app.locals.forceHttps = config.forceHttps; + // serve favicon app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); // parse application/json Content-Type From 2ea3a2efa5c4704d97adba7a79311069653d0cc4 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:58:35 -0500 Subject: [PATCH 08/36] set default forceHttps value to false --- config/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/index.js b/config/index.js index d70101f2..66930d52 100644 --- a/config/index.js +++ b/config/index.js @@ -21,6 +21,8 @@ const defaultConfig = { webConcurrency: process.env.WEB_CONCURRENCY || 1, dbUri: process.env.DB_URI || 'mongodb://localhost/ds-mdata-responder', apiKey: process.env.GAMBIT_API_KEY || 'totallysecret', + // overridden in production to true + forceHttps: false, }; const configVars = underscore.extend({}, defaultConfig, envConfig); From efe8fb7db6aaf9ab0f47ac3dae35712edb0515c7 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 14:59:00 -0500 Subject: [PATCH 09/36] implemented and use the enforce-https middleware --- app/routes/index.js | 4 ++++ lib/middleware/enforce-https.js | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 lib/middleware/enforce-https.js diff --git a/app/routes/index.js b/app/routes/index.js index f717d2bf..b042ff81 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -16,10 +16,14 @@ const statusRoute = require('./status'); const authenticateConfig = require('../../config/lib/middleware/authenticate'); // middleware +const enforceHttpsMiddleware = require('../../lib/middleware/enforce-https'); const timeoutMiddleware = require('../../lib/middleware/timeouts'); const authenticateMiddleware = require('../../lib/middleware/authenticate'); function regGlobalMiddleware(app) { + // Enforce https + app.use(enforceHttpsMiddleware(app.locals.forceHttps)); + // 504 timeouts middleware Object.keys(timeoutMiddleware).forEach((name) => { app.use(timeoutMiddleware[name]); diff --git a/lib/middleware/enforce-https.js b/lib/middleware/enforce-https.js new file mode 100644 index 00000000..d499596c --- /dev/null +++ b/lib/middleware/enforce-https.js @@ -0,0 +1,18 @@ +'use strict'; + +const enforce = require('express-sslify'); +const logger = require('winston'); + +module.exports = function enforceHttps(forceHttps) { + logger.info(`Enforcing HTTPS connections=${forceHttps}`); + if (!forceHttps) { + return (req, res, next) => next(); + } + return enforce.HTTPS({ + /** + * Required for Heroku deployed apps + * @see https://www.npmjs.com/package/express-sslify#reverse-proxies-heroku-nodejitsu-and-others + */ + trustProtoHeader: true, + }); +}; From a9e3cbeeab826d1a44091de11a07f3c5ad5322e6 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 16:14:37 -0500 Subject: [PATCH 10/36] added tests for the enforce-https middleware --- test/lib/middleware/enforce-https.test.js | 53 +++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 test/lib/middleware/enforce-https.test.js diff --git a/test/lib/middleware/enforce-https.test.js b/test/lib/middleware/enforce-https.test.js new file mode 100644 index 00000000..b2af4d2f --- /dev/null +++ b/test/lib/middleware/enforce-https.test.js @@ -0,0 +1,53 @@ +'use strict'; + +require('dotenv').config(); + +const test = require('ava'); +const chai = require('chai'); +const sinon = require('sinon'); +const rewire = require('rewire'); +const logger = require('winston'); +const sinonChai = require('sinon-chai'); +const enforce = require('express-sslify'); +const httpMocks = require('node-mocks-http'); + +const stubs = require('../../utils/stubs'); + +chai.should(); +chai.use(sinonChai); + +// module to be tested +const enforceHttpsMiddleware = rewire('../../../lib/middleware/enforce-https'); + +const sandbox = sinon.sandbox.create(); + +test.beforeEach((t) => { + stubs.stubLogger(sandbox, logger); + t.context.req = httpMocks.createRequest(); + t.context.res = httpMocks.createResponse(); +}); + +test.afterEach((t) => { + // reset stubs, spies, and mocks + sandbox.restore(); + t.context = {}; + enforceHttpsMiddleware.__set__('enforce', enforce); +}); + +test('enforceHttpsMiddleware should return dummy function that always calls next if forceHttps is false', (t) => { + const forceHttps = false; + const middleware = enforceHttpsMiddleware(forceHttps); + const next = sinon.stub(); + + middleware(t.context.req, t.context.res, next); + next.should.have.been.called; +}); + +test('enforceHttpsMiddleware should return a function that enforces HTTPS if forceHttps is true', () => { + const forceHttps = true; + const enforceStub = { HTTPS: sinon.stub() }; + enforceHttpsMiddleware.__set__('enforce', enforceStub); + enforceHttpsMiddleware(forceHttps); + + enforceStub.HTTPS.should.have.been.calledWith({ trustProtoHeader: true }); +}); From 54ad33bd0395255029419f7c923bf392c4067ba9 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 17:08:44 -0500 Subject: [PATCH 11/36] added thor env override so the staging environment also enforces https --- config/env/thor.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/env/thor.js diff --git a/config/env/thor.js b/config/env/thor.js new file mode 100644 index 00000000..d1d89009 --- /dev/null +++ b/config/env/thor.js @@ -0,0 +1,7 @@ +'use strict'; + +const configVars = { + forceHttps: true, +}; + +module.exports = configVars; From 2dac246d1948e10a8cd0cd123ccd2b1aeda2a9d2 Mon Sep 17 00:00:00 2001 From: Rafa Date: Mon, 6 Aug 2018 18:25:48 -0500 Subject: [PATCH 12/36] upgraded old newrelic package which has a dependency vulnerability --- package-lock.json | 67 ++++++++++++++++++++++++++++------------------- package.json | 4 +-- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6cc0c5f2..449f22dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -303,9 +303,9 @@ } }, "@newrelic/native-metrics": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@newrelic/native-metrics/-/native-metrics-2.4.0.tgz", - "integrity": "sha512-6Pv2Z9vkinr0MTnH1BORBs/SFOdKei43tQo2z30h9NtTc1pmWb/n5VWjgp7ReZ7FwzTI2oIhjbgnk2gZzpl6bw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@newrelic/native-metrics/-/native-metrics-3.1.0.tgz", + "integrity": "sha512-45OhFKiRT5L+hBzAkDkR5UTuHWIUNMjwlMlu65Y8HmyrTPtgUMKoqMmHERRX4aRqb/EEaW3oWYYLOpLnB6fiHg==", "optional": true, "requires": { "nan": "2.10.0" @@ -345,6 +345,11 @@ "samsam": "1.3.0" } }, + "@tyriar/fibonacci-heap": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@tyriar/fibonacci-heap/-/fibonacci-heap-2.0.7.tgz", + "integrity": "sha512-DANf9u0VN5oWrRk31B+xCy9mMNx1H9YhWUaTzCzU0uBruj/zg8u9JSw5qpArntvfJxaW/gWGWbQtzpAkYO6VBg==" + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -383,9 +388,12 @@ } }, "agent-base": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz", - "integrity": "sha1-aJDT+yFwBLYrcPiSjg+uX4lSpwY=" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "requires": { + "es6-promisify": "5.0.0" + } }, "ajv": { "version": "5.5.2", @@ -2903,6 +2911,21 @@ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q=" }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "requires": { + "es6-promise": "4.2.4" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", + "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" + } + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -4469,23 +4492,12 @@ } }, "https-proxy-agent": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz", - "integrity": "sha1-cT+jjl01P1DrFKNC/r4pAz7RYZs=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "requires": { - "agent-base": "1.0.2", - "debug": "2.6.9", - "extend": "3.0.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } + "agent-base": "4.2.1", + "debug": "3.1.0" } }, "hullabaloo-config-manager": { @@ -5687,15 +5699,16 @@ "dev": true }, "newrelic": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/newrelic/-/newrelic-3.2.0.tgz", - "integrity": "sha1-eMSmFrLPRYT9v7M7gH+rbdLAsMA=", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/newrelic/-/newrelic-4.7.0.tgz", + "integrity": "sha512-p8nOFgyPlShhk3MK4EZVE5GumxSubaUdQFzOCmu+zmbDOrZuYFmmLGUccjezfODpnC6K/htxZKAzPoZtrn98+g==", "requires": { "@newrelic/koa": "1.0.5", - "@newrelic/native-metrics": "2.4.0", + "@newrelic/native-metrics": "3.1.0", + "@tyriar/fibonacci-heap": "2.0.7", "async": "2.6.1", "concat-stream": "1.6.2", - "https-proxy-agent": "0.3.6", + "https-proxy-agent": "2.2.1", "json-stringify-safe": "5.0.1", "readable-stream": "2.3.6", "semver": "5.5.0" diff --git a/package.json b/package.json index 01e952d8..38025889 100644 --- a/package.json +++ b/package.json @@ -54,12 +54,12 @@ "connect-timeout": "^1.8.0", "contentful": "^3.8.0", "date-fns": "^1.29.0", - "express": "^4.10.2", + "express": "^4.16.3", "express-sslify": "^1.2.0", "file-exists": "^4.0.0", "html-entities": "^1.1.1", "mongoose": "4.6.8", - "newrelic": "3.2.0", + "newrelic": "4.7.0", "path": "~0.4.9", "redis": "^2.8.0", "s3-upload-stream": "^1.0.7", From 968fc9de85b8d4e378a07d6be1acac1a3078622a Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 14:43:08 -0700 Subject: [PATCH 13/36] Renames as askYesNo --- config/lib/helpers/broadcast.js | 14 ++++++--- config/lib/helpers/topic.js | 4 +-- documentation/endpoints/topics.md | 5 ++- lib/helpers/broadcast.js | 8 ++++- lib/helpers/contentfulEntry.js | 7 +++++ test/lib/lib-helpers/broadcast.test.js | 24 +++++++++----- .../factories/contentful/askChangeTopic.js | 31 +++++++++++++++++++ 7 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 test/utils/factories/contentful/askChangeTopic.js diff --git a/config/lib/helpers/broadcast.js b/config/lib/helpers/broadcast.js index 76da825f..c499aec6 100644 --- a/config/lib/helpers/broadcast.js +++ b/config/lib/helpers/broadcast.js @@ -2,20 +2,26 @@ module.exports = { contentTypes: { - askChangeTopicBroadcast: { - type: 'askChangeTopicBroadcast', + askYesNo: { + type: 'askYesNo', templates: [ - 'declinedChangeTopic', - 'invalidAskChangeTopicResponse', + 'saidYes', + 'saidNo', + 'invalidAskYesNoResponse', 'autoReply', ], }, + // TODO: Deprecate this type? if an externalPostConfig didn't require a campaign, a campaignless + // externalPostConfig seems it could take the place of our survey_response Rivescript topic. autoReplyBroadcast: { type: 'autoReplyBroadcast', templates: [ 'autoReply', ], }, + // Ideally we'd backfill all legacy entries as their new types, but we likely can't change the + // the type of a Contentful entry without changing its id (if that's the case - we'd need to + // bulk update all documents in the Conversations messages DB) legacy: { type: 'broadcast', templates: [], diff --git a/config/lib/helpers/topic.js b/config/lib/helpers/topic.js index 6906937e..b176cb70 100644 --- a/config/lib/helpers/topic.js +++ b/config/lib/helpers/topic.js @@ -2,8 +2,8 @@ // @see documentation/endpoints/topics const contentTypes = { - askChangeTopicBroadcast: { - type: 'askChangeTopicBroadcast', + askChangeTopic: { + type: 'askChangeTopic', isBroadcast: true, postType: null, }, diff --git a/documentation/endpoints/topics.md b/documentation/endpoints/topics.md index d88ff3db..27760e78 100644 --- a/documentation/endpoints/topics.md +++ b/documentation/endpoints/topics.md @@ -10,8 +10,11 @@ A conversation topic may be set to one of the following Contentful content types ### Broadcast topics + +[under construction](https://i.amz.mshcdn.com/xxwMNSb7PAnpcIOmwhIU1dh80SA=/fit-in/1200x9600/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F168421%2Ftumblr_ks4m18IymX1qz4u07o1_250.gif) + * `autoReplyBroadcast` - replies with an `autoReply` template after sending an outbound broadcast -* `askChangeTopicBroadcast` - [under construction](https://i.amz.mshcdn.com/xxwMNSb7PAnpcIOmwhIU1dh80SA=/fit-in/1200x9600/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F168421%2Ftumblr_ks4m18IymX1qz4u07o1_250.gif) +* `askChangeTopic` - asks yes/no question Fields: diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index f37b4da8..09096a04 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -119,6 +119,9 @@ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { // Another note: the new broadcast content types will reference a topic Contentful entry, not // a campaign Contentful entry -- eventually topic will be returned as a nested object. data.campaignId = null; + // TODO: Return this as an object once Conversations is updated to check if topic is an object + // first before checking it as a string. This will be removed when we're no longer dependent on + // the legacy broadcast content type. data.topic = hardcodedTopic; data.message.template = 'rivescript'; } else { @@ -135,7 +138,9 @@ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { * @return {Object} */ function parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { - const broadcastMessageEntry = contentfulEntry.fields.broadcast; + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); + const broadcastMessageEntry = contentfulEntry.fields[contentType]; + if (!broadcastMessageEntry) { return null; } @@ -153,6 +158,7 @@ function parseTemplatesFromContentfulEntryAndFieldNames(contentfulEntry, fieldNa if (!contentfulEntry) { return data; } + fieldNames.forEach((fieldName) => { const messageEntry = contentfulEntry.fields[fieldName]; if (!messageEntry) { diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 39b843ce..1b26f48c 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -42,6 +42,13 @@ function parseContentfulEntry(contentfulEntry) { * @return {Object} */ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); + if (contentType !== 'message') { + return { + template: 'changeTopic', + topic: contentful.getContentTypeFromContentfulEntry(contentfulEntry), + }; + } return { text: contentful.getTextFromMessage(contentfulEntry), attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index dc44c6b0..d7499110 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -10,7 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const helpers = require('../../../lib/helpers'); const stubs = require('../../utils/stubs'); -const autoReplyBroadcastEntryFactory = require('../../utils/factories/contentful/autoReplyBroadcast'); +const askChangeTopicEntryFactory = require('../../utils/factories/contentful/askChangeTopic'); const broadcastEntryFactory = require('../../utils/factories/contentful/broadcast'); const broadcastFactory = require('../../utils/factories/broadcast'); @@ -20,8 +20,9 @@ const broadcastId = stubs.getContentfulId(); const broadcastEntry = broadcastEntryFactory.getValidCampaignBroadcast(); const broadcast = broadcastFactory.getValidCampaignBroadcast(); const broadcastName = stubs.getBroadcastName(); -const broadcastType = 'broadcast'; +const broadcastType = 'askChangeTopic'; const campaignId = stubs.getCampaignId(); +const legacyBroadcastType = 'broadcast'; // Module to test const broadcastHelper = require('../../../lib/helpers/broadcast'); @@ -34,8 +35,6 @@ const sandbox = sinon.sandbox.create(); test.beforeEach(() => { sandbox.stub(contentful, 'getContentfulIdFromContentfulEntry') .returns(broadcastId); - sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') - .returns(broadcastType); sandbox.stub(contentful, 'getNameTextFromContentfulEntry') .returns(broadcastName); sandbox.stub(contentful, 'getCampaignIdFromContentfulEntry') @@ -57,6 +56,8 @@ test('fetch returns contentful.fetchByContentTypes parsed as broadcast objects', .returns(Promise.resolve(fetchEntriesResult)); sandbox.stub(broadcastHelper, 'parseBroadcastFromContentfulEntry') .returns(Promise.resolve(broadcast)); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(broadcastType); const result = await broadcastHelper.fetch(); @@ -86,6 +87,8 @@ test('fetchById returns contentful.fetchByContentfulId parsed as broadcast objec .returns(Promise.resolve(fetchEntryResult)); sandbox.stub(broadcastHelper, 'parseBroadcastFromContentfulEntry') .returns(Promise.resolve(broadcast)); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(broadcastType); const result = await broadcastHelper.fetchById(broadcastId); contentful.fetchByContentfulId.should.have.been.calledWith(broadcastId); @@ -139,14 +142,16 @@ test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns null if co }); test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessageTemplateFromContentfulEntryAndTemplateName', () => { - const autoReplyBroadcast = autoReplyBroadcastEntryFactory.getValidAutoReplyBroadcast(); + const askChangeTopic = askChangeTopicEntryFactory.getValidAskChangeTopic(); const templateName = stubs.getRandomWord(); const messageTemplate = { text: stubs.getRandomMessageText(), template: templateName }; sandbox.stub(helpers.contentfulEntry, 'getMessageTemplateFromContentfulEntryAndTemplateName') .returns(messageTemplate); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(broadcastType); const result = broadcastHelper - .parseBroadcastMessageFromContentfulEntryAndTemplateName(autoReplyBroadcast, templateName); + .parseBroadcastMessageFromContentfulEntryAndTemplateName(askChangeTopic, templateName); result.should.equal(messageTemplate); }); @@ -154,12 +159,14 @@ test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessage test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', async (t) => { sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') .returns(attachments); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(legacyBroadcastType); const result = await broadcastHelper.parseLegacyBroadcastFromContentfulEntry(broadcastEntry); contentful.getContentfulIdFromContentfulEntry.should.have.been.calledWith(broadcastEntry); result.id.should.equal(broadcastId); contentful.getContentTypeFromContentfulEntry.should.have.been.calledWith(broadcastEntry); - result.type.should.equal(broadcastType); + result.type.should.equal(legacyBroadcastType); contentful.getNameTextFromContentfulEntry.should.have.been.calledWith(broadcastEntry); result.name.should.equal(broadcastName); t.is(result.topic, null); @@ -172,12 +179,15 @@ test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic test('parseLegacyBroadcastFromContentfulEntry returns an object with null campaignId if hardcoded topic broadcast', async (t) => { const hardcodedTopicBroadcastEntry = broadcastEntryFactory.getValidTopicBroadcast(); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(legacyBroadcastType); const result = await broadcastHelper .parseLegacyBroadcastFromContentfulEntry(hardcodedTopicBroadcastEntry); contentful.getContentfulIdFromContentfulEntry .should.have.been.calledWith(hardcodedTopicBroadcastEntry); result.id.should.equal(broadcastId); + result.type.should.equal(legacyBroadcastType); contentful.getNameTextFromContentfulEntry .should.have.been.calledWith(hardcodedTopicBroadcastEntry); result.name.should.equal(broadcastName); diff --git a/test/utils/factories/contentful/askChangeTopic.js b/test/utils/factories/contentful/askChangeTopic.js new file mode 100644 index 00000000..fbffdd84 --- /dev/null +++ b/test/utils/factories/contentful/askChangeTopic.js @@ -0,0 +1,31 @@ +'use strict'; + +const stubs = require('../../stubs'); +const messageFactory = require('./message'); +const textPostConfigFactory = require('./textPostConfig'); + +function getValidAskChangeTopic() { + const data = { + sys: { + id: stubs.getContentfulId(), + contentType: { + sys: { + id: 'askChangeTopic', + }, + }, + }, + fields: { + name: stubs.getBroadcastName(), + topic: textPostConfigFactory.getValidTextPostConfig(), + askChangeTopic: messageFactory.getValidMessage(), + invalidAskChangeTopicResponse: messageFactory.getValidMessage(), + saidNo: messageFactory.getValidMessage(), + saidNoAutoReply: messageFactory.getValidMessage(), + }, + }; + return data; +} + +module.exports = { + getValidAskChangeTopic, +}; From feba5eb6b6c9d659222ccb3780e79e7e1c4be7c7 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 17:14:22 -0700 Subject: [PATCH 14/36] Returns non-message templates as changeTopic templates --- config/lib/helpers/topic.js | 4 ++-- documentation/endpoints/topics.md | 2 +- lib/helpers/broadcast.js | 21 ++------------------- lib/helpers/contentfulEntry.js | 20 +++++++++++++++++++- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/config/lib/helpers/topic.js b/config/lib/helpers/topic.js index b176cb70..c9e8f271 100644 --- a/config/lib/helpers/topic.js +++ b/config/lib/helpers/topic.js @@ -2,8 +2,8 @@ // @see documentation/endpoints/topics const contentTypes = { - askChangeTopic: { - type: 'askChangeTopic', + askYesNo: { + type: 'askYesNo', isBroadcast: true, postType: null, }, diff --git a/documentation/endpoints/topics.md b/documentation/endpoints/topics.md index 27760e78..c7fecdf2 100644 --- a/documentation/endpoints/topics.md +++ b/documentation/endpoints/topics.md @@ -14,7 +14,7 @@ A conversation topic may be set to one of the following Contentful content types [under construction](https://i.amz.mshcdn.com/xxwMNSb7PAnpcIOmwhIU1dh80SA=/fit-in/1200x9600/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F168421%2Ftumblr_ks4m18IymX1qz4u07o1_250.gif) * `autoReplyBroadcast` - replies with an `autoReply` template after sending an outbound broadcast -* `askChangeTopic` - asks yes/no question +* `askYesNo` - asks yes/no question Fields: diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 09096a04..3e1d87f8 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -60,22 +60,6 @@ function getById(broadcastId, resetCache = false) { }); } -/** - * @param {Object} contentfulEntry - * @return {Object} - */ -function parseBroadcastInfoFromContentfulEntry(contentfulEntry) { - const result = { - id: contentful.getContentfulIdFromContentfulEntry(contentfulEntry), - name: contentful.getNameTextFromContentfulEntry(contentfulEntry), - type: contentful.getContentTypeFromContentfulEntry(contentfulEntry), - createdAt: contentfulEntry.sys.createdAt, - updatedAt: contentfulEntry.sys.updatedAt, - }; - logger.debug('parseBroadcastInfoFromContentfulEntry', { result }); - return result; -} - /** * @param {Object} contentfulEntry * @return {Promise} @@ -90,7 +74,7 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { return module.exports.parseLegacyBroadcastFromContentfulEntry(contentfulEntry); } - const data = module.exports.parseBroadcastInfoFromContentfulEntry(contentfulEntry); + const data = helpers.contentfulEntry.getNameInfoFromContentfulEntry(contentfulEntry); const message = module.exports .parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, contentType); const fieldNames = contentTypeConfigs[contentType].templates; @@ -108,7 +92,7 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { * @return {Promise} */ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { - const data = module.exports.parseBroadcastInfoFromContentfulEntry(contentfulEntry); + const data = helpers.contentfulEntry.getNameInfoFromContentfulEntry(contentfulEntry); data.message = { text: contentfulEntry.fields.message, attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), @@ -176,7 +160,6 @@ module.exports = { getById, getContentTypes, parseBroadcastFromContentfulEntry, - parseBroadcastInfoFromContentfulEntry, parseBroadcastMessageFromContentfulEntryAndTemplateName, parseLegacyBroadcastFromContentfulEntry, parseTemplatesFromContentfulEntryAndFieldNames, diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 1b26f48c..dc1bf212 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -1,5 +1,6 @@ 'use strict'; +const logger = require('winston'); const contentful = require('../contentful'); const helpers = require('../helpers'); @@ -36,6 +37,22 @@ function parseContentfulEntry(contentfulEntry) { return Promise.resolve(contentfulEntry); } +/** + * @param {Object} contentfulEntry + * @return {Object} + */ +function getNameInfoFromContentfulEntry(contentfulEntry) { + const result = { + id: contentful.getContentfulIdFromContentfulEntry(contentfulEntry), + name: contentful.getNameTextFromContentfulEntry(contentfulEntry), + type: contentful.getContentTypeFromContentfulEntry(contentfulEntry), + createdAt: contentfulEntry.sys.createdAt, + updatedAt: contentfulEntry.sys.updatedAt, + }; + logger.debug('parseNameInfoFromContentfulEntry', { result }); + return result; +} + /** * @param {Object} contentfulEntry * @param {String} templateName @@ -46,7 +63,7 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t if (contentType !== 'message') { return { template: 'changeTopic', - topic: contentful.getContentTypeFromContentfulEntry(contentfulEntry), + topic: module.exports.getNameInfoFromContentfulEntry(contentfulEntry), }; } return { @@ -59,5 +76,6 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t module.exports = { getById, getMessageTemplateFromContentfulEntryAndTemplateName, + getNameInfoFromContentfulEntry, parseContentfulEntry, }; From 8974ca56f7616aa2660346dfdd24426c25997605 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 17:17:54 -0700 Subject: [PATCH 15/36] Updates tests --- test/lib/lib-helpers/broadcast.test.js | 8 +-- test/lib/lib-helpers/contentfulEntry.test.js | 51 +++++++++++++++++++ .../factories/contentful/askChangeTopic.js | 31 ----------- test/utils/factories/contentful/askYesNo.js | 24 +++++++++ test/utils/stubs.js | 19 +++++++ 5 files changed, 98 insertions(+), 35 deletions(-) create mode 100644 test/lib/lib-helpers/contentfulEntry.test.js delete mode 100644 test/utils/factories/contentful/askChangeTopic.js create mode 100644 test/utils/factories/contentful/askYesNo.js diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index d7499110..90fc5633 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -10,7 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const helpers = require('../../../lib/helpers'); const stubs = require('../../utils/stubs'); -const askChangeTopicEntryFactory = require('../../utils/factories/contentful/askChangeTopic'); +const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); const broadcastEntryFactory = require('../../utils/factories/contentful/broadcast'); const broadcastFactory = require('../../utils/factories/broadcast'); @@ -20,7 +20,7 @@ const broadcastId = stubs.getContentfulId(); const broadcastEntry = broadcastEntryFactory.getValidCampaignBroadcast(); const broadcast = broadcastFactory.getValidCampaignBroadcast(); const broadcastName = stubs.getBroadcastName(); -const broadcastType = 'askChangeTopic'; +const broadcastType = 'askYesNo'; const campaignId = stubs.getCampaignId(); const legacyBroadcastType = 'broadcast'; @@ -142,7 +142,7 @@ test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns null if co }); test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessageTemplateFromContentfulEntryAndTemplateName', () => { - const askChangeTopic = askChangeTopicEntryFactory.getValidAskChangeTopic(); + const askYesNo = askYesNoEntryFactory.getValidAskYesNo(); const templateName = stubs.getRandomWord(); const messageTemplate = { text: stubs.getRandomMessageText(), template: templateName }; sandbox.stub(helpers.contentfulEntry, 'getMessageTemplateFromContentfulEntryAndTemplateName') @@ -151,7 +151,7 @@ test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessage .returns(broadcastType); const result = broadcastHelper - .parseBroadcastMessageFromContentfulEntryAndTemplateName(askChangeTopic, templateName); + .parseBroadcastMessageFromContentfulEntryAndTemplateName(askYesNo, templateName); result.should.equal(messageTemplate); }); diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js new file mode 100644 index 00000000..4408e87f --- /dev/null +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -0,0 +1,51 @@ +'use strict'; + +require('dotenv').config(); + +const test = require('ava'); +const chai = require('chai'); +const sinonChai = require('sinon-chai'); +const sinon = require('sinon'); + +const contentful = require('../../../lib/contentful'); +const stubs = require('../../utils/stubs'); +const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); + +// stubs +const stubEntryDate = Date.now(); +const stubEntry = askYesNoEntryFactory.getValidAskYesNo(stubEntryDate); +const stubEntryId = stubs.getContentfulId(); +const stubContentType = stubs.getTopicContentType(); +const stubNameText = stubs.getBroadcastName(); + +// Module to test +const contentfulEntryHelper = require('../../../lib/helpers/contentfulEntry'); + +chai.should(); +chai.use(sinonChai); + + +const sandbox = sinon.sandbox.create(); + +test.beforeEach(() => { + sandbox.stub(contentful, 'getContentfulIdFromContentfulEntry') + .returns(stubEntryId); + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(stubContentType); + sandbox.stub(contentful, 'getNameTextFromContentfulEntry') + .returns(stubNameText); +}); + +test.afterEach(() => { + sandbox.restore(); +}); + +// getNameInfoFromContentfulEntry +test('getNameInfoFromContentfulEntry returns an object with name and type properties', () => { + const result = contentfulEntryHelper.getNameInfoFromContentfulEntry(stubEntry); + result.id.should.equal(stubEntryId); + result.type.should.equal(stubContentType); + result.name.should.equal(stubNameText); + result.createdAt.should.equal(stubEntryDate); + result.updatedAt.should.equal(stubEntryDate); +}); diff --git a/test/utils/factories/contentful/askChangeTopic.js b/test/utils/factories/contentful/askChangeTopic.js deleted file mode 100644 index fbffdd84..00000000 --- a/test/utils/factories/contentful/askChangeTopic.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -const stubs = require('../../stubs'); -const messageFactory = require('./message'); -const textPostConfigFactory = require('./textPostConfig'); - -function getValidAskChangeTopic() { - const data = { - sys: { - id: stubs.getContentfulId(), - contentType: { - sys: { - id: 'askChangeTopic', - }, - }, - }, - fields: { - name: stubs.getBroadcastName(), - topic: textPostConfigFactory.getValidTextPostConfig(), - askChangeTopic: messageFactory.getValidMessage(), - invalidAskChangeTopicResponse: messageFactory.getValidMessage(), - saidNo: messageFactory.getValidMessage(), - saidNoAutoReply: messageFactory.getValidMessage(), - }, - }; - return data; -} - -module.exports = { - getValidAskChangeTopic, -}; diff --git a/test/utils/factories/contentful/askYesNo.js b/test/utils/factories/contentful/askYesNo.js new file mode 100644 index 00000000..6a79e1c3 --- /dev/null +++ b/test/utils/factories/contentful/askYesNo.js @@ -0,0 +1,24 @@ +'use strict'; + +const stubs = require('../../stubs'); +const messageFactory = require('./message'); +const textPostConfigFactory = require('./textPostConfig'); + +function getValidAskYesNo(date = Date.now()) { + const data = { + sys: stubs.contentful.getSysWithTypeAndDate('askYesNo', date), + fields: { + name: stubs.getBroadcastName(), + askYesNo: messageFactory.getValidMessage(), + saidYes: textPostConfigFactory.getValidTextPostConfig(), + saidNo: messageFactory.getValidMessage(), + invalidAskYesNoResponse: messageFactory.getValidMessage(), + saidNoAutoReply: messageFactory.getValidMessage(), + }, + }; + return data; +} + +module.exports = { + getValidAskYesNo, +}; diff --git a/test/utils/stubs.js b/test/utils/stubs.js index c666b9b6..b5518fd0 100644 --- a/test/utils/stubs.js +++ b/test/utils/stubs.js @@ -288,6 +288,25 @@ module.exports = { const result = require(`${path}get-entries-${contentType}.json`); return result; }, + /** + * Returns a mock sys property of an item in a Contentful getEnries response. + * + * @param {String} contentType + * @param {Date} date + * @return {Object} + */ + getSysWithTypeAndDate: function getSysWithTypeAndDate(contentType, date = Date.now()) { + return { + id: module.exports.getContentfulId(), + contentType: { + sys: { + id: contentType, + }, + }, + createdAt: date, + updatedAt: date, + }; + }, }, getJSONstub: function getJSONstub(name, category = 'contentful') { const path = `../stubs/${category}/`; From b99f07d37889ba9bc790ad6c53e75810f553060d Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 22:06:59 -0700 Subject: [PATCH 16/36] Moves isMessage into contentfulEntry helper --- lib/contentful.js | 8 -------- lib/helpers/contentfulEntry.js | 13 +++++++++++-- lib/helpers/defaultTopicTrigger.js | 2 +- test/lib/lib-helpers/contentfulEntry.test.js | 13 +++++++++++++ test/utils/factories/contentful/message.js | 9 +-------- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/lib/contentful.js b/lib/contentful.js index 6ca34128..56441f12 100644 --- a/lib/contentful.js +++ b/lib/contentful.js @@ -219,13 +219,6 @@ function isDefaultTopicTrigger(contentfulEntry) { return module.exports.isContentType(contentfulEntry, 'defaultTopicTrigger'); } -/** - * @param {Object} contentfulEntry - * @return {Boolean} - */ -function isMessage(contentfulEntry) { - return module.exports.isContentType(contentfulEntry, 'message'); -} module.exports = { contentfulError, @@ -244,6 +237,5 @@ module.exports = { getTriggerTextFromDefaultTopicTrigger, isContentType, isDefaultTopicTrigger, - isMessage, parseGetEntriesResponse, }; diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index dc1bf212..8b1efd0d 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -59,13 +59,13 @@ function getNameInfoFromContentfulEntry(contentfulEntry) { * @return {Object} */ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { - const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - if (contentType !== 'message') { + if (!module.exports.isMessage(contentfulEntry)) { return { template: 'changeTopic', topic: module.exports.getNameInfoFromContentfulEntry(contentfulEntry), }; } + return { text: contentful.getTextFromMessage(contentfulEntry), attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), @@ -73,9 +73,18 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t }; } +/** + * @param {Object} contentfulEntry + * @return {Boolean} + */ +function isMessage(contentfulEntry) { + return contentful.isContentType(contentfulEntry, 'message'); +} + module.exports = { getById, getMessageTemplateFromContentfulEntryAndTemplateName, getNameInfoFromContentfulEntry, + isMessage, parseContentfulEntry, }; diff --git a/lib/helpers/defaultTopicTrigger.js b/lib/helpers/defaultTopicTrigger.js index e30c8111..62dd1f9e 100644 --- a/lib/helpers/defaultTopicTrigger.js +++ b/lib/helpers/defaultTopicTrigger.js @@ -107,7 +107,7 @@ function parseDefaultTopicTriggerFromContentfulEntry(contentfulEntry) { return Promise.resolve(data); } - if (contentful.isMessage(responseEntry)) { + if (helpers.contentfulEntry.isMessage(responseEntry)) { data.reply = contentful.getTextFromMessage(responseEntry); return Promise.resolve(data); } diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 4408e87f..8b7c6d29 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -49,3 +49,16 @@ test('getNameInfoFromContentfulEntry returns an object with name and type proper result.createdAt.should.equal(stubEntryDate); result.updatedAt.should.equal(stubEntryDate); }); + +// isMessage +test('isMessage returns true if contentful.isContentType result with args entry and message', (t) => { + sandbox.stub(contentful, 'isContentType') + .returns(true); + t.truthy(contentfulEntryHelper.isMessage(stubEntry)); +}); + +test('isMessage returns false if not contentful.isContentType result with args entry and message ', (t) => { + sandbox.stub(contentful, 'isContentType') + .returns(false); + t.falsy(contentfulEntryHelper.isMessage(stubEntry)); +}); diff --git a/test/utils/factories/contentful/message.js b/test/utils/factories/contentful/message.js index 5e00ce6c..d13fdb6b 100644 --- a/test/utils/factories/contentful/message.js +++ b/test/utils/factories/contentful/message.js @@ -4,14 +4,7 @@ const stubs = require('../../stubs'); function getValidMessage() { const data = { - sys: { - id: stubs.getContentfulId(), - contentType: { - sys: { - id: 'message', - }, - }, - }, + sys: stubs.contentful.getSysWithTypeAndDate('message'), fields: { text: stubs.getRandomMessageText(), attachments: [ From 8fade1705a4763230a8756117560dabbb8b2e7cc Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 22:13:08 -0700 Subject: [PATCH 17/36] Renames as getSummaryFromContentfulEntry --- lib/helpers/broadcast.js | 4 ++-- lib/helpers/contentfulEntry.js | 6 +++--- test/lib/lib-helpers/contentfulEntry.test.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 3e1d87f8..55ebd44e 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -74,7 +74,7 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { return module.exports.parseLegacyBroadcastFromContentfulEntry(contentfulEntry); } - const data = helpers.contentfulEntry.getNameInfoFromContentfulEntry(contentfulEntry); + const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); const message = module.exports .parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, contentType); const fieldNames = contentTypeConfigs[contentType].templates; @@ -92,7 +92,7 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { * @return {Promise} */ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { - const data = helpers.contentfulEntry.getNameInfoFromContentfulEntry(contentfulEntry); + const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); data.message = { text: contentfulEntry.fields.message, attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 8b1efd0d..a91fde80 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -41,7 +41,7 @@ function parseContentfulEntry(contentfulEntry) { * @param {Object} contentfulEntry * @return {Object} */ -function getNameInfoFromContentfulEntry(contentfulEntry) { +function getSummaryFromContentfulEntry(contentfulEntry) { const result = { id: contentful.getContentfulIdFromContentfulEntry(contentfulEntry), name: contentful.getNameTextFromContentfulEntry(contentfulEntry), @@ -62,7 +62,7 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t if (!module.exports.isMessage(contentfulEntry)) { return { template: 'changeTopic', - topic: module.exports.getNameInfoFromContentfulEntry(contentfulEntry), + topic: module.exports.getSummaryFromContentfulEntry(contentfulEntry), }; } @@ -84,7 +84,7 @@ function isMessage(contentfulEntry) { module.exports = { getById, getMessageTemplateFromContentfulEntryAndTemplateName, - getNameInfoFromContentfulEntry, + getSummaryFromContentfulEntry, isMessage, parseContentfulEntry, }; diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 8b7c6d29..799c2a56 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -40,9 +40,9 @@ test.afterEach(() => { sandbox.restore(); }); -// getNameInfoFromContentfulEntry -test('getNameInfoFromContentfulEntry returns an object with name and type properties', () => { - const result = contentfulEntryHelper.getNameInfoFromContentfulEntry(stubEntry); +// getSummaryFromContentfulEntry +test('getSummaryFromContentfulEntry returns an object with name and type properties', () => { + const result = contentfulEntryHelper.getSummaryFromContentfulEntry(stubEntry); result.id.should.equal(stubEntryId); result.type.should.equal(stubContentType); result.name.should.equal(stubNameText); From 4692a91ff4e7dd8bbca0eb51e3a8f73ea8652d1e Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Mon, 6 Aug 2018 23:01:33 -0700 Subject: [PATCH 18/36] Moves isDefaultTopicTrigger into contentfulEntry helper --- lib/contentful.js | 10 --------- lib/helpers/contentfulEntry.js | 9 ++++++++ lib/helpers/defaultTopicTrigger.js | 2 +- test/lib/lib-helpers/contentfulEntry.test.js | 22 +++++++++++++++++++- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/lib/contentful.js b/lib/contentful.js index 56441f12..ee3f7c29 100644 --- a/lib/contentful.js +++ b/lib/contentful.js @@ -211,15 +211,6 @@ function isContentType(contentfulEntry, contentTypeName) { return contentType === contentTypeName; } -/** - * @param {Object} contentfulEntry - * @return {Boolean} - */ -function isDefaultTopicTrigger(contentfulEntry) { - return module.exports.isContentType(contentfulEntry, 'defaultTopicTrigger'); -} - - module.exports = { contentfulError, createNewClient, @@ -236,6 +227,5 @@ module.exports = { getTextFromMessage, getTriggerTextFromDefaultTopicTrigger, isContentType, - isDefaultTopicTrigger, parseGetEntriesResponse, }; diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index a91fde80..f750f17d 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -73,6 +73,14 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t }; } +/** + * @param {Object} contentfulEntry + * @return {Boolean} + */ +function isDefaultTopicTrigger(contentfulEntry) { + return contentful.isContentType(contentfulEntry, 'defaultTopicTrigger'); +} + /** * @param {Object} contentfulEntry * @return {Boolean} @@ -85,6 +93,7 @@ module.exports = { getById, getMessageTemplateFromContentfulEntryAndTemplateName, getSummaryFromContentfulEntry, + isDefaultTopicTrigger, isMessage, parseContentfulEntry, }; diff --git a/lib/helpers/defaultTopicTrigger.js b/lib/helpers/defaultTopicTrigger.js index 62dd1f9e..b9b72f3d 100644 --- a/lib/helpers/defaultTopicTrigger.js +++ b/lib/helpers/defaultTopicTrigger.js @@ -102,7 +102,7 @@ function parseDefaultTopicTriggerFromContentfulEntry(contentfulEntry) { return Promise.resolve(null); } - if (contentful.isDefaultTopicTrigger(responseEntry)) { + if (helpers.contentfulEntry.isDefaultTopicTrigger(responseEntry)) { data.redirect = contentful.getTriggerTextFromDefaultTopicTrigger(responseEntry); return Promise.resolve(data); } diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 799c2a56..53623304 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -50,13 +50,33 @@ test('getSummaryFromContentfulEntry returns an object with name and type propert result.updatedAt.should.equal(stubEntryDate); }); +// isDefaultTopicTrigger +test('isDefaultTopicTrigger is truthy if contentful.isContentType', (t) => { + sandbox.stub(contentful, 'isContentType') + .returns(true); + t.truthy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); +}); + +test('isDefaultTopicTrigger is falsy if not contentful.isContentType', (t) => { + sandbox.stub(contentful, 'isContentType') + .returns(false); + t.falsy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); +}); + + // isMessage -test('isMessage returns true if contentful.isContentType result with args entry and message', (t) => { +test('isMessage is truthy if contentful.isContentType', (t) => { sandbox.stub(contentful, 'isContentType') .returns(true); t.truthy(contentfulEntryHelper.isMessage(stubEntry)); }); +test('isMessage is falsy if not contentful.isContentType', (t) => { + sandbox.stub(contentful, 'isContentType') + .returns(false); + t.falsy(contentfulEntryHelper.isMessage(stubEntry)); +}); + test('isMessage returns false if not contentful.isContentType result with args entry and message ', (t) => { sandbox.stub(contentful, 'isContentType') .returns(false); From 72de2e2c38f2254dc02904a03d2467564fc61c64 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 09:51:45 -0700 Subject: [PATCH 19/36] Adds topic property to a template for topic changes --- lib/helpers/contentfulEntry.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index f750f17d..d6881e99 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -59,17 +59,13 @@ function getSummaryFromContentfulEntry(contentfulEntry) { * @return {Object} */ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { - if (!module.exports.isMessage(contentfulEntry)) { - return { - template: 'changeTopic', - topic: module.exports.getSummaryFromContentfulEntry(contentfulEntry), - }; - } - + const topicRef = contentfulEntry.fields.topic; + const topic = topicRef ? { id: contentful.getContentfulIdFromContentfulEntry(topicRef) } : null; return { text: contentful.getTextFromMessage(contentfulEntry), attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), template: templateName, + topic, }; } From 5cb9defb19506d85bbbfd96810d66b1a0c10407f Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 10:03:41 -0700 Subject: [PATCH 20/36] Updates comments --- config/lib/helpers/broadcast.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/lib/helpers/broadcast.js b/config/lib/helpers/broadcast.js index c499aec6..6feb9298 100644 --- a/config/lib/helpers/broadcast.js +++ b/config/lib/helpers/broadcast.js @@ -11,8 +11,6 @@ module.exports = { 'autoReply', ], }, - // TODO: Deprecate this type? if an externalPostConfig didn't require a campaign, a campaignless - // externalPostConfig seems it could take the place of our survey_response Rivescript topic. autoReplyBroadcast: { type: 'autoReplyBroadcast', templates: [ From 80578de512bef9b1311e8c464829593ba44f6836 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 13:32:51 -0700 Subject: [PATCH 21/36] Changes per https://github.com/DoSomething/gambit-campaigns/pull/1070#pullrequestreview-144170830 --- lib/helpers/contentfulEntry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index d6881e99..17890e1a 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -60,7 +60,7 @@ function getSummaryFromContentfulEntry(contentfulEntry) { */ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { const topicRef = contentfulEntry.fields.topic; - const topic = topicRef ? { id: contentful.getContentfulIdFromContentfulEntry(topicRef) } : null; + const topic = topicRef ? { id: contentful.getContentfulIdFromContentfulEntry(topicRef) } : {}; return { text: contentful.getTextFromMessage(contentfulEntry), attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), From ce298870ad6a767cf6754332fa88f08ec5e89393 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 16:35:24 -0700 Subject: [PATCH 22/36] Moves broadcast config into contentfulEntry to DRY --- .../{broadcast.js => contentfulEntry.js} | 14 +++++--- config/lib/helpers/topic.js | 4 +-- lib/helpers/broadcast.js | 36 +++---------------- lib/helpers/contentfulEntry.js | 35 ++++++++++++++++++ 4 files changed, 51 insertions(+), 38 deletions(-) rename config/lib/helpers/{broadcast.js => contentfulEntry.js} (77%) diff --git a/config/lib/helpers/broadcast.js b/config/lib/helpers/contentfulEntry.js similarity index 77% rename from config/lib/helpers/broadcast.js rename to config/lib/helpers/contentfulEntry.js index 6feb9298..f02b1bfb 100644 --- a/config/lib/helpers/broadcast.js +++ b/config/lib/helpers/contentfulEntry.js @@ -4,6 +4,7 @@ module.exports = { contentTypes: { askYesNo: { type: 'askYesNo', + broadcastable: true, templates: [ 'saidYes', 'saidNo', @@ -11,18 +12,23 @@ module.exports = { 'autoReply', ], }, - autoReplyBroadcast: { - type: 'autoReplyBroadcast', + autoReply: { + type: 'autoReply', + broadcastable: false, templates: [ 'autoReply', ], }, + autoReplyBroadcast: { + type: 'autoReplyBroadcast', + broadcastable: true, + }, // Ideally we'd backfill all legacy entries as their new types, but we likely can't change the // the type of a Contentful entry without changing its id (if that's the case - we'd need to // bulk update all documents in the Conversations messages DB) - legacy: { + legacyBroadcast: { type: 'broadcast', - templates: [], + broadcastable: true, }, }, }; diff --git a/config/lib/helpers/topic.js b/config/lib/helpers/topic.js index c9e8f271..b1e3917e 100644 --- a/config/lib/helpers/topic.js +++ b/config/lib/helpers/topic.js @@ -7,8 +7,8 @@ const contentTypes = { isBroadcast: true, postType: null, }, - autoReplyBroadcast: { - type: 'autoReplyBroadcast', + autoReply: { + type: 'autoReply', isBroadcast: true, postType: null, }, diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 55ebd44e..ef8aed61 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -3,14 +3,13 @@ const logger = require('winston'); const contentful = require('../contentful'); const helpers = require('../helpers'); -const config = require('../../config/lib/helpers/broadcast'); /** * @return {Array} */ function getContentTypes() { - const contentTypeConfigs = Object.values(config.contentTypes); - return contentTypeConfigs.map(contentTypeConfig => contentTypeConfig.type); + const configs = Object.values(helpers.contentfulEntry.getContentTypeConfigs()); + return configs.filter(config => config.broadcastable).map(config => config.type); } /** @@ -66,20 +65,16 @@ function getById(broadcastId, resetCache = false) { */ function parseBroadcastFromContentfulEntry(contentfulEntry) { const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - const contentTypeConfigs = config.contentTypes; - // A nice to have TODO is migrating all legacy broadcast entries into the respective new type, so // we can remove check and the function it calls entirely. - if (contentType === contentTypeConfigs.legacy.type) { + if (contentType === 'broadcast') { return module.exports.parseLegacyBroadcastFromContentfulEntry(contentfulEntry); } const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); const message = module.exports .parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, contentType); - const fieldNames = contentTypeConfigs[contentType].templates; - const templates = module.exports - .parseTemplatesFromContentfulEntryAndFieldNames(contentfulEntry, fieldNames); + const templates = helpers.contentfulEntry.getMessageTemplatesFromContentfulEntry(contentfulEntry); return Promise.resolve(Object.assign(data, { message, templates })); } @@ -132,28 +127,6 @@ function parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry .getMessageTemplateFromContentfulEntryAndTemplateName(broadcastMessageEntry, templateName); } -/** - * @param {Object} - * @param {String} - * @return {Object} - */ -function parseTemplatesFromContentfulEntryAndFieldNames(contentfulEntry, fieldNames) { - const data = {}; - if (!contentfulEntry) { - return data; - } - - fieldNames.forEach((fieldName) => { - const messageEntry = contentfulEntry.fields[fieldName]; - if (!messageEntry) { - return; - } - data[fieldName] = helpers.contentfulEntry - .getMessageTemplateFromContentfulEntryAndTemplateName(messageEntry, fieldName); - }); - return data; -} - module.exports = { fetch, fetchById, @@ -162,5 +135,4 @@ module.exports = { parseBroadcastFromContentfulEntry, parseBroadcastMessageFromContentfulEntryAndTemplateName, parseLegacyBroadcastFromContentfulEntry, - parseTemplatesFromContentfulEntryAndFieldNames, }; diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 17890e1a..73b8c9f5 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -3,6 +3,14 @@ const logger = require('winston'); const contentful = require('../contentful'); const helpers = require('../helpers'); +const config = require('../../config/lib/helpers/contentfulEntry'); + +/** + * @return {Array} + */ +function getContentTypeConfigs() { + return config.contentTypes; +} /** * @param {String} contentfulId @@ -69,6 +77,31 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t }; } +/** + * @param {Object} + * @param {String} + * @return {Object} + */ +function getMessageTemplatesFromContentfulEntry(contentfulEntry) { + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); + const fieldNames = config.contentTypes[contentType].templates; + const result = {}; + + if (!contentfulEntry || !fieldNames) { + return result; + } + + fieldNames.forEach((fieldName) => { + const messageEntry = contentfulEntry.fields[fieldName]; + if (!messageEntry) { + return; + } + result[fieldName] = helpers.contentfulEntry + .getMessageTemplateFromContentfulEntryAndTemplateName(messageEntry, fieldName); + }); + return result; +} + /** * @param {Object} contentfulEntry * @return {Boolean} @@ -87,7 +120,9 @@ function isMessage(contentfulEntry) { module.exports = { getById, + getContentTypeConfigs, getMessageTemplateFromContentfulEntryAndTemplateName, + getMessageTemplatesFromContentfulEntry, getSummaryFromContentfulEntry, isDefaultTopicTrigger, isMessage, From 8328a8852aff579734ecf9f5db0a2abd90ab7653 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 18:29:19 -0700 Subject: [PATCH 23/36] Moves topic config.contentTypes into contentfulEntry config to DRY --- config/lib/helpers/contentfulEntry.js | 15 +++++++++ config/lib/helpers/topic.js | 30 ------------------ lib/helpers/contentfulEntry.js | 11 ++++++- lib/helpers/topic.js | 32 +++++++++++++++----- test/lib/lib-helpers/contentfulEntry.test.js | 1 - test/lib/lib-helpers/topic.test.js | 3 +- 6 files changed, 51 insertions(+), 41 deletions(-) diff --git a/config/lib/helpers/contentfulEntry.js b/config/lib/helpers/contentfulEntry.js index f02b1bfb..4781bdc7 100644 --- a/config/lib/helpers/contentfulEntry.js +++ b/config/lib/helpers/contentfulEntry.js @@ -23,6 +23,21 @@ module.exports = { type: 'autoReplyBroadcast', broadcastable: true, }, + externalPostConfig: { + type: 'externalPostConfig', + postType: 'external', + }, + message: { + type: 'message', + }, + photoPostConfig: { + type: 'photoPostConfig', + postType: 'photo', + }, + textPostConfig: { + type: 'textPostConfig', + postType: 'text', + }, // Ideally we'd backfill all legacy entries as their new types, but we likely can't change the // the type of a Contentful entry without changing its id (if that's the case - we'd need to // bulk update all documents in the Conversations messages DB) diff --git a/config/lib/helpers/topic.js b/config/lib/helpers/topic.js index b1e3917e..fe988bfe 100644 --- a/config/lib/helpers/topic.js +++ b/config/lib/helpers/topic.js @@ -1,34 +1,5 @@ 'use strict'; -// @see documentation/endpoints/topics -const contentTypes = { - askYesNo: { - type: 'askYesNo', - isBroadcast: true, - postType: null, - }, - autoReply: { - type: 'autoReply', - isBroadcast: true, - postType: null, - }, - externalPostConfig: { - type: 'externalPostConfig', - isBroadcast: false, - postType: 'external', - }, - photoPostConfig: { - type: 'photoPostConfig', - isBroadcast: false, - postType: 'photo', - }, - textPostConfig: { - type: 'textPostConfig', - isBroadcast: false, - postType: 'text', - }, -}; - const defaultText = { declined: 'Text MENU if you\'d like to find a different action to take.', invalidInput: 'Sorry, I didn\'t get that.', @@ -49,7 +20,6 @@ const photoPostDefaultText = { module.exports = { allTopicsCacheKey: 'all', - contentTypes, defaultPostType: 'photo', /* * Maps each content type with a map of templateNames and its corresponding field name and diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 73b8c9f5..29efbe7e 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -102,6 +102,14 @@ function getMessageTemplatesFromContentfulEntry(contentfulEntry) { return result; } +/** + * @param {Object} contentfulEntry + * @return {Boolean} + */ +function isAutoReply(contentfulEntry) { + return contentful.isContentType(contentfulEntry, config.contentTypes.autoReply.type); +} + /** * @param {Object} contentfulEntry * @return {Boolean} @@ -115,7 +123,7 @@ function isDefaultTopicTrigger(contentfulEntry) { * @return {Boolean} */ function isMessage(contentfulEntry) { - return contentful.isContentType(contentfulEntry, 'message'); + return contentful.isContentType(contentfulEntry, config.contentTypes.message.type); } module.exports = { @@ -124,6 +132,7 @@ module.exports = { getMessageTemplateFromContentfulEntryAndTemplateName, getMessageTemplatesFromContentfulEntry, getSummaryFromContentfulEntry, + isAutoReply, isDefaultTopicTrigger, isMessage, parseContentfulEntry, diff --git a/lib/helpers/topic.js b/lib/helpers/topic.js index 2790072b..0832734c 100644 --- a/lib/helpers/topic.js +++ b/lib/helpers/topic.js @@ -9,8 +9,14 @@ const config = require('../../config/lib/helpers/topic'); * @return {Array} */ function getContentTypes() { - const contentTypeConfigs = Object.values(config.contentTypes); - return contentTypeConfigs.map(contentTypeConfig => contentTypeConfig.type); + const configs = Object.values(helpers.contentfulEntry.getContentTypeConfigs()); + // Return any configs that have templates set, or a postType. + // We'll eventually refactor this config to only check for existence of templates, with each item + // corresponding to a reference field to a message or changeTopicMessage entry, like how it does + // in an askYesNo or autoReply topic (vs a textPostConfig or photoPostConfig, where we're using + // text fields and the fieldName map defined in the topic helper config). + return configs.filter(typeConfig => typeConfig.templates || typeConfig.postType) + .map(typeConfig => typeConfig.type); } /** @@ -155,16 +161,22 @@ function parseTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templa * @param {Object} entry * @return {Object} */ -function parseTemplatesFromContentfulEntryAndCampaign(entry, campaign) { +function parseTemplatesFromContentfulEntryAndCampaign(contentfulEntry, campaign) { + if (helpers.contentfulEntry.isAutoReply(contentfulEntry)) { + return helpers.contentfulEntry.getMessageTemplatesFromContentfulEntry(contentfulEntry); + } + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); const data = {}; - const contentType = contentful.getContentTypeFromContentfulEntry(entry); const templateNames = Object.keys(config.templatesByContentType[contentType]); templateNames.forEach((templateName) => { data[templateName] = module.exports - .parseTemplateFromContentfulEntryAndTemplateName(entry, templateName); - data[templateName].rendered = helpers + .parseTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templateName); + data[templateName].text = helpers .replacePhoenixCampaignVars(data[templateName].raw, campaign); + // TODO: Remove rendered property once Gambit Conversations references text. + data[templateName].rendered = data[templateName].text; }); + return data; } @@ -173,7 +185,8 @@ function parseTemplatesFromContentfulEntryAndCampaign(entry, campaign) { * @return {String} */ function getPostTypeFromContentType(contentType) { - return config.contentTypes[contentType].postType; + const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); + return contentTypeConfigs[contentType].postType; } /** @@ -184,9 +197,12 @@ function parseTopicFromContentfulEntry(contentfulEntry) { const topicId = contentful.getContentfulIdFromContentfulEntry(contentfulEntry); logger.debug('parseTopicFromContentfulEntry', { topicId }); const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - if (config.contentTypes[contentType].isBroadcast) { + const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); + + if (contentTypeConfigs[contentType].broadcastable) { return helpers.broadcast.parseBroadcastFromContentfulEntry(contentfulEntry); } + const data = { id: topicId, name: contentful.getNameTextFromContentfulEntry(contentfulEntry), diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 53623304..24554496 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -63,7 +63,6 @@ test('isDefaultTopicTrigger is falsy if not contentful.isContentType', (t) => { t.falsy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); }); - // isMessage test('isMessage is truthy if contentful.isContentType', (t) => { sandbox.stub(contentful, 'isContentType') diff --git a/test/lib/lib-helpers/topic.test.js b/test/lib/lib-helpers/topic.test.js index 20c4b216..d891e4e7 100644 --- a/test/lib/lib-helpers/topic.test.js +++ b/test/lib/lib-helpers/topic.test.js @@ -222,7 +222,8 @@ test('getFieldValueFromContentfulEntryAndTemplateName returns the entry field va // getPostTypeFromContentType test('getPostTypeFromContentType returns postType string property from contentTypeConfig', () => { const result = topicHelper.getPostTypeFromContentType(topicContentType); - result.should.equal(config.contentTypes[topicContentType].postType); + const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); + result.should.equal(contentTypeConfigs[topicContentType].postType); }); // parseTopicFromContentfulEntry From f91075cbfc4f955f36d35ab5cbf7a697562a1e48 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 19:44:29 -0700 Subject: [PATCH 24/36] Adds defaultTopicTrigger to contentfulEntry config --- config/lib/helpers/contentfulEntry.js | 12 ++++++++---- config/lib/helpers/defaultTopicTrigger.js | 3 --- lib/helpers/broadcast.js | 3 ++- lib/helpers/defaultTopicTrigger.js | 3 ++- test/lib/lib-helpers/defaultTopicTrigger.test.js | 9 ++++++++- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/config/lib/helpers/contentfulEntry.js b/config/lib/helpers/contentfulEntry.js index 4781bdc7..a14960f6 100644 --- a/config/lib/helpers/contentfulEntry.js +++ b/config/lib/helpers/contentfulEntry.js @@ -14,7 +14,6 @@ module.exports = { }, autoReply: { type: 'autoReply', - broadcastable: false, templates: [ 'autoReply', ], @@ -23,9 +22,8 @@ module.exports = { type: 'autoReplyBroadcast', broadcastable: true, }, - externalPostConfig: { - type: 'externalPostConfig', - postType: 'external', + defaultTopicTrigger: { + type: 'defaultTopicTrigger', }, message: { type: 'message', @@ -38,9 +36,15 @@ module.exports = { type: 'textPostConfig', postType: 'text', }, + // Legacy types: // Ideally we'd backfill all legacy entries as their new types, but we likely can't change the // the type of a Contentful entry without changing its id (if that's the case - we'd need to // bulk update all documents in the Conversations messages DB) + // This externalPostConfig type will deprecated by an autoReply: + externalPostConfig: { + type: 'externalPostConfig', + postType: 'external', + }, legacyBroadcast: { type: 'broadcast', broadcastable: true, diff --git a/config/lib/helpers/defaultTopicTrigger.js b/config/lib/helpers/defaultTopicTrigger.js index 8a6dcac5..b0e02aa3 100644 --- a/config/lib/helpers/defaultTopicTrigger.js +++ b/config/lib/helpers/defaultTopicTrigger.js @@ -2,7 +2,4 @@ module.exports = { allDefaultTopicTriggersCacheKey: 'all', - contentTypes: [ - 'defaultTopicTrigger', - ], }; diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index ef8aed61..4419541a 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -67,7 +67,8 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); // A nice to have TODO is migrating all legacy broadcast entries into the respective new type, so // we can remove check and the function it calls entirely. - if (contentType === 'broadcast') { + const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); + if (contentType === contentTypeConfigs.legacyBroadcast.type) { return module.exports.parseLegacyBroadcastFromContentfulEntry(contentfulEntry); } diff --git a/lib/helpers/defaultTopicTrigger.js b/lib/helpers/defaultTopicTrigger.js index b9b72f3d..014a7b55 100644 --- a/lib/helpers/defaultTopicTrigger.js +++ b/lib/helpers/defaultTopicTrigger.js @@ -11,7 +11,8 @@ const config = require('../../config/lib/helpers/defaultTopicTrigger'); * @return {Array} */ function getContentTypes() { - return config.contentTypes; + const configs = helpers.contentfulEntry.getContentTypeConfigs(); + return [configs.defaultTopicTrigger.type]; } /** diff --git a/test/lib/lib-helpers/defaultTopicTrigger.test.js b/test/lib/lib-helpers/defaultTopicTrigger.test.js index 401e9c79..e9bd7223 100644 --- a/test/lib/lib-helpers/defaultTopicTrigger.test.js +++ b/test/lib/lib-helpers/defaultTopicTrigger.test.js @@ -31,10 +31,17 @@ test.afterEach(() => { sandbox.restore(); }); +test.afterEach(() => { + sandbox.restore(); +}); + // fetch test('fetch returns contentful.fetchByContentTypes parsed as defaultTopicTrigger objects', async () => { const entries = [firstEntry, secondEntry]; + const types = ['defaultTopicTrigger']; const fetchEntriesResult = stubs.contentful.getFetchByContentTypesResultWithArray(entries); + sandbox.stub(defaultTopicTriggerHelper, 'getContentTypes') + .returns(types); sandbox.stub(contentful, 'fetchByContentTypes') .returns(Promise.resolve(fetchEntriesResult)); sandbox.stub(defaultTopicTriggerHelper, 'parseDefaultTopicTriggerFromContentfulEntry') @@ -45,7 +52,7 @@ test('fetch returns contentful.fetchByContentTypes parsed as defaultTopicTrigger const result = await defaultTopicTriggerHelper.fetch(); contentful.fetchByContentTypes - .should.have.been.calledWith(config.contentTypes); + .should.have.been.calledWith(types); defaultTopicTriggerHelper.parseDefaultTopicTriggerFromContentfulEntry .should.have.been.calledWith(firstEntry); defaultTopicTriggerHelper.parseDefaultTopicTriggerFromContentfulEntry From 61ad7b781332026436164a09980a4ba5d08bea1e Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 20:46:31 -0700 Subject: [PATCH 25/36] Adds helpers.contentfulEntry.isBroadcastable --- lib/helpers/contentfulEntry.js | 10 ++++++ lib/helpers/topic.js | 13 ++------ test/lib/lib-helpers/contentfulEntry.test.js | 35 +++++++++----------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 29efbe7e..c34fe286 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -110,6 +110,15 @@ function isAutoReply(contentfulEntry) { return contentful.isContentType(contentfulEntry, config.contentTypes.autoReply.type); } +/** + * @param {Object} contentfulEntry + * @return {Boolean} + */ +function isBroadcastable(contentfulEntry) { + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); + return config.contentTypes[contentType].broadcastable; +} + /** * @param {Object} contentfulEntry * @return {Boolean} @@ -133,6 +142,7 @@ module.exports = { getMessageTemplatesFromContentfulEntry, getSummaryFromContentfulEntry, isAutoReply, + isBroadcastable, isDefaultTopicTrigger, isMessage, parseContentfulEntry, diff --git a/lib/helpers/topic.js b/lib/helpers/topic.js index 0832734c..64d7c30c 100644 --- a/lib/helpers/topic.js +++ b/lib/helpers/topic.js @@ -194,21 +194,14 @@ function getPostTypeFromContentType(contentType) { * @return {Promise} */ function parseTopicFromContentfulEntry(contentfulEntry) { - const topicId = contentful.getContentfulIdFromContentfulEntry(contentfulEntry); - logger.debug('parseTopicFromContentfulEntry', { topicId }); const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); - if (contentTypeConfigs[contentType].broadcastable) { + if (helpers.contentfulEntry.isBroadcastable(contentfulEntry)) { return helpers.broadcast.parseBroadcastFromContentfulEntry(contentfulEntry); } - const data = { - id: topicId, - name: contentful.getNameTextFromContentfulEntry(contentfulEntry), - type: contentType, - postType: module.exports.getPostTypeFromContentType(contentType), - }; + const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); + data.postType = module.exports.getPostTypeFromContentType(contentType); const campaignConfigEntry = contentfulEntry.fields.campaign; let promise = Promise.resolve(null); let campaignId; diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 24554496..eeaf277d 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -10,6 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const stubs = require('../../utils/stubs'); const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); +const messageFactory = require('../../utils/factories/contentful/message'); // stubs const stubEntryDate = Date.now(); @@ -30,8 +31,6 @@ const sandbox = sinon.sandbox.create(); test.beforeEach(() => { sandbox.stub(contentful, 'getContentfulIdFromContentfulEntry') .returns(stubEntryId); - sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') - .returns(stubContentType); sandbox.stub(contentful, 'getNameTextFromContentfulEntry') .returns(stubNameText); }); @@ -42,6 +41,8 @@ test.afterEach(() => { // getSummaryFromContentfulEntry test('getSummaryFromContentfulEntry returns an object with name and type properties', () => { + sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') + .returns(stubContentType); const result = contentfulEntryHelper.getSummaryFromContentfulEntry(stubEntry); result.id.should.equal(stubEntryId); result.type.should.equal(stubContentType); @@ -50,34 +51,30 @@ test('getSummaryFromContentfulEntry returns an object with name and type propert result.updatedAt.should.equal(stubEntryDate); }); -// isDefaultTopicTrigger -test('isDefaultTopicTrigger is truthy if contentful.isContentType', (t) => { - sandbox.stub(contentful, 'isContentType') - .returns(true); - t.truthy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); +// isBroadcastable +test('isBroadcastable is returns whether contentType is broadcastable', (t) => { + const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); + t.truthy(contentfulEntryHelper.isBroadcastable(askYesNoEntry)); + const messageEntry = messageFactory.getValidMessage(); + t.falsy(contentfulEntryHelper.isBroadcastable(messageEntry)); }); +// isDefaultTopicTrigger test('isDefaultTopicTrigger is falsy if not contentful.isContentType', (t) => { sandbox.stub(contentful, 'isContentType') .returns(false); t.falsy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); }); -// isMessage -test('isMessage is truthy if contentful.isContentType', (t) => { +test('isDefaultTopicTrigger is truthy if contentful.isContentType', (t) => { sandbox.stub(contentful, 'isContentType') .returns(true); - t.truthy(contentfulEntryHelper.isMessage(stubEntry)); -}); - -test('isMessage is falsy if not contentful.isContentType', (t) => { - sandbox.stub(contentful, 'isContentType') - .returns(false); - t.falsy(contentfulEntryHelper.isMessage(stubEntry)); + t.truthy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); }); -test('isMessage returns false if not contentful.isContentType result with args entry and message ', (t) => { - sandbox.stub(contentful, 'isContentType') - .returns(false); +// isMessage +test('isMessage returns whether content type is message', (t) => { + const messageEntry = messageFactory.getValidMessage(); + t.truthy(contentfulEntryHelper.isMessage(messageEntry)); t.falsy(contentfulEntryHelper.isMessage(stubEntry)); }); From 8d7e7c8f20858d5d22b2e58f6173f844d54445ce Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Tue, 7 Aug 2018 22:09:22 -0700 Subject: [PATCH 26/36] Adds autoReply factory --- test/lib/lib-helpers/contentfulEntry.test.js | 11 ++++++++++- test/utils/factories/contentful/autoReply.js | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 test/utils/factories/contentful/autoReply.js diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index eeaf277d..e300ad67 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -10,6 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const stubs = require('../../utils/stubs'); const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); +const autoReplyFactory = require('../../utils/factories/contentful/autoReply'); const messageFactory = require('../../utils/factories/contentful/message'); // stubs @@ -51,8 +52,16 @@ test('getSummaryFromContentfulEntry returns an object with name and type propert result.updatedAt.should.equal(stubEntryDate); }); +// isAutoReply +test('isAutoReply returns whether contentType is autoReply', (t) => { + const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); + t.falsy(contentfulEntryHelper.isAutoReply(askYesNoEntry)); + const autoReplyEntry = autoReplyFactory.getValidAutoReply(); + t.truthy(contentfulEntryHelper.isAutoReply(autoReplyEntry)); +}); + // isBroadcastable -test('isBroadcastable is returns whether contentType is broadcastable', (t) => { +test('isBroadcastable returns whether contentType is broadcastable', (t) => { const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); t.truthy(contentfulEntryHelper.isBroadcastable(askYesNoEntry)); const messageEntry = messageFactory.getValidMessage(); diff --git a/test/utils/factories/contentful/autoReply.js b/test/utils/factories/contentful/autoReply.js new file mode 100644 index 00000000..b1020d49 --- /dev/null +++ b/test/utils/factories/contentful/autoReply.js @@ -0,0 +1,19 @@ +'use strict'; + +const stubs = require('../../stubs'); +const messageFactory = require('./message'); + +function getValidAutoReply(date = Date.now()) { + const data = { + sys: stubs.contentful.getSysWithTypeAndDate('autoReply', date), + fields: { + name: stubs.getBroadcastName(), + autoReply: messageFactory.getValidMessage(), + }, + }; + return data; +} + +module.exports = { + getValidAutoReply, +}; From 94a4c3972c7da68e2dba33b97aef6a448e7ad0a5 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 07:34:51 -0700 Subject: [PATCH 27/36] Adds tests for getMessageTemplatesFromContentfulEntry --- lib/helpers/contentfulEntry.js | 2 +- test/lib/lib-helpers/contentfulEntry.test.js | 62 +++++++++---------- test/utils/factories/contentful/autoReply.js | 1 + .../contentful/autoReplyBroadcast.js | 3 +- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index c34fe286..f854dd99 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -96,7 +96,7 @@ function getMessageTemplatesFromContentfulEntry(contentfulEntry) { if (!messageEntry) { return; } - result[fieldName] = helpers.contentfulEntry + result[fieldName] = module.exports .getMessageTemplateFromContentfulEntryAndTemplateName(messageEntry, fieldName); }); return result; diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index e300ad67..466307ff 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -11,14 +11,16 @@ const contentful = require('../../../lib/contentful'); const stubs = require('../../utils/stubs'); const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); const autoReplyFactory = require('../../utils/factories/contentful/autoReply'); +const autoReplyBroadcastFactory = require('../../utils/factories/contentful/autoReplyBroadcast'); +const defaultTopicTriggerFactory = require('../../utils/factories/contentful/defaultTopicTrigger'); const messageFactory = require('../../utils/factories/contentful/message'); // stubs -const stubEntryDate = Date.now(); -const stubEntry = askYesNoEntryFactory.getValidAskYesNo(stubEntryDate); -const stubEntryId = stubs.getContentfulId(); -const stubContentType = stubs.getTopicContentType(); -const stubNameText = stubs.getBroadcastName(); +const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); +const autoReplyEntry = autoReplyFactory.getValidAutoReply(); +const autoReplyBroadcastEntry = autoReplyBroadcastFactory.getValidAutoReplyBroadcast(); +const defaultTopicTriggerEntry = defaultTopicTriggerFactory.getValidDefaultTopicTrigger(); +const messageEntry = messageFactory.getValidMessage(); // Module to test const contentfulEntryHelper = require('../../../lib/helpers/contentfulEntry'); @@ -26,24 +28,34 @@ const contentfulEntryHelper = require('../../../lib/helpers/contentfulEntry'); chai.should(); chai.use(sinonChai); - const sandbox = sinon.sandbox.create(); -test.beforeEach(() => { - sandbox.stub(contentful, 'getContentfulIdFromContentfulEntry') - .returns(stubEntryId); - sandbox.stub(contentful, 'getNameTextFromContentfulEntry') - .returns(stubNameText); -}); - test.afterEach(() => { sandbox.restore(); }); +// getMessageTemplatesFromContentfulEntry +test('getMessageTemplatesFromContentfulEntry returns an object with templates values if content type config has templates', () => { + const result = contentfulEntryHelper.getMessageTemplatesFromContentfulEntry(autoReplyEntry); + result.autoReply.text.should.equal(autoReplyEntry.fields.autoReply.fields.text); +}); + +test('getMessageTemplatesFromContentfulEntry returns an empty object if content type config does not have templates', () => { + const result = contentfulEntryHelper + .getMessageTemplatesFromContentfulEntry(autoReplyBroadcastEntry); + result.should.deep.equal({}); +}); + // getSummaryFromContentfulEntry test('getSummaryFromContentfulEntry returns an object with name and type properties', () => { + const stubEntryDate = Date.now(); + const stubEntry = askYesNoEntryFactory.getValidAskYesNo(stubEntryDate); + const stubEntryId = stubs.getContentfulId(); + const stubContentType = stubs.getTopicContentType(); + const stubNameText = stubs.getBroadcastName(); sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') .returns(stubContentType); + const result = contentfulEntryHelper.getSummaryFromContentfulEntry(stubEntry); result.id.should.equal(stubEntryId); result.type.should.equal(stubContentType); @@ -53,37 +65,25 @@ test('getSummaryFromContentfulEntry returns an object with name and type propert }); // isAutoReply -test('isAutoReply returns whether contentType is autoReply', (t) => { - const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); +test('isAutoReply returns whether content type is autoReply', (t) => { t.falsy(contentfulEntryHelper.isAutoReply(askYesNoEntry)); - const autoReplyEntry = autoReplyFactory.getValidAutoReply(); t.truthy(contentfulEntryHelper.isAutoReply(autoReplyEntry)); }); // isBroadcastable -test('isBroadcastable returns whether contentType is broadcastable', (t) => { - const askYesNoEntry = askYesNoEntryFactory.getValidAskYesNo(); +test('isBroadcastable returns whether content type is broadcastable', (t) => { t.truthy(contentfulEntryHelper.isBroadcastable(askYesNoEntry)); - const messageEntry = messageFactory.getValidMessage(); t.falsy(contentfulEntryHelper.isBroadcastable(messageEntry)); }); // isDefaultTopicTrigger -test('isDefaultTopicTrigger is falsy if not contentful.isContentType', (t) => { - sandbox.stub(contentful, 'isContentType') - .returns(false); - t.falsy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); -}); - -test('isDefaultTopicTrigger is truthy if contentful.isContentType', (t) => { - sandbox.stub(contentful, 'isContentType') - .returns(true); - t.truthy(contentfulEntryHelper.isDefaultTopicTrigger(stubEntry)); +test('isDefaultTopicTrigger returns whether content type is defaultTopicTrigger', (t) => { + t.truthy(contentfulEntryHelper.isDefaultTopicTrigger(defaultTopicTriggerEntry)); + t.falsy(contentfulEntryHelper.isDefaultTopicTrigger(messageEntry)); }); // isMessage test('isMessage returns whether content type is message', (t) => { - const messageEntry = messageFactory.getValidMessage(); t.truthy(contentfulEntryHelper.isMessage(messageEntry)); - t.falsy(contentfulEntryHelper.isMessage(stubEntry)); + t.falsy(contentfulEntryHelper.isMessage(autoReplyEntry)); }); diff --git a/test/utils/factories/contentful/autoReply.js b/test/utils/factories/contentful/autoReply.js index b1020d49..6839d8ea 100644 --- a/test/utils/factories/contentful/autoReply.js +++ b/test/utils/factories/contentful/autoReply.js @@ -9,6 +9,7 @@ function getValidAutoReply(date = Date.now()) { fields: { name: stubs.getBroadcastName(), autoReply: messageFactory.getValidMessage(), + // TODO: Add a campaign reference field, returning a campaign factory's valid campaign. }, }; return data; diff --git a/test/utils/factories/contentful/autoReplyBroadcast.js b/test/utils/factories/contentful/autoReplyBroadcast.js index e1ebe5df..a30b071c 100644 --- a/test/utils/factories/contentful/autoReplyBroadcast.js +++ b/test/utils/factories/contentful/autoReplyBroadcast.js @@ -2,6 +2,7 @@ const stubs = require('../../stubs'); const messageFactory = require('./message'); +const autoReplyFactory = require('./autoReply'); function getValidAutoReplyBroadcast() { const data = { @@ -15,7 +16,7 @@ function getValidAutoReplyBroadcast() { }, fields: { broadcast: messageFactory.getValidMessage(), - autoReply: messageFactory.getValidMessage(), + topic: autoReplyFactory.getValidAutoReply(), }, }; return data; From 6c3e00731776fe7cfc31826ec89041b4cd350633 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 11:06:53 -0700 Subject: [PATCH 28/36] Cleanup --- lib/helpers/contentfulEntry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index f854dd99..bfb9112b 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -57,7 +57,7 @@ function getSummaryFromContentfulEntry(contentfulEntry) { createdAt: contentfulEntry.sys.createdAt, updatedAt: contentfulEntry.sys.updatedAt, }; - logger.debug('parseNameInfoFromContentfulEntry', { result }); + logger.debug('getSummaryFromContentfulEntry', { result }); return result; } @@ -124,7 +124,7 @@ function isBroadcastable(contentfulEntry) { * @return {Boolean} */ function isDefaultTopicTrigger(contentfulEntry) { - return contentful.isContentType(contentfulEntry, 'defaultTopicTrigger'); + return contentful.isContentType(contentfulEntry, config.contentTypes.defaultTopicTrigger.type); } /** From d60540cba20340152e28dfba5c87c077f6734b55 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 14:45:00 -0700 Subject: [PATCH 29/36] Use text fields for templates instead of reference fields --- config/lib/helpers/contentfulEntry.js | 11 ++- lib/helpers/broadcast.js | 43 ++++-------- lib/helpers/contentfulEntry.js | 9 +++ test/lib/lib-helpers/broadcast.test.js | 69 +++++-------------- test/utils/factories/contentful/askYesNo.js | 16 ++--- test/utils/factories/contentful/autoReply.js | 2 +- .../contentful/autoReplyBroadcast.js | 15 ++-- test/utils/factories/contentful/broadcast.js | 11 +-- test/utils/factories/contentful/message.js | 11 +-- test/utils/stubs.js | 19 +++++ 10 files changed, 82 insertions(+), 124 deletions(-) diff --git a/config/lib/helpers/contentfulEntry.js b/config/lib/helpers/contentfulEntry.js index a14960f6..ccb4e623 100644 --- a/config/lib/helpers/contentfulEntry.js +++ b/config/lib/helpers/contentfulEntry.js @@ -1,5 +1,15 @@ 'use strict'; +/** + * This maps the fields in our Contentful types into broadcast, topic, and defaultTopicTriggers. + * + * Content types with templates set are returned as topics. Each item in the templates array is a + * single value text field to be used as a bot reply template while in the topic. + * + * A broadcastable content type currently requires a text field named "text" and attachments field + * named "attachments" to define content for the outbound broadcast. + * + */ module.exports = { contentTypes: { askYesNo: { @@ -9,7 +19,6 @@ module.exports = { 'saidYes', 'saidNo', 'invalidAskYesNoResponse', - 'autoReply', ], }, autoReply: { diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 4419541a..b31dfb25 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -64,19 +64,17 @@ function getById(broadcastId, resetCache = false) { * @return {Promise} */ function parseBroadcastFromContentfulEntry(contentfulEntry) { - const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); + const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); // A nice to have TODO is migrating all legacy broadcast entries into the respective new type, so // we can remove check and the function it calls entirely. - const contentTypeConfigs = helpers.contentfulEntry.getContentTypeConfigs(); - if (contentType === contentTypeConfigs.legacyBroadcast.type) { - return module.exports.parseLegacyBroadcastFromContentfulEntry(contentfulEntry); + if (helpers.contentfulEntry.isLegacyBroadcast(contentfulEntry)) { + return Promise.resolve(Object.assign(data, module.exports + .parseLegacyBroadcastFromContentfulEntry(contentfulEntry))); } - const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); - const message = module.exports - .parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, contentType); + const message = helpers.contentfulEntry + .getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, data.type); const templates = helpers.contentfulEntry.getMessageTemplatesFromContentfulEntry(contentfulEntry); - return Promise.resolve(Object.assign(data, { message, templates })); } @@ -85,13 +83,14 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { * deprecated by new content types per broadcast type. * * @param {Object} contentfulEntry - * @return {Promise} + * @return {Object} */ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { - const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); - data.message = { - text: contentfulEntry.fields.message, - attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), + const data = { + message: { + text: contentfulEntry.fields.message, + attachments: contentful.getAttachmentsFromContentfulEntry(contentfulEntry), + }, }; // This content type was used to send all types of broadcasts and has since been deprecated. const hardcodedTopic = contentfulEntry.fields.topic; @@ -110,22 +109,7 @@ function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { data.topic = null; data.message.template = contentfulEntry.fields.template || 'askSignup'; } - return Promise.resolve(data); -} - -/** - * @param {Object} contentfulEntry - * @return {Object} - */ -function parseBroadcastMessageFromContentfulEntryAndTemplateName(contentfulEntry, templateName) { - const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - const broadcastMessageEntry = contentfulEntry.fields[contentType]; - - if (!broadcastMessageEntry) { - return null; - } - return helpers.contentfulEntry - .getMessageTemplateFromContentfulEntryAndTemplateName(broadcastMessageEntry, templateName); + return data; } module.exports = { @@ -134,6 +118,5 @@ module.exports = { getById, getContentTypes, parseBroadcastFromContentfulEntry, - parseBroadcastMessageFromContentfulEntryAndTemplateName, parseLegacyBroadcastFromContentfulEntry, }; diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index bfb9112b..23b3f2e7 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -127,6 +127,14 @@ function isDefaultTopicTrigger(contentfulEntry) { return contentful.isContentType(contentfulEntry, config.contentTypes.defaultTopicTrigger.type); } +/** + * @param {Object} contentfulEntry + * @return {Boolean} + */ +function isLegacyBroadcast(contentfulEntry) { + return contentful.isContentType(contentfulEntry, config.contentTypes.legacyBroadcast.type); +} + /** * @param {Object} contentfulEntry * @return {Boolean} @@ -144,6 +152,7 @@ module.exports = { isAutoReply, isBroadcastable, isDefaultTopicTrigger, + isLegacyBroadcast, isMessage, parseContentfulEntry, }; diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index 90fc5633..a5601261 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -10,7 +10,7 @@ const sinon = require('sinon'); const contentful = require('../../../lib/contentful'); const helpers = require('../../../lib/helpers'); const stubs = require('../../utils/stubs'); -const askYesNoEntryFactory = require('../../utils/factories/contentful/askYesNo'); +const autoReplyBroadcastFactory = require('../../utils/factories/contentful/autoReplyBroadcast'); const broadcastEntryFactory = require('../../utils/factories/contentful/broadcast'); const broadcastFactory = require('../../utils/factories/broadcast'); @@ -19,10 +19,8 @@ const attachments = [stubs.getAttachment()]; const broadcastId = stubs.getContentfulId(); const broadcastEntry = broadcastEntryFactory.getValidCampaignBroadcast(); const broadcast = broadcastFactory.getValidCampaignBroadcast(); -const broadcastName = stubs.getBroadcastName(); const broadcastType = 'askYesNo'; const campaignId = stubs.getCampaignId(); -const legacyBroadcastType = 'broadcast'; // Module to test const broadcastHelper = require('../../../lib/helpers/broadcast'); @@ -32,15 +30,6 @@ chai.use(sinonChai); const sandbox = sinon.sandbox.create(); -test.beforeEach(() => { - sandbox.stub(contentful, 'getContentfulIdFromContentfulEntry') - .returns(broadcastId); - sandbox.stub(contentful, 'getNameTextFromContentfulEntry') - .returns(broadcastName); - sandbox.stub(contentful, 'getCampaignIdFromContentfulEntry') - .returns(campaignId); -}); - test.afterEach(() => { sandbox.restore(); }); @@ -96,7 +85,6 @@ test('fetchById returns contentful.fetchByContentfulId parsed as broadcast objec result.should.deep.equal(broadcast); }); - // getById test('getById returns broadcasts cache if set', async () => { sandbox.stub(helpers.cache.broadcasts, 'get') @@ -134,41 +122,26 @@ test('getById returns fetchById if resetCache arg is true', async () => { result.should.deep.equal(broadcast); }); -// parseBroadcastMessageFromContentfulEntryAndTemplateName -test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns null if contentfulEntry does not have broadcast set', (t) => { - const result = broadcastHelper - .parseBroadcastMessageFromContentfulEntryAndTemplateName(broadcastEntry); - t.is(result, null); -}); - -test('parseBroadcastMessageFromContentfulEntryAndTemplateName returns getMessageTemplateFromContentfulEntryAndTemplateName', () => { - const askYesNo = askYesNoEntryFactory.getValidAskYesNo(); - const templateName = stubs.getRandomWord(); - const messageTemplate = { text: stubs.getRandomMessageText(), template: templateName }; +// parseBroadcastFromContentfulEntry +test('parseBroadcastFromContentfulEntry sets message to getMessageTemplateFromContentfulEntryAndTemplateName', async () => { + const autoReplyBroadcastEntry = autoReplyBroadcastFactory.getValidAutoReplyBroadcast(); + const stubContentType = stubs.getRandomWord(); + sandbox.stub(helpers.contentfulEntry, 'getSummaryFromContentfulEntry') + .returns({ type: stubContentType }); + const stubTemplate = { text: stubs.getRandomMessageText(), template: stubContentType }; sandbox.stub(helpers.contentfulEntry, 'getMessageTemplateFromContentfulEntryAndTemplateName') - .returns(messageTemplate); - sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') - .returns(broadcastType); + .returns(stubTemplate); - const result = broadcastHelper - .parseBroadcastMessageFromContentfulEntryAndTemplateName(askYesNo, templateName); - result.should.equal(messageTemplate); + const result = await broadcastHelper.parseBroadcastFromContentfulEntry(autoReplyBroadcastEntry); + result.message.text.should.equal(stubTemplate.text); + result.message.template.should.equal(stubContentType); }); // parseLegacyBroadcastFromContentfulEntry -test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', async (t) => { +test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', (t) => { sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') .returns(attachments); - sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') - .returns(legacyBroadcastType); - - const result = await broadcastHelper.parseLegacyBroadcastFromContentfulEntry(broadcastEntry); - contentful.getContentfulIdFromContentfulEntry.should.have.been.calledWith(broadcastEntry); - result.id.should.equal(broadcastId); - contentful.getContentTypeFromContentfulEntry.should.have.been.calledWith(broadcastEntry); - result.type.should.equal(legacyBroadcastType); - contentful.getNameTextFromContentfulEntry.should.have.been.calledWith(broadcastEntry); - result.name.should.equal(broadcastName); + const result = broadcastHelper.parseLegacyBroadcastFromContentfulEntry(broadcastEntry); t.is(result.topic, null); result.campaignId.should.equal(campaignId); result.message.text.should.equal(broadcastEntry.fields.message); @@ -177,20 +150,10 @@ test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic result.message.attachments.should.equal(attachments); }); -test('parseLegacyBroadcastFromContentfulEntry returns an object with null campaignId if hardcoded topic broadcast', async (t) => { +test('parseLegacyBroadcastFromContentfulEntry returns an object with null campaignId if hardcoded topic broadcast', (t) => { const hardcodedTopicBroadcastEntry = broadcastEntryFactory.getValidTopicBroadcast(); - sandbox.stub(contentful, 'getContentTypeFromContentfulEntry') - .returns(legacyBroadcastType); - - const result = await broadcastHelper + const result = broadcastHelper .parseLegacyBroadcastFromContentfulEntry(hardcodedTopicBroadcastEntry); - contentful.getContentfulIdFromContentfulEntry - .should.have.been.calledWith(hardcodedTopicBroadcastEntry); - result.id.should.equal(broadcastId); - result.type.should.equal(legacyBroadcastType); - contentful.getNameTextFromContentfulEntry - .should.have.been.calledWith(hardcodedTopicBroadcastEntry); - result.name.should.equal(broadcastName); t.is(result.campaignId, null); result.topic.should.equal(hardcodedTopicBroadcastEntry.fields.topic); result.message.text.should.equal(hardcodedTopicBroadcastEntry.fields.message); diff --git a/test/utils/factories/contentful/askYesNo.js b/test/utils/factories/contentful/askYesNo.js index 6a79e1c3..513efb03 100644 --- a/test/utils/factories/contentful/askYesNo.js +++ b/test/utils/factories/contentful/askYesNo.js @@ -1,22 +1,22 @@ 'use strict'; const stubs = require('../../stubs'); -const messageFactory = require('./message'); const textPostConfigFactory = require('./textPostConfig'); function getValidAskYesNo(date = Date.now()) { - const data = { + return { sys: stubs.contentful.getSysWithTypeAndDate('askYesNo', date), fields: { name: stubs.getBroadcastName(), - askYesNo: messageFactory.getValidMessage(), - saidYes: textPostConfigFactory.getValidTextPostConfig(), - saidNo: messageFactory.getValidMessage(), - invalidAskYesNoResponse: messageFactory.getValidMessage(), - saidNoAutoReply: messageFactory.getValidMessage(), + text: stubs.getRandomMessageText(), + attachments: stubs.contentful.getAttachments(), + topic: textPostConfigFactory.getValidTextPostConfig(), + saidYes: stubs.getRandomMessageText(), + saidNo: stubs.getRandomMessageText(), + invalidAskYesNoResponse: stubs.getRandomMessageText(), + autoReply: stubs.getRandomMessageText(), }, }; - return data; } module.exports = { diff --git a/test/utils/factories/contentful/autoReply.js b/test/utils/factories/contentful/autoReply.js index 6839d8ea..38fba9f4 100644 --- a/test/utils/factories/contentful/autoReply.js +++ b/test/utils/factories/contentful/autoReply.js @@ -7,7 +7,7 @@ function getValidAutoReply(date = Date.now()) { const data = { sys: stubs.contentful.getSysWithTypeAndDate('autoReply', date), fields: { - name: stubs.getBroadcastName(), + name: stubs.getRandomName(), autoReply: messageFactory.getValidMessage(), // TODO: Add a campaign reference field, returning a campaign factory's valid campaign. }, diff --git a/test/utils/factories/contentful/autoReplyBroadcast.js b/test/utils/factories/contentful/autoReplyBroadcast.js index a30b071c..19303be9 100644 --- a/test/utils/factories/contentful/autoReplyBroadcast.js +++ b/test/utils/factories/contentful/autoReplyBroadcast.js @@ -1,21 +1,14 @@ 'use strict'; const stubs = require('../../stubs'); -const messageFactory = require('./message'); const autoReplyFactory = require('./autoReply'); -function getValidAutoReplyBroadcast() { +function getValidAutoReplyBroadcast(date = Date.now()) { const data = { - sys: { - id: stubs.getContentfulId(), - contentType: { - sys: { - id: 'autoReplyBroadcast', - }, - }, - }, + sys: stubs.contentful.getSysWithTypeAndDate('autoReplyBroadcast', date), fields: { - broadcast: messageFactory.getValidMessage(), + text: stubs.getRandomMessageText(), + attachments: stubs.contentful.getAttachments(), topic: autoReplyFactory.getValidAutoReply(), }, }; diff --git a/test/utils/factories/contentful/broadcast.js b/test/utils/factories/contentful/broadcast.js index 95224566..8b5af52f 100644 --- a/test/utils/factories/contentful/broadcast.js +++ b/test/utils/factories/contentful/broadcast.js @@ -4,16 +4,7 @@ const stubs = require('../../stubs'); module.exports.getValidCampaignBroadcast = function getValidCampaignBroadcast(date = Date.now()) { return { - sys: { - id: stubs.getBroadcastId(), - contentType: { - sys: { - id: 'broadcast', - }, - }, - createdAt: date, - updatedAt: date, - }, + sys: stubs.contentful.getSysWithTypeAndDate('broadcast', date), fields: { name: stubs.getBroadcastName(), topic: null, diff --git a/test/utils/factories/contentful/message.js b/test/utils/factories/contentful/message.js index d13fdb6b..d8a68b4a 100644 --- a/test/utils/factories/contentful/message.js +++ b/test/utils/factories/contentful/message.js @@ -7,16 +7,7 @@ function getValidMessage() { sys: stubs.contentful.getSysWithTypeAndDate('message'), fields: { text: stubs.getRandomMessageText(), - attachments: [ - { - sys: { - id: stubs.getContentfulId(), - }, - fields: { - file: stubs.getAttachment(), - }, - }, - ], + attachments: stubs.contentful.getAttachments(), }, }; return data; diff --git a/test/utils/stubs.js b/test/utils/stubs.js index b5518fd0..544f46f1 100644 --- a/test/utils/stubs.js +++ b/test/utils/stubs.js @@ -26,6 +26,19 @@ function getAttachment() { }; } +function getAttachments() { + return [ + { + sys: { + id: module.exports.getContentfulId(), + }, + fields: { + file: module.exports.getAttachment(), + }, + }, + ]; +} + /** * @return {String} */ @@ -46,6 +59,10 @@ function getFetchByContentTypesResultWithArray(data) { }; } +function getRandomName() { + return `${chance.animal()} ${chance.word()}`; +} + /** * @return {String} */ @@ -139,6 +156,7 @@ module.exports = { getRandomMessageText: function getRandomMessageText() { return chance.sentence(); }, + getRandomName, getRandomWord, getTemplateName: function getTemplateName() { return 'memberSupport'; @@ -273,6 +291,7 @@ module.exports = { return msg; }, contentful: { + getAttachments, getFetchByContentTypesResultWithArray, getAllTemplatesForCampaignId: function getAllTemplatesForCampaignId() { return module.exports.getJSONstub('all-campaign-fields'); From 5c4c3a67b6a802954419da105335168613cabe5c Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 15:47:26 -0700 Subject: [PATCH 30/36] Refactors as getTopicTemplatesFromContentfulEntry --- config/lib/helpers/contentfulEntry.js | 1 + lib/helpers/broadcast.js | 7 ++--- lib/helpers/contentfulEntry.js | 28 +++++++++++++------- lib/helpers/topic.js | 3 ++- test/lib/lib-helpers/contentfulEntry.test.js | 23 ++++++++-------- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/config/lib/helpers/contentfulEntry.js b/config/lib/helpers/contentfulEntry.js index ccb4e623..35069b6d 100644 --- a/config/lib/helpers/contentfulEntry.js +++ b/config/lib/helpers/contentfulEntry.js @@ -19,6 +19,7 @@ module.exports = { 'saidYes', 'saidNo', 'invalidAskYesNoResponse', + 'autoReply', ], }, autoReply: { diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index b31dfb25..8e99fd0a 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -65,8 +65,8 @@ function getById(broadcastId, resetCache = false) { */ function parseBroadcastFromContentfulEntry(contentfulEntry) { const data = helpers.contentfulEntry.getSummaryFromContentfulEntry(contentfulEntry); - // A nice to have TODO is migrating all legacy broadcast entries into the respective new type, so - // we can remove check and the function it calls entirely. + // A nice to have TODO would be migrating all legacy broadcast entries into their new respective + // type to avoid this check, but it likely is not possible to change type of an existing entry. if (helpers.contentfulEntry.isLegacyBroadcast(contentfulEntry)) { return Promise.resolve(Object.assign(data, module.exports .parseLegacyBroadcastFromContentfulEntry(contentfulEntry))); @@ -74,7 +74,8 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { const message = helpers.contentfulEntry .getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, data.type); - const templates = helpers.contentfulEntry.getMessageTemplatesFromContentfulEntry(contentfulEntry); + logger.debug('getMessageTemplateFromContentfulEntryAndTemplateName', { message }); + const templates = helpers.contentfulEntry.getTopicTemplatesFromContentfulEntry(contentfulEntry); return Promise.resolve(Object.assign(data, { message, templates })); } diff --git a/lib/helpers/contentfulEntry.js b/lib/helpers/contentfulEntry.js index 23b3f2e7..e316ff46 100644 --- a/lib/helpers/contentfulEntry.js +++ b/lib/helpers/contentfulEntry.js @@ -82,23 +82,31 @@ function getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, t * @param {String} * @return {Object} */ -function getMessageTemplatesFromContentfulEntry(contentfulEntry) { +function getTopicTemplatesFromContentfulEntry(contentfulEntry) { const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); - const fieldNames = config.contentTypes[contentType].templates; + const templateFieldNames = config.contentTypes[contentType].templates; const result = {}; - if (!contentfulEntry || !fieldNames) { + if (!contentfulEntry || !templateFieldNames) { return result; } - fieldNames.forEach((fieldName) => { - const messageEntry = contentfulEntry.fields[fieldName]; - if (!messageEntry) { - return; + templateFieldNames.forEach((fieldName) => { + const text = contentfulEntry.fields[fieldName]; + const topic = {}; + // The saidYes template should change conversation topic to the saidYesTopic field. + if (fieldName === 'saidYes') { + const topicRef = contentfulEntry.fields.saidYesTopic; + if (topicRef) { + topic.id = contentful.getContentfulIdFromContentfulEntry(topicRef); + } } - result[fieldName] = module.exports - .getMessageTemplateFromContentfulEntryAndTemplateName(messageEntry, fieldName); + result[fieldName] = { + text, + topic, + }; }); + return result; } @@ -147,8 +155,8 @@ module.exports = { getById, getContentTypeConfigs, getMessageTemplateFromContentfulEntryAndTemplateName, - getMessageTemplatesFromContentfulEntry, getSummaryFromContentfulEntry, + getTopicTemplatesFromContentfulEntry, isAutoReply, isBroadcastable, isDefaultTopicTrigger, diff --git a/lib/helpers/topic.js b/lib/helpers/topic.js index 64d7c30c..b54a9bcc 100644 --- a/lib/helpers/topic.js +++ b/lib/helpers/topic.js @@ -163,8 +163,9 @@ function parseTemplateFromContentfulEntryAndTemplateName(contentfulEntry, templa */ function parseTemplatesFromContentfulEntryAndCampaign(contentfulEntry, campaign) { if (helpers.contentfulEntry.isAutoReply(contentfulEntry)) { - return helpers.contentfulEntry.getMessageTemplatesFromContentfulEntry(contentfulEntry); + return helpers.contentfulEntry.getTopicTemplatesFromContentfulEntry(contentfulEntry); } + const contentType = contentful.getContentTypeFromContentfulEntry(contentfulEntry); const data = {}; const templateNames = Object.keys(config.templatesByContentType[contentType]); diff --git a/test/lib/lib-helpers/contentfulEntry.test.js b/test/lib/lib-helpers/contentfulEntry.test.js index 466307ff..01e128a1 100644 --- a/test/lib/lib-helpers/contentfulEntry.test.js +++ b/test/lib/lib-helpers/contentfulEntry.test.js @@ -34,17 +34,6 @@ test.afterEach(() => { sandbox.restore(); }); -// getMessageTemplatesFromContentfulEntry -test('getMessageTemplatesFromContentfulEntry returns an object with templates values if content type config has templates', () => { - const result = contentfulEntryHelper.getMessageTemplatesFromContentfulEntry(autoReplyEntry); - result.autoReply.text.should.equal(autoReplyEntry.fields.autoReply.fields.text); -}); - -test('getMessageTemplatesFromContentfulEntry returns an empty object if content type config does not have templates', () => { - const result = contentfulEntryHelper - .getMessageTemplatesFromContentfulEntry(autoReplyBroadcastEntry); - result.should.deep.equal({}); -}); // getSummaryFromContentfulEntry test('getSummaryFromContentfulEntry returns an object with name and type properties', () => { @@ -64,6 +53,18 @@ test('getSummaryFromContentfulEntry returns an object with name and type propert result.updatedAt.should.equal(stubEntryDate); }); +// getTopicTemplatesFromContentfulEntry +test('getTopicTemplatesFromContentfulEntry returns an object with templates values if content type config has templates', () => { + const result = contentfulEntryHelper.getTopicTemplatesFromContentfulEntry(autoReplyEntry); + result.autoReply.text.should.equal(autoReplyEntry.fields.autoReply); +}); + +test('getTopicTemplatesFromContentfulEntry returns an empty object if content type config does not have templates', () => { + const result = contentfulEntryHelper + .getTopicTemplatesFromContentfulEntry(autoReplyBroadcastEntry); + result.should.deep.equal({}); +}); + // isAutoReply test('isAutoReply returns whether content type is autoReply', (t) => { t.falsy(contentfulEntryHelper.isAutoReply(askYesNoEntry)); From ae397541b3a8d83431c80509ad15d02dea9e380e Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 16:04:31 -0700 Subject: [PATCH 31/36] Renames as getLegacyBroadcastDataFromContentfulEntry --- lib/helpers/broadcast.js | 10 +++++----- test/lib/lib-helpers/broadcast.test.js | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 8e99fd0a..77d3b812 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -69,12 +69,12 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { // type to avoid this check, but it likely is not possible to change type of an existing entry. if (helpers.contentfulEntry.isLegacyBroadcast(contentfulEntry)) { return Promise.resolve(Object.assign(data, module.exports - .parseLegacyBroadcastFromContentfulEntry(contentfulEntry))); + .getLegacyBroadcastDataFromContentfulEntry(contentfulEntry))); } - + // Parse the outbound broadcast message to send. const message = helpers.contentfulEntry .getMessageTemplateFromContentfulEntryAndTemplateName(contentfulEntry, data.type); - logger.debug('getMessageTemplateFromContentfulEntryAndTemplateName', { message }); + // Parse topic templates if they exist. const templates = helpers.contentfulEntry.getTopicTemplatesFromContentfulEntry(contentfulEntry); return Promise.resolve(Object.assign(data, { message, templates })); } @@ -86,7 +86,7 @@ function parseBroadcastFromContentfulEntry(contentfulEntry) { * @param {Object} contentfulEntry * @return {Object} */ -function parseLegacyBroadcastFromContentfulEntry(contentfulEntry) { +function getLegacyBroadcastDataFromContentfulEntry(contentfulEntry) { const data = { message: { text: contentfulEntry.fields.message, @@ -118,6 +118,6 @@ module.exports = { fetchById, getById, getContentTypes, + getLegacyBroadcastDataFromContentfulEntry, parseBroadcastFromContentfulEntry, - parseLegacyBroadcastFromContentfulEntry, }; diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index a5601261..125018d2 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -123,7 +123,7 @@ test('getById returns fetchById if resetCache arg is true', async () => { }); // parseBroadcastFromContentfulEntry -test('parseBroadcastFromContentfulEntry sets message to getMessageTemplateFromContentfulEntryAndTemplateName', async () => { +test('parseBroadcastFromContentfulEntry returns object with message from getMessageTemplateFromContentfulEntryAndTemplateName', async () => { const autoReplyBroadcastEntry = autoReplyBroadcastFactory.getValidAutoReplyBroadcast(); const stubContentType = stubs.getRandomWord(); sandbox.stub(helpers.contentfulEntry, 'getSummaryFromContentfulEntry') @@ -137,11 +137,11 @@ test('parseBroadcastFromContentfulEntry sets message to getMessageTemplateFromCo result.message.template.should.equal(stubContentType); }); -// parseLegacyBroadcastFromContentfulEntry -test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic if campaign broadcast', (t) => { +// getLegacyBroadcastDataFromContentfulEntry +test('getLegacyBroadcastDataFromContentfulEntry returns an object with null topic if campaign broadcast', (t) => { sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') .returns(attachments); - const result = broadcastHelper.parseLegacyBroadcastFromContentfulEntry(broadcastEntry); + const result = broadcastHelper.getLegacyBroadcastDataFromContentfulEntry(broadcastEntry); t.is(result.topic, null); result.campaignId.should.equal(campaignId); result.message.text.should.equal(broadcastEntry.fields.message); @@ -150,10 +150,10 @@ test('parseLegacyBroadcastFromContentfulEntry returns an object with null topic result.message.attachments.should.equal(attachments); }); -test('parseLegacyBroadcastFromContentfulEntry returns an object with null campaignId if hardcoded topic broadcast', (t) => { +test('getLegacyBroadcastDataFromContentfulEntry returns an object with null campaignId if hardcoded topic broadcast', (t) => { const hardcodedTopicBroadcastEntry = broadcastEntryFactory.getValidTopicBroadcast(); const result = broadcastHelper - .parseLegacyBroadcastFromContentfulEntry(hardcodedTopicBroadcastEntry); + .getLegacyBroadcastDataFromContentfulEntry(hardcodedTopicBroadcastEntry); t.is(result.campaignId, null); result.topic.should.equal(hardcodedTopicBroadcastEntry.fields.topic); result.message.text.should.equal(hardcodedTopicBroadcastEntry.fields.message); From bcdf08d101fb58c5e052e16ccff097943547261e Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 16:25:29 -0700 Subject: [PATCH 32/36] Updates docs --- documentation/endpoints/broadcasts.md | 51 +++++-- documentation/endpoints/topics.md | 195 +++++++------------------- 2 files changed, 91 insertions(+), 155 deletions(-) diff --git a/documentation/endpoints/broadcasts.md b/documentation/endpoints/broadcasts.md index 5189d70b..0f108e3f 100644 --- a/documentation/endpoints/broadcasts.md +++ b/documentation/endpoints/broadcasts.md @@ -8,15 +8,21 @@ Name | Type | Description -----|------|------------ `id` | String | The Contentful entry id `name` | String | Internal name used to reference the broadcast -`type` | String | The Contentful entry type, e.g. `autoReplyBroadcast`, `broadcast` +`type` | String | The Contentful entry type, e.g. `askYesNo`, `autoReplyBroadcast`, `broadcast` `message` | Object | Contains the [outbound message content](https://github.com/DoSomething/gambit-conversations/blob/master/documentation/endpoints/messages.md) to send to user `message.text` | String | `message.attachments` | Array | `message.template` | String | -`topic` | String | If set, updates the conversation topic to this string.* -`campaignId` | Number | If set, updates the conversation topic to the given campaign's topic.* +`message.topic` | Object | If an id property exists, its saved to the [conversation topic](https://github.com/DoSomething/gambit-conversations/blob/master/documentation/endpoints/topics.md) when broadcast is sent +`templates` | Object | Defines replies for when this broadcast is saved as a [conversation topic](https://github.com/DoSomething/gambit-conversations/blob/master/documentation/endpoints/topics.md) -- used in `askYesNo`, which will update the conversation topic again if user answers yes + +Legacy fields (only used for type `broadcast`) + +Name | Type | Description +-----|------|------------ +`topic` | String | (Legacy) If set, updates the conversation topic to this string.* +`campaignId` | Number | (Legacy) If set, updates the conversation topic to the given campaign's topic.* -* Note: These fields will likely be deprecated by a `topicId` per https://www.pivotaltracker.com/story/show/157369418 ## Retrieve broadcasts @@ -64,18 +70,37 @@ curl http://localhost:5000/v1/broadcasts?skip=20 "topic": "survey_response" }, { - "id": "4C2gkDV8oUAaewSMYeokEC", - "name": "VoterRegistration2018_Jul8_OhioSpecialHouseGeneralReminder", - "type": "broadcast", - "createdAt": "2018-07-06T18:28:51.478Z", - "updatedAt": "2018-07-06T18:31:55.968Z", + "id": "2X4r3fZrTGA2mGemowgiEI", + "name": "askYesNo test", + "type": "askYesNo", + "createdAt": "2018-08-06T23:34:56.395Z", + "updatedAt": "2018-08-08T22:20:14.822Z", "message": { - "text": "It's Freddie! Guess what -- Ohio needs YOU. Voters have the power to make a huge difference in your state, so make sure you're registered to vote in Ohio's special house general election before tonight's deadline! It takes just 2 mins: https://vote.dosomething.org/?r=user:{{user.id}},campaignID:8017,campaignRunID:8022,source:sms,source_details:broadcastID_4C2gkDV8oUAaewSMYeokEC", + "text": "Join Pump it Up? \n\nYes No", "attachments": [], - "template": "rivescript" + "template": "askYesNo", + "topic": {} + }, + "templates": { + "saidYes": { + "text": "Great! Text START to submit a photo.", + "topic": { + "id": "4xXe9sQqmIeiWauSUu6kAY" + } + }, + "saidNo": { + "text": "Ok, we'll check in with you later.", + "topic": {} + }, + "invalidAskYesNoResponse": { + "text": "Sorry, I didn't get that - did you want to join for Pump It Up? Yes or No", + "topic": {} + }, + "autoReply": { + "text": "Sorry, I didn't understand that. Text Q if you have a question.", + "topic": {} + } }, - "campaignId": null, - "topic": "survey_response" }, ... }, diff --git a/documentation/endpoints/topics.md b/documentation/endpoints/topics.md index c7fecdf2..c2e71c68 100644 --- a/documentation/endpoints/topics.md +++ b/documentation/endpoints/topics.md @@ -8,13 +8,10 @@ A conversation topic may be set to one of the following Contentful content types * `textPostConfig` - creates a signup and sends replies to create text post for a campaign * `externalPostConfig` - creates a signup for a campaign, but does not create a post via messaging. The campaign post is created externally when user visits the link included in the templates of an `externalPostConfig` topic. +Under construction -### Broadcast topics - -[under construction](https://i.amz.mshcdn.com/xxwMNSb7PAnpcIOmwhIU1dh80SA=/fit-in/1200x9600/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F168421%2Ftumblr_ks4m18IymX1qz4u07o1_250.gif) - -* `autoReplyBroadcast` - replies with an `autoReply` template after sending an outbound broadcast -* `askYesNo` - asks yes/no question +* `autoReply` - repeats a single `autoReply` template, creates a signup if campaign is set. This will deprecate the `externalPostConfig` type. +* `askYesNo` - asks yes/no question (and can be sent as a [broadcast](./topics.md)) Fields: @@ -26,8 +23,9 @@ Name | Type | Description `campaign` | Object | The campaign this topic should create a signup and post for. `templates` | Object | Collection of outbound message templates that can be sent from this topic. `templates.raw` | String | The field value stored in Contentful to return for the template, or a hardcoded default value if the field value is not set -`templates.rendered` | String | The `raw` value replaced with any campaign or command tags. See https://github.com/DoSomething/gambit-admin/wiki/Tags +`templates.text` | String | The `raw` value replaced with any campaign or command tags. See https://github.com/DoSomething/gambit-admin/wiki/Tags `templates.override` | Boolean | Whether the `raw` value is set from a Contentful field value (override is `true`), or from a hardcoded default (override is `false`) +`templates.topic` | Object | If an id is present, this reply template should update the conversation topic accordingly. `triggers` | Array | List of defaultTopicTriggers that change user conversation to this topic ## Retrieve topics @@ -98,45 +96,57 @@ curl http://localhost:5000/v1/topics?skip=5 "override": false, "rendered": "Text back your question and I'll try to get back to you within 24 hrs.\n\nIf you want to continue Lose Your V-Card, text back VCARD" }, - "campaignClosed": { - "raw": "Want to make your voice heard? Take 2 mins to make sure you’re registered to vote: {{{custom_url}}}\n\nThis year DoSomething.org is unleashing the power of young people to make change online, in their communities, and at all levels of govt. Stay tuned for updates on how you can get involved!", - "override": true, - "rendered": "Want to make your voice heard? Take 2 mins to make sure you’re registered to vote: {{{custom_url}}}\n\nThis year DoSomething.org is unleashing the power of young people to make change online, in their communities, and at all levels of govt. Stay tuned for updates on how you can get involved!" - }, - "askSignup": { - "raw": "{{tagline}}\n\nWant to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Help your friends register to vote!\n\nWant to join Lose Your V-Card?\n\nYes or No" - }, - "declinedSignup": { - "raw": "Okay, that's the last you'll hear from me today! But before I go, I wanted to give you one action you can do in under 2 mins (for the chance to win a scholarship). We're creating the largest crowd-sourced guide with tips to beat bullying. Want to share a tip? Text POWER now. ", - "override": true, - "rendered": "Okay, that's the last you'll hear from me today! But before I go, I wanted to give you one action you can do in under 2 mins (for the chance to win a scholarship). We're creating the largest crowd-sourced guide with tips to beat bullying. Want to share a tip? Text POWER now. " - }, - "invalidAskSignupResponse": { - "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Sorry, I didn't get that. Did you want to join Lose Your V-Card?\n\nYes or No" - }, - "askContinue": { - "raw": "Ready to get back to {{title}}?\n\nYes or No", - "override": false, - "rendered": "Ready to get back to Lose Your V-Card?\n\nYes or No" - }, - "declinedContinue": { - "raw": "Right on, we'll check in with you about {{title}} later.\n\nText MENU if you'd like to find a different action to take.", - "override": false, - "rendered": "Right on, we'll check in with you about Lose Your V-Card later.\n\nText MENU if you'd like to find a different action to take." - }, - "invalidAskContinueResponse": { - "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Sorry, I didn't get that. Did you want to join Lose Your V-Card?\n\nYes or No" - } + ... }, "triggers": [ "vcard", ] + }, + { + "id": "2X4r3fZrTGA2mGemowgiEI", + "name": "askYesNo test", + "type": "askYesNo", + "createdAt": "2018-08-06T23:34:56.395Z", + "updatedAt": "2018-08-08T22:20:14.822Z", + "message": { + "text": "Join Pump it Up? \n\nYes No", + "attachments": [ + + ], + "template": "askYesNo", + "topic": { + + } + }, + "templates": { + "saidYes": { + "text": "Great! Text START to submit a photo.", + "topic": { + "id": "4xXe9sQqmIeiWauSUu6kAY" + } + }, + "saidNo": { + "text": "Ok, we'll check in with you later.", + "topic": { + + } + }, + "invalidAskYesNoResponse": { + "text": "Sorry, I didn't get that - did you want to join for Pump It Up? Yes or No", + "topic": { + + } + }, + "autoReply": { + "text": "Sorry, I didn't understand that. Text Q if you have a question.", + "topic": { + + } + } + }, + "triggers": [ + + ] }, { "id": "3peS2Oye08o6OwUMAEcS2c", @@ -160,106 +170,7 @@ curl http://localhost:5000/v1/topics?skip=5 "override": true, "rendered": "Secondhand smoke causes cancer, which is why thousands of colleges have gone tobacco-free. Problem is, 3,273 campuses still allow tobacco, which means secondhand smoke is harming everyone on campus including our beloved mascots. \n\nTell your college (or a college near you) to pledge to go tobacco-free by telling them to #SaveTheMascots by clicking here: http://bit.ly/2GE8APl\n\nTake a screenshot of the post you share, then text START to share it with us (and enter for a chance to win a $2500 scholarship)!" }, - "webStartPhotoPost": { - "raw": "Thanks for joining DoSomething.org's #SaveTheMascots! Ready to take a quick action (and enter for the chance to win a $2500 scholarship)? \n\nSecondhand smoke causes cancer, which is why thousands of colleges have gone tobacco-free. Problem is, 3,273 campuses still allow tobacco, which means secondhand smoke is harming everyone on campus including our beloved mascots. \n\nTell your college (or a college near you) to pledge to go tobacco-free by clicking here: http://bit.ly/2GE8APl\n\nTake a screenshot of the post you share, then text {{cmd_reportback}} to share it with us (and enter for the scholarship).", - "override": true, - "rendered": "Thanks for joining DoSomething.org's #SaveTheMascots! Ready to take a quick action (and enter for the chance to win a $2500 scholarship)? \n\nSecondhand smoke causes cancer, which is why thousands of colleges have gone tobacco-free. Problem is, 3,273 campuses still allow tobacco, which means secondhand smoke is harming everyone on campus including our beloved mascots. \n\nTell your college (or a college near you) to pledge to go tobacco-free by clicking here: http://bit.ly/2GE8APl\n\nTake a screenshot of the post you share, then text START to share it with us (and enter for the scholarship)." - }, - "startPhotoPostAutoReply": { - "raw": "Sorry, I didn't understand that. Text {{cmd_reportback}} when you have asked your college (or one near you) to go tobacco-free!\n\nIf you have a question, text Q.", - "override": true, - "rendered": "Sorry, I didn't understand that. Text START when you have asked your college (or one near you) to go tobacco-free!\n\nIf you have a question, text Q." - }, - "completedPhotoPost": { - "raw": "Thanks for urging the college or university to pledge to join the movement to have tobacco-free campuses! \n\nInterested in taking more actions and learning about other scholarship opportunities? Text MENU.", - "override": true, - "rendered": "Thanks for urging the college or university to pledge to join the movement to have tobacco-free campuses! \n\nInterested in taking more actions and learning about other scholarship opportunities? Text MENU." - }, - "completedPhotoPostAutoReply": { - "raw": "Sorry, I didn't understand that.\n\nText {{cmd_reportback}} if you have shared more posts urging colleges or universities to join the movement to have tobacco free campuses! \n\nIf you have a question, text Q.", - "override": true, - "rendered": "Sorry, I didn't understand that.\n\nText START if you have shared more posts urging colleges or universities to join the movement to have tobacco free campuses! \n\nIf you have a question, text Q." - }, - "askQuantity": { - "raw": "Sweet! First, what's the total number of posts you shared?\n\nBe sure to text in a number not a word (i.e. “4”, not “four”)", - "override": true, - "rendered": "Sweet! First, what's the total number of posts you shared?\n\nBe sure to text in a number not a word (i.e. “4”, not “four”)" - }, - "invalidQuantity": { - "raw": "Sorry, that's not a valid number.\n\nWhat's the total number of posts you have shared?\n\nIf you have a question, text Q.", - "override": true, - "rendered": "Sorry, that's not a valid number.\n\nWhat's the total number of posts you have shared?\n\nIf you have a question, text Q." - }, - "askPhoto": { - "raw": "Nice! Send back a screenshot of the tweet you posted asking your college (or one near you) to go tobacco-free.", - "override": true, - "rendered": "Nice! Send back a screenshot of the tweet you posted asking your college (or one near you) to go tobacco-free." - }, - "invalidPhoto": { - "raw": "Sorry, I didn't get that.\n\nSend a photo of the posts you have shared.\n\nIf you have a question, text Q - I'll get back to you within 24 hours.", - "override": true, - "rendered": "Sorry, I didn't get that.\n\nSend a photo of the posts you have shared.\n\nIf you have a question, text Q - I'll get back to you within 24 hours." - }, - "askCaption": { - "raw": "Got it! Now text back a caption for your photo (think Instagram)! Keep it short & sweet, under 60 characters please.", - "override": false, - "rendered": "Got it! Now text back a caption for your photo (think Instagram)! Keep it short & sweet, under 60 characters please." - }, - "invalidCaption": { - "raw": "Sorry, I didn't get that.\n\nText back a caption for your photo -- keep it short & sweet, under 60 characters please. (but more than 3!)", - "override": false, - "rendered": "Sorry, I didn't get that.\n\nText back a caption for your photo -- keep it short & sweet, under 60 characters please. (but more than 3!)" - }, - "askWhyParticipated": { - "raw": "Last question: Why was participating in {{title}} important to you? (No need to write an essay, one sentence is good).", - "override": false, - "rendered": "Last question: Why was participating in #SaveTheMascots important to you? (No need to write an essay, one sentence is good)." - }, - "invalidWhyParticipated": { - "raw": "Sorry, I didn't get that.\n\nLast question: Why was participating in {{title}} important to you? (No need to write an essay, one sentence is good).", - "override": false, - "rendered": "Sorry, I didn't get that.\n\nLast question: Why was participating in #SaveTheMascots important to you? (No need to write an essay, one sentence is good)." - }, - "memberSupport": { - "raw": "Text back your question and I'll try to get back to you within 24 hrs.\n\nIf you want to continue {{title}}, text back {{keyword}}", - "override": false, - "rendered": "Text back your question and I'll try to get back to you within 24 hrs.\n\nIf you want to continue #SaveTheMascots, text back MASCOT" - }, - "campaignClosed": { - "raw": "Sorry, {{title}} is no longer available.\n\nText {{cmd_member_support}} for help.", - "override": false, - "rendered": "Sorry, #SaveTheMascots is no longer available.\n\nText Q for help." - }, - "askSignup": { - "raw": "{{tagline}}\n\nWant to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Help us make every college campus tobacco-free.\n\nWant to join #SaveTheMascots?\n\nYes or No" - }, - "declinedSignup": { - "raw": "Ok! Text MENU if you'd like to find a different action to take.", - "override": false, - "rendered": "Ok! Text MENU if you'd like to find a different action to take." - }, - "invalidAskSignupResponse": { - "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Sorry, I didn't get that. Did you want to join #SaveTheMascots?\n\nYes or No" - }, - "askContinue": { - "raw": "Ready to get back to {{title}}?\n\nYes or No", - "override": false, - "rendered": "Ready to get back to #SaveTheMascots?\n\nYes or No" - }, - "declinedContinue": { - "raw": "Right on, we'll check in with you about {{title}} later.\n\nText MENU if you'd like to find a different action to take.", - "override": false, - "rendered": "Right on, we'll check in with you about #SaveTheMascots later.\n\nText MENU if you'd like to find a different action to take." - }, - "invalidAskContinueResponse": { - "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Sorry, I didn't get that. Did you want to join #SaveTheMascots?\n\nYes or No" - } + ... }, "triggers": [ "mascot", From 4cf048e414203ec822536b26cd72b41d2f1d6c91 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 21:26:27 -0700 Subject: [PATCH 33/36] Adds tests for when parseBroadcastFromContentfulEntry is called with legacy type, adds comments --- config/lib/helpers/contentfulEntry.js | 9 +++-- lib/helpers/broadcast.js | 2 ++ test/lib/lib-helpers/broadcast.test.js | 35 ++++++++++++++++++-- test/utils/factories/contentful/askYesNo.js | 2 +- test/utils/factories/contentful/broadcast.js | 11 +----- 5 files changed, 43 insertions(+), 16 deletions(-) diff --git a/config/lib/helpers/contentfulEntry.js b/config/lib/helpers/contentfulEntry.js index 35069b6d..b6bd82fb 100644 --- a/config/lib/helpers/contentfulEntry.js +++ b/config/lib/helpers/contentfulEntry.js @@ -3,8 +3,13 @@ /** * This maps the fields in our Contentful types into broadcast, topic, and defaultTopicTriggers. * - * Content types with templates set are returned as topics. Each item in the templates array is a - * single value text field to be used as a bot reply template while in the topic. + * Content types with either a templates or postType property set are returned as topics. + * If the type contains a templates array, each array item should correspond to a single value text + * field defined on the content type, which is used as a bot reply template in the topic. + * If the type contains a postType string property instead, its an older content type and its + * templates are configured via config/lib/helpers/topic. Ideally we should consolidate, but it'd + * take a bit of refactoring as the topic helper config contains default values for certain text + * fields to use if the field values are blank. * * A broadcastable content type currently requires a text field named "text" and attachments field * named "attachments" to define content for the outbound broadcast. diff --git a/lib/helpers/broadcast.js b/lib/helpers/broadcast.js index 77d3b812..1f5c7143 100644 --- a/lib/helpers/broadcast.js +++ b/lib/helpers/broadcast.js @@ -108,6 +108,8 @@ function getLegacyBroadcastDataFromContentfulEntry(contentfulEntry) { const campaignConfigEntry = contentfulEntry.fields.campaign; data.campaignId = Number(contentful.getCampaignIdFromContentfulEntry(campaignConfigEntry)); data.topic = null; + // Ancient legacy broadcasts didn't require the template field, because at the time, we only + // supported askSignup broadcasts. data.message.template = contentfulEntry.fields.template || 'askSignup'; } return data; diff --git a/test/lib/lib-helpers/broadcast.test.js b/test/lib/lib-helpers/broadcast.test.js index 125018d2..852c7d2f 100644 --- a/test/lib/lib-helpers/broadcast.test.js +++ b/test/lib/lib-helpers/broadcast.test.js @@ -124,7 +124,7 @@ test('getById returns fetchById if resetCache arg is true', async () => { // parseBroadcastFromContentfulEntry test('parseBroadcastFromContentfulEntry returns object with message from getMessageTemplateFromContentfulEntryAndTemplateName', async () => { - const autoReplyBroadcastEntry = autoReplyBroadcastFactory.getValidAutoReplyBroadcast(); + const contentfulEntry = autoReplyBroadcastFactory.getValidAutoReplyBroadcast(); const stubContentType = stubs.getRandomWord(); sandbox.stub(helpers.contentfulEntry, 'getSummaryFromContentfulEntry') .returns({ type: stubContentType }); @@ -132,9 +132,31 @@ test('parseBroadcastFromContentfulEntry returns object with message from getMess sandbox.stub(helpers.contentfulEntry, 'getMessageTemplateFromContentfulEntryAndTemplateName') .returns(stubTemplate); - const result = await broadcastHelper.parseBroadcastFromContentfulEntry(autoReplyBroadcastEntry); + const result = await broadcastHelper.parseBroadcastFromContentfulEntry(contentfulEntry); + helpers.contentfulEntry.getSummaryFromContentfulEntry + .should.have.been.calledWith(contentfulEntry); result.message.text.should.equal(stubTemplate.text); result.message.template.should.equal(stubContentType); + helpers.contentfulEntry.getMessageTemplateFromContentfulEntryAndTemplateName + .should.have.been.calledWith(contentfulEntry, stubContentType); +}); + +test('parseBroadcastFromContentfulEntry calls getLegacyBroadcastDataFromContentfulEntry if legacy broadcast', async () => { + const legacyBroadcastEntry = broadcastEntryFactory.getValidCampaignBroadcast(); + const stubMessageText = stubs.getRandomMessageText; + sandbox.stub(helpers.contentfulEntry, 'isLegacyBroadcast') + .returns(true); + sandbox.stub(helpers.contentfulEntry, 'getSummaryFromContentfulEntry') + .returns({ type: stubMessageText }); + sandbox.stub(broadcastHelper, 'getLegacyBroadcastDataFromContentfulEntry') + .returns({ message: { text: stubMessageText } }); + + const result = await broadcastHelper.parseBroadcastFromContentfulEntry(legacyBroadcastEntry); + helpers.contentfulEntry.getSummaryFromContentfulEntry + .should.have.been.calledWith(legacyBroadcastEntry); + broadcastHelper.getLegacyBroadcastDataFromContentfulEntry + .should.have.been.calledWith(legacyBroadcastEntry); + result.message.text.should.equal(stubMessageText); }); // getLegacyBroadcastDataFromContentfulEntry @@ -142,7 +164,7 @@ test('getLegacyBroadcastDataFromContentfulEntry returns an object with null topi sandbox.stub(contentful, 'getAttachmentsFromContentfulEntry') .returns(attachments); const result = broadcastHelper.getLegacyBroadcastDataFromContentfulEntry(broadcastEntry); - t.is(result.topic, null); + t.falsy(result.topic); result.campaignId.should.equal(campaignId); result.message.text.should.equal(broadcastEntry.fields.message); result.message.template.should.equal(broadcastEntry.fields.template); @@ -159,3 +181,10 @@ test('getLegacyBroadcastDataFromContentfulEntry returns an object with null camp result.message.text.should.equal(hardcodedTopicBroadcastEntry.fields.message); result.message.template.should.equal('rivescript'); }); + +test('getLegacyBroadcastDataFromContentfulEntry returns an object with askSignup template if campaign broadcast and template not set', () => { + const contentfulEntry = broadcastEntryFactory.getValidCampaignBroadcast(); + delete contentfulEntry.fields.template; + const result = broadcastHelper.getLegacyBroadcastDataFromContentfulEntry(contentfulEntry); + result.message.template.should.equal('askSignup'); +}); diff --git a/test/utils/factories/contentful/askYesNo.js b/test/utils/factories/contentful/askYesNo.js index 513efb03..9398c795 100644 --- a/test/utils/factories/contentful/askYesNo.js +++ b/test/utils/factories/contentful/askYesNo.js @@ -10,7 +10,7 @@ function getValidAskYesNo(date = Date.now()) { name: stubs.getBroadcastName(), text: stubs.getRandomMessageText(), attachments: stubs.contentful.getAttachments(), - topic: textPostConfigFactory.getValidTextPostConfig(), + saidYesTopic: textPostConfigFactory.getValidTextPostConfig(), saidYes: stubs.getRandomMessageText(), saidNo: stubs.getRandomMessageText(), invalidAskYesNoResponse: stubs.getRandomMessageText(), diff --git a/test/utils/factories/contentful/broadcast.js b/test/utils/factories/contentful/broadcast.js index 8b5af52f..f956c83a 100644 --- a/test/utils/factories/contentful/broadcast.js +++ b/test/utils/factories/contentful/broadcast.js @@ -18,16 +18,7 @@ module.exports.getValidCampaignBroadcast = function getValidCampaignBroadcast(da campaignId: stubs.getCampaignId(), }, }, - attachments: [ - { - sys: { - id: stubs.getContentfulId(), - }, - fields: { - file: stubs.getAttachment(), - }, - }, - ], + attachments: stubs.contentful.getAttachments(), }, }; }; From d03a5b274a29de540a0afbbce620ccc2f3f36295 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Wed, 8 Aug 2018 22:34:34 -0700 Subject: [PATCH 34/36] Cleanup example responses --- documentation/endpoints/topics.md | 116 ++---------------------------- 1 file changed, 6 insertions(+), 110 deletions(-) diff --git a/documentation/endpoints/topics.md b/documentation/endpoints/topics.md index c2e71c68..761d23de 100644 --- a/documentation/endpoints/topics.md +++ b/documentation/endpoints/topics.md @@ -110,13 +110,9 @@ curl http://localhost:5000/v1/topics?skip=5 "updatedAt": "2018-08-08T22:20:14.822Z", "message": { "text": "Join Pump it Up? \n\nYes No", - "attachments": [ - - ], + "attachments": [], "template": "askYesNo", - "topic": { - - } + "topic": {} }, "templates": { "saidYes": { @@ -127,21 +123,15 @@ curl http://localhost:5000/v1/topics?skip=5 }, "saidNo": { "text": "Ok, we'll check in with you later.", - "topic": { - - } + "topic": {} }, "invalidAskYesNoResponse": { "text": "Sorry, I didn't get that - did you want to join for Pump It Up? Yes or No", - "topic": { - - } + "topic": {} }, "autoReply": { "text": "Sorry, I didn't understand that. Text Q if you have a question.", - "topic": { - - } + "topic": {} } }, "triggers": [ @@ -240,101 +230,7 @@ curl http://localhost:5000/v1/topics/6swLaA7HKE8AGI6iQuWk4y?cache=false \ "override": true, "rendered": "Over 111,000 people have joined the movement to bring positivity to their schools. All it takes is posting encouraging notes in places that can trigger low self-esteem. Take 5 mins to post a note today. \n\nThen, text START to share a photo of the messages you posted (and you'll be entered to win a $2000 scholarship)!" }, - "webStartPhotoPost": { - "raw": "Hey - this is Freddie from DoSomething. Thanks for joining a movement to spread positivity in school. You can do something simple to make a big impact for a stranger.\n\nLet's do this: post encouraging notes in places that can trigger low self-esteem, like school bathrooms.\n\nThen, text {{cmd_reportback}} to share a photo of the messages you posted (and you'll be entered to win a $2000 scholarship)!", - "override": true, - "rendered": "Hey - this is Freddie from DoSomething. Thanks for joining a movement to spread positivity in school. You can do something simple to make a big impact for a stranger.\n\nLet's do this: post encouraging notes in places that can trigger low self-esteem, like school bathrooms.\n\nThen, text START to share a photo of the messages you posted (and you'll be entered to win a $2000 scholarship)!" - }, - "startPhotoPostAutoReply": { - "raw": "Sorry, I didn't get that.\n\nText {{cmd_reportback}} when you're ready to submit a post for {{title}}.", - "override": false, - "rendered": "Sorry, I didn't get that.\n\nText START when you're ready to submit a post for Mirror Messages." - }, - "completedPhotoPost": { - "raw": "Great! We've got you down for {{quantity}} messages posted.\n\nTo submit another post for Mirror Messages, text {{cmd_reportback}}.", - "override": true, - "rendered": "Great! We've got you down for {{quantity}} messages posted.\n\nTo submit another post for Mirror Messages, text START." - }, - "completedPhotoPostAutoReply": { - "raw": "Sorry I didn't get that. If you've posted more messages, text {{cmd_reportback}}.\n\nText Q if you have a question, or text MENU to find a different action to take.", - "override": true, - "rendered": "Sorry I didn't get that. If you've posted more messages, text START.\n\nText Q if you have a question, or text MENU to find a different action to take." - }, - "askQuantity": { - "raw": "Sweet! First, what's the total number of messages you posted?\n\nBe sure to text in a number not a word (i.e. “4”, not “four”)", - "override": true, - "rendered": "Sweet! First, what's the total number of messages you posted?\n\nBe sure to text in a number not a word (i.e. “4”, not “four”)" - }, - "invalidQuantity": { - "raw": "Sorry, that isn't a valid number. What's the total number of messages you posted? Be sure to text in a number not a word (i.e. “4”, not “four”)", - "override": true, - "rendered": "Sorry, that isn't a valid number. What's the total number of messages you posted? Be sure to text in a number not a word (i.e. “4”, not “four”)" - }, - "askPhoto": { - "raw": "Send us your best pic of yourself and the messages you posted.", - "override": true, - "rendered": "Send us your best pic of yourself and the messages you posted." - }, - "invalidPhoto": { - "raw": "Sorry, I didn't get that.\n\nSend us your best pic of yourself and the messages you posted. \n\nIf you have a question, text Q.", - "override": true, - "rendered": "Sorry, I didn't get that.\n\nSend us your best pic of yourself and the messages you posted. \n\nIf you have a question, text Q." - }, - "askCaption": { - "raw": "Got it! Now text back a caption for your photo (think Instagram)! Keep it short & sweet, under 60 characters please.", - "override": false, - "rendered": "Got it! Now text back a caption for your photo (think Instagram)! Keep it short & sweet, under 60 characters please." - }, - "invalidCaption": { - "raw": "Sorry, I didn't get that.\n\nText back a caption for your photo -- keep it short & sweet, under 60 characters please. (but more than 3!)", - "override": false, - "rendered": "Sorry, I didn't get that.\n\nText back a caption for your photo -- keep it short & sweet, under 60 characters please. (but more than 3!)" - }, - "askWhyParticipated": { - "raw": "Last question: Why was participating in {{title}} important to you? (No need to write an essay, one sentence is good).", - "override": false, - "rendered": "Last question: Why was participating in Mirror Messages important to you? (No need to write an essay, one sentence is good)." - }, - "invalidWhyParticipated": { - "raw": "Sorry, I didn't get that.\n\nLast question: Why was participating in {{title}} important to you? (No need to write an essay, one sentence is good).", - "override": false, - "rendered": "Sorry, I didn't get that.\n\nLast question: Why was participating in Mirror Messages important to you? (No need to write an essay, one sentence is good)." - }, - "memberSupport": { - "raw": "Text back your question and I'll try to get back to you within 24 hrs.\n\nIf you want to continue {{title}}, text back {{keyword}}", - "override": false, - "rendered": "Text back your question and I'll try to get back to you within 24 hrs.\n\nIf you want to continue Mirror Messages, text back MIRROR" - }, - "campaignClosed": { - "raw": "Sorry, {{title}} is no longer available.\n\nText {{cmd_member_support}} for help.", - "override": false, - "rendered": "Sorry, Mirror Messages is no longer available.\n\nText Q for help." - }, - "askSignup": { - "raw": "{{tagline}}\n\nWant to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Boost a stranger's self-esteem with just a sticky note!\n\nWant to join Mirror Messages?\n\nYes or No" - }, - "declinedSignup": { - "raw": "Ok! Text MENU if you'd like to find a different action to take.", - "override": false, - "rendered": "Ok! Text MENU if you'd like to find a different action to take." - }, - "invalidAskSignupResponse": { - "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", - "override": false, - "rendered": "Sorry, I didn't get that. Did you want to join Mirror Messages?\n\nYes or No" - }, - "askContinue": { - "raw": "Ready to get back to {{title}}?\n\nYes or No", - "override": false, - "rendered": "Ready to get back to Mirror Messages?\n\nYes or No" - }, - "declinedContinue": { - "raw": "Right on, we'll check in with you about {{title}} later.\n\nText MENU if you'd like to find a different action to take.", - "override": false, - "rendered": "Right on, we'll check in with you about Mirror Messages later.\n\nText MENU if you'd like to find a different action to take." - }, + ... "invalidAskContinueResponse": { "raw": "Sorry, I didn't get that. Did you want to join {{title}}?\n\nYes or No", "override": false, From 8dc28ee16a5e373597f7f750d65dc917c095deb7 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Thu, 9 Aug 2018 09:01:22 -0700 Subject: [PATCH 35/36] Fix links to topics docs --- documentation/endpoints/broadcasts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/endpoints/broadcasts.md b/documentation/endpoints/broadcasts.md index 0f108e3f..2e2298dd 100644 --- a/documentation/endpoints/broadcasts.md +++ b/documentation/endpoints/broadcasts.md @@ -13,8 +13,8 @@ Name | Type | Description `message.text` | String | `message.attachments` | Array | `message.template` | String | -`message.topic` | Object | If an id property exists, its saved to the [conversation topic](https://github.com/DoSomething/gambit-conversations/blob/master/documentation/endpoints/topics.md) when broadcast is sent -`templates` | Object | Defines replies for when this broadcast is saved as a [conversation topic](https://github.com/DoSomething/gambit-conversations/blob/master/documentation/endpoints/topics.md) -- used in `askYesNo`, which will update the conversation topic again if user answers yes +`message.topic` | Object | If an id property exists, its saved to the [conversation topic](https://github.com/DoSomething/gambit-campaigns/blob/master/documentation/endpoints/topics.md) when broadcast is sent +`templates` | Object | Defines replies for when this broadcast is saved as a [conversation topic](https://github.com/DoSomething/gambit-campaigns/blob/master/documentation/endpoints/topics.md) -- used in `askYesNo`, which will update the conversation topic again if user answers yes Legacy fields (only used for type `broadcast`) From d017d0cfb48a7a6dc8144421b4baeeab909305f9 Mon Sep 17 00:00:00 2001 From: Aaron Schachter Date: Thu, 9 Aug 2018 09:37:08 -0700 Subject: [PATCH 36/36] Bumped version number to 5.12.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38025889..5f6536bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gambit-campaigns", - "version": "5.11.0", + "version": "5.12.0", "description": "The DoSomething.org chatbot service for campaigns and their activity.", "license": "MIT", "repository": {