From 62bdcb693a5c6c13a32b28c9fce45ce08868bbbe Mon Sep 17 00:00:00 2001 From: Gabriel Lomba Date: Thu, 26 Jul 2018 21:58:08 -0300 Subject: [PATCH 1/3] Add the addFileNameHash option that allows users to remove the hash from file names --- README.md | 1 + package-lock.json | 120 ++++++++++++++++++++--------- spec/FilesController.spec.js | 42 +++++++++- src/Controllers/FilesController.js | 8 +- src/Controllers/index.js | 3 +- src/Options/Definitions.js | 6 ++ src/Options/index.js | 3 + 7 files changed, 139 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index c6fa1d05b6..fe19d9ef96 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo #### Advanced options * `fileKey` - For migrated apps, this is necessary to provide access to files already hosted on Parse. +* `addFileNameHash` - Set to false to remove the addition of the unique hash to the file names. Defaults to true. * `allowClientClassCreation` - Set to false to disable client class creation. Defaults to true. * `enableAnonymousUsers` - Set to false to disable anonymous users. Defaults to true. * `auth` - Used to configure support for [3rd party authentication](http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication). diff --git a/package-lock.json b/package-lock.json index c4430f4a2b..754bcb5ea2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1737,6 +1737,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-3.0.0.tgz", "integrity": "sha512-gjicxsD4e5U3nH0EqiEb5y+fKpsZ7F52wcnmNfu45nxnolWVAYh7NgbdfilY+5x1v6cLspxmzz4hf+ju2pFxhA==", + "optional": true, "requires": { "nan": "2.10.0", "node-pre-gyp": "0.10.2" @@ -1744,7 +1745,8 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true + "bundled": true, + "optional": true }, "ansi-regex": { "version": "2.1.1", @@ -1752,11 +1754,13 @@ }, "aproba": { "version": "1.2.0", - "bundled": true + "bundled": true, + "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "optional": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.3.5" @@ -1776,7 +1780,8 @@ }, "chownr": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "code-point-at": { "version": "1.1.0", @@ -1792,41 +1797,49 @@ }, "core-util-is": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "debug": { "version": "2.6.9", "bundled": true, + "optional": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.6.0", - "bundled": true + "bundled": true, + "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true + "bundled": true, + "optional": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, + "optional": true, "requires": { "minipass": "2.3.3" } }, "fs.realpath": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "optional": true, "requires": { "aproba": "1.2.0", "console-control-strings": "1.1.0", @@ -1841,6 +1854,7 @@ "glob": { "version": "7.1.2", "bundled": true, + "optional": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -1852,11 +1866,13 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true + "bundled": true, + "optional": true }, "iconv-lite": { "version": "0.4.23", "bundled": true, + "optional": true, "requires": { "safer-buffer": "2.1.2" } @@ -1864,6 +1880,7 @@ "ignore-walk": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "minimatch": "3.0.4" } @@ -1871,6 +1888,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "optional": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -1882,7 +1900,8 @@ }, "ini": { "version": "1.3.5", - "bundled": true + "bundled": true, + "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -1893,7 +1912,8 @@ }, "isarray": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "minimatch": { "version": "3.0.4", @@ -1927,6 +1947,7 @@ "minizlib": { "version": "1.1.0", "bundled": true, + "optional": true, "requires": { "minipass": "2.3.3" } @@ -1940,11 +1961,13 @@ }, "ms": { "version": "2.0.0", - "bundled": true + "bundled": true, + "optional": true }, "needle": { "version": "2.2.1", "bundled": true, + "optional": true, "requires": { "debug": "2.6.9", "iconv-lite": "0.4.23", @@ -1954,6 +1977,7 @@ "node-pre-gyp": { "version": "0.10.2", "bundled": true, + "optional": true, "requires": { "detect-libc": "1.0.3", "mkdirp": "0.5.1", @@ -1970,6 +1994,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "optional": true, "requires": { "abbrev": "1.1.1", "osenv": "0.1.5" @@ -1977,11 +2002,13 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true + "bundled": true, + "optional": true }, "npm-packlist": { "version": "1.1.10", "bundled": true, + "optional": true, "requires": { "ignore-walk": "3.0.1", "npm-bundled": "1.0.3" @@ -1990,6 +2017,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "optional": true, "requires": { "are-we-there-yet": "1.1.5", "console-control-strings": "1.1.0", @@ -2003,7 +2031,8 @@ }, "object-assign": { "version": "4.1.1", - "bundled": true + "bundled": true, + "optional": true }, "once": { "version": "1.4.0", @@ -2014,15 +2043,18 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "optional": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -2030,15 +2062,18 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true + "bundled": true, + "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "optional": true, "requires": { "deep-extend": "0.6.0", "ini": "1.3.5", @@ -2048,13 +2083,15 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true + "bundled": true, + "optional": true } } }, "readable-stream": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -2068,6 +2105,7 @@ "rimraf": { "version": "2.6.2", "bundled": true, + "optional": true, "requires": { "glob": "7.1.2" } @@ -2078,23 +2116,28 @@ }, "safer-buffer": { "version": "2.1.2", - "bundled": true + "bundled": true, + "optional": true }, "sax": { "version": "1.2.4", - "bundled": true + "bundled": true, + "optional": true }, "semver": { "version": "5.5.0", - "bundled": true + "bundled": true, + "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true + "bundled": true, + "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true }, "string-width": { "version": "1.0.2", @@ -2108,6 +2151,7 @@ "string_decoder": { "version": "1.0.3", "bundled": true, + "optional": true, "requires": { "safe-buffer": "5.1.1" } @@ -2121,11 +2165,13 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true + "bundled": true, + "optional": true }, "tar": { "version": "4.4.4", "bundled": true, + "optional": true, "requires": { "chownr": "1.0.1", "fs-minipass": "1.2.5", @@ -2138,21 +2184,25 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true } } }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "optional": true, "requires": { "string-width": "1.0.2" } @@ -3751,13 +3801,8 @@ "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" + "split": "0.3.3", + "through": "2.3.8" }, "dependencies": { "split": { @@ -3766,7 +3811,7 @@ "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { - "through": "2" + "through": "2.3.8" } } } @@ -6974,7 +7019,8 @@ "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "optional": true }, "nanomatch": { "version": "1.2.9", diff --git a/spec/FilesController.spec.js b/spec/FilesController.spec.js index d4aa85b510..e6713ead0c 100644 --- a/spec/FilesController.spec.js +++ b/spec/FilesController.spec.js @@ -14,13 +14,13 @@ const mockAdapter = { } // Small additional tests to improve overall coverage -describe("FilesController",() =>{ +describe("FilesController", () => { it("should properly expand objects", (done) => { const config = Config.get(Parse.applicationId); const gridStoreAdapter = new GridStoreAdapter('mongodb://localhost:27017/parse'); const filesController = new FilesController(gridStoreAdapter) - const result = filesController.expandFilesInObject(config, function(){}); + const result = filesController.expandFilesInObject(config, function () { }); expect(result).toBeUndefined(); @@ -43,7 +43,7 @@ describe("FilesController",() =>{ reconfigureServer({ filesAdapter: mockAdapter }) .then(() => new Promise(resolve => setTimeout(resolve, 1000))) - .then(() => new Parse.File("yolo.txt", [1,2,3], "text/plain").save()) + .then(() => new Parse.File("yolo.txt", [1, 2, 3], "text/plain").save()) .then( () => done.fail('should not succeed'), () => setImmediate(() => Parse.Promise.as('done')) @@ -62,4 +62,40 @@ describe("FilesController",() =>{ done(); }); }); + + it("should add a unique hash to the file name when the addFileNameHash option is true", (done) => { + + const config = Config.get(Parse.applicationId) + const gridStoreAdapter = new GridStoreAdapter('mongodb://localhost:27017/parse') + spyOn(gridStoreAdapter, 'createFile') + gridStoreAdapter.createFile.and.returnValue(Promise.resolve()) + const fileName = 'randomFileName.pdf' + const regexEscapedFileName = fileName.replace(/\./g, "\\$&") + const filesController = new FilesController(gridStoreAdapter, null, { addFileNameHash: true }) + + filesController.createFile(config, fileName) + + expect(gridStoreAdapter.createFile).toHaveBeenCalledTimes(1) + expect(gridStoreAdapter.createFile.calls.mostRecent().args[0]).toMatch(`^.{32}_${regexEscapedFileName}$`) + + done(); + }); + + it("should not add a unique hash to the file name when the addFileNameHash option is false", (done) => { + + const config = Config.get(Parse.applicationId) + const gridStoreAdapter = new GridStoreAdapter('mongodb://localhost:27017/parse') + spyOn(gridStoreAdapter, 'createFile') + gridStoreAdapter.createFile.and.returnValue(Promise.resolve()) + const fileName = 'randomFileName.pdf' + const filesController = new FilesController(gridStoreAdapter, null, { addFileNameHash: false }) + + filesController.createFile(config, fileName) + + expect(gridStoreAdapter.createFile).toHaveBeenCalledTimes(1) + expect(gridStoreAdapter.createFile.calls.mostRecent().args[0]).toEqual(fileName) + + done(); + }); + }); diff --git a/src/Controllers/FilesController.js b/src/Controllers/FilesController.js index 2ea83412db..cd24b40a40 100644 --- a/src/Controllers/FilesController.js +++ b/src/Controllers/FilesController.js @@ -2,7 +2,7 @@ import { randomHexString } from '../cryptoUtils'; import AdaptableController from './AdaptableController'; import { FilesAdapter } from '../Adapters/Files/FilesAdapter'; -import path from 'path'; +import path from 'path'; import mime from 'mime'; const legacyFilesRegex = new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}-.*"); @@ -25,9 +25,11 @@ export class FilesController extends AdaptableController { contentType = mime.getType(filename); } - filename = randomHexString(32) + '_' + filename; + if (this.options.addFileNameHash) { + filename = randomHexString(32) + '_' + filename; + } - var location = this.adapter.getFileLocation(config, filename); + const location = this.adapter.getFileLocation(config, filename); return this.adapter.createFile(filename, data, contentType).then(() => { return Promise.resolve({ url: location, diff --git a/src/Controllers/index.js b/src/Controllers/index.js index 6bbcc7f299..44607373ab 100644 --- a/src/Controllers/index.js +++ b/src/Controllers/index.js @@ -82,6 +82,7 @@ export function getFilesController(options: ParseServerOptions): FilesController databaseURI, filesAdapter, databaseAdapter, + addFileNameHash, } = options; if (!filesAdapter && databaseAdapter) { throw 'When using an explicit database adapter, you must also use an explicit filesAdapter.'; @@ -89,7 +90,7 @@ export function getFilesController(options: ParseServerOptions): FilesController const filesControllerAdapter = loadAdapter(filesAdapter, () => { return new GridStoreAdapter(databaseURI); }); - return new FilesController(filesControllerAdapter, appId); + return new FilesController(filesControllerAdapter, appId, { addFileNameHash }); } export function getUserController(options: ParseServerOptions): UserController { diff --git a/src/Options/Definitions.js b/src/Options/Definitions.js index 6747fd59cc..799831e2ad 100644 --- a/src/Options/Definitions.js +++ b/src/Options/Definitions.js @@ -135,6 +135,12 @@ module.exports.ParseServerOptions = { "env": "PARSE_SERVER_FILE_KEY", "help": "Key for your files" }, + "addFileNameHash": { + "env": "PARSE_SERVER_ADD_FILE_NAME_HASH", + "help": "Enable (or disable) the addition of a unique hash to the file names", + "action": parsers.booleanParser, + "default": true + }, "userSensitiveFields": { "env": "PARSE_SERVER_USER_SENSITIVE_FIELDS", "help": "Personally identifiable information fields in the user table the should be removed for non-authorized users.", diff --git a/src/Options/index.js b/src/Options/index.js index 247e008a06..dfde930d96 100644 --- a/src/Options/index.js +++ b/src/Options/index.js @@ -64,6 +64,9 @@ export interface ParseServerOptions { webhookKey: ?string; /* Key for your files */ fileKey: ?string; + /* Enable (or disable) the addition of a unique hash to the file names + :ENV: PARSE_SERVER_ADD_FILE_NAME_HASH */ + addFileNameHash: ?boolean; // = true /* Personally identifiable information fields in the user table the should be removed for non-authorized users. */ userSensitiveFields: ?string[]; // = ["email"] /* Enable (or disable) anon users, defaults to true From b5fc214420f8dd046bfd54fd528d5734bcd36399 Mon Sep 17 00:00:00 2001 From: Gabriel Lomba Date: Fri, 27 Jul 2018 09:14:18 -0300 Subject: [PATCH 2/3] Change option name to preserveFileName --- README.md | 2 +- spec/FilesController.spec.js | 8 ++++---- src/Controllers/FilesController.js | 2 +- src/Controllers/index.js | 4 ++-- src/Options/Definitions.js | 6 +++--- src/Options/index.js | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fe19d9ef96..3c5a81bea3 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ The client keys used with Parse are no longer necessary with Parse Server. If yo #### Advanced options * `fileKey` - For migrated apps, this is necessary to provide access to files already hosted on Parse. -* `addFileNameHash` - Set to false to remove the addition of the unique hash to the file names. Defaults to true. +* `preserveFileName` - Set to true to remove the unique hash added to the file names. Defaults to false. * `allowClientClassCreation` - Set to false to disable client class creation. Defaults to true. * `enableAnonymousUsers` - Set to false to disable anonymous users. Defaults to true. * `auth` - Used to configure support for [3rd party authentication](http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication). diff --git a/spec/FilesController.spec.js b/spec/FilesController.spec.js index e6713ead0c..18c685fb98 100644 --- a/spec/FilesController.spec.js +++ b/spec/FilesController.spec.js @@ -63,7 +63,7 @@ describe("FilesController", () => { }); }); - it("should add a unique hash to the file name when the addFileNameHash option is true", (done) => { + it("should add a unique hash to the file name when the preserveFileName option is false", (done) => { const config = Config.get(Parse.applicationId) const gridStoreAdapter = new GridStoreAdapter('mongodb://localhost:27017/parse') @@ -71,7 +71,7 @@ describe("FilesController", () => { gridStoreAdapter.createFile.and.returnValue(Promise.resolve()) const fileName = 'randomFileName.pdf' const regexEscapedFileName = fileName.replace(/\./g, "\\$&") - const filesController = new FilesController(gridStoreAdapter, null, { addFileNameHash: true }) + const filesController = new FilesController(gridStoreAdapter, null, { preserveFileName: false }) filesController.createFile(config, fileName) @@ -81,14 +81,14 @@ describe("FilesController", () => { done(); }); - it("should not add a unique hash to the file name when the addFileNameHash option is false", (done) => { + it("should not add a unique hash to the file name when the preserveFileName option is false", (done) => { const config = Config.get(Parse.applicationId) const gridStoreAdapter = new GridStoreAdapter('mongodb://localhost:27017/parse') spyOn(gridStoreAdapter, 'createFile') gridStoreAdapter.createFile.and.returnValue(Promise.resolve()) const fileName = 'randomFileName.pdf' - const filesController = new FilesController(gridStoreAdapter, null, { addFileNameHash: false }) + const filesController = new FilesController(gridStoreAdapter, null, { preserveFileName: true }) filesController.createFile(config, fileName) diff --git a/src/Controllers/FilesController.js b/src/Controllers/FilesController.js index cd24b40a40..16cd2ac79c 100644 --- a/src/Controllers/FilesController.js +++ b/src/Controllers/FilesController.js @@ -25,7 +25,7 @@ export class FilesController extends AdaptableController { contentType = mime.getType(filename); } - if (this.options.addFileNameHash) { + if (!this.options.preserveFileName) { filename = randomHexString(32) + '_' + filename; } diff --git a/src/Controllers/index.js b/src/Controllers/index.js index 44607373ab..a1958cc983 100644 --- a/src/Controllers/index.js +++ b/src/Controllers/index.js @@ -82,7 +82,7 @@ export function getFilesController(options: ParseServerOptions): FilesController databaseURI, filesAdapter, databaseAdapter, - addFileNameHash, + preserveFileName, } = options; if (!filesAdapter && databaseAdapter) { throw 'When using an explicit database adapter, you must also use an explicit filesAdapter.'; @@ -90,7 +90,7 @@ export function getFilesController(options: ParseServerOptions): FilesController const filesControllerAdapter = loadAdapter(filesAdapter, () => { return new GridStoreAdapter(databaseURI); }); - return new FilesController(filesControllerAdapter, appId, { addFileNameHash }); + return new FilesController(filesControllerAdapter, appId, { preserveFileName }); } export function getUserController(options: ParseServerOptions): UserController { diff --git a/src/Options/Definitions.js b/src/Options/Definitions.js index 799831e2ad..dec6284841 100644 --- a/src/Options/Definitions.js +++ b/src/Options/Definitions.js @@ -135,11 +135,11 @@ module.exports.ParseServerOptions = { "env": "PARSE_SERVER_FILE_KEY", "help": "Key for your files" }, - "addFileNameHash": { - "env": "PARSE_SERVER_ADD_FILE_NAME_HASH", + "preserveFileName": { + "env": "PARSE_SERVER_PRESERVE_FILE_NAME", "help": "Enable (or disable) the addition of a unique hash to the file names", "action": parsers.booleanParser, - "default": true + "default": false }, "userSensitiveFields": { "env": "PARSE_SERVER_USER_SENSITIVE_FIELDS", diff --git a/src/Options/index.js b/src/Options/index.js index dfde930d96..07f0c06ba1 100644 --- a/src/Options/index.js +++ b/src/Options/index.js @@ -65,8 +65,8 @@ export interface ParseServerOptions { /* Key for your files */ fileKey: ?string; /* Enable (or disable) the addition of a unique hash to the file names - :ENV: PARSE_SERVER_ADD_FILE_NAME_HASH */ - addFileNameHash: ?boolean; // = true + :ENV: PARSE_SERVER_PRESERVE_FILE_NAME */ + preserveFileName: ?boolean; // = false /* Personally identifiable information fields in the user table the should be removed for non-authorized users. */ userSensitiveFields: ?string[]; // = ["email"] /* Enable (or disable) anon users, defaults to true From 12e1fd8997a0745a0d84e921eef9119adf0bbef3 Mon Sep 17 00:00:00 2001 From: Gabriel Lomba Date: Fri, 27 Jul 2018 09:21:41 -0300 Subject: [PATCH 3/3] Revert changes to package-lock.json --- package-lock.json | 120 ++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index 754bcb5ea2..c4430f4a2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1737,7 +1737,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-3.0.0.tgz", "integrity": "sha512-gjicxsD4e5U3nH0EqiEb5y+fKpsZ7F52wcnmNfu45nxnolWVAYh7NgbdfilY+5x1v6cLspxmzz4hf+ju2pFxhA==", - "optional": true, "requires": { "nan": "2.10.0", "node-pre-gyp": "0.10.2" @@ -1745,8 +1744,7 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, - "optional": true + "bundled": true }, "ansi-regex": { "version": "2.1.1", @@ -1754,13 +1752,11 @@ }, "aproba": { "version": "1.2.0", - "bundled": true, - "optional": true + "bundled": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, - "optional": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.3.5" @@ -1780,8 +1776,7 @@ }, "chownr": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "code-point-at": { "version": "1.1.0", @@ -1797,49 +1792,41 @@ }, "core-util-is": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "debug": { "version": "2.6.9", "bundled": true, - "optional": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.6.0", - "bundled": true, - "optional": true + "bundled": true }, "delegates": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, - "optional": true + "bundled": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, - "optional": true, "requires": { "minipass": "2.3.3" } }, "fs.realpath": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "gauge": { "version": "2.7.4", "bundled": true, - "optional": true, "requires": { "aproba": "1.2.0", "console-control-strings": "1.1.0", @@ -1854,7 +1841,6 @@ "glob": { "version": "7.1.2", "bundled": true, - "optional": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -1866,13 +1852,11 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "iconv-lite": { "version": "0.4.23", "bundled": true, - "optional": true, "requires": { "safer-buffer": "2.1.2" } @@ -1880,7 +1864,6 @@ "ignore-walk": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "minimatch": "3.0.4" } @@ -1888,7 +1871,6 @@ "inflight": { "version": "1.0.6", "bundled": true, - "optional": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -1900,8 +1882,7 @@ }, "ini": { "version": "1.3.5", - "bundled": true, - "optional": true + "bundled": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -1912,8 +1893,7 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "minimatch": { "version": "3.0.4", @@ -1947,7 +1927,6 @@ "minizlib": { "version": "1.1.0", "bundled": true, - "optional": true, "requires": { "minipass": "2.3.3" } @@ -1961,13 +1940,11 @@ }, "ms": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "needle": { "version": "2.2.1", "bundled": true, - "optional": true, "requires": { "debug": "2.6.9", "iconv-lite": "0.4.23", @@ -1977,7 +1954,6 @@ "node-pre-gyp": { "version": "0.10.2", "bundled": true, - "optional": true, "requires": { "detect-libc": "1.0.3", "mkdirp": "0.5.1", @@ -1994,7 +1970,6 @@ "nopt": { "version": "4.0.1", "bundled": true, - "optional": true, "requires": { "abbrev": "1.1.1", "osenv": "0.1.5" @@ -2002,13 +1977,11 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true, - "optional": true + "bundled": true }, "npm-packlist": { "version": "1.1.10", "bundled": true, - "optional": true, "requires": { "ignore-walk": "3.0.1", "npm-bundled": "1.0.3" @@ -2017,7 +1990,6 @@ "npmlog": { "version": "4.1.2", "bundled": true, - "optional": true, "requires": { "are-we-there-yet": "1.1.5", "console-control-strings": "1.1.0", @@ -2031,8 +2003,7 @@ }, "object-assign": { "version": "4.1.1", - "bundled": true, - "optional": true + "bundled": true }, "once": { "version": "1.4.0", @@ -2043,18 +2014,15 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "osenv": { "version": "0.1.5", "bundled": true, - "optional": true, "requires": { "os-homedir": "1.0.2", "os-tmpdir": "1.0.2" @@ -2062,18 +2030,15 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "rc": { "version": "1.2.8", "bundled": true, - "optional": true, "requires": { "deep-extend": "0.6.0", "ini": "1.3.5", @@ -2083,15 +2048,13 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, - "optional": true + "bundled": true } } }, "readable-stream": { "version": "2.3.5", "bundled": true, - "optional": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -2105,7 +2068,6 @@ "rimraf": { "version": "2.6.2", "bundled": true, - "optional": true, "requires": { "glob": "7.1.2" } @@ -2116,28 +2078,23 @@ }, "safer-buffer": { "version": "2.1.2", - "bundled": true, - "optional": true + "bundled": true }, "sax": { "version": "1.2.4", - "bundled": true, - "optional": true + "bundled": true }, "semver": { "version": "5.5.0", - "bundled": true, - "optional": true + "bundled": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, - "optional": true + "bundled": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, - "optional": true + "bundled": true }, "string-width": { "version": "1.0.2", @@ -2151,7 +2108,6 @@ "string_decoder": { "version": "1.0.3", "bundled": true, - "optional": true, "requires": { "safe-buffer": "5.1.1" } @@ -2165,13 +2121,11 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, - "optional": true + "bundled": true }, "tar": { "version": "4.4.4", "bundled": true, - "optional": true, "requires": { "chownr": "1.0.1", "fs-minipass": "1.2.5", @@ -2184,25 +2138,21 @@ "dependencies": { "safe-buffer": { "version": "5.1.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.2", - "bundled": true, - "optional": true + "bundled": true } } }, "util-deprecate": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "wide-align": { "version": "1.1.3", "bundled": true, - "optional": true, "requires": { "string-width": "1.0.2" } @@ -3801,8 +3751,13 @@ "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { - "split": "0.3.3", - "through": "2.3.8" + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" }, "dependencies": { "split": { @@ -3811,7 +3766,7 @@ "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { - "through": "2.3.8" + "through": "2" } } } @@ -7019,8 +6974,7 @@ "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "optional": true + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, "nanomatch": { "version": "1.2.9",