diff --git a/frontend/src/fileReceiver.js b/frontend/src/fileReceiver.js index c030fb71..a1a50457 100644 --- a/frontend/src/fileReceiver.js +++ b/frontend/src/fileReceiver.js @@ -34,7 +34,7 @@ class FileReceiver extends EventEmitter { data: this.result, fname: xhr .getResponseHeader('Content-Disposition') - .match(/filename="(.+)"/)[1] + .match(/=(.+)/)[1] }); }; diff --git a/frontend/src/fileSender.js b/frontend/src/fileSender.js index 776bddb0..69fe597a 100644 --- a/frontend/src/fileSender.js +++ b/frontend/src/fileSender.js @@ -85,10 +85,13 @@ class FileSender extends EventEmitter { xhr.onreadystatechange = () => { if (xhr.readyState == XMLHttpRequest.DONE) { + // uuid field and url field + let responseObj = JSON.parse(xhr.responseText); resolve({ + url: responseObj.url, fileId: fileId, secretKey: keydata.k, - deleteToken: xhr.responseText + deleteToken: responseObj.uuid }); } }; diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 2c478610..40ee4b90 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -58,8 +58,7 @@ $(document).ready(function() { progress.innerText = `Progress: ${percentComplete}%`; }); fileSender.upload().then(info => { - const url = `${window.location - .origin}/download/${info.fileId}/#${info.secretKey}`; + const url = info.url.trim() + `#${info.secretKey}`.trim(); $('#link').attr('value', url); link.innerHTML = url; localStorage.setItem(info.fileId, info.deleteToken); diff --git a/package-lock.json b/package-lock.json index 51eaa966..d511dbb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,15 +14,27 @@ "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", "dev": true }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=" + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true }, "anymatch": { "version": "1.3.0", @@ -77,6 +89,11 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asap": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz", + "integrity": "sha1-UidltQw1EEkOUtfc/ghe+bqWlY8=" + }, "asn1.js": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", @@ -92,7 +109,8 @@ "ast-types": { "version": "0.9.8", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.8.tgz", - "integrity": "sha1-bLakC+ujH0nyCSjihDn8FKPasHg=" + "integrity": "sha1-bLakC+ujH0nyCSjihDn8FKPasHg=", + "dev": true }, "astw": { "version": "2.2.0", @@ -100,21 +118,50 @@ "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", "dev": true }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", "dev": true }, + "aws-sdk": { + "version": "2.64.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.64.0.tgz", + "integrity": "sha1-Nl2n2Mfz7WTCINX3Ov14YgxJI6M=", + "dependencies": { + "crypto-browserify": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", + "integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=" + } + } + }, "babel-code-frame": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz", - "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=" + "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", + "dev": true }, "babylon": { "version": "7.0.0-beta.8", "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.8.tgz", - "integrity": "sha1-K9xa42YEFELCfgaMzm8NfAbqmUk=" + "integrity": "sha1-K9xa42YEFELCfgaMzm8NfAbqmUk=", + "dev": true }, "balanced-match": { "version": "0.4.2", @@ -124,8 +171,7 @@ "base64-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=", - "dev": true + "integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=" }, "binary-extensions": { "version": "1.8.0", @@ -246,8 +292,7 @@ "buffer": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.0.6.tgz", - "integrity": "sha1-LqZp9+7Atu2gWwj4tf9mGyhXNYg=", - "dev": true + "integrity": "sha1-LqZp9+7Atu2gWwj4tf9mGyhXNYg=" }, "buffer-shims": { "version": "1.0.0", @@ -273,9 +318,9 @@ "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=" }, "bytes": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", - "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz", + "integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo=" }, "cached-path-relative": { "version": "1.0.1", @@ -283,10 +328,23 @@ "integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=", "dev": true }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "optional": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "optional": true + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=" + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true }, "chokidar": { "version": "1.7.0", @@ -300,6 +358,20 @@ "integrity": "sha1-7qvxlEGc6QDaMBjCB9IS8qbfCgc=", "dev": true }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "optional": true, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "optional": true + } + } + }, "color-convert": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", @@ -374,6 +446,61 @@ "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", "dev": true }, + "convict": { + "version": "3.0.0", + "resolved": "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", + "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", @@ -407,6 +534,18 @@ "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", "dev": true }, + "cross-env": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.0.0.tgz", + "integrity": "sha1-VlzK5NCWdkQaUIf0Bv52YaKckxs=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true + }, "crypto-browserify": { "version": "3.11.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", @@ -424,6 +563,17 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=" }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "optional": true + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=" + }, "defined": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", @@ -522,6 +672,11 @@ "resolved": "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", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -530,12 +685,14 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true }, "etag": { "version": "1.8.0", @@ -571,6 +728,18 @@ "resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz", "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=" }, + "express-handlebars": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/express-handlebars/-/express-handlebars-3.0.0.tgz", + "integrity": "sha1-gKBwu4GbCeSvLKbQeA91zgXnXC8=", + "dependencies": { + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=" + } + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -597,7 +766,8 @@ "flow-parser": { "version": "0.45.0", "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.45.0.tgz", - "integrity": "sha1-qinUrifwaqAoF3crug/L7+9+YvA=" + "integrity": "sha1-qinUrifwaqAoF3crug/L7+9+YvA=", + "dev": true }, "for-in": { "version": "1.0.2", @@ -611,6 +781,11 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "forwarded": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", @@ -629,7 +804,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "1.1.1", @@ -639,688 +815,688 @@ "optional": true, "dependencies": { "abbrev": { - "version": "1.1.0", - "bundled": true, + "version": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", "dev": true, "optional": true }, "ansi-regex": { - "version": "2.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "ansi-styles": { - "version": "2.2.1", - "bundled": true, + "version": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true, "optional": true }, "aproba": { - "version": "1.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz", + "integrity": "sha1-ldNgDwdxCqDpKYxyatXs8urLq6s=", "dev": true, "optional": true }, "are-we-there-yet": { - "version": "1.1.2", - "bundled": true, + "version": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz", + "integrity": "sha1-gORw6VoIR5T+GJkmLFZnxuiN4bM=", "dev": true, "optional": true }, "asn1": { - "version": "0.2.3", - "bundled": true, + "version": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", "dev": true, "optional": true }, "assert-plus": { - "version": "0.2.0", - "bundled": true, + "version": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", "dev": true, "optional": true }, "asynckit": { - "version": "0.4.0", - "bundled": true, + "version": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true, "optional": true }, "aws-sign2": { - "version": "0.6.0", - "bundled": true, + "version": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", "dev": true, "optional": true }, "aws4": { - "version": "1.6.0", - "bundled": true, + "version": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "dev": true, "optional": true }, "balanced-match": { - "version": "0.4.2", - "bundled": true, + "version": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", "dev": true }, "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "dev": true, "optional": true }, "block-stream": { - "version": "0.0.9", - "bundled": true, + "version": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true }, "boom": { - "version": "2.10.1", - "bundled": true, + "version": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true }, "brace-expansion": { - "version": "1.1.6", - "bundled": true, + "version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "integrity": "sha1-cZfX6qm4fmSDkOph/GbIRCdCDfk=", "dev": true }, "buffer-shims": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, "caseless": { - "version": "0.11.0", - "bundled": true, + "version": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", "dev": true, "optional": true }, "chalk": { - "version": "1.1.3", - "bundled": true, + "version": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "optional": true }, "code-point-at": { - "version": "1.1.0", - "bundled": true, + "version": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "combined-stream": { - "version": "1.0.5", - "bundled": true, + "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true }, "commander": { - "version": "2.9.0", - "bundled": true, + "version": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", "dev": true, "optional": true }, "concat-map": { - "version": "0.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { - "version": "1.1.0", - "bundled": true, + "version": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "cryptiles": { - "version": "2.0.5", - "bundled": true, + "version": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "optional": true }, "dashdash": { - "version": "1.14.1", - "bundled": true, + "version": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "optional": true, "dependencies": { "assert-plus": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } } }, "debug": { - "version": "2.2.0", - "bundled": true, + "version": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", "dev": true, "optional": true }, "deep-extend": { - "version": "0.4.1", - "bundled": true, + "version": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz", + "integrity": "sha1-7+QRPQgIX05vlod1mBD4B0aeIlM=", "dev": true, "optional": true }, "delayed-stream": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, "delegates": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "dev": true, "optional": true }, "escape-string-regexp": { - "version": "1.0.5", - "bundled": true, + "version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true, "optional": true }, "extend": { - "version": "3.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", + "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", "dev": true, "optional": true }, "extsprintf": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", + "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, "forever-agent": { - "version": "0.6.1", - "bundled": true, + "version": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true, "optional": true }, "form-data": { - "version": "2.1.2", - "bundled": true, + "version": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", + "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ=", "dev": true, "optional": true }, "fs.realpath": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "fstream": { - "version": "1.0.10", - "bundled": true, + "version": "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz", + "integrity": "sha1-YE6Kkv4m/9n2+uMDmdSYThqyKCI=", "dev": true }, "fstream-ignore": { - "version": "1.0.5", - "bundled": true, + "version": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", + "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "dev": true, "optional": true }, "gauge": { - "version": "2.7.3", - "bundled": true, + "version": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz", + "integrity": "sha1-HCOFX5YvF7OtPQ3HRD8wRULt/gk=", "dev": true, "optional": true }, "generate-function": { - "version": "2.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", "dev": true, "optional": true }, "generate-object-property": { - "version": "1.2.0", - "bundled": true, + "version": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, "optional": true }, "getpass": { - "version": "0.1.6", - "bundled": true, + "version": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", + "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=", "dev": true, "optional": true, "dependencies": { "assert-plus": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } } }, "glob": { - "version": "7.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", "dev": true }, "graceful-fs": { - "version": "4.1.11", - "bundled": true, + "version": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, "graceful-readlink": { - "version": "1.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "dev": true, "optional": true }, "har-validator": { - "version": "2.0.6", - "bundled": true, + "version": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", "dev": true, "optional": true }, "has-ansi": { - "version": "2.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "optional": true }, "has-unicode": { - "version": "2.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "hawk": { - "version": "3.1.3", - "bundled": true, + "version": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "optional": true }, "hoek": { - "version": "2.16.3", - "bundled": true, + "version": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", "dev": true }, "http-signature": { - "version": "1.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "optional": true }, "inflight": { - "version": "1.0.6", - "bundled": true, + "version": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true }, "inherits": { - "version": "2.0.3", - "bundled": true, + "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { - "version": "1.3.4", - "bundled": true, + "version": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", "dev": true, "optional": true }, "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true }, "is-my-json-valid": { - "version": "2.15.0", - "bundled": true, + "version": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", + "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs=", "dev": true, "optional": true }, "is-property": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", "dev": true, "optional": true }, "is-typedarray": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true, "optional": true }, "isarray": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isstream": { - "version": "0.1.2", - "bundled": true, + "version": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true, "optional": true }, "jodid25519": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", + "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=", "dev": true, "optional": true }, "jsbn": { - "version": "0.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true, "optional": true }, "json-schema": { - "version": "0.2.3", - "bundled": true, + "version": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true, "optional": true }, "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true, "optional": true }, "jsonpointer": { - "version": "4.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", "dev": true, "optional": true }, "jsprim": { - "version": "1.3.1", - "bundled": true, + "version": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", + "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI=", "dev": true, "optional": true }, "mime-db": { - "version": "1.26.0", - "bundled": true, + "version": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz", + "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8=", "dev": true }, "mime-types": { - "version": "2.1.14", - "bundled": true, + "version": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", + "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4=", "dev": true }, "minimatch": { - "version": "3.0.3", - "bundled": true, + "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", "dev": true }, "minimist": { - "version": "0.0.8", - "bundled": true, + "version": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { - "version": "0.5.1", - "bundled": true, + "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true }, "ms": { - "version": "0.7.1", - "bundled": true, + "version": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", "dev": true, "optional": true }, "node-pre-gyp": { - "version": "0.6.33", - "bundled": true, + "version": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz", + "integrity": "sha1-ZArFUZj2qSWXLgwWxKwmoDTV7Mk=", "dev": true, "optional": true }, "nopt": { - "version": "3.0.6", - "bundled": true, + "version": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "optional": true }, "npmlog": { - "version": "4.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz", + "integrity": "sha1-0DlQ4OeM4VJ7om0qdZLpNIrD518=", "dev": true, "optional": true }, "number-is-nan": { - "version": "1.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "oauth-sign": { - "version": "0.8.2", - "bundled": true, + "version": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", "dev": true, "optional": true }, "object-assign": { - "version": "4.1.1", - "bundled": true, + "version": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { - "version": "1.4.0", - "bundled": true, + "version": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "pinkie": { - "version": "2.0.4", - "bundled": true, + "version": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true, "optional": true }, "pinkie-promise": { - "version": "2.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "optional": true }, "process-nextick-args": { - "version": "1.0.7", - "bundled": true, + "version": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "dev": true }, "punycode": { - "version": "1.4.1", - "bundled": true, + "version": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true, "optional": true }, "qs": { - "version": "6.3.1", - "bundled": true, + "version": "https://registry.npmjs.org/qs/-/qs-6.3.1.tgz", + "integrity": "sha1-kYwLO802Z5dyuvE1say0wWUe150=", "dev": true, "optional": true }, "rc": { - "version": "1.1.7", - "bundled": true, + "version": "https://registry.npmjs.org/rc/-/rc-1.1.7.tgz", + "integrity": "sha1-xepWS7B6/5/TpbMukGwdOmWUD+o=", "dev": true, "optional": true, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, + "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } } }, "readable-stream": { - "version": "2.2.2", - "bundled": true, + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz", + "integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4=", "dev": true, "optional": true }, "request": { - "version": "2.79.0", - "bundled": true, + "version": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", + "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", "dev": true, "optional": true }, "rimraf": { - "version": "2.5.4", - "bundled": true, + "version": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz", + "integrity": "sha1-loAAk8vxoMhr2VtGJUZ1NcKd+gQ=", "dev": true }, "semver": { - "version": "5.3.0", - "bundled": true, + "version": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true, "optional": true }, "set-blocking": { - "version": "2.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { - "version": "3.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "sntp": { - "version": "1.0.9", - "bundled": true, + "version": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "optional": true }, "sshpk": { - "version": "1.10.2", - "bundled": true, + "version": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", + "integrity": "sha1-1agEziJpVRVjjnmNviMnPeBwpfo=", "dev": true, "optional": true, "dependencies": { "assert-plus": { - "version": "1.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true, "optional": true } } }, "string_decoder": { - "version": "0.10.31", - "bundled": true, + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "string-width": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true }, "stringstream": { - "version": "0.0.5", - "bundled": true, + "version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", "dev": true, "optional": true }, "strip-ansi": { - "version": "3.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true }, "strip-json-comments": { - "version": "2.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "supports-color": { - "version": "2.0.0", - "bundled": true, + "version": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true, "optional": true }, "tar": { - "version": "2.2.1", - "bundled": true, + "version": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true }, "tar-pack": { - "version": "3.3.0", - "bundled": true, + "version": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.3.0.tgz", + "integrity": "sha1-MJMYFkGPVa/E0hd1r91nIM7kXa4=", "dev": true, "optional": true, "dependencies": { "once": { - "version": "1.3.3", - "bundled": true, + "version": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", "dev": true, "optional": true }, "readable-stream": { - "version": "2.1.5", - "bundled": true, + "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz", + "integrity": "sha1-ZvqLcg4UOLNkaB8q0aY8YYRIydA=", "dev": true, "optional": true } } }, "tough-cookie": { - "version": "2.3.2", - "bundled": true, + "version": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "dev": true, "optional": true }, "tunnel-agent": { - "version": "0.4.3", - "bundled": true, + "version": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", "dev": true, "optional": true }, "tweetnacl": { - "version": "0.14.5", - "bundled": true, + "version": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true, "optional": true }, "uid-number": { - "version": "0.0.6", - "bundled": true, + "version": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true, "optional": true }, "util-deprecate": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "uuid": { - "version": "3.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", "dev": true, "optional": true }, "verror": { - "version": "1.3.6", - "bundled": true, + "version": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", + "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=", "dev": true, "optional": true }, "wide-align": { - "version": "1.1.0", - "bundled": true, + "version": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz", + "integrity": "sha1-QO3egCpx/qHwcNo+YtzaLnrdlq0=", "dev": true, "optional": true }, "wrappy": { - "version": "1.0.2", - "bundled": true, + "version": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "xtend": { - "version": "4.0.1", - "bundled": true, + "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true, "optional": true } @@ -1329,18 +1505,19 @@ "function-bind": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=", - "dev": true + "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" }, "get-stdin": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true }, "glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true }, "glob-base": { "version": "0.3.0", @@ -1359,6 +1536,18 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, + "handlebars": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.10.tgz", + "integrity": "sha1-PTDHGLCaPZbyPqTMH0A8TTup/08=", + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=" + } + } + }, "has": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", @@ -1368,7 +1557,8 @@ "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=" + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true }, "hash-base": { "version": "2.0.2", @@ -1413,8 +1603,7 @@ "ieee754": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" }, "indexof": { "version": "0.0.1", @@ -1458,8 +1647,7 @@ "is-buffer": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", - "dev": true + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" }, "is-dotfile": { "version": "1.0.3", @@ -1509,11 +1697,28 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-windows": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz", + "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=", + "dev": true + }, "isarray": { "version": "0.0.1", "resolved": "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", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", @@ -1531,17 +1736,25 @@ "jest-matcher-utils": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz", - "integrity": "sha1-Xs2bY1ZdKwAfYfv37Ex/U3lkVk0=" + "integrity": "sha1-Xs2bY1ZdKwAfYfv37Ex/U3lkVk0=", + "dev": true }, "jest-validate": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-19.0.0.tgz", - "integrity": "sha1-jGMYog7P6roLpTeL+7gner3tQXM=" + "integrity": "sha1-jGMYog7P6roLpTeL+7gner3tQXM=", + "dev": true + }, + "jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=" }, "js-tokens": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz", - "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=" + "integrity": "sha1-COnxMkhKLEWjCQfp3E1VZ7fxFNc=", + "dev": true }, "json-stable-stringify": { "version": "0.0.1", @@ -1575,8 +1788,7 @@ "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" }, "labeled-stream-splicer": { "version": "2.0.0", @@ -1584,10 +1796,17 @@ "integrity": "sha1-pS4dE4AkwAuGscDJH2d5GLiuClk=", "dev": true }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "optional": true + }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true }, "lexical-scope": { "version": "1.2.0", @@ -1595,12 +1814,28 @@ "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", "dev": true }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, "lodash.memoize": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", "dev": true }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "lru-cache": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.0.tgz", + "integrity": "sha1-Wb5JpoO42YapOfHKYP22mJ9LIEY=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1658,12 +1893,13 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=" }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true }, "module-deps": { "version": "4.1.1", @@ -1708,12 +1944,27 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "node-fetch": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", + "integrity": "sha1-iZyz0KPJL5UsR/G4dvTIrqvUANU=" + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + }, + "object.assign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.0.4.tgz", + "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=" + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -1730,6 +1981,18 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } + }, "os-browserify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", @@ -1819,17 +2082,20 @@ "prettier": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.3.1.tgz", - "integrity": "sha1-+g6oS0WsC6beah5M7Nz/kA1WMVE=" + "integrity": "sha1-+g6oS0WsC6beah5M7Nz/kA1WMVE=", + "dev": true }, "pretty-format": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "dev": true, "dependencies": { "ansi-styles": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.0.0.tgz", - "integrity": "sha1-VATpOlRMT+x/BIJil3vr/jFV4ME=" + "integrity": "sha1-VATpOlRMT+x/BIJil3vr/jFV4ME=", + "dev": true } } }, @@ -1844,11 +2110,22 @@ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", "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", "integrity": "sha1-J+VF9pYKRKYn2bREZ+NcG2tM4vM=" }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "public-encrypt": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", @@ -1869,8 +2146,7 @@ "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", @@ -1993,8 +2269,7 @@ "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "resolve": { "version": "1.3.3", @@ -2002,6 +2277,12 @@ "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "optional": true + }, "ripemd160": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", @@ -2014,6 +2295,11 @@ "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", "dev": true }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" + }, "send": { "version": "0.15.3", "resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz", @@ -2047,6 +2333,18 @@ "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", + "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", + "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", @@ -2056,8 +2354,7 @@ "source-map": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "dev": true + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" }, "statuses": { "version": "1.3.1", @@ -2181,7 +2478,8 @@ "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true }, "subarg": { "version": "1.0.0", @@ -2192,7 +2490,8 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true }, "syntax-error": { "version": "1.3.0", @@ -2261,6 +2560,18 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "uglify-js": { + "version": "2.8.28", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.28.tgz", + "integrity": "sha512-WqKNbmNJKzIdIEQu/U2ytgGBbhCy2PVks94GoetczOAJ/zCgVu2CuO7gguI5KPFGPtUtI1dmPQl6h0D4cPzypA==", + "optional": true + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, "umd": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", @@ -2314,6 +2625,11 @@ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" }, + "uuid": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=" + }, "vary": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", @@ -2331,16 +2647,55 @@ "integrity": "sha1-8HX9LoqGrN6Eztum5cKgvt1SPZ4=", "dev": true }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "xml2js": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz", + "integrity": "sha1-F76T6q4/O3eTWceVtBlwWogX6Gg=" + }, + "xmlbuilder": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", + "integrity": "sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=" + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "optional": true } } } diff --git a/package.json b/package.json index 462d07fb..41934f48 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,23 @@ "version": "1.0.0", "author": "Mozilla (https://mozilla.org)", "dependencies": { + "aws-sdk": "^2.62.0", "body-parser": "^1.17.2", + "bytes": "^2.5.0", + "color-convert": "^1.9.0", "connect-busboy": "0.0.2", + "convict": "^3.0.0", "express": "^4.15.3", + "express-handlebars": "^3.0.0", "fs-extra": "^3.0.1", + "node-fetch": "^1.7.1", "path": "^0.12.7", "redis": "^2.7.1" }, "devDependencies": { "browserify": "^14.4.0", + "buffer-shims": "^1.0.0", + "cross-env": "^5.0.0", "prettier": "^1.3.1", "watchify": "^3.9.0" }, @@ -20,7 +28,8 @@ "repository": "mozilla/something-awesome", "scripts": { "format": "prettier --single-quote --write 'frontend/src/*.js' 'server/*.js'", - "start": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js", + "dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js", + "start": "watchify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js", "test": "echo \"Error: no test specified\" && exit 1" } } diff --git a/server/config.js b/server/config.js new file mode 100644 index 00000000..1e1119a4 --- /dev/null +++ b/server/config.js @@ -0,0 +1,35 @@ +const convict = require('convict'); + +let conf = convict({ + bitly_key: { + format: String, + default: 'localhost', + env: 'P2P_BITLY_KEY' + }, + s3_bucket: { + format: String, + default: 'localhost', + env: 'P2P_S3_BUCKET' + }, + redis_host: { + format: String, + default: 'localhost', + env: 'P2P_REDIS_HOST' + }, + listen_port: { + format: 'port', + default: 1443, + arg: 'port', + env: 'P2P_LISTEN_PORT' + }, + env: { + format: ['production', 'development'], + default: 'development', + env: 'NODE_ENV' + } +}); + +// Perform validation +conf.validate({ allowed: 'strict' }); + +module.exports = conf.getProperties(); diff --git a/server/portal_server.js b/server/portal_server.js index 3d518ec4..31329320 100644 --- a/server/portal_server.js +++ b/server/portal_server.js @@ -1,49 +1,85 @@ const express = require('express'); +const exphbs = require('express-handlebars'); const busboy = require('connect-busboy'); const path = require('path'); const fs = require('fs-extra'); const bodyParser = require('body-parser'); const crypto = require('crypto'); +const stream = require('stream'); +const fetch = require('node-fetch'); +const bytes = require('bytes'); +const conf = require('./config.js'); +const storage = require('./storage.js'); + +let notLocalHost = + conf.env === 'production' && + conf.s3_bucket !== 'localhost' && + conf.bitly_key !== 'localhost'; const app = express(); -const redis = require('redis'), - client = redis.createClient(); -client.on('error', err => { - console.log(err); -}); +app.engine('handlebars', exphbs({ defaultLayout: 'main' })); +app.set('view engine', 'handlebars'); app.use(busboy()); app.use(bodyParser.json()); + app.use(express.static(path.join(__dirname, '../public'))); +app.get('/', (req, res) => { + res.render('index'); +}); + app.get('/download/:id', (req, res) => { - res.sendFile(path.join(__dirname + '/../public/download.html')); + let id = req.params.id; + storage.filename(id).then(filename => { + storage + .length(id) + .then(contentLength => { + res.render('download', { + filename: filename, + filesize: bytes(contentLength) + }); + }) + .catch(() => { + res.render('download'); + }); + }); }); app.get('/assets/download/:id', (req, res) => { let id = req.params.id; if (!validateID(id)) { - res.send(404); + res.sendStatus(404); return; } - client.hget(id, 'filename', (err, reply) => { - // maybe some expiration logic too - if (!reply) { - res.sendStatus(404); - } else { - res.setHeader('Content-Disposition', 'attachment; filename=' + reply); - res.setHeader('Content-Type', 'application/octet-stream'); - - res.download(__dirname + '/../static/' + id, reply, err => { - if (!err) { - client.del(id); - fs.unlinkSync(__dirname + '/../static/' + id); - } + storage + .filename(id) + .then(reply => { + storage.length(id).then(contentLength => { + res.writeHead(200, { + 'Content-Disposition': 'attachment; filename=' + reply, + 'Content-Type': 'application/octet-stream', + 'Content-Length': contentLength + }); }); - } - }); + + let file_stream = storage.get(id); + + file_stream.on(notLocalHost ? 'finish' : 'close', () => { + storage.forceDelete(id).then(err => { + if (!err) { + console.log('Deleted.'); + } + }); + }); + + file_stream.pipe(res); + }) + .catch(err => { + res.sendStatus(404); + }); }); app.post('/delete/:id', (req, res) => { @@ -60,15 +96,14 @@ app.post('/delete/:id', (req, res) => { res.sendStatus(404); } - client.hget(id, 'delete', (err, reply) => { - if (!reply) { - res.sendStatus(404); - } else { - client.del(id); - fs.unlinkSync(__dirname + '/../static/' + id); - res.sendStatus(200); - } - }); + storage + .delete(id, delete_token) + .then(err => { + if (!err) { + console.log('Deleted.'); + } + }) + .catch(err => res.sendStatus(404)); }); app.post('/upload/:id', (req, res, next) => { @@ -77,34 +112,19 @@ app.post('/upload/:id', (req, res, next) => { return; } - let fstream; req.pipe(req.busboy); req.busboy.on('file', (fieldname, file, filename) => { console.log('Uploading: ' + filename); + let url = `${req.protocol}://${req.get('host')}/download/${req.params.id}/`; - //Path where image will be uploaded - fstream = fs.createWriteStream(__dirname + '/../static/' + req.params.id); - file.pipe(fstream); - fstream.on('close', () => { - let id = req.params.id; - let uuid = crypto.randomBytes(10).toString('hex'); - - client.hmset([id, 'filename', filename, 'delete', uuid]); - - // delete the file off the server in 24 hours - // setTimeout(() => { - // fs.unlinkSync(__dirname + "/static/" + id); - // }, 86400000); - - client.expire(id, 86400000); - console.log('Upload Finished of ' + filename); - res.send(uuid); + storage.set(req.params.id, file, filename, url).then(linkAndID => { + res.json(linkAndID); }); }); }); -app.listen(3000, () => { - console.log('Portal app listening on port 3000!'); +let server = app.listen(conf.listen_port, () => { + console.log(`Portal app listening on port ${conf.listen_port}!`); }); let validateID = route_id => { diff --git a/server/storage.js b/server/storage.js new file mode 100644 index 00000000..2b72cb9c --- /dev/null +++ b/server/storage.js @@ -0,0 +1,212 @@ +const AWS = require('aws-sdk'); +const s3 = new AWS.S3(); + +const conf = require('./config.js'); +const fs = require('fs'); +const path = require('path'); +const fetch = require('node-fetch'); +const crypto = require('crypto'); + +const redis = require('redis'); +const redis_client = redis.createClient(); + +redis_client.on('error', err => { + console.log(err); +}); + +let notLocalhost = + conf.env === 'production' && + conf.s3_bucket !== 'localhost' && + conf.bitly_key !== 'localhost'; + +if (notLocalhost) { + module.exports = { + filename: filename, + length: awsLength, + get: awsGet, + set: awsSet, + delete: awsDelete, + forceDelete: awsForceDelete + }; +} else { + module.exports = { + filename: filename, + length: localLength, + get: localGet, + set: localSet, + delete: localDelete, + forceDelete: localForceDelete + }; +} + +function filename(id) { + return new Promise((resolve, reject) => { + redis_client.hget(id, 'filename', (err, reply) => { + if (!err) { + resolve(reply); + } else { + reject(); + } + }); + }); +} + +function localLength(id) { + return new Promise((resolve, reject) => { + try { + resolve(fs.statSync(__dirname + '/../static/' + id).size); + } catch (err) { + reject(); + } + }); +} + +function localGet(id) { + return fs.createReadStream(__dirname + '/../static/' + id); +} + +function localSet(id, file, filename, url) { + return new Promise((resolve, reject) => { + fstream = fs.createWriteStream(__dirname + '/../static/' + id); + file.pipe(fstream); + fstream.on('close', () => { + let uuid = crypto.randomBytes(10).toString('hex'); + + redis_client.hmset([id, 'filename', filename, 'delete', uuid]); + redis_client.expire(id, 86400000); + console.log('Upload Finished of ' + filename); + resolve({ + uuid: uuid, + url: url + }); + }); + + fstream.on('error', () => reject()); + }); +} + +function localDelete(id, delete_token) { + return new Promise((resolve, reject) => { + redis_client.hget(id, 'delete', (err, reply) => { + if (!reply || delete_token !== reply) { + reject(); + } else { + redis_client.del(id); + resolve(fs.unlinkSync(__dirname + '/../static/' + id)); + } + }); + }); +} + +function localForceDelete(id) { + return new Promise((resolve, reject) => { + redis_client.del(id); + resolve(fs.unlinkSync(__dirname + '/../static/' + id)); + }); +} + +function awsLength(id) { + let params = { + Bucket: conf.s3_bucket, + Key: id + }; + return new Promise((resolve, reject) => { + s3.headObject(params, function(err, data) { + if (!err) { + resolve(data.ContentLength); + } else { + reject(); + } + }); + }); +} + +function awsGet(id) { + let params = { + Bucket: conf.s3_bucket, + Key: id + }; + + return s3.getObject(params).createReadStream(); +} + +function awsSet(id, file, filename, url) { + let params = { + Bucket: conf.s3_bucket, + Key: id, + Body: file + }; + + return new Promise((resolve, reject) => { + s3.upload(params, function(err, data) { + if (err) { + console.log(err, err.stack); // an error occurred + reject(); + } else { + let uuid = crypto.randomBytes(10).toString('hex'); + + redis_client.hmset([id, 'filename', filename, 'delete', uuid]); + + redis_client.expire(id, 86400000); + console.log('Upload Finished of ' + filename); + if (conf.bitly_key) { + fetch( + 'https://api-ssl.bitly.com/v3/shorten?access_token=' + + conf.bitly_key + + '&longUrl=' + + encodeURIComponent(url) + + '&format=txt' + ) + .then(res => { + return res.text(); + }) + .then(body => { + resolve({ + uuid: uuid, + url: body + }); + }); + } else { + resolve({ + uuid: uuid, + url: url + }); + } + } + }); + }); +} + +function awsDelete(id, delete_token) { + return new Promise((resolve, reject) => { + redis_client.hget(id, 'delete', (err, reply) => { + if (!reply || delete_token !== reply) { + reject(); + } else { + redis_client.del(id); + let params = { + Bucket: conf.s3_bucket, + Key: id + }; + + s3.deleteObject(params, function(err, data) { + resolve(err); + }); + } + }); + }); +} + +function awsForceDelete(id) { + return new Promise((resolve, reject) => { + redis_client.del(id); + let params = { + Bucket: conf.s3_bucket, + Key: id + }; + + s3.deleteObject(params, function(err, data) { + resolve(err); + }); + }); +} diff --git a/public/download.html b/views/download.handlebars similarity index 68% rename from public/download.html rename to views/download.handlebars index 513d3c96..516172c3 100644 --- a/public/download.html +++ b/views/download.handlebars @@ -11,9 +11,13 @@
+ {{#if filename}}
Your friend is sending you a file:
+ + {{{filename}}} ({{{filesize}}}) +
diff --git a/public/index.html b/views/index.handlebars similarity index 95% rename from public/index.html rename to views/index.handlebars index 128d3a95..d44e98e0 100644 --- a/public/index.html +++ b/views/index.handlebars @@ -3,9 +3,9 @@ Firefox Fileshare - + - + diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars new file mode 100644 index 00000000..4839ad4c --- /dev/null +++ b/views/layouts/main.handlebars @@ -0,0 +1 @@ +{{{body}}} \ No newline at end of file