From 74c41897ad363fe3b925c9b6c9b219fc6fe12d03 Mon Sep 17 00:00:00 2001 From: Peter deHaan Date: Tue, 20 Jun 2017 12:18:14 -0700 Subject: [PATCH] Fix a bunch of ESLint and HTMLLint errors --- .eslintrc.yml | 20 +- circle.yml | 5 + frontend/src/.eslintrc.yml | 3 + frontend/src/fileSender.js | 2 +- frontend/src/utils.js | 2 +- package-lock.json | 1082 +++++++++++++++--------------------- package.json | 19 +- test/.eslintrc.yml | 21 + test/aws.storage.test.js | 149 ++--- test/local.storage.test.js | 170 +++--- views/index.handlebars | 2 + 11 files changed, 669 insertions(+), 806 deletions(-) create mode 100644 frontend/src/.eslintrc.yml create mode 100644 test/.eslintrc.yml diff --git a/.eslintrc.yml b/.eslintrc.yml index 2ba41056..63748891 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,13 +1,11 @@ env: - browser: true es6: true - jquery: true - mocha: true node: true extends: - eslint:recommended - plugin:node/recommended + - plugin:security/recommended plugins: - node @@ -16,18 +14,10 @@ plugins: root: true rules: - security/detect-buffer-noassert: warn - security/detect-child-process: warn - security/detect-disable-mustache-escape: warn - security/detect-eval-with-expression: warn - security/detect-new-buffer: warn - security/detect-no-csrf-before-method-override: warn - security/detect-non-literal-fs-filename: warn - security/detect-non-literal-regexp: warn - security/detect-non-literal-require: warn - security/detect-possible-timing-attacks: warn - security/detect-pseudoRandomBytes: warn - security/detect-unsafe-regex: warn + node/no-unpublished-require: off + + security/detect-non-literal-fs-filename: off + security/detect-object-injection: off eqeqeq: error no-console: warn diff --git a/circle.yml b/circle.yml index 10acfda0..9e8a94b3 100644 --- a/circle.yml +++ b/circle.yml @@ -9,3 +9,8 @@ deployment: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker build . -t mozilla/portal:latest - docker push mozilla/portal:latest + +test: + override: + - npm run lint + - npm test diff --git a/frontend/src/.eslintrc.yml b/frontend/src/.eslintrc.yml new file mode 100644 index 00000000..2eb01e5b --- /dev/null +++ b/frontend/src/.eslintrc.yml @@ -0,0 +1,3 @@ +env: + browser: true + jquery: true diff --git a/frontend/src/fileSender.js b/frontend/src/fileSender.js index fea1daf2..1651147b 100644 --- a/frontend/src/fileSender.js +++ b/frontend/src/fileSender.js @@ -1,5 +1,5 @@ const EventEmitter = require('events'); -const { ivToStr, notify } = require('./utils'); +const { ivToStr } = require('./utils'); class FileSender extends EventEmitter { constructor(file) { diff --git a/frontend/src/utils.js b/frontend/src/utils.js index 3c504705..b5ea5563 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -21,7 +21,7 @@ function strToIv(str) { } function notify(str) { - if (!("Notification" in window)) { + if (!('Notification' in window)) { return; } else if (Notification.permission === 'granted') { new Notification(str) diff --git a/package-lock.json b/package-lock.json index 9635de90..4446cc00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,13 +4,11 @@ "lockfileVersion": 1, "dependencies": { "accepts": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", + "version": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz", "integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo=" }, "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "version": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", "dev": true }, @@ -58,12 +56,6 @@ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -75,8 +67,7 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "anymatch": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", + "version": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", "integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=", "dev": true }, @@ -87,14 +78,12 @@ "dev": true }, "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "version": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true }, "arr-flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", + "version": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=", "dev": true }, @@ -111,8 +100,7 @@ "dev": true }, "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "version": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", "dev": true }, @@ -123,19 +111,16 @@ "dev": true }, "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "version": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "version": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", "dev": true }, "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "version": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", "dev": true }, @@ -158,14 +143,12 @@ "dev": true }, "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "version": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", "dev": true }, "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "version": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, @@ -181,14 +164,12 @@ "dev": true }, "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "version": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", "dev": true }, "astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", + "version": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", "dev": true }, @@ -198,8 +179,7 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "version": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, @@ -221,18 +201,15 @@ "dev": true }, "balanced-match": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "version": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" }, "base64-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", + "version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=" }, "binary-extensions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", + "version": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz", "integrity": "sha1-SOyNFt9Dd+rl+liEaCSAr02Vx3Q=", "dev": true }, @@ -243,14 +220,13 @@ "dev": true }, "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "version": "4.11.7", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.7.tgz", + "integrity": "sha512-LxFiV5mefv0ley0SzqkOPR1bC4EbpPx8LkOz5vMe/Yi15t5hzwgO/G+tc7wOtL4PZTYjwHu8JnEiSLumuSjSfA==", "dev": true }, "body-parser": { - "version": "1.17.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", + "version": "https://registry.npmjs.org/body-parser/-/body-parser-1.17.2.tgz", "integrity": "sha1-+IkqvI+eYn1Crtr7yma/WrmRBO4=", "dependencies": { "bytes": { @@ -261,13 +237,11 @@ } }, "brace-expansion": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", + "version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=" }, "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "version": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true }, @@ -278,14 +252,12 @@ "dev": true }, "browser-pack": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", + "version": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz", "integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=", "dev": true }, "browser-resolve": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "version": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", "dev": true, "dependencies": { @@ -304,8 +276,7 @@ "dev": true }, "browserify": { - "version": "14.4.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.4.0.tgz", + "version": "https://registry.npmjs.org/browserify/-/browserify-14.4.0.tgz", "integrity": "sha1-CJo0Y69Y0OSNjNQHCz90ZU1avKk=", "dev": true, "dependencies": { @@ -378,8 +349,7 @@ "dev": true }, "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "version": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", "dev": true }, @@ -390,8 +360,7 @@ "dev": true }, "buffer": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.6.tgz", + "version": "https://registry.npmjs.org/buffer/-/buffer-5.0.6.tgz", "integrity": "sha1-LqZp9+7Atu2gWwj4tf9mGyhXNYg=" }, "buffer-shims": { @@ -413,8 +382,7 @@ "dev": true }, "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "version": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, @@ -445,8 +413,7 @@ } }, "busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "version": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=" }, "bytes": { @@ -455,8 +422,7 @@ "integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo=" }, "cached-path-relative": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", + "version": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz", "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", "dev": true }, @@ -513,8 +479,7 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=" }, "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "version": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true }, @@ -536,12 +501,6 @@ "integrity": "sha1-oPSGAeAWFk37LG2JHjgMlsramDk=", "dev": true }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, "cli-width": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz", @@ -615,8 +574,7 @@ } }, "combine-source-map": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", + "version": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.7.2.tgz", "integrity": "sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4=", "dev": true, "dependencies": { @@ -635,13 +593,11 @@ "dev": true }, "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", + "version": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", "dev": true, "dependencies": { @@ -665,25 +621,21 @@ "integrity": "sha1-aU6NIGgb/kkCgsiriGvpjwn0L+c=" }, "connect-busboy": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/connect-busboy/-/connect-busboy-0.0.2.tgz", + "version": "https://registry.npmjs.org/connect-busboy/-/connect-busboy-0.0.2.tgz", "integrity": "sha1-rFyclmchcYheV2xmsr/ZXTuxEJc=" }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "version": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true }, "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "version": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "version": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" }, "content-security-policy-builder": { @@ -692,84 +644,35 @@ "integrity": "sha1-2R8bB2I2wRmFDH3umSS/VeBXcrM=" }, "content-type": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "version": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=" }, "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "version": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", "dev": true }, "convict": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/convict/-/convict-3.0.0.tgz", + "version": "https://registry.npmjs.org/convict/-/convict-3.0.0.tgz", "integrity": "sha1-JZ8wv7h+4JRIYEhiA1GdRntNUbU=", "dependencies": { - "depd": { - "version": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=" - }, - "json5": { - "version": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" - }, - "lodash.clonedeep": { - "version": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "moment": { - "version": "https://registry.npmjs.org/moment/-/moment-2.17.1.tgz", - "integrity": "sha1-/tlQYGPzaxDwZsi1mhRNf66+HYI=" - }, - "validator": { - "version": "https://registry.npmjs.org/validator/-/validator-7.0.0.tgz", - "integrity": "sha1-x03rgGNRL6w1VHk45vCxUEooL9I=" - }, - "varify": { - "version": "https://registry.npmjs.org/varify/-/varify-0.2.0.tgz", - "integrity": "sha1-GR2p/p3EzWjQ0USY1OKpEP9OZRY=", - "optional": true, - "dependencies": { - "redeyed": { - "version": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz", - "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=", - "optional": true, - "dependencies": { - "esprima": { - "version": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz", - "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k=", - "optional": true - } - } - }, - "through": { - "version": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "optional": true - } - } } } }, "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "version": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "version": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { @@ -811,8 +714,7 @@ "dev": true }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "version": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true }, @@ -867,12 +769,6 @@ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true - }, "dasherize": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dasherize/-/dasherize-2.0.0.tgz", @@ -884,8 +780,7 @@ "integrity": "sha1-agdBWgHJH69KMuONnfunH2HLIP4=" }, "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "version": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, @@ -895,8 +790,7 @@ "integrity": "sha1-MrSzEF6IYQQ6b5rHVdgOVC02WzE=" }, "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", + "version": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=" }, "decamelize": { @@ -916,8 +810,7 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=" }, "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "version": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true }, @@ -928,13 +821,11 @@ "dev": true }, "depd": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "version": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=" }, "deps-sort": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", + "version": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.0.tgz", "integrity": "sha1-CRckkC6EZYJg65EHSMzNGvbiH7U=", "dev": true }, @@ -945,8 +836,7 @@ "dev": true }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "version": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "detect-file": { @@ -956,14 +846,12 @@ "dev": true }, "detective": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", + "version": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", "dev": true }, "dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "version": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=" }, "diff": { @@ -1040,8 +928,7 @@ } }, "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "version": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", "dev": true }, @@ -1069,8 +956,7 @@ "integrity": "sha1-WTKJDcn04vGeXrAqIAJuXl78j1g=" }, "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "version": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" }, "duplexer": { @@ -1080,8 +966,7 @@ "dev": true }, "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "version": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "dev": true, "dependencies": { @@ -1106,8 +991,7 @@ } }, "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "version": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { @@ -1123,13 +1007,11 @@ "dev": true }, "encodeurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "version": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "version": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=" }, "entities": { @@ -1156,45 +1038,8 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true }, - "es5-ext": { - "version": "0.10.23", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.23.tgz", - "integrity": "sha1-dXi1G+l0IHpUh4IbVlOMIk5Oezg=", - "dev": true - }, - "es6-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", - "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", - "dev": true - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "dev": true - }, "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "version": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, "escape-string-regexp": { @@ -1202,32 +1047,160 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "dev": true - }, "eslint": { - "version": "3.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", - "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.0.0.tgz", + "integrity": "sha1-cnfAFDf99B3M0WjVqg5Jt1yh8mA=", "dev": true, "dependencies": { + "ansi-escapes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-2.0.0.tgz", + "integrity": "sha1-W65SvkJIeN2Xg+iRDj/Cki6DyBs=", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "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 }, + "inquirer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.1.1.tgz", + "integrity": "sha512-H50sHQwgvvaTBd3HpKMVtL/u6LoHDvYym51gd7bGQe/+9HkCE+J0/3N5FJLfd6O6oz44hHewC2Pc2LodzWVafQ==", + "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 + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true + }, + "pluralize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-4.0.0.tgz", + "integrity": "sha1-WbcIwcAZCi9pLxx2GMRGsFL9F2I=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "readable-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.1.tgz", + "integrity": "sha512-u6cxIvtbZcjq2HH71Zc/SRBUl7vbv62szIqmqqGpK3HY5J1c0kR/LUzKUpeoFgMzapvVAlBD+QY56ilWmHi4Nw==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "string_decoder": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz", + "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=", + "dev": true, + "dependencies": { + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", + "dev": true + } + } + }, + "string-width": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz", + "integrity": "sha1-Y1xUNsxypuDDh87KJ41OLuxSaH4=", + "dev": true + }, + "table": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", + "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", + "dev": true } } }, + "eslint-plugin-mocha": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-4.11.0.tgz", + "integrity": "sha1-kRk6L1XiCl41l0BUoAidMBmO5Xg=", + "dev": true + }, "eslint-plugin-node": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.0.0.tgz", @@ -1235,9 +1208,15 @@ "dev": true }, "eslint-plugin-security": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.3.0.tgz", - "integrity": "sha1-8Qbi9rm4G3V/julp00RW7w5R3Oo=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", + "integrity": "sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true }, "espree": { @@ -1285,16 +1264,9 @@ "dev": true }, "etag": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", + "version": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=" }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true - }, "event-stream": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", @@ -1302,8 +1274,7 @@ "dev": true }, "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "version": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", "dev": true }, @@ -1319,21 +1290,13 @@ "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", "dev": true }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "version": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true }, "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "version": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true }, @@ -1349,8 +1312,7 @@ "integrity": "sha1-UnNWeN4YUwiQ2Ne5XwrGNkCVgJQ=" }, "express": { - "version": "4.15.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", + "version": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=" }, "express-handlebars": { @@ -1364,9 +1326,22 @@ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", "dev": true }, + "external-editor": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.0.4.tgz", + "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", + "dev": true, + "dependencies": { + "iconv-lite": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", + "integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA==", + "dev": true + } + } + }, "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "version": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true }, @@ -1376,12 +1351,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true - }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -1389,8 +1358,7 @@ "dev": true }, "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "version": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", "dev": true }, @@ -1401,14 +1369,12 @@ "dev": true }, "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "version": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "dev": true }, "finalhandler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", + "version": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", "integrity": "sha1-70fneVDpmXgOhgIqVg4yF+DQzIk=" }, "find-up": { @@ -1456,14 +1422,12 @@ "dev": true }, "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "version": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "version": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true }, @@ -1479,8 +1443,7 @@ "dev": true }, "forwarded": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", + "version": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=" }, "frameguard": { @@ -1489,8 +1452,7 @@ "integrity": "sha1-e8rUae57lukdEs6zlZx4I1qScuk=" }, "fresh": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", + "version": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=" }, "from": { @@ -1506,8 +1468,7 @@ "dev": true }, "fs-extra": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", + "version": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=" }, "fs.realpath": { @@ -1517,8 +1478,7 @@ "dev": true }, "fsevents": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz", + "version": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.1.tgz", "integrity": "sha1-8Z/Sj0Pur3YWgOUZogPE0LPTGv8=", "dev": true, "optional": true, @@ -2212,8 +2172,7 @@ } }, "function-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "version": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" }, "gather-stream": { @@ -2252,14 +2211,12 @@ "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=" }, "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "version": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true }, "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "version": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true }, @@ -2318,8 +2275,7 @@ "dev": true }, "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "version": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "graceful-readlink": { @@ -2340,8 +2296,7 @@ "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=" }, "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "version": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true }, @@ -2363,9 +2318,9 @@ "dev": true }, "hash.js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", - "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.1.tgz", + "integrity": "sha512-I2TYCUjYQMmqmRMCp6jKMC5bvdXxGIZ/heITRR/0F1u0OP920ImEj/cXt3WgcTKBnNYGn7enxUzdai3db829JA==", "dev": true }, "helmet": { @@ -2418,8 +2373,7 @@ "dev": true }, "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "version": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", "dev": true }, @@ -2502,24 +2456,20 @@ } }, "http-errors": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", + "version": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=" }, "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "version": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", + "version": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" }, "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "version": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" }, "ienoopen": { @@ -2552,8 +2502,7 @@ "dev": true }, "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "version": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, @@ -2563,8 +2512,7 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { @@ -2574,8 +2522,7 @@ "dev": true }, "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "version": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", "dev": true, "dependencies": { @@ -2587,15 +2534,8 @@ } } }, - "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "dev": true - }, "insert-module-globals": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "version": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz", "integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=", "dev": true }, @@ -2604,12 +2544,6 @@ "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", "integrity": "sha1-EdEUfraz9Fgr31M3s31UFYTp5B4=" }, - "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", - "dev": true - }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", @@ -2617,8 +2551,7 @@ "dev": true }, "ipaddr.js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", + "version": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", "integrity": "sha1-HgOlL9rYOou7KyXL9JmLTP/NPew=" }, "irregular-plurals": { @@ -2648,14 +2581,12 @@ "dev": true }, "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "version": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true }, "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "version": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" }, "is-builtin-module": { @@ -2683,26 +2614,22 @@ "dev": true }, "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "version": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", "dev": true }, "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "version": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true }, "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "version": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "version": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", "dev": true }, @@ -2719,8 +2646,7 @@ "dev": true }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "version": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true }, @@ -2731,8 +2657,7 @@ "dev": true }, "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "version": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true }, @@ -2775,17 +2700,21 @@ } }, "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "version": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", "dev": true }, "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "version": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -2817,8 +2746,7 @@ "dev": true }, "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "version": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-supported-regexp-flag": { @@ -2852,19 +2780,16 @@ "dev": true }, "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "version": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "version": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, "dependencies": { @@ -2910,6 +2835,12 @@ "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", "dev": true }, + "jschardet": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.4.2.tgz", + "integrity": "sha1-KqEH8UKvQSHRRWWdRPUIMJYeaZo=", + "dev": true + }, "json-parse-helpfulerror": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", @@ -2917,8 +2848,7 @@ "dev": true }, "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "version": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", "dev": true }, @@ -2928,9 +2858,13 @@ "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", "dev": true }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, "jsonfile": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.0.tgz", + "version": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.0.tgz", "integrity": "sha1-kufHRE5f/V+jLmqa6LhQNN+DR9A=" }, "jsonfilter": { @@ -2978,14 +2912,12 @@ } }, "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "version": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "version": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, @@ -2996,14 +2928,12 @@ "dev": true }, "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", + "version": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", "dev": true }, "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "version": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" }, "known-css-properties": { @@ -3013,8 +2943,7 @@ "dev": true }, "labeled-stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", + "version": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz", "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", "dev": true }, @@ -3056,8 +2985,7 @@ "dev": true }, "lexical-scope": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", + "version": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", "dev": true }, @@ -3082,8 +3010,7 @@ } }, "lodash": { - "version": "4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, "lodash._baseassign": { @@ -3116,6 +3043,11 @@ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, "lodash.create": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", @@ -3159,8 +3091,7 @@ "dev": true }, "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "version": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", "dev": true }, @@ -3193,9 +3124,8 @@ "dev": true }, "lru-cache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.0.tgz", - "integrity": "sha512-aHGs865JXz6bkB4AHL+3AhyvTFKL3iZamKVWjIUKnXOXyasJvqPK8WAjOnAQKQZVpeXDVz19u1DD0r/12bWAdQ==", + "version": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.0.tgz", + "integrity": "sha1-Wb5JpoO42YapOfHKYP22mJ9LIEY=", "dev": true }, "map-cache": { @@ -3223,8 +3153,7 @@ "dev": true }, "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "version": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "meow": { @@ -3247,18 +3176,15 @@ "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=" }, "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "version": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "version": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "version": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true }, @@ -3269,20 +3195,23 @@ "dev": true }, "mime": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "version": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" }, "mime-db": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", + "version": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=" }, "mime-types": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", + "version": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, "minimalistic-assert": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", @@ -3296,9 +3225,8 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=" }, "minimist": { "version": "0.0.10", @@ -3352,8 +3280,7 @@ } }, "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", + "version": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", "dev": true, "dependencies": { @@ -3383,14 +3310,18 @@ "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=", "dev": true }, + "moment": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.17.1.tgz", + "integrity": "sha1-/tlQYGPzaxDwZsi1mhRNf66+HYI=" + }, "mozlog": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mozlog/-/mozlog-2.1.1.tgz", "integrity": "sha1-JxCOChxQvOMuo3Q4kRiDrjdO77s=" }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "version": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multimatch": { @@ -3399,15 +3330,8 @@ "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", "dev": true }, - "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", - "dev": true - }, "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "version": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=", "dev": true, "optional": true @@ -3425,8 +3349,7 @@ "dev": true }, "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "version": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, "nocache": { @@ -3435,9 +3358,8 @@ "integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA=" }, "node-fetch": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", - "integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==" + "version": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", + "integrity": "sha1-iZyz0KPJL5UsR/G4dvTIrqvUANU=" }, "normalize-package-data": { "version": "2.3.8", @@ -3446,8 +3368,7 @@ "dev": true }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "version": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true }, @@ -3538,8 +3459,7 @@ } }, "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "version": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true }, @@ -3550,8 +3470,7 @@ "dev": true }, "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "version": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=" }, "once": { @@ -3565,12 +3484,6 @@ "integrity": "sha1-daRvgNpseqpbTarhekcZi9llJJQ=", "dev": true }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -3591,8 +3504,7 @@ } }, "os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "version": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", "dev": true }, @@ -3608,21 +3520,24 @@ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true }, + "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 + }, "outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "version": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", "dev": true }, "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "version": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", "dev": true }, "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "version": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", "dev": true }, @@ -3639,8 +3554,7 @@ "dev": true }, "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "version": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true }, @@ -3657,18 +3571,15 @@ "dev": true }, "parseurl": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "version": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=" }, "path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "version": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=" }, "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "version": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", "dev": true }, @@ -3679,8 +3590,7 @@ "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { @@ -3690,14 +3600,12 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "version": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "version": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", "dev": true }, @@ -3714,8 +3622,7 @@ "dev": true }, "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "version": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "path-type": { @@ -3771,12 +3678,6 @@ "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", "dev": true }, - "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", - "dev": true - }, "postcss": { "version": "5.2.17", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", @@ -3846,8 +3747,7 @@ "dev": true }, "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "version": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, @@ -3858,8 +3758,7 @@ "dev": true }, "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "version": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "process-nextick-args": { @@ -3868,20 +3767,13 @@ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", - "dev": true - }, "promise": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz", "integrity": "sha1-SJZUxpJha4qlWwck+oCbt9tJxb8=" }, "proxy-addr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", + "version": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", "integrity": "sha1-J+VF9pYKRKYn2bREZ+NcG2tM4vM=" }, "proxyquire": { @@ -3905,8 +3797,7 @@ "dev": true }, "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "version": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, @@ -3922,8 +3813,7 @@ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", + "version": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, "querystring": { @@ -3932,14 +3822,18 @@ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "version": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "ramda": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", + "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=", + "dev": true + }, "randomatic": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz", + "version": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz", "integrity": "sha1-EQ3Kv/OX6dz/fAeJzMCkmt8exbs=", "dev": true }, @@ -3950,21 +3844,19 @@ "dev": true, "dependencies": { "safe-buffer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", - "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true } } }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "version": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", + "version": "https://registry.npmjs.org/raw-body/-/raw-body-2.2.0.tgz", "integrity": "sha1-mUl2z2pQlqQRYoQEkvC9xdbn+5Y=", "dependencies": { "bytes": { @@ -3981,8 +3873,7 @@ "dev": true }, "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "version": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", "dev": true, "dependencies": { @@ -4019,13 +3910,11 @@ "dev": true }, "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=" }, "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "version": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "dependencies": { @@ -4049,12 +3938,6 @@ } } }, - "readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "dev": true - }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -4067,19 +3950,30 @@ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true }, + "redeyed": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz", + "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=", + "optional": true, + "dependencies": { + "esprima": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz", + "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k=", + "optional": true + } + } + }, "redis": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.7.1.tgz", + "version": "https://registry.npmjs.org/redis/-/redis-2.7.1.tgz", "integrity": "sha1-fVb3h1uYsgQQtxU58dh47Vjr9Go=" }, "redis-commands": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", + "version": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.1.tgz", "integrity": "sha1-gdgm9F+pyLIBH0zXoP5ZfSQdRCs=" }, "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "version": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" }, "referrer-policy": { @@ -4088,8 +3982,7 @@ "integrity": "sha1-NXdOtzW/UPtsB46DM0tHI1AgfXk=" }, "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", + "version": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", "dev": true }, @@ -4100,14 +3993,12 @@ "dev": true }, "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "version": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", "dev": true }, "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "version": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "repeating": { @@ -4141,8 +4032,7 @@ "dev": true }, "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "version": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", "dev": true }, @@ -4158,12 +4048,6 @@ "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", "dev": true }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - }, "ret": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.14.tgz", @@ -4195,18 +4079,18 @@ "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", "dev": true }, - "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", - "dev": true - }, "rx-lite": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", "dev": true }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true + }, "safe-buffer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", @@ -4237,13 +4121,11 @@ "dev": true }, "send": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", + "version": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", "integrity": "sha1-UBP5+ZAj31DRvZiSwZ4979HVMwk=" }, "serve-static": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", + "version": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz", "integrity": "sha1-n0uhni8wMMVH+K+ZEHg47DjVseI=" }, "set-blocking": { @@ -4253,60 +4135,39 @@ "dev": true }, "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "version": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", "dev": true }, "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "version": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" }, "sha.js": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", + "version": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", "dev": true }, "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "version": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "dev": true }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "version": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "version": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "version": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", "dev": true }, - "shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", - "dev": true, - "dependencies": { - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true - } - } - }, "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", @@ -4406,13 +4267,11 @@ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "version": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "version": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "dependencies": { @@ -4443,8 +4302,7 @@ "dev": true }, "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "version": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "dependencies": { @@ -4469,8 +4327,7 @@ } }, "stream-http": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.1.tgz", + "version": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.1.tgz", "integrity": "sha1-VGpRdBrVprB+njGwsQRBqRffUoo=", "dev": true, "dependencies": { @@ -4495,8 +4352,7 @@ } }, "stream-splicer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", + "version": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.0.tgz", "integrity": "sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM=", "dev": true, "dependencies": { @@ -4521,8 +4377,7 @@ } }, "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "version": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" }, "strftime": { @@ -4531,8 +4386,7 @@ "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=" }, "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "string-width": { @@ -4655,8 +4509,7 @@ "dev": true }, "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "version": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "dev": true, "dependencies": { @@ -4697,31 +4550,10 @@ "dev": true }, "syntax-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", + "version": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", "dev": true }, - "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", - "dev": true, - "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 - }, - "string-width": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz", - "integrity": "sha1-Y1xUNsxypuDDh87KJ41OLuxSaH4=", - "dev": true - } - } - }, "text-encoding": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", @@ -4735,14 +4567,11 @@ "dev": true }, "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "version": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "version": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "dependencies": { @@ -4767,14 +4596,18 @@ } }, "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "version": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", "dev": true }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dev": true + }, "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "version": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, @@ -4791,8 +4624,7 @@ "dev": true }, "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "version": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, @@ -4809,13 +4641,11 @@ "dev": true }, "type-is": { - "version": "1.6.15", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "version": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=" }, "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "version": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, @@ -4840,8 +4670,7 @@ "optional": true }, "umd": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", + "version": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", "dev": true }, @@ -4858,13 +4687,11 @@ "dev": true }, "universalify": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.0.tgz", + "version": "https://registry.npmjs.org/universalify/-/universalify-0.1.0.tgz", "integrity": "sha1-nrHEZR3rzGcMyU8adXYjMruWd3g=" }, "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "version": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "url": { @@ -4872,20 +4699,13 @@ "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=" }, - "user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", - "dev": true - }, "utcstring": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz", "integrity": "sha1-Qw/VEKt/yVtdWRDJAteYgMIIQ2s=" }, "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "version": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dependencies": { "inherits": { @@ -4902,8 +4722,7 @@ "dev": true }, "utils-merge": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "version": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" }, "uuid": { @@ -4917,26 +4736,33 @@ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true }, + "validator": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-7.0.0.tgz", + "integrity": "sha1-x03rgGNRL6w1VHk45vCxUEooL9I=" + }, + "varify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/varify/-/varify-0.2.0.tgz", + "integrity": "sha1-GR2p/p3EzWjQ0USY1OKpEP9OZRY=", + "optional": true + }, "vary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", + "version": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=" }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "version": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "dev": true }, "watchify": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", + "version": "https://registry.npmjs.org/watchify/-/watchify-3.9.0.tgz", "integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=", "dev": true }, "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "version": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", "dev": true }, @@ -4995,8 +4821,7 @@ "integrity": "sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=" }, "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true }, @@ -5007,8 +4832,7 @@ "dev": true }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "version": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "dev": true }, diff --git a/package.json b/package.json index 68274e00..0c8c6993 100644 --- a/package.json +++ b/package.json @@ -24,17 +24,18 @@ "browserify": "^14.4.0", "buffer-shims": "^1.0.0", "cross-env": "^5.0.0", - "eslint": "3.19.0", - "eslint-plugin-node": "5.0.0", - "eslint-plugin-security": "1.3.0", - "htmllint-cli": "0.0.6", + "eslint": "^4.0.0", + "eslint-plugin-mocha": "^4.11.0", + "eslint-plugin-node": "^5.0.0", + "eslint-plugin-security": "^1.4.0", + "htmllint-cli": "^0.0.6", "mocha": "^3.4.2", - "npm-run-all": "4.0.2", - "prettier": "1.4.4", + "npm-run-all": "^4.0.2", + "prettier": "^1.4.4", "proxyquire": "^1.8.0", "sinon": "^2.3.5", - "stylelint": "7.11.0", - "stylelint-config-standard": "16.0.0", + "stylelint": "^7.11.0", + "stylelint-config-standard": "^16.0.0", "watchify": "^3.9.0" }, "engines": { @@ -44,7 +45,7 @@ "repository": "mozilla/something-awesome", "scripts": { "dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js", - "format": "prettier 'frontend/src/*.js' 'server/*.js' 'public/*.css' --single-quote --write", + "format": "prettier 'frontend/src/*.js' 'public/*.css' 'server/*.js' 'test/*.js' --single-quote --write", "lint": "npm-run-all lint:*", "lint:css": "stylelint 'public/*.css'", "lint:html": "htmllint 'views/*.handlebars'", diff --git a/test/.eslintrc.yml b/test/.eslintrc.yml new file mode 100644 index 00000000..b65502fd --- /dev/null +++ b/test/.eslintrc.yml @@ -0,0 +1,21 @@ +env: + mocha: true + +extends: + - plugin:mocha/recommended + +plugins: + - mocha + - node + +rules: + node/no-unpublished-require: off + + mocha/handle-done-callback: error + mocha/no-exclusive-tests: error + mocha/no-identical-title: warn + mocha/no-mocha-arrows: error + mocha/no-nested-tests: error + mocha/no-pending-tests: error + mocha/no-return-and-callback: warn + mocha/no-skipped-tests: error diff --git a/test/aws.storage.test.js b/test/aws.storage.test.js index e8b7b102..a0778766 100644 --- a/test/aws.storage.test.js +++ b/test/aws.storage.test.js @@ -6,12 +6,12 @@ const crypto = require('crypto'); const conf = require('../server/config.js'); conf.notLocalHost = true; -let redisStub = {}; -let exists = sinon.stub(); -let hget = sinon.stub(); -let hmset = sinon.stub(); -let expire = sinon.spy(); -let del = sinon.stub(); +const redisStub = {}; +const exists = sinon.stub(); +const hget = sinon.stub(); +const hmset = sinon.stub(); +const expire = sinon.spy(); +const del = sinon.stub(); redisStub.createClient = function() { return { @@ -21,145 +21,156 @@ redisStub.createClient = function() { hmset: hmset, expire: expire, del: del - } -} + }; +}; -let fsStub = {}; +const fsStub = {}; fsStub.statSync = sinon.stub(); fsStub.createReadStream = sinon.stub(); fsStub.createWriteStream = sinon.stub(); fsStub.unlinkSync = sinon.stub(); -let logStub = {}; +const logStub = {}; logStub.info = sinon.stub(); logStub.error = sinon.stub(); -let s3Stub = {}; +const s3Stub = {}; s3Stub.headObject = sinon.stub(); s3Stub.getObject = sinon.stub(); s3Stub.upload = sinon.stub(); s3Stub.deleteObject = sinon.stub(); -let awsStub = { - S3: function() { - return s3Stub; - } -} +const awsStub = { + S3: function() { + return s3Stub; + } +}; const storage = proxyquire('../server/storage', { - 'redis': redisStub, - 'fs': fsStub, - './log.js': function() { return logStub }, + redis: redisStub, + fs: fsStub, + './log.js': function() { + return logStub; + }, 'aws-sdk': awsStub }); describe('Testing Length using aws', function() { it('Filesize returns properly if id exists', function() { - s3Stub.headObject.callsArgWith(1, null, {ContentLength: 1}); - return storage.length('123') - .then(reply => assert.equal(reply, 1)) - .catch(err => assert.fail()) - }) + s3Stub.headObject.callsArgWith(1, null, { ContentLength: 1 }); + return storage + .length('123') + .then(reply => assert.equal(reply, 1)) + .catch(err => assert.fail()); + }); it('Filesize fails if the id does not exist', function() { s3Stub.headObject.callsArgWith(1, new Error(), null); - return storage.length('123') - .then(reply => assert.fail()) - .catch(err => assert(1)) - }) + return storage + .length('123') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); }); describe('Testing Get using aws', function() { - it('Should not error out when the file exists', function() { - let spy = sinon.spy(); + const spy = sinon.spy(); s3Stub.getObject.returns({ createReadStream: spy }); storage.get('123'); assert(spy.calledOnce); - }) + }); it('Should error when the file does not exist', function() { - let err = function() { throw new Error(); } - let spy = sinon.spy(err); + const err = function() { + throw new Error(); + }; + const spy = sinon.spy(err); s3Stub.getObject.returns({ createReadStream: spy }); assert.equal(storage.get('123'), null); assert(spy.threw()); - }) + }); }); describe('Testing Set using aws', function() { beforeEach(function() { expire.reset(); - }) + }); after(function() { crypto.randomBytes.restore(); - }) + }); it('Should pass when the file is successfully uploaded and no bitly key', function() { conf.bitly_key = null; - const buf = new Buffer(10); + const buf = Buffer.alloc(10); sinon.stub(crypto, 'randomBytes').returns(buf); s3Stub.upload.callsArgWith(1, null, {}); - return storage.set('123', {}, 'Filename.moz', 'url.com') - .then(reply => { - assert.equal(reply.uuid, buf.toString('hex')); - assert.equal(reply.url, 'url.com'); - assert.notEqual(reply.uuid, null); - assert(expire.calledOnce); - assert(expire.calledWith('123', 86400000)); - }) - .catch(err => assert.fail()); - }) + return storage + .set('123', {}, 'Filename.moz', 'url.com') + .then(reply => { + assert.equal(reply.uuid, buf.toString('hex')); + assert.equal(reply.url, 'url.com'); + assert.notEqual(reply.uuid, null); + assert(expire.calledOnce); + assert(expire.calledWith('123', 86400000)); + }) + .catch(err => assert.fail()); + }); it('Should fail if there was an error during uploading', function() { s3Stub.upload.callsArgWith(1, new Error(), null); - return storage.set('123', {}, 'Filename.moz', 'url.com') - .then(reply => assert.fail()) - .catch(err => assert(1)); - }) + return storage + .set('123', {}, 'Filename.moz', 'url.com') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); }); describe('Testing Delete from aws', function() { it('Returns successfully if the id is deleted off aws', function() { hget.callsArgWith(2, null, 'delete_token'); s3Stub.deleteObject.callsArgWith(1, null, {}); - return storage.delete('file_id', 'delete_token') - .then(reply => assert(1), err => assert.fail()) - }) + return storage + .delete('file_id', 'delete_token') + .then(_reply => assert(1), err => assert.fail()); + }); it('Delete fails if id exists locally but does not in aws', function() { hget.callsArgWith(2, null, 'delete_token'); s3Stub.deleteObject.callsArgWith(1, new Error(), {}); - return storage.delete('file_id', 'delete_token') - .then(reply => assert.fail(), err => assert(1)) - }) + return storage + .delete('file_id', 'delete_token') + .then(_reply => assert.fail(), err => assert(1)); + }); it('Delete fails if the delete token does not match', function() { hget.callsArgWith(2, null, {}); - return storage.delete('Filename.moz', 'delete_token') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) + return storage + .delete('Filename.moz', 'delete_token') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); }); describe('Testing Forced Delete from aws', function() { it('Deletes properly if id exists', function() { s3Stub.deleteObject.callsArgWith(1, null, {}); - return storage.forceDelete('file_id', 'delete_token') - .then(reply => assert(1), err => assert.fail()); - }) + return storage + .forceDelete('file_id', 'delete_token') + .then(_reply => assert(1), err => assert.fail()); + }); it('Deletes fails if id does not exist', function() { s3Stub.deleteObject.callsArgWith(1, new Error(), {}); - return storage.forceDelete('file_id') - .then(reply => assert.fail(), err => assert(1)) - }) - -}) \ No newline at end of file + return storage + .forceDelete('file_id') + .then(_reply => assert.fail(), err => assert(1)); + }); +}); diff --git a/test/local.storage.test.js b/test/local.storage.test.js index c4c6c9c5..bb8ad187 100644 --- a/test/local.storage.test.js +++ b/test/local.storage.test.js @@ -2,15 +2,15 @@ const assert = require('assert'); const sinon = require('sinon'); const proxyquire = require('proxyquire'); -const conf = require('../server/config.js') +const conf = require('../server/config.js'); conf.notLocalHost = false; -let redisStub = {}; -let exists = sinon.stub(); -let hget = sinon.stub(); -let hmset = sinon.stub(); -let expire = sinon.stub(); -let del = sinon.stub(); +const redisStub = {}; +const exists = sinon.stub(); +const hget = sinon.stub(); +const hmset = sinon.stub(); +const expire = sinon.stub(); +const del = sinon.stub(); redisStub.createClient = function() { return { @@ -20,80 +20,84 @@ redisStub.createClient = function() { hmset: hmset, expire: expire, del: del - } -} + }; +}; -let fsStub = {}; +const fsStub = {}; fsStub.statSync = sinon.stub(); fsStub.createReadStream = sinon.stub(); fsStub.createWriteStream = sinon.stub(); fsStub.unlinkSync = sinon.stub(); -let logStub = {}; +const logStub = {}; logStub.info = sinon.stub(); logStub.error = sinon.stub(); const storage = proxyquire('../server/storage', { - 'redis': redisStub, - 'fs': fsStub, - './log.js': function() { return logStub } + redis: redisStub, + fs: fsStub, + './log.js': function() { + return logStub; + } }); describe('Testing Exists from local filesystem', function() { it('Exists returns true when file exists', function() { exists.callsArgWith(1, null, 1); - return storage.exists('test') - .then((reply) => assert(reply)); - }) + return storage.exists('test').then(reply => assert(reply)); + }); it('Exists returns false when file does not exist', function() { exists.callsArgWith(1, null, 0); - return storage.exists('test') - .then((reply) => assert(!reply)); - }) + return storage.exists('test').then(reply => assert(!reply)); + }); }); describe('Testing Filename from local filesystem', function() { it('Filename returns properly if id exists', function() { hget.callsArgWith(2, null, 'Filename.moz'); - return storage.filename('test') - .then(reply => assert(1)) - .catch(reply => assert.fail()) - }) + return storage + .filename('test') + .then(_reply => assert(1)) + .catch(err => assert.fail()); + }); it('Filename fails if id does not exist', function() { hget.callsArgWith(2, null, 'Filename.moz'); - return storage.filename('test') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) -}) + return storage + .filename('test') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); +}); describe('Testing Length from local filesystem', function() { it('Filesize returns properly if id exists', function() { - fsStub.statSync.returns({size: 10}); - return storage.length('Filename.moz') - .then(reply => assert(1)) - .catch(reply => assert.fail()) - }) + fsStub.statSync.returns({ size: 10 }); + return storage + .length('Filename.moz') + .then(_reply => assert(1)) + .catch(err => assert.fail()); + }); it('Filesize fails if the id does not exist', function() { fsStub.statSync.returns(null); - return storage.length('Filename.moz') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) -}) + return storage + .length('Filename.moz') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); +}); describe('Testing Get from local filesystem', function() { it('Get returns properly if id exists', function() { fsStub.createReadStream.returns(1); if (storage.get('Filename.moz')) { - assert(1) + assert(1); } else { assert.fail(); } - }) + }); it('Get fails if the id does not exist', function() { fsStub.createReadStream.returns(null); @@ -102,71 +106,73 @@ describe('Testing Get from local filesystem', function() { } else { assert(1); } - }) -}) + }); +}); describe('Testing Set to local filesystem', function() { it('Successfully writes the file to the local filesystem', function() { - let stub = sinon.stub(); - stub.withArgs('close', sinon.match.any).callsArgWithAsync(1) + const stub = sinon.stub(); + stub.withArgs('close', sinon.match.any).callsArgWithAsync(1); stub.withArgs('error', sinon.match.any).returns(1); - fsStub.createWriteStream.returns({ on: stub }) + fsStub.createWriteStream.returns({ on: stub }); - return storage.set('test', { pipe: sinon.stub() }, 'Filename.moz', 'moz.la') - .then(reply => { - assert(reply.uuid); - assert.equal(reply.url, 'moz.la'); - }) - .catch(reply => assert.fail()) - }) + return storage + .set('test', { pipe: sinon.stub() }, 'Filename.moz', 'moz.la') + .then(reply => { + assert(reply.uuid); + assert.equal(reply.url, 'moz.la'); + }) + .catch(err => assert.fail()); + }); it('Fails when the file is not properly written to the local filesystem', function() { - let stub = sinon.stub(); - stub.withArgs('error', sinon.match.any).callsArgWithAsync(1) + const stub = sinon.stub(); + stub.withArgs('error', sinon.match.any).callsArgWithAsync(1); stub.withArgs('close', sinon.match.any).returns(1); - fsStub.createWriteStream.returns({ on: stub }) + fsStub.createWriteStream.returns({ on: stub }); - return storage.set('test', {pipe: sinon.stub()}, 'Filename.moz', 'moz.la') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) -}) + return storage + .set('test', { pipe: sinon.stub() }, 'Filename.moz', 'moz.la') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); +}); describe('Testing Delete from local filesystem', function() { it('Deletes properly if id exists', function() { hget.callsArgWith(2, null, '123'); fsStub.unlinkSync.returns(1); - return storage.delete('Filename.moz', '123') - .then(reply => assert(reply)) - .catch(reply => assert.fail()) - }) + return storage + .delete('Filename.moz', '123') + .then(reply => assert(reply)) + .catch(err => assert.fail()); + }); it('Delete fails if id does not exist', function() { hget.callsArgWith(2, null, null); - return storage.delete('Filename.moz', '123') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) + return storage + .delete('Filename.moz', '123') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); it('Delete fails if the delete token does not match', function() { hget.callsArgWith(2, null, null); - return storage.delete('Filename.moz', '123') - .then(reply => assert.fail()) - .catch(reply => assert(1)) - }) -}) + return storage + .delete('Filename.moz', '123') + .then(_reply => assert.fail()) + .catch(err => assert(1)); + }); +}); describe('Testing Forced Delete from local filesystem', function() { it('Deletes properly if id exists', function() { fsStub.unlinkSync.returns(1); - return storage.forceDelete('Filename.moz') - .then(reply => assert(reply)) - }) + return storage.forceDelete('Filename.moz').then(reply => assert(reply)); + }); it('Deletes fails if id does not exist, but no reject is called', function() { fsStub.unlinkSync.returns(0); - return storage.forceDelete('Filename.moz') - .then(reply => assert(!reply)) - }) - -}) \ No newline at end of file + return storage.forceDelete('Filename.moz').then(reply => assert(!reply)); + }); +}); diff --git a/views/index.handlebars b/views/index.handlebars index 45a979ad..8b881424 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -54,7 +54,9 @@ Uploading
+
Upload
+