From 1a77010ea349d755f5be4da0368cfba2975373f2 Mon Sep 17 00:00:00 2001 From: Matthew Andrews Date: Sun, 26 Oct 2014 10:48:15 +0000 Subject: [PATCH 01/50] Respect static --cache 0 --- bin/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index 2f73585..5f6c72c 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -75,7 +75,7 @@ if (argv.version){ process.exit(0); } -if (argv.cache){ +if ('cache' in argv){ (options = options || {}).cache = argv.cache; } From 9cfcc55e77d4cbecd67b5adbbfaaa0382ec1cf42 Mon Sep 17 00:00:00 2001 From: Ramon Liu Date: Sun, 9 Nov 2014 16:17:46 -0800 Subject: [PATCH 02/50] make sure ip/localhost/127.0.0.1 all work --- bin/cli.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 2f73585..1f6ba38 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -94,7 +94,7 @@ if (argv.gzip){ file = new(statik.Server)(dir, options); -require('http').createServer(function (request, response) { +var server = require('http').createServer(function (request, response) { request.addListener('end', function () { file.serve(request, response, function(e, rsp) { if (e && e.status === 404) { @@ -106,6 +106,12 @@ require('http').createServer(function (request, response) { } }); }).resume(); -}).listen(+argv.port, argv['host-address']); +}); + +if (argv['host-address'] === '127.0.0.1') { + server.listen(+argv.port); +} else { + server.listen(+argv.port, argv['host-address']); +} console.log('serving "' + dir + '" at http://' + argv['host-address'] + ':' + argv.port); From 78cd2cb62b63e4d61afbe81e53febb882b2d6c97 Mon Sep 17 00:00:00 2001 From: Ramon Liu Date: Sun, 9 Nov 2014 16:17:46 -0800 Subject: [PATCH 03/50] fix bug, cannot access with local ip #139 --- bin/cli.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 2f73585..1f6ba38 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -94,7 +94,7 @@ if (argv.gzip){ file = new(statik.Server)(dir, options); -require('http').createServer(function (request, response) { +var server = require('http').createServer(function (request, response) { request.addListener('end', function () { file.serve(request, response, function(e, rsp) { if (e && e.status === 404) { @@ -106,6 +106,12 @@ require('http').createServer(function (request, response) { } }); }).resume(); -}).listen(+argv.port, argv['host-address']); +}); + +if (argv['host-address'] === '127.0.0.1') { + server.listen(+argv.port); +} else { + server.listen(+argv.port, argv['host-address']); +} console.log('serving "' + dir + '" at http://' + argv['host-address'] + ':' + argv.port); From b7ca339f10307bd74a5b64d4c2da31eb27dd5a2e Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Mon, 9 Nov 2015 19:43:22 -0200 Subject: [PATCH 04/50] Adding travis --- .gitignore | 2 +- .travis.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index 073cfe2..d95a66e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ npm-debug.log node_modules - +.idea diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6998e32 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "stable" \ No newline at end of file From 33211f494787264c2e41125f9e1e0c30aeafb7f0 Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Mon, 9 Nov 2015 20:01:00 -0200 Subject: [PATCH 05/50] Trying to finish the run --- .travis.yml | 1 + test/integration/node-static-test.js | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6998e32..c89b579 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: node_js node_js: + - "0.12" - "stable" \ No newline at end of file diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 14c591d..f321b70 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -386,5 +386,16 @@ suite.addBatch({ assert.equal(body, 'hello world'); } } +}).addBatch({ + 'terminate server': { + topic: function () { + server.close(); + }, + 'should be listening' : function(){ + /* This test is necessary to ensure the topic execution. + * A topic without tests will be not executed */ + assert.isTrue(true); + } + } }).export(module); From 73bcc939a7127593bc7d19f6d5d0642cf4601d64 Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Mon, 9 Nov 2015 20:03:29 -0200 Subject: [PATCH 06/50] Test bugfix --- test/integration/node-static-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index f321b70..9fe7742 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -389,7 +389,7 @@ suite.addBatch({ }).addBatch({ 'terminate server': { topic: function () { - server.close(); + server.close(this.callback); }, 'should be listening' : function(){ /* This test is necessary to ensure the topic execution. From d3552ad6f2106f4bf2b88a7416fb43b478758836 Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Tue, 10 Nov 2015 16:11:17 -0200 Subject: [PATCH 07/50] New fileServer option: defaultExtension Tests added --- lib/node-static.js | 20 +++++++++++-- test/integration/node-static-test.js | 43 +++++++++++++++++++++------- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index 6ba88ed..95c58af 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -37,6 +37,12 @@ var Server = function (root, options) { this.serverInfo = 'node-static/' + version.join('.'); } + if ('defaultExtension' in this.options) { + this.defaultExtension = '.'+this.options.defaultExtension; + } else { + this.defaultExtension = null; + } + this.defaultHeaders['server'] = this.serverInfo; if (this.cache !== false) { @@ -146,7 +152,17 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini that.respond(null, status, headers, [pathname], stat, req, res, finish); } else if (stat.isDirectory()) { // Stream a directory of files. that.serveDir(pathname, req, res, finish); - } else { + } else if (that.defaultExtension) { + fs.stat(pathname+that.defaultExtension, function(e2, stat2) { + if (e2) { + finish(404, {}); + } else if (stat2.isFile()) { + that.respond(null, status, headers, [pathname+that.defaultExtension], stat2, req, res, finish); + } else { + finish(400, {}); + } + }); + } else { finish(400, {}); } }); @@ -204,7 +220,7 @@ Server.prototype.gzipOk = function(req, contentType) { } /* Send a gzipped version of the file if the options and the client indicate gzip is enabled and - * we find a .gz file mathing the static resource requested. + * we find a .gz file matching the static resource requested. */ Server.prototype.respondGzip = function(pathname, status, contentType, _headers, files, stat, req, res, finish) { var that = this; diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 9fe7742..a289e7b 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -387,15 +387,36 @@ suite.addBatch({ } } }).addBatch({ - 'terminate server': { - topic: function () { - server.close(this.callback); - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. - * A topic without tests will be not executed */ - assert.isTrue(true); - } - } -}).export(module); + 'finding a file by default extension': { + topic: function() { + server.close(); + + fileServer = new static.Server(__dirname+'/../fixtures', {defaultExtension: ".txt"}); + server = require('http').createServer(function(request, response) { + fileServer.serve(request, response); + }).listen(TEST_PORT); + request.get(TEST_SERVER + '/hello', this.callback); + }, + 'should respond with 200': function(error, response, body) { + assert.equal(response.statusCode, 200); + }, + 'should respond with text/plain': function(error, response, body) { + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should respond with hello world': function(error, response, body) { + assert.equal(body, 'hello world'); + } + } +}).addBatch({ + 'terminate server': { + topic: function() { + server.close(this.callback); + }, + 'should be listening': function() { + /* This test is necessary to ensure the topic execution. + * A topic without tests will be not executed */ + assert.isTrue(true); + } + } +}).export(module); \ No newline at end of file From bd637f3cc1802a307898545bdab27faa62549af4 Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Tue, 10 Nov 2015 17:11:10 -0200 Subject: [PATCH 08/50] Test validation of new option "defaultExtension" --- lib/node-static.js | 28 ++++++++++++++++------------ test/integration/node-static-test.js | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index 95c58af..1a30293 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -147,22 +147,26 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini if (pathname.indexOf(that.root) === 0) { fs.stat(pathname, function (e, stat) { if (e) { - finish(404, {}); + // possibly not found, check default extension + if (that.defaultExtension) { + fs.stat(pathname+that.defaultExtension, function(e2, stat2) { + if (e2) { + // really not found + finish(404, {'console':e2.message}); + } else if (stat2.isFile()) { + that.respond(null, status, headers, [pathname+that.defaultExtension], stat2, req, res, finish); + } else { + finish(400, {}); + } + }); + } else { + finish(404, {}); + } } else if (stat.isFile()) { // Stream a single file. that.respond(null, status, headers, [pathname], stat, req, res, finish); } else if (stat.isDirectory()) { // Stream a directory of files. that.serveDir(pathname, req, res, finish); - } else if (that.defaultExtension) { - fs.stat(pathname+that.defaultExtension, function(e2, stat2) { - if (e2) { - finish(404, {}); - } else if (stat2.isFile()) { - that.respond(null, status, headers, [pathname+that.defaultExtension], stat2, req, res, finish); - } else { - finish(400, {}); - } - }); - } else { + } else { finish(400, {}); } }); diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index a289e7b..014916a 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -391,7 +391,7 @@ suite.addBatch({ topic: function() { server.close(); - fileServer = new static.Server(__dirname+'/../fixtures', {defaultExtension: ".txt"}); + fileServer = new static.Server(__dirname+'/../fixtures', {defaultExtension: "txt"}); server = require('http').createServer(function(request, response) { fileServer.serve(request, response); From f086f9a39dca81767fcd78194efa556076330ac7 Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Tue, 10 Nov 2015 17:32:20 -0200 Subject: [PATCH 09/50] Test added: default extension does not interfere with folders Updated README --- README.md | 9 +++++++++ test/fixtures/there.html | 8 ++++++++ test/integration/node-static-test.js | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 test/fixtures/there.html diff --git a/README.md b/README.md index 70eec00..6829269 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,15 @@ example: `{ indexFile: "index.htm" }` > Defaults to `index.html` +#### `defaultExtension` # + +Choose a default extension when serving files. +A request to '/myFile' would check for a `myFile` folder (first) then a `myFile.html` (second). + +example: `{ defaultExtension: "html" }` + +> Defaults to `null` + Command Line Interface ---------------------- diff --git a/test/fixtures/there.html b/test/fixtures/there.html new file mode 100644 index 0000000..bb2a3c4 --- /dev/null +++ b/test/fixtures/there.html @@ -0,0 +1,8 @@ + + + Awesome page + + + hello there! + + diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 014916a..476bb70 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -408,6 +408,28 @@ suite.addBatch({ assert.equal(body, 'hello world'); } } +}).addBatch({ + 'default extension does not interfere with folders': { + topic : function(){ + server.close(); + + fileServer = new static.Server(__dirname+'/../fixtures', {defaultExtension: "html"}); + + server = require('http').createServer(function(request, response) { + fileServer.serve(request, response); + }).listen(TEST_PORT); + request.get({ url: TEST_SERVER + '/there', followRedirect: false }, this.callback); // without trailing slash + }, + 'should respond with 301' : function(error, response, body){ + assert.equal(response.statusCode, 301); + }, + 'should respond with location header': function(error, response, body){ + assert.equal(response.headers['location'], '/there/'); // now with trailing slash + }, + 'should respond with empty string body' : function(error, response, body){ + assert.equal(body, ''); + } + } }).addBatch({ 'terminate server': { topic: function() { From bd5d0444b2ef0d9709920f87e34f0a02c6411bdc Mon Sep 17 00:00:00 2001 From: Fernando Piancastelli Date: Tue, 10 Nov 2015 17:39:59 -0200 Subject: [PATCH 10/50] Small fix --- lib/node-static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node-static.js b/lib/node-static.js index 1a30293..01e0711 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -152,7 +152,7 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini fs.stat(pathname+that.defaultExtension, function(e2, stat2) { if (e2) { // really not found - finish(404, {'console':e2.message}); + finish(404, {}); } else if (stat2.isFile()) { that.respond(null, status, headers, [pathname+that.defaultExtension], stat2, req, res, finish); } else { From 6ccc79a44c57eea79186521be72b90b7b1fefd57 Mon Sep 17 00:00:00 2001 From: Daniel White Date: Tue, 27 Sep 2016 11:28:22 -0400 Subject: [PATCH 11/50] Added glob matching feature for setting cache headers. * Keep backwards compatibility with previous cache options * Add tests to ensure glob matching with defined cache values * Updated README with instructions for new cache feature --- README.md | 4 +- lib/node-static.js | 47 ++++++++++++++------- package.json | 5 ++- test/integration/node-static-test.js | 61 ++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 70eec00..6a9f6c9 100644 --- a/README.md +++ b/README.md @@ -145,10 +145,12 @@ With this method, you don't have to explicitly send the response back, in case o Sets the `Cache-Control` header. -example: `{ cache: 7200 }` +example: `{ cache: 7200 }` will set the max-age for all files to 7200 seconds +example: `{ cache: {'**/*.css': 300}}` will set the max-age for all CSS files to 5 minutes. Passing a number will set the cache duration to that number of seconds. Passing `false` will disable the `Cache-Control` header. +Passing a object with [minimatch glob pattern](https://github.com/isaacs/minimatch) keys and number values will set cache max-age for any matching paths. > Defaults to `3600` diff --git a/lib/node-static.js b/lib/node-static.js index 22984e2..3c95040 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -1,11 +1,12 @@ -var fs = require('fs') - , events = require('events') - , buffer = require('buffer') - , http = require('http') - , url = require('url') - , path = require('path') - , mime = require('mime') - , util = require('./node-static/util'); +var fs = require('fs') + , events = require('events') + , buffer = require('buffer') + , http = require('http') + , url = require('url') + , path = require('path') + , mime = require('mime') + , util = require('./node-static/util') + , minimatch = require('minimatch'); // Current version var version = [0, 7, 7]; @@ -16,7 +17,7 @@ var Server = function (root, options) { // resolve() doesn't normalize (to lowercase) drive letters on Windows this.root = path.normalize(path.resolve(root || '.')); this.options = options || {}; - this.cache = 3600; + this.cache = {'**': 3600}; this.defaultHeaders = {}; this.options.headers = this.options.headers || {}; @@ -25,9 +26,11 @@ var Server = function (root, options) { if ('cache' in this.options) { if (typeof(this.options.cache) === 'number') { + this.cache = {'**': this.options.cache}; + } else if (typeof(this.options.cache) === 'object') { this.cache = this.options.cache; } else if (! this.options.cache) { - this.cache = false; + this.cache = {}; } } @@ -39,10 +42,6 @@ var Server = function (root, options) { this.defaultHeaders['server'] = this.serverInfo; - if (this.cache !== false) { - this.defaultHeaders['cache-control'] = 'max-age=' + this.cache; - } - for (var k in this.defaultHeaders) { this.options.headers[k] = this.options.headers[k] || this.defaultHeaders[k]; @@ -347,6 +346,7 @@ Server.prototype.respond = function (pathname, status, _headers, files, stat, re var contentType = _headers['Content-Type'] || mime.lookup(files[0]) || 'application/octet-stream'; + _headers = this.setCacheHeaders(_headers, req); if(this.options.gzip) { this.respondGzip(pathname, status, contentType, _headers, files, stat, req, res, finish); @@ -388,6 +388,25 @@ Server.prototype.stream = function (pathname, files, length, startByte, res, cal })(files.slice(0), 0); }; +Server.prototype.setCacheHeaders = function(_headers, req) { + var maxAge = this.getMaxAge(req.url); + if (typeof(maxAge) === 'number') { + _headers['cache-control'] = 'max-age=' + maxAge; + } + return _headers; +}; + +Server.prototype.getMaxAge = function(requestUrl) { + if (this.cache) { + for(var pattern in this.cache) { + if (minimatch(requestUrl, pattern)) { + return this.cache[pattern]; + } + } + } + return false; +}; + // Exports exports.Server = Server; exports.version = version; diff --git a/package.json b/package.json index 047fb48..5b44054 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,10 @@ }, "license": "MIT", "dependencies": { - "optimist": ">=0.3.4", "colors": ">=0.6.0", - "mime": ">=1.2.9" + "mime": ">=1.2.9", + "minimatch": "^3.0.3", + "optimist": ">=0.3.4" }, "devDependencies": { "request": "latest", diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 14c591d..6f81d23 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -229,6 +229,9 @@ suite.addBatch({ }, 'should respond with text/html': function(error, response, body){ assert.equal(response.headers['content-type'], 'text/html'); + }, + 'should respond with cache-control': function(error, response, body){ + assert.equal(response.headers['cache-control'], 'max-age=3600'); } } }).addBatch({ @@ -386,5 +389,63 @@ suite.addBatch({ assert.equal(body, 'hello world'); } } +}).addBatch({ + 'once an http server is listening with custom cache configuration': { + topic: function () { + server.close(); + + fileServer = new static.Server(__dirname + '/../fixtures', { + cache: { + '**/*.txt': 100, + '**/': 300 + } + }); + + server = require('http').createServer(function (request, response) { + fileServer.serve(request, response); + }).listen(TEST_PORT, this.callback) + }, + 'should be listening' : function(){ + /* This test is necessary to ensure the topic execution. + * A topic without tests will be not executed */ + assert.isTrue(true); + } + } +}).addBatch({ + 'requesting custom cache index file': { + topic : function(){ + request.get(TEST_SERVER + '/', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with cache-control': function(error, response, body){ + assert.equal(response.headers['cache-control'], 'max-age=300'); + } + } +}).addBatch({ + 'requesting custom cache text file': { + topic : function(){ + request.get(TEST_SERVER + '/hello.txt', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with cache-control': function(error, response, body){ + assert.equal(response.headers['cache-control'], 'max-age=100'); + } + } +}).addBatch({ + 'requesting custom cache un-cached file': { + topic : function(){ + request.get(TEST_SERVER + '/empty.css', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should not respond with cache-control': function(error, response, body){ + assert.equal(response.headers['cache-control'], undefined); + } + } }).export(module); From 47fe715364acd79f4bdd2df54b14d94e1e8f7009 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Thu, 4 Feb 2021 11:52:13 -0600 Subject: [PATCH 12/50] Fix vulnerabilities found with npm audit Switched to a different option parser to keep things simple --- bin/cli.js | 160 ++++----- lib/node-static.js | 2 +- package-lock.json | 520 +++++++++++++++++++++++++++ package.json | 6 +- test/integration/node-static-test.js | 2 +- 5 files changed, 595 insertions(+), 95 deletions(-) create mode 100644 package-lock.json diff --git a/bin/cli.js b/bin/cli.js index ecdab3f..40ea916 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,106 +1,86 @@ #!/usr/bin/env node +function help() { + return `Node-Static CLI - simple, RFC 2616 compliant file streaming module for Node. + +USAGE: cli.js [OPTIONS] [-p PORT] [] + +Options: + -p PORT, --port PORT + TCP port at which the files will be served. [default: 8080] + -a ADDRESS, --host-address ADDRESS + The local network interface at which to listen. [default: "127.0.0.1"] + -c SECONDS, --cache SECONDS + "Cache-Control" header setting. [default: 3600] + -v, --version + Node-static version + -H HEADERS, --headers HEADERS + Additional headers in JSON format. + -f FILE, --header-file FILE + JSON file of additional headers. + -z, --gzip + Enable compression (tries to serve file of same name plus ".gz"). + --spa + Serve the content as a single page app by redirecting all non-file requests to the index HTML file. + -i FILENAME, --indexFile FILENAME + Specify a custom index file when serving up directories. [default: "index.html"] + -h, --help + Display this help message. +`; +} + var fs = require('fs'), tty = require('tty'), statik = require('./../lib/node-static'); + neodoc = require('neodoc'); - var argv = require('optimist') - .usage([ - 'USAGE: $0 [-p ] []', - 'simple, rfc 2616 compliant file streaming module for node'] - .join('\n\n')) - .option('port', { - alias: 'p', - 'default': 8080, - description: 'TCP port at which the files will be served' - }) - .option('host-address', { - alias: 'a', - 'default': '127.0.0.1', - description: 'the local network interface at which to listen' - }) - .option('cache', { - alias: 'c', - description: '"Cache-Control" header setting, defaults to 3600' - }) - .option('version', { - alias: 'v', - description: 'node-static version' - }) - .option('headers', { - alias: 'H', - description: 'additional headers (in JSON format)' - }) - .option('header-file', { - alias: 'f', - description: 'JSON file of additional headers' - }) - .option('gzip', { - alias: 'z', - description: 'enable compression (tries to serve file of same name plus \'.gz\')' - }) - .option('spa', { - description: 'serve the content as a single page app by redirecting all non-file requests to the index html file' - }) - .option('indexFile', { - alias: 'i', - 'default': 'index.html', - description: 'specify a custom index file when serving up directories' - }) - .option('help', { - alias: 'h', - description: 'display this help message' - }) - .argv; - - var dir = argv._[0] || '.'; - - var colors = require('colors'); - - var log = function(request, response, statusCode) { - var d = new Date(); - var seconds = d.getSeconds() < 10? '0'+d.getSeconds() : d.getSeconds(), - datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, - line = datestr + ' [' + response.statusCode + ']: ' + request.url, - colorized = line; - if (tty.isatty(process.stdout.fd)) - colorized = (response.statusCode >= 500) ? line.red.bold : - (response.statusCode >= 400) ? line.red : - line; - console.log(colorized); - }; - - var file, options; - -if (argv.help) { - require('optimist').showHelp(console.log); - process.exit(0); -} +var args = neodoc.run(help(), { + laxPlacement: true, + helpFlags: ['-h', '--help'] +}); + +var dir = args[''] || '.'; + +var colors = require('colors'); + +var log = function(request, response, statusCode) { + var d = new Date(); + var seconds = d.getSeconds() < 10? '0'+d.getSeconds() : d.getSeconds(), + datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, + line = datestr + ' [' + response.statusCode + ']: ' + request.url, + colorized = line; + if (tty.isatty(process.stdout.fd)) + colorized = (response.statusCode >= 500) ? line.red.bold : + (response.statusCode >= 400) ? line.red : + line; + console.log(colorized); +}; + +var file, options = {}; -if (argv.version) { +if (args['--version']) { console.log('node-static', statik.version.join('.')); process.exit(0); } -if (argv.cache) { - (options = options || {}).cache = argv.cache; +if (args['--cache']) { + options.cache = args['--cache'] } -if (argv.headers) { - (options = options || {}).headers = JSON.parse(argv.headers); +if (args['--headers']) { + options.headers = JSON.parse(args['--headers']); } -if (argv['header-file']) { - (options = options || {}).headers = - JSON.parse(fs.readFileSync(argv['header-file'])); +if (args['--header-file']) { + options.headers = JSON.parse(fs.readFileSync(args['--header-file'])); } -if (argv.gzip) { - (options = options || {}).gzip = true; +if (args['--gzip']) { + options.gzip = true; } -if (argv.indexFile) { - (options = options || {}).indexFile = argv['indexFile']; +if (args['--index-file']) { + options.indexFile = args['--index-file']; } file = new(statik.Server)(dir, options); @@ -117,15 +97,15 @@ require('http').createServer(function (request, response) { } }; - if (argv['spa'] && request.url.indexOf(".") == -1) { - file.serveFile(argv['indexFile'], 200, {}, request, response); + if (args['--spa'] && request.url.indexOf(".") == -1) { + file.serveFile(args['--index-file'], 200, {}, request, response); } else { file.serve(request, response, callback); } }).resume(); -}).listen(+argv.port, argv['host-address']); +}).listen(+args['--port'], args['--host-address']); -console.log('serving "' + dir + '" at http://' + argv['host-address'] + ':' + argv.port); -if (argv.spa) { - console.log('serving as a single page app (all non-file requests redirect to ' + argv['indexFile'] +')'); +console.log('serving "' + dir + '" at http://' + args['--host-address'] + ':' + args['--port']); +if (args['--spa']) { + console.log('serving as a single page app (all non-file requests redirect to ' + arg['--index-file'] +')'); } diff --git a/lib/node-static.js b/lib/node-static.js index 15d8144..c0f4cef 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -341,7 +341,7 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) { var contentType = _headers['Content-Type'] || - mime.lookup(files[0]) || + mime.getType(files[0]) || 'application/octet-stream'; if(this.options.gzip) { diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c0bd76e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,520 @@ +{ + "name": "node-static", + "version": "0.7.11", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "mime": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz", + "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==" + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "dev": true + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, + "requires": { + "mime-db": "1.45.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "neodoc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/neodoc/-/neodoc-2.0.2.tgz", + "integrity": "sha512-NAppJ0YecKWdhSXFYCHbo6RutiX8vOt/Jo3l46mUg6pQlpJNaqc5cGxdrW2jITQm5JIYySbFVPDl3RrREXNyPw==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vows": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/vows/-/vows-0.8.3.tgz", + "integrity": "sha512-PVIxa/ovXhrw5gA3mz6M+ZF3PHlqX4tutR2p/y9NWPAaFVKcWBE8b2ktfr0opQM/qFmcOVWKjSCJVjnYOvjXhw==", + "dev": true, + "requires": { + "diff": "^4.0.1", + "eyes": "~0.1.6", + "glob": "^7.1.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json index 64d89ad..5e4ec39 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ }, "license": "MIT", "dependencies": { - "optimist": ">=0.3.4", - "colors": ">=0.6.0", - "mime": "^1.2.9" + "colors": ">=1.4.0", + "mime": "^2.5.0", + "neodoc": "^2.0.2" }, "devDependencies": { "request": "latest", diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 14c591d..4f2d95e 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -305,7 +305,7 @@ suite.addBatch({ this.callback(); }, 'should add woff' : function(error, response, body){ - assert.equal(static.mime.lookup('woff'), 'application/font-woff'); + assert.equal(static.mime.getType('woff'), 'font/woff'); } } }) From 9c9389b30caa43c3e2c6f64d5adcad47780b2cde Mon Sep 17 00:00:00 2001 From: Bernardo Vieira Date: Mon, 1 Mar 2021 09:47:48 -0300 Subject: [PATCH 13/50] Protect fs.stats calls from bad path arguments Prevents uncaught exception: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string or Uint8Array without null bytes. --- lib/node-static.js | 16 ++++++++++++---- test/integration/node-static-test.js | 9 +++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index 15d8144..46dedc4 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -10,6 +10,14 @@ var fs = require('fs') // Current version var version = [0, 7, 9]; +function tryStat(p, callback) { + try { + fs.stat(p, callback); + } catch (e) { + callback(e); + } +} + var Server = function (root, options) { if (root && (typeof(root) === 'object')) { options = root; root = null } @@ -53,7 +61,7 @@ Server.prototype.serveDir = function (pathname, req, res, finish) { var htmlIndex = path.join(pathname, this.options.indexFile), that = this; - fs.stat(htmlIndex, function (e, stat) { + tryStat(htmlIndex, function (e, stat) { if (!e) { var status = 200; var headers = {}; @@ -86,7 +94,7 @@ Server.prototype.serveFile = function (pathname, status, headers, req, res) { pathname = this.resolve(pathname); - fs.stat(pathname, function (e, stat) { + tryStat(pathname, function (e, stat) { if (e) { return promise.emit('error', e); } @@ -139,7 +147,7 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini // Make sure we're not trying to access a // file outside of the root. if (pathname.indexOf(that.root) === 0) { - fs.stat(pathname, function (e, stat) { + tryStat(pathname, function (e, stat) { if (e) { finish(404, {}); } else if (stat.isFile()) { // Stream a single file. @@ -210,7 +218,7 @@ Server.prototype.respondGzip = function (pathname, status, contentType, _headers var that = this; if (files.length == 1 && this.gzipOk(req, contentType)) { var gzFile = files[0] + ".gz"; - fs.stat(gzFile, function (e, gzStat) { + tryStat(gzFile, function (e, gzStat) { if (!e && gzStat.isFile()) { var vary = _headers['Vary']; _headers['Vary'] = (vary && vary != 'Accept-Encoding' ? vary + ', ' : '') + 'Accept-Encoding'; diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 14c591d..874ccd4 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -386,5 +386,14 @@ suite.addBatch({ assert.equal(body, 'hello world'); } } +}).addBatch({ + 'handling malicious urls': { + topic : function(){ + request.get(TEST_SERVER + '/%00', this.callback); + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } + } }).export(module); From 03be38d75f555c7201c47cc00be92f7cf234431b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 00:46:26 +0800 Subject: [PATCH 14/50] - Optimization: 'use strict' directive (and avoid octal) - Maintenance: Add `.editorconfig` - Linting: Prefer const, no-var, fix indent, comment-out unused - npm: Add eslint devDep. and script - npm: Set engines to 10.11.0+ - npm: Add lock file --- .editorconfig | 15 + .eslintrc.js | 15 + bin/cli.js | 158 +- examples/file-server.js | 8 +- lib/node-static.js | 113 +- lib/node-static/util.js | 8 +- package-lock.json | 3033 ++++++++++++++++++++++++++ package.json | 8 +- test/integration/node-static-test.js | 727 +++--- 9 files changed, 3578 insertions(+), 507 deletions(-) create mode 100644 .editorconfig create mode 100644 .eslintrc.js create mode 100644 package-lock.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b404769 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +; EditorConfig file: https://EditorConfig.org +; Install the "EditorConfig" plugin into your editor to use + +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.json] +indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..6f6d943 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + env: { + es6: true, + node: true + }, + extends: ['eslint:recommended'], + rules: { + indent: ['error', 4], + 'no-var': ['error'], + 'no-unused-vars': ['error', {args: 'none'}], + 'prefer-const': ['error'] + } +}; diff --git a/bin/cli.js b/bin/cli.js index ecdab3f..fae355f 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,76 +1,78 @@ #!/usr/bin/env node -var fs = require('fs'), +'use strict'; + +const fs = require('fs'), tty = require('tty'), statik = require('./../lib/node-static'); - var argv = require('optimist') - .usage([ - 'USAGE: $0 [-p ] []', - 'simple, rfc 2616 compliant file streaming module for node'] - .join('\n\n')) - .option('port', { - alias: 'p', - 'default': 8080, - description: 'TCP port at which the files will be served' - }) - .option('host-address', { - alias: 'a', - 'default': '127.0.0.1', - description: 'the local network interface at which to listen' - }) - .option('cache', { - alias: 'c', - description: '"Cache-Control" header setting, defaults to 3600' - }) - .option('version', { - alias: 'v', - description: 'node-static version' - }) - .option('headers', { - alias: 'H', - description: 'additional headers (in JSON format)' - }) - .option('header-file', { - alias: 'f', - description: 'JSON file of additional headers' - }) - .option('gzip', { - alias: 'z', - description: 'enable compression (tries to serve file of same name plus \'.gz\')' - }) - .option('spa', { - description: 'serve the content as a single page app by redirecting all non-file requests to the index html file' - }) - .option('indexFile', { - alias: 'i', - 'default': 'index.html', - description: 'specify a custom index file when serving up directories' - }) - .option('help', { - alias: 'h', - description: 'display this help message' - }) - .argv; - - var dir = argv._[0] || '.'; - - var colors = require('colors'); - - var log = function(request, response, statusCode) { - var d = new Date(); - var seconds = d.getSeconds() < 10? '0'+d.getSeconds() : d.getSeconds(), - datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, - line = datestr + ' [' + response.statusCode + ']: ' + request.url, - colorized = line; - if (tty.isatty(process.stdout.fd)) - colorized = (response.statusCode >= 500) ? line.red.bold : - (response.statusCode >= 400) ? line.red : - line; - console.log(colorized); - }; - - var file, options; +const argv = require('optimist') + .usage([ + 'USAGE: $0 [-p ] []', + 'simple, rfc 2616 compliant file streaming module for node'] + .join('\n\n')) + .option('port', { + alias: 'p', + 'default': 8080, + description: 'TCP port at which the files will be served' + }) + .option('host-address', { + alias: 'a', + 'default': '127.0.0.1', + description: 'the local network interface at which to listen' + }) + .option('cache', { + alias: 'c', + description: '"Cache-Control" header setting, defaults to 3600' + }) + .option('version', { + alias: 'v', + description: 'node-static version' + }) + .option('headers', { + alias: 'H', + description: 'additional headers (in JSON format)' + }) + .option('header-file', { + alias: 'f', + description: 'JSON file of additional headers' + }) + .option('gzip', { + alias: 'z', + description: 'enable compression (tries to serve file of same name plus \'.gz\')' + }) + .option('spa', { + description: 'serve the content as a single page app by redirecting all non-file requests to the index html file' + }) + .option('indexFile', { + alias: 'i', + 'default': 'index.html', + description: 'specify a custom index file when serving up directories' + }) + .option('help', { + alias: 'h', + description: 'display this help message' + }) + .argv; + +const dir = argv._[0] || '.'; + +// const colors = require('colors'); + +const log = function(request, response, statusCode) { + const d = new Date(); + const seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(), + datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, + line = datestr + ' [' + response.statusCode + ']: ' + request.url; + let colorized = line; + if (tty.isatty(process.stdout.fd)) + colorized = (response.statusCode >= 500) ? line.red.bold : + (response.statusCode >= 400) ? line.red : + line; + console.log(colorized); +}; + +let options; if (argv.help) { require('optimist').showHelp(console.log); @@ -103,18 +105,18 @@ if (argv.indexFile) { (options = options || {}).indexFile = argv['indexFile']; } -file = new(statik.Server)(dir, options); +const file = new(statik.Server)(dir, options); require('http').createServer(function (request, response) { request.addListener('end', function () { - var callback = function(e, rsp) { - if (e && e.status === 404) { - response.writeHead(e.status, e.headers); - response.end("Not Found"); - log(request, response); - } else { - log(request, response); - } + const callback = function(e, rsp) { + if (e && e.status === 404) { + response.writeHead(e.status, e.headers); + response.end("Not Found"); + log(request, response); + } else { + log(request, response); + } }; if (argv['spa'] && request.url.indexOf(".") == -1) { @@ -127,5 +129,5 @@ require('http').createServer(function (request, response) { console.log('serving "' + dir + '" at http://' + argv['host-address'] + ':' + argv.port); if (argv.spa) { - console.log('serving as a single page app (all non-file requests redirect to ' + argv['indexFile'] +')'); + console.log('serving as a single page app (all non-file requests redirect to ' + argv['indexFile'] +')'); } diff --git a/examples/file-server.js b/examples/file-server.js index 4f0796e..64d5a2f 100644 --- a/examples/file-server.js +++ b/examples/file-server.js @@ -1,13 +1,15 @@ -var static = require('../lib/node-static'); +'use strict'; + +const statik = require('../lib/node-static'); // // Create a node-static server to serve the current directory // -var file = new static.Server('.', { cache: 7200, headers: {'X-Hello':'World!'} }); +const file = new statik.Server('.', { cache: 7200, headers: {'X-Hello':'World!'} }); require('http').createServer(function (request, response) { file.serve(request, response, function (err, res) { - if (err) { // An error as occured + if (err) { // An error has occurred console.error("> Error serving " + request.url + " - " + err.message); response.writeHead(err.status, err.headers); response.end(); diff --git a/lib/node-static.js b/lib/node-static.js index 15d8144..7ba4885 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -1,16 +1,18 @@ -var fs = require('fs') - , events = require('events') - , buffer = require('buffer') - , http = require('http') - , url = require('url') - , path = require('path') - , mime = require('mime') - , util = require('./node-static/util'); +'use strict'; + +const fs = require('fs') + , events = require('events') + // , buffer = require('buffer') + , http = require('http') + , url = require('url') + , path = require('path') + , mime = require('mime') + , util = require('./node-static/util'); // Current version -var version = [0, 7, 9]; +const version = [0, 7, 9]; -var Server = function (root, options) { +const Server = function (root, options) { if (root && (typeof(root) === 'object')) { options = root; root = null } // resolve() doesn't normalize (to lowercase) drive letters on Windows @@ -43,21 +45,21 @@ var Server = function (root, options) { this.defaultHeaders['cache-control'] = 'max-age=' + this.cache; } - for (var k in this.defaultHeaders) { + for (const k in this.defaultHeaders) { this.options.headers[k] = this.options.headers[k] || this.defaultHeaders[k]; } }; Server.prototype.serveDir = function (pathname, req, res, finish) { - var htmlIndex = path.join(pathname, this.options.indexFile), + const htmlIndex = path.join(pathname, this.options.indexFile), that = this; fs.stat(htmlIndex, function (e, stat) { if (!e) { - var status = 200; - var headers = {}; - var originalPathname = decodeURI(url.parse(req.url).pathname); + const status = 200; + const headers = {}; + const originalPathname = decodeURI(url.parse(req.url).pathname); if (originalPathname.length && originalPathname.charAt(originalPathname.length - 1) !== '/') { return finish(301, { 'Location': originalPathname + '/' }); } else { @@ -67,7 +69,7 @@ Server.prototype.serveDir = function (pathname, req, res, finish) { // Stream a directory of files as a single file. fs.readFile(path.join(pathname, 'index.json'), function (e, contents) { if (e) { return finish(404, {}) } - var index = JSON.parse(contents); + const index = JSON.parse(contents); streamFiles(index.files); }); } @@ -81,8 +83,8 @@ Server.prototype.serveDir = function (pathname, req, res, finish) { }; Server.prototype.serveFile = function (pathname, status, headers, req, res) { - var that = this; - var promise = new(events.EventEmitter); + const that = this; + const promise = new(events.EventEmitter); pathname = this.resolve(pathname); @@ -98,7 +100,7 @@ Server.prototype.serveFile = function (pathname, status, headers, req, res) { }; Server.prototype.finish = function (status, headers, req, res, promise, callback) { - var result = { + const result = { status: status, headers: headers, message: http.STATUS_CODES[status] @@ -114,8 +116,8 @@ Server.prototype.finish = function (status, headers, req, res, promise, callback promise.emit('error', result); } else { - res.writeHead(status, headers); - res.end(); + res.writeHead(status, headers); + res.end(); } } } else { @@ -131,7 +133,7 @@ Server.prototype.finish = function (status, headers, req, res, promise, callback }; Server.prototype.servePath = function (pathname, status, headers, req, res, finish) { - var that = this, + const that = this, promise = new(events.EventEmitter); pathname = this.resolve(pathname); @@ -162,11 +164,11 @@ Server.prototype.resolve = function (pathname) { }; Server.prototype.serve = function (req, res, callback) { - var that = this, - promise = new(events.EventEmitter), - pathname; + const that = this, + promise = new(events.EventEmitter); + let pathname; - var finish = function (status, headers) { + const finish = function (status, headers) { that.finish(status, headers, req, res, promise, callback); }; @@ -193,11 +195,11 @@ Server.prototype.serve = function (req, res, callback) { * file content type and client's Accept-Encoding header value. */ Server.prototype.gzipOk = function (req, contentType) { - var enable = this.options.gzip; + const enable = this.options.gzip; if(enable && (typeof enable === 'boolean' || (contentType && (enable instanceof RegExp) && enable.test(contentType)))) { - var acceptEncoding = req.headers['accept-encoding']; + const acceptEncoding = req.headers['accept-encoding']; return acceptEncoding && acceptEncoding.indexOf("gzip") >= 0; } return false; @@ -207,12 +209,12 @@ Server.prototype.gzipOk = function (req, contentType) { * we find a .gz file mathing the static resource requested. */ Server.prototype.respondGzip = function (pathname, status, contentType, _headers, files, stat, req, res, finish) { - var that = this; + const that = this; if (files.length == 1 && this.gzipOk(req, contentType)) { - var gzFile = files[0] + ".gz"; + const gzFile = files[0] + ".gz"; fs.stat(gzFile, function (e, gzStat) { if (!e && gzStat.isFile()) { - var vary = _headers['Vary']; + const vary = _headers['Vary']; _headers['Vary'] = (vary && vary != 'Accept-Encoding' ? vary + ', ' : '') + 'Accept-Encoding'; _headers['Content-Encoding'] = 'gzip'; stat.size = gzStat.size; @@ -227,14 +229,14 @@ Server.prototype.respondGzip = function (pathname, status, contentType, _headers } Server.prototype.parseByteRange = function (req, stat) { - var byteRange = { - from: 0, - to: 0, - valid: false + const byteRange = { + from: 0, + to: 0, + valid: false } - var rangeHeader = req.headers['range']; - var flavor = 'bytes='; + let rangeHeader = req.headers['range']; + const flavor = 'bytes='; if (rangeHeader) { if (rangeHeader.indexOf(flavor) == 0 && rangeHeader.indexOf(',') == -1) { @@ -265,14 +267,14 @@ Server.prototype.parseByteRange = function (req, stat) { } Server.prototype.respondNoGzip = function (pathname, status, contentType, _headers, files, stat, req, res, finish) { - var mtime = Date.parse(stat.mtime), + const mtime = Date.parse(stat.mtime), key = pathname || files[0], headers = {}, clientETag = req.headers['if-none-match'], clientMTime = Date.parse(req.headers['if-modified-since']), - startByte = 0, - length = stat.size, byteRange = this.parseByteRange(req, stat); + let startByte = 0, + length = stat.size; /* Handle byte ranges */ if (files.length == 1 && byteRange.valid) { @@ -298,9 +300,9 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade } // Copy default headers - for (var k in this.options.headers) { headers[k] = this.options.headers[k] } + for (const k in this.options.headers) { headers[k] = this.options.headers[k] } // Copy custom headers - for (var k in _headers) { headers[k] = _headers[k] } + for (const k in _headers) { headers[k] = _headers[k] } headers['Etag'] = JSON.stringify([stat.ino, stat.size, mtime].join('-')); headers['Date'] = new(Date)().toUTCString(); @@ -308,7 +310,7 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade headers['Content-Type'] = contentType; headers['Content-Length'] = length; - for (var k in _headers) { headers[k] = _headers[k] } + for (const k in _headers) { headers[k] = _headers[k] } // Conditional GET // If the "If-Modified-Since" or "If-None-Match" headers @@ -318,14 +320,14 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade (!clientMTime || clientMTime >= mtime)) { // 304 response should not contain entity headers ['Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-MD5', - 'Content-Range', - 'Content-Type', - 'Expires', - 'Last-Modified'].forEach(function (entityHeader) { + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-MD5', + 'Content-Range', + 'Content-Type', + 'Expires', + 'Last-Modified'].forEach(function (entityHeader) { delete headers[entityHeader]; }); finish(304, headers); @@ -340,7 +342,7 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade }; Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) { - var contentType = _headers['Content-Type'] || + const contentType = _headers['Content-Type'] || mime.lookup(files[0]) || 'application/octet-stream'; @@ -354,7 +356,7 @@ Server.prototype.respond = function (pathname, status, _headers, files, stat, re Server.prototype.stream = function (pathname, files, length, startByte, res, callback) { (function streamFile(files, offset) { - var file = files.shift(); + let file = files.shift(); if (file) { file = path.resolve(file) === path.normalize(file) ? file : path.join(pathname || '.', file); @@ -362,7 +364,7 @@ Server.prototype.stream = function (pathname, files, length, startByte, res, cal // Stream the file to the client fs.createReadStream(file, { flags: 'r', - mode: 0666, + mode: '0666', start: startByte, end: startByte + (length ? length - 1 : 0) }).on('data', function (chunk) { @@ -388,6 +390,3 @@ Server.prototype.stream = function (pathname, files, length, startByte, res, cal exports.Server = Server; exports.version = version; exports.mime = mime; - - - diff --git a/lib/node-static/util.js b/lib/node-static/util.js index 02de548..b4b794d 100644 --- a/lib/node-static/util.js +++ b/lib/node-static/util.js @@ -1,9 +1,11 @@ -var fs = require('fs') - , path = require('path'); +'use strict'; + +const fs = require('fs') + , path = require('path'); exports.mstat = function (dir, files, callback) { (function mstat(files, stats) { - var file = files.shift(); + const file = files.shift(); if (file) { fs.stat(path.join(dir, file), function (e, stat) { diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..255570a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3033 @@ +{ + "name": "node-static", + "version": "0.7.11", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "version": "0.7.11", + "license": "MIT", + "dependencies": { + "colors": ">=0.6.0", + "mime": "^1.2.9", + "optimist": ">=0.3.4" + }, + "bin": { + "static": "bin/cli.js" + }, + "devDependencies": { + "eslint": "^7.23.0", + "request": "latest", + "vows": "latest" + }, + "engines": { + "node": ">= 0.4.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "node_modules/@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/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=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", + "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true, + "engines": { + "node": "> 0.1.90" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "dev": true, + "dependencies": { + "mime-db": "1.46.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dependencies": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "dependencies": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/vows": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/vows/-/vows-0.8.3.tgz", + "integrity": "sha512-PVIxa/ovXhrw5gA3mz6M+ZF3PHlqX4tutR2p/y9NWPAaFVKcWBE8b2ktfr0opQM/qFmcOVWKjSCJVjnYOvjXhw==", + "dev": true, + "dependencies": { + "diff": "^4.0.1", + "eyes": "~0.1.6", + "glob": "^7.1.2" + }, + "bin": { + "vows": "bin/vows" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "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=", + "dev": true + }, + "eslint": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", + "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "dev": true, + "requires": { + "mime-db": "1.46.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vows": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/vows/-/vows-0.8.3.tgz", + "integrity": "sha512-PVIxa/ovXhrw5gA3mz6M+ZF3PHlqX4tutR2p/y9NWPAaFVKcWBE8b2ktfr0opQM/qFmcOVWKjSCJVjnYOvjXhw==", + "dev": true, + "requires": { + "diff": "^4.0.1", + "eyes": "~0.1.6", + "glob": "^7.1.2" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": 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=", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 64d89ad..66c0fb6 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "main": "./lib/node-static", "scripts": { + "lint": "eslint .", "test": "vows --spec --isolate" }, "bin": { @@ -26,17 +27,18 @@ }, "license": "MIT", "dependencies": { - "optimist": ">=0.3.4", "colors": ">=0.6.0", - "mime": "^1.2.9" + "mime": "^1.2.9", + "optimist": ">=0.3.4" }, "devDependencies": { + "eslint": "^7.23.0", "request": "latest", "vows": "latest" }, "version": "0.7.11", "engines": { - "node": ">= 0.4.1" + "node": ">=10.0.0" }, "bugs": { "url": "https://github.com/cloudhead/node-static/issues" diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 14c591d..7968bf3 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -1,390 +1,391 @@ -var vows = require('vows') - , request = require('request') - , assert = require('assert') - , static = require('../../lib/node-static'); +'use strict'; -var fileServer = new static.Server(__dirname + '/../fixtures'); -var suite = vows.describe('node-static'); -var TEST_PORT = 8080; -var TEST_SERVER = 'http://localhost:' + TEST_PORT; -var version = static.version.join('.'); -var server; -var callback; +const vows = require('vows') + , request = require('request') + , assert = require('assert') + , statik = require('../../lib/node-static'); -headers = { - 'requesting headers': { - topic : function(){ - request.head(TEST_SERVER + '/index.html', this.callback); +let fileServer = new statik.Server(__dirname + '/../fixtures'); +const suite = vows.describe('node-static'); +const TEST_PORT = 8080; +const TEST_SERVER = 'http://localhost:' + TEST_PORT; +const version = statik.version.join('.'); +let server; +let callback; + +const headers = { + 'requesting headers': { + topic : function(){ + request.head(TEST_SERVER + '/index.html', this.callback); + } } - } } headers['requesting headers']['should respond with node-static/' + version] = function(error, response, body){ - assert.equal(response.headers['server'], 'node-static/' + version); + assert.equal(response.headers['server'], 'node-static/' + version); } suite.addBatch({ - 'once an http server is listening with a callback': { - topic: function () { - server = require('http').createServer(function (request, response) { - fileServer.serve(request, response, function(err, result) { - if (callback) - callback(request, response, err, result); - else - request.end(); - }); - }).listen(TEST_PORT, this.callback) - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. + 'once an http server is listening with a callback': { + topic: function () { + server = require('http').createServer(function (request, response) { + fileServer.serve(request, response, function(err, result) { + if (callback) + callback(request, response, err, result); + else + request.end(); + }); + }).listen(TEST_PORT, this.callback) + }, + 'should be listening' : function(){ + /* This test is necessary to ensure the topic execution. * A topic without tests will be not executed */ - assert.isTrue(true); - } - }, + assert.isTrue(true); + } + }, }).addBatch({ 'streaming a 404 page': { - topic: function(){ - callback = function(request, response, err, result) { - if (err) { - response.writeHead(err.status, err.headers); - setTimeout(function() { - response.end('Custom 404 Stream.') - }, 100); - } + topic: function(){ + callback = function(request, response, err, result) { + if (err) { + response.writeHead(err.status, err.headers); + setTimeout(function() { + response.end('Custom 404 Stream.') + }, 100); + } + } + request.get(TEST_SERVER + '/not-found', this.callback); + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + }, + 'should respond with the streamed content': function(error, response, body){ + callback = null; + assert.equal(body, 'Custom 404 Stream.'); } - request.get(TEST_SERVER + '/not-found', this.callback); - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - }, - 'should respond with the streamed content': function(error, response, body){ - callback = null; - assert.equal(body, 'Custom 404 Stream.'); - } } }).addBatch({ - 'once an http server is listening without a callback': { - topic: function () { - server.close(); - server = require('http').createServer(function (request, response) { - fileServer.serve(request, response); - }).listen(TEST_PORT, this.callback) - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. + 'once an http server is listening without a callback': { + topic: function () { + server.close(); + server = require('http').createServer(function (request, response) { + fileServer.serve(request, response); + }).listen(TEST_PORT, this.callback) + }, + 'should be listening' : function(){ + /* This test is necessary to ensure the topic execution. * A topic without tests will be not executed */ - assert.isTrue(true); + assert.isTrue(true); + } } - } }).addBatch({ 'requesting a file not found': { - topic : function(){ - request.get(TEST_SERVER + '/not-found', this.callback); - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}) -.addBatch({ - 'requesting a malformed URI': { - topic: function(){ - request.get(TEST_SERVER + '/a%AFc', this.callback); - }, - 'should respond with 400': function(error, response, body){ - assert.equal(response.statusCode, 400); - } - } -}) -.addBatch({ - 'serving empty.css': { - topic : function(){ - request.get(TEST_SERVER + '/empty.css', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/css': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/css'); - }, - 'should respond with empty string': function(error, response, body){ - assert.equal(body, ''); + topic : function(){ + request.get(TEST_SERVER + '/not-found', this.callback); + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } } - } }) -.addBatch({ - 'serving hello.txt': { - topic : function(){ - request.get(TEST_SERVER + '/hello.txt', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/plain': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/plain'); - }, - 'should respond with hello world': function(error, response, body){ - assert.equal(body, 'hello world'); - } - } -}).addBatch({ - 'serving first 5 bytes of hello.txt': { - topic : function(){ - var options = { - url: TEST_SERVER + '/hello.txt', - headers: { - 'Range': 'bytes=0-4' + .addBatch({ + 'requesting a malformed URI': { + topic: function(){ + request.get(TEST_SERVER + '/a%AFc', this.callback); + }, + 'should respond with 400': function(error, response, body){ + assert.equal(response.statusCode, 400); + } } - }; - request.get(options, this.callback); - }, - 'should respond with 206' : function(error, response, body){ - assert.equal(response.statusCode, 206); - }, - 'should respond with text/plain': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/plain'); - }, - 'should have content-length of 5 bytes': function(error, response, body){ - assert.equal(response.headers['content-length'], 5); - }, - 'should have a valid Content-Range header in response': function(error, response, body){ - assert.equal(response.headers['content-range'], 'bytes 0-4/11'); - }, - 'should respond with hello': function(error, response, body){ - assert.equal(body, 'hello'); - } - } -}).addBatch({ - 'serving last 5 bytes of hello.txt': { - topic : function(){ - var options = { - url: TEST_SERVER + '/hello.txt', - headers: { - 'Range': 'bytes=6-10' + }) + .addBatch({ + 'serving empty.css': { + topic : function(){ + request.get(TEST_SERVER + '/empty.css', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/css': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/css'); + }, + 'should respond with empty string': function(error, response, body){ + assert.equal(body, ''); + } } - }; - request.get(options, this.callback); - }, - 'should respond with 206' : function(error, response, body){ - assert.equal(response.statusCode, 206); - }, - 'should respond with text/plain': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/plain'); - }, - 'should have content-length of 5 bytes': function(error, response, body){ - assert.equal(response.headers['content-length'], 5); - }, - 'should have a valid Content-Range header in response': function(error, response, body){ - assert.equal(response.headers['content-range'], 'bytes 6-10/11'); - }, - 'should respond with world': function(error, response, body){ - assert.equal(body, 'world'); - } - } -}).addBatch({ - 'serving all from the start of hello.txt': { - topic : function(){ - var options = { - url: TEST_SERVER + '/hello.txt', - headers: { - 'Range': 'bytes=0-' + }) + .addBatch({ + 'serving hello.txt': { + topic : function(){ + request.get(TEST_SERVER + '/hello.txt', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should respond with hello world': function(error, response, body){ + assert.equal(body, 'hello world'); + } } - }; - request.get(options, this.callback); - }, - 'should respond with 206' : function(error, response, body){ - assert.equal(response.statusCode, 206); - }, - 'should respond with text/plain': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/plain'); - }, - 'should have content-length of 11 bytes': function(error, response, body){ - assert.equal(response.headers['content-length'], 11); - }, - 'should have a valid Content-Range header in response': function(error, response, body){ - assert.equal(response.headers['content-range'], 'bytes 0-10/11'); - }, - 'should respond with "hello world"': function(error, response, body){ - assert.equal(body, 'hello world'); - } - } -}).addBatch({ - 'serving directory index': { - topic : function(){ - request.get(TEST_SERVER, this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}).addBatch({ - 'serving index.html from the cache': { - topic : function(){ - request.get(TEST_SERVER + '/index.html', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}).addBatch({ - 'requesting with If-None-Match': { - topic : function(){ - var _this = this; - request.get(TEST_SERVER + '/index.html', function(error, response, body){ - request({ - method: 'GET', - uri: TEST_SERVER + '/index.html', - headers: {'if-none-match': response.headers['etag']} - }, - _this.callback); - }); - }, - 'should respond with 304' : function(error, response, body){ - assert.equal(response.statusCode, 304); - } - }, - 'requesting with If-None-Match and If-Modified-Since': { - topic : function(){ - var _this = this; - request.get(TEST_SERVER + '/index.html', function(error, response, body){ - var modified = Date.parse(response.headers['last-modified']); - var oneDayLater = new Date(modified + (24 * 60 * 60 * 1000)).toUTCString(); - var nonMatchingEtag = '1111222233334444'; - request({ - method: 'GET', - uri: TEST_SERVER + '/index.html', - headers: { - 'if-none-match': nonMatchingEtag, - 'if-modified-since': oneDayLater - } + }).addBatch({ + 'serving first 5 bytes of hello.txt': { + topic : function(){ + const options = { + url: TEST_SERVER + '/hello.txt', + headers: { + 'Range': 'bytes=0-4' + } + }; + request.get(options, this.callback); + }, + 'should respond with 206' : function(error, response, body){ + assert.equal(response.statusCode, 206); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should have content-length of 5 bytes': function(error, response, body){ + assert.equal(response.headers['content-length'], 5); + }, + 'should have a valid Content-Range header in response': function(error, response, body){ + assert.equal(response.headers['content-range'], 'bytes 0-4/11'); + }, + 'should respond with hello': function(error, response, body){ + assert.equal(body, 'hello'); + } + } + }).addBatch({ + 'serving last 5 bytes of hello.txt': { + topic : function(){ + const options = { + url: TEST_SERVER + '/hello.txt', + headers: { + 'Range': 'bytes=6-10' + } + }; + request.get(options, this.callback); + }, + 'should respond with 206' : function(error, response, body){ + assert.equal(response.statusCode, 206); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should have content-length of 5 bytes': function(error, response, body){ + assert.equal(response.headers['content-length'], 5); + }, + 'should have a valid Content-Range header in response': function(error, response, body){ + assert.equal(response.headers['content-range'], 'bytes 6-10/11'); + }, + 'should respond with world': function(error, response, body){ + assert.equal(body, 'world'); + } + } + }).addBatch({ + 'serving all from the start of hello.txt': { + topic : function(){ + const options = { + url: TEST_SERVER + '/hello.txt', + headers: { + 'Range': 'bytes=0-' + } + }; + request.get(options, this.callback); + }, + 'should respond with 206' : function(error, response, body){ + assert.equal(response.statusCode, 206); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should have content-length of 11 bytes': function(error, response, body){ + assert.equal(response.headers['content-length'], 11); + }, + 'should have a valid Content-Range header in response': function(error, response, body){ + assert.equal(response.headers['content-range'], 'bytes 0-10/11'); + }, + 'should respond with "hello world"': function(error, response, body){ + assert.equal(body, 'hello world'); + } + } + }).addBatch({ + 'serving directory index': { + topic : function(){ + request.get(TEST_SERVER, this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/html': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/html'); + } + } + }).addBatch({ + 'serving index.html from the cache': { + topic : function(){ + request.get(TEST_SERVER + '/index.html', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/html': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/html'); + } + } + }).addBatch({ + 'requesting with If-None-Match': { + topic : function(){ + const _this = this; + request.get(TEST_SERVER + '/index.html', function(error, response, body){ + request({ + method: 'GET', + uri: TEST_SERVER + '/index.html', + headers: {'if-none-match': response.headers['etag']} + }, + _this.callback); + }); + }, + 'should respond with 304' : function(error, response, body){ + assert.equal(response.statusCode, 304); + } }, - _this.callback); - }); - }, - 'should respond with a 200': function(error, response, body){ - assert.equal(response.statusCode, 200); - } - } -}) -.addBatch({ - 'requesting POST': { - topic : function(){ - request.post(TEST_SERVER + '/index.html', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should not be empty' : function(error, response, body){ - assert.isNotEmpty(body); - } - } -}) -.addBatch({ - 'requesting HEAD': { - topic : function(){ - request.head(TEST_SERVER + '/index.html', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'head must has no body' : function(error, response, body){ - assert.isEmpty(body); - } - } -}) -.addBatch(headers) -.addBatch({ - 'addings custom mime types': { - topic : function(){ - static.mime.define({'application/font-woff': ['woff']}); - this.callback(); - }, - 'should add woff' : function(error, response, body){ - assert.equal(static.mime.lookup('woff'), 'application/font-woff'); - } - } -}) -.addBatch({ - 'serving subdirectory index': { - topic : function(){ - request.get(TEST_SERVER + '/there/', this.callback); // with trailing slash - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}) -.addBatch({ - 'redirecting to subdirectory index': { - topic : function(){ - request.get({ url: TEST_SERVER + '/there', followRedirect: false }, this.callback); // without trailing slash - }, - 'should respond with 301' : function(error, response, body){ - assert.equal(response.statusCode, 301); - }, - 'should respond with location header': function(error, response, body){ - assert.equal(response.headers['location'], '/there/'); // now with trailing slash - }, - 'should respond with empty string body' : function(error, response, body){ - assert.equal(body, ''); - } - } -}) -.addBatch({ - 'requesting a subdirectory (with trailing slash) not found': { - topic : function(){ - request.get(TEST_SERVER + '/notthere/', this.callback); // with trailing slash - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}) -.addBatch({ - 'requesting a subdirectory (without trailing slash) not found': { - topic : function(){ - request.get({ url: TEST_SERVER + '/notthere', followRedirect: false }, this.callback); // without trailing slash - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}).addBatch({ - 'once an http server is listening with custom index configuration': { - topic: function () { - server.close(); + 'requesting with If-None-Match and If-Modified-Since': { + topic : function(){ + const _this = this; + request.get(TEST_SERVER + '/index.html', function(error, response, body){ + const modified = Date.parse(response.headers['last-modified']); + const oneDayLater = new Date(modified + (24 * 60 * 60 * 1000)).toUTCString(); + const nonMatchingEtag = '1111222233334444'; + request({ + method: 'GET', + uri: TEST_SERVER + '/index.html', + headers: { + 'if-none-match': nonMatchingEtag, + 'if-modified-since': oneDayLater + } + }, + _this.callback); + }); + }, + 'should respond with a 200': function(error, response, body){ + assert.equal(response.statusCode, 200); + } + } + }) + .addBatch({ + 'requesting POST': { + topic : function(){ + request.post(TEST_SERVER + '/index.html', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should not be empty' : function(error, response, body){ + assert.isNotEmpty(body); + } + } + }) + .addBatch({ + 'requesting HEAD': { + topic : function(){ + request.head(TEST_SERVER + '/index.html', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'head must has no body' : function(error, response, body){ + assert.isEmpty(body); + } + } + }) + .addBatch(headers) + .addBatch({ + 'addings custom mime types': { + topic : function(){ + statik.mime.define({'application/font-woff': ['woff']}); + this.callback(); + }, + 'should add woff' : function(error, response, body){ + assert.equal(statik.mime.lookup('woff'), 'application/font-woff'); + } + } + }) + .addBatch({ + 'serving subdirectory index': { + topic : function(){ + request.get(TEST_SERVER + '/there/', this.callback); // with trailing slash + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/html': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/html'); + } + } + }) + .addBatch({ + 'redirecting to subdirectory index': { + topic : function(){ + request.get({ url: TEST_SERVER + '/there', followRedirect: false }, this.callback); // without trailing slash + }, + 'should respond with 301' : function(error, response, body){ + assert.equal(response.statusCode, 301); + }, + 'should respond with location header': function(error, response, body){ + assert.equal(response.headers['location'], '/there/'); // now with trailing slash + }, + 'should respond with empty string body' : function(error, response, body){ + assert.equal(body, ''); + } + } + }) + .addBatch({ + 'requesting a subdirectory (with trailing slash) not found': { + topic : function(){ + request.get(TEST_SERVER + '/notthere/', this.callback); // with trailing slash + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } + } + }) + .addBatch({ + 'requesting a subdirectory (without trailing slash) not found': { + topic : function(){ + request.get({ url: TEST_SERVER + '/notthere', followRedirect: false }, this.callback); // without trailing slash + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } + } + }).addBatch({ + 'once an http server is listening with custom index configuration': { + topic: function () { + server.close(); - fileServer = new static.Server(__dirname + '/../fixtures', { indexFile: "hello.txt" }); + fileServer = new statik.Server(__dirname + '/../fixtures', { indexFile: "hello.txt" }); - server = require('http').createServer(function (request, response) { - fileServer.serve(request, response); - }).listen(TEST_PORT, this.callback) - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. + server = require('http').createServer(function (request, response) { + fileServer.serve(request, response); + }).listen(TEST_PORT, this.callback) + }, + 'should be listening' : function(){ + /* This test is necessary to ensure the topic execution. * A topic without tests will be not executed */ - assert.isTrue(true); - } - } -}).addBatch({ - 'serving custom index file': { - topic : function(){ - request.get(TEST_SERVER + '/', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with empty string': function(error, response, body){ - assert.equal(body, 'hello world'); - } - } -}).export(module); - + assert.isTrue(true); + } + } + }).addBatch({ + 'serving custom index file': { + topic : function(){ + request.get(TEST_SERVER + '/', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with empty string': function(error, response, body){ + assert.equal(body, 'hello world'); + } + } + }).export(module); From e18ca016b51c1a5f5dca4f8a936247fb7dc93067 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 01:10:41 +0800 Subject: [PATCH 15/50] - Time display logging with leading 0 --- bin/cli.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index fae355f..fe674c8 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -62,7 +62,10 @@ const dir = argv._[0] || '.'; const log = function(request, response, statusCode) { const d = new Date(); const seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(), - datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, + minutes = d.getMinutes() < 10 ? '0' + d .getMinutes() : d.getMinutes(), + hours = d.getHours() < 10 ? '0' + d .getHours() : d.getHours(), + datestr = hours + ':' + minutes + ':' + seconds, + line = datestr + ' [' + response.statusCode + ']: ' + request.url; let colorized = line; if (tty.isatty(process.stdout.fd)) From 036c6f776c8a68eebae3fd85eec0c6739bddc58f Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 07:45:26 +0800 Subject: [PATCH 16/50] - npm: Add scoping: @brettz9/node-static --- README.md | 57 ++++++++++++++-------------- benchmark/node-static-0.3.0.txt | 2 +- bin/cli.js | 4 +- examples/file-server.js | 2 +- lib/node-static.js | 2 +- package.json | 8 ++-- test/integration/node-static-test.js | 6 +-- 7 files changed, 41 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 70eec00..a7ee2bc 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -node-static -=========== +# @brettz9/node-static > a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org) -node-static understands and supports *conditional GET* and *HEAD* requests. -node-static was inspired by some of the other static-file serving modules out there, -such as node-paperboy and antinode. +A maintained fork of `node-static`. `node-static` was inspired by some of the +other static-file serving modules out there, such as node-paperboy and antinode. -Synopsis --------- +`@brettz9/node-static` understands and supports *conditional GET* and *HEAD* requests. + +# Synopsis ```js -var static = require('node-static'); +const statik = require('@brettz9/node-static'); // -// Create a node-static server instance to serve the './public' folder +// Create a @brettz9/node-static server instance to serve the './public' folder // -var file = new static.Server('./public'); +var file = new statik.Server('./public'); require('http').createServer(function (request, response) { request.addListener('end', function () { @@ -31,25 +30,26 @@ require('http').createServer(function (request, response) { API --- -### Creating a node-static Server # +### Creating a @brettz9/node-static Server # Creating a file server instance is as simple as: ```js -new static.Server(); +new statik.Server(); ``` This will serve files in the current directory. If you want to serve files in a specific directory, pass it as the first argument: ```js -new static.Server('./public'); +new statik.Server('./public'); ``` -You can also specify how long the client is supposed to cache the files node-static serves: +You can also specify how long the client is supposed to cache the files +@brettz9/node-static serves: ```js -new static.Server('./public', { cache: 3600 }); +new statik.Server('./public', { cache: 3600 }); ``` This will set the `Cache-Control` header, telling clients to cache the file for an hour. @@ -60,10 +60,10 @@ This is the default setting. To serve files under a directory, simply call the `serve` method on a `Server` instance, passing it the HTTP request and response object: -```js -var static = require('node-static'); +```js +var statik = require('@brettz9/node-static'); -var fileServer = new static.Server('./public'); +var fileServer = new statik.Server('./public'); require('http').createServer(function (request, response) { request.addListener('end', function () { @@ -103,9 +103,9 @@ An optional callback can be passed as last argument, it will be called every tim has been served successfully, or if there was an error serving the file: ```js -var static = require('node-static'); - -var fileServer = new static.Server('./public'); +var statik = require('@brettz9/node-static'); + +var fileServer = new statik.Server('./public'); require('http').createServer(function (request, response) { request.addListener('end', function () { @@ -122,12 +122,13 @@ require('http').createServer(function (request, response) { }).listen(8080); ``` -Note that if you pass a callback, and there is an error serving the file, node-static -*will not* respond to the client. This gives you the opportunity to re-route the request, +Note that if you pass a callback, and there is an error serving the file, +@brettz9/node-static *will not* respond to the client. This gives you the +opportunity to re-route the request, or handle it differently. -For example, you may want to interpret a request as a static request, but if the file isn't found, -send it to an application. +For example, you may want to interpret a request as a static request, but if +the file isn't found, send it to an application. If you only want to *listen* for errors, you can use *event listeners*: @@ -159,7 +160,7 @@ Sets the `Server` header. example: `{ serverInfo: "myserver" }` -> Defaults to `node-static/{version}` +> Defaults to `@brettz9/node-static/{version}` #### `headers` # @@ -198,12 +199,12 @@ example: `{ indexFile: "index.htm" }` Command Line Interface ---------------------- -`node-static` also provides a CLI. +`@brettz9/node-static` also provides a CLI. ### Installation # ```sh -$ npm install -g node-static +$ npm install -g @brettz9/node-static ``` ### Example Usage # diff --git a/benchmark/node-static-0.3.0.txt b/benchmark/node-static-0.3.0.txt index c6083ea..1367d7c 100644 --- a/benchmark/node-static-0.3.0.txt +++ b/benchmark/node-static-0.3.0.txt @@ -5,7 +5,7 @@ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) -Server Software: node-static/0.3.0 +Server Software: @brettz9/node-static/0.3.0 Server Hostname: 127.0.0.1 Server Port: 8080 diff --git a/bin/cli.js b/bin/cli.js index fe674c8..6dd8e11 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -27,7 +27,7 @@ const argv = require('optimist') }) .option('version', { alias: 'v', - description: 'node-static version' + description: '@brettz9/node-static version' }) .option('headers', { alias: 'H', @@ -83,7 +83,7 @@ if (argv.help) { } if (argv.version) { - console.log('node-static', statik.version.join('.')); + console.log('@brettz9/node-static', statik.version.join('.')); process.exit(0); } diff --git a/examples/file-server.js b/examples/file-server.js index 64d5a2f..7364af3 100644 --- a/examples/file-server.js +++ b/examples/file-server.js @@ -19,4 +19,4 @@ require('http').createServer(function (request, response) { }); }).listen(8080); -console.log("> node-static is listening on http://127.0.0.1:8080"); +console.log("> @brettz9/node-static is listening on http://127.0.0.1:8080"); diff --git a/lib/node-static.js b/lib/node-static.js index 7ba4885..26840c8 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -36,7 +36,7 @@ const Server = function (root, options) { if ('serverInfo' in this.options) { this.serverInfo = this.options.serverInfo.toString(); } else { - this.serverInfo = 'node-static/' + version.join('.'); + this.serverInfo = '@brettz9/node-static/' + version.join('.'); } this.defaultHeaders['server'] = this.serverInfo; diff --git a/package.json b/package.json index 66c0fb6..8272052 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,21 @@ { - "name": "node-static", + "name": "@brettz9/node-static", "description": "simple, compliant file streaming module for node", - "url": "http://github.com/cloudhead/node-static", "keywords": [ "http", "static", "file", "server" ], - "author": "Alexis Sellier ", + "author": "Brett Zamir", "contributors": [ + "Alexis Sellier ", "Pablo Cantero ", "Ionică Bizău " ], "repository": { "type": "git", - "url": "http://github.com/cloudhead/node-static" + "url": "http://github.com/brettz9/node-static" }, "main": "./lib/node-static", "scripts": { diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 7968bf3..02bf4e7 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -6,7 +6,7 @@ const vows = require('vows') , statik = require('../../lib/node-static'); let fileServer = new statik.Server(__dirname + '/../fixtures'); -const suite = vows.describe('node-static'); +const suite = vows.describe('@brettz9/node-static'); const TEST_PORT = 8080; const TEST_SERVER = 'http://localhost:' + TEST_PORT; const version = statik.version.join('.'); @@ -20,8 +20,8 @@ const headers = { } } } -headers['requesting headers']['should respond with node-static/' + version] = function(error, response, body){ - assert.equal(response.headers['server'], 'node-static/' + version); +headers['requesting headers']['should respond with @brettz9/node-static/' + version] = function(error, response, body){ + assert.equal(response.headers['server'], '@brettz9/node-static/' + version); } suite.addBatch({ From 1e7db150819b3fa77483f48ce9b53d95c3951d68 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 07:48:11 +0800 Subject: [PATCH 17/50] - Docs: Fix header example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7ee2bc..a3de830 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ example: `{ serverInfo: "myserver" }` Sets response headers. -example: `{ 'X-Hello': 'World!' }` +example: `{ headers: { 'X-Hello': 'World!' } }` > defaults to `{}` From c1eb9d6b32c4053f37181bbe5e63eaadfaaf94ae Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 08:16:15 +0800 Subject: [PATCH 18/50] Support bytes=0-0 range header --- lib/node-static.js | 6 +++--- test/integration/node-static-test.js | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index 26840c8..d2ac529 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -101,8 +101,8 @@ Server.prototype.serveFile = function (pathname, status, headers, req, res) { Server.prototype.finish = function (status, headers, req, res, promise, callback) { const result = { - status: status, - headers: headers, + status, + headers, message: http.STATUS_CODES[status] }; @@ -254,7 +254,7 @@ Server.prototype.parseByteRange = function (req, stat) { } /* General byte range validation */ - if (!isNaN(byteRange.from) && !!byteRange.to && 0 <= byteRange.from && byteRange.from < byteRange.to) { + if (!isNaN(byteRange.from) && !isNaN(byteRange.to) && 0 <= byteRange.from && byteRange.from <= byteRange.to) { byteRange.valid = true; } else { console.warn("Request contains invalid range header: ", rangeHeader); diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 02bf4e7..8e96cc1 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -182,6 +182,33 @@ suite.addBatch({ assert.equal(body, 'world'); } } + }).addBatch({ + 'serving first byte of hello.txt': { + topic : function(){ + const options = { + url: TEST_SERVER + '/hello.txt', + headers: { + 'Range': 'bytes=0-0' + } + }; + request.get(options, this.callback); + }, + 'should respond with 206' : function(error, response, body){ + assert.equal(response.statusCode, 206); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should have content-length of 1 bytes': function(error, response, body){ + assert.equal(response.headers['content-length'], 1); + }, + 'should have a valid Content-Range header in response': function(error, response, body){ + assert.equal(response.headers['content-range'], 'bytes 0-0/11'); + }, + 'should respond with h': function(error, response, body){ + assert.equal(body, 'h'); + } + } }).addBatch({ 'serving all from the start of hello.txt': { topic : function(){ From e19686f30a9cd0c1cddb0317477193091f0d71fa Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 09:19:03 +0800 Subject: [PATCH 19/50] For spa, allow dots after path --- bin/cli.js | 6 +++++- package.json | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/cli.js b/bin/cli.js index 6dd8e11..57bf706 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -4,6 +4,7 @@ const fs = require('fs'), tty = require('tty'), + url = require('url'), statik = require('./../lib/node-static'); const argv = require('optimist') @@ -122,7 +123,10 @@ require('http').createServer(function (request, response) { } }; - if (argv['spa'] && request.url.indexOf(".") == -1) { + // Parsing catches: + // npm start -- --spa --indexFile test/fixtures/there/index.html + // with http://127.0.0.1:8080/test/fixtures/there?email=john.cena + if (argv['spa'] && !url.parse(request.url).pathname.includes(".")) { file.serveFile(argv['indexFile'], 200, {}, request, response); } else { file.serve(request, response, callback); diff --git a/package.json b/package.json index 8272052..986e053 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "main": "./lib/node-static", "scripts": { + "start": "./bin/cli.js", "lint": "eslint .", "test": "vows --spec --isolate" }, From 48691d231216d4490613830ca5ff3d38290491fd Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 09:42:45 +0800 Subject: [PATCH 20/50] - Enhancement: Allow `serverInfo` to be `null`; add test for null and non-null serverInfo --- lib/node-static.js | 10 +++++-- test/integration/node-static-test.js | 45 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index d2ac529..aec7543 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -33,13 +33,15 @@ const Server = function (root, options) { } } - if ('serverInfo' in this.options) { + if ('serverInfo' in this.options && this.options.serverInfo) { this.serverInfo = this.options.serverInfo.toString(); } else { this.serverInfo = '@brettz9/node-static/' + version.join('.'); } - this.defaultHeaders['server'] = this.serverInfo; + if (this.options.serverInfo !== null) { + this.defaultHeaders['server'] = this.serverInfo; + } if (this.cache !== false) { this.defaultHeaders['cache-control'] = 'max-age=' + this.cache; @@ -106,7 +108,9 @@ Server.prototype.finish = function (status, headers, req, res, promise, callback message: http.STATUS_CODES[status] }; - headers['server'] = this.serverInfo; + if (this.options.serverInfo !== null) { + headers['server'] = this.serverInfo; + } if (!status || status >= 400) { if (callback) { diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 8e96cc1..326fa5c 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -128,9 +128,54 @@ suite.addBatch({ assert.equal(body, 'hello world'); } } + }).addBatch({ + 'serving hello.txt without server header': { + topic : function(){ + fileServer = new statik.Server(__dirname + '/../fixtures', { + serverInfo: null + }); + + request.get(TEST_SERVER + '/hello.txt', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should contain server header': function(error, response, body){ + assert.equal(response.headers['server'], null); + }, + 'should respond with hello world': function(error, response, body){ + assert.equal(body, 'hello world'); + } + } + }).addBatch({ + 'serving hello.txt with custom server header': { + topic : function(){ + fileServer = new statik.Server(__dirname + '/../fixtures', { + serverInfo: 'own header' + }); + + request.get(TEST_SERVER + '/hello.txt', this.callback); + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/plain': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/plain'); + }, + 'should contain custom server header': function(error, response, body){ + assert.equal(response.headers['server'], 'own header'); + }, + 'should respond with hello world': function(error, response, body){ + assert.equal(body, 'hello world'); + } + } }).addBatch({ 'serving first 5 bytes of hello.txt': { topic : function(){ + fileServer = new statik.Server(__dirname + '/../fixtures'); const options = { url: TEST_SERVER + '/hello.txt', headers: { From 83aac2e6c1d5d0702f014a9b6f252484583eee68 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 10:26:40 +0800 Subject: [PATCH 21/50] - Prefer includes or startsWith over indexOf where possible --- lib/node-static.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node-static.js b/lib/node-static.js index aec7543..5d2b1e2 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -144,7 +144,7 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini // Make sure we're not trying to access a // file outside of the root. - if (pathname.indexOf(that.root) === 0) { + if (pathname.startsWith(that.root)) { fs.stat(pathname, function (e, stat) { if (e) { finish(404, {}); @@ -204,7 +204,7 @@ Server.prototype.gzipOk = function (req, contentType) { (typeof enable === 'boolean' || (contentType && (enable instanceof RegExp) && enable.test(contentType)))) { const acceptEncoding = req.headers['accept-encoding']; - return acceptEncoding && acceptEncoding.indexOf("gzip") >= 0; + return acceptEncoding && acceptEncoding.includes("gzip"); } return false; } @@ -243,7 +243,7 @@ Server.prototype.parseByteRange = function (req, stat) { const flavor = 'bytes='; if (rangeHeader) { - if (rangeHeader.indexOf(flavor) == 0 && rangeHeader.indexOf(',') == -1) { + if (rangeHeader.startsWith(flavor) && !rangeHeader.includes(',')) { /* Parse */ rangeHeader = rangeHeader.substr(flavor.length).split('-'); byteRange.from = parseInt(rangeHeader[0]); From 3909741c495590326fd26627b9f52e84f6b3ab2e Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 10:58:41 +0800 Subject: [PATCH 22/50] - Docs: CHANGES.md - npm: Change to 0.1.0 version --- CHANGES.md | 27 +++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..0dcea9b --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,27 @@ +# CHANGES for `@brettz9/node-static` + +## 0.1.0 + +Fork from `node-static` + +### User-facing + +- Fix: Avoid octal (@bgao / @Ilrilan) +- Fix: Support `bytes=0-0` Range header (@prajwalkman) +- Fix: For `spa`, allow dots after path (@gjuchault) +- Update/fix: Protect `fs.stat` calls from bad path arguments (@brpvieira) +- Enhancement: Allow `serverInfo` to be `null` (@martindale) +- Enhancement: Time display logging with leading 0 (@mauris) +- Optimization: 'use strict' directive +- Docs: Fix header example (@emmanouil) +- Docs: Sp. (@EdwardBetts) +- npm: Set engines to 10.11.0+ + +### Dev-facing + +- Linting: Prefer const, no-var, fix indent, comment-out unused, + prefer `startsWith` and `includes` +- Maintenance: Add `.editorconfig` +- Testing: Add test for `null` and non-`null` serverInfo +- npm: Add eslint devDep. and script +- npm: Add lock file diff --git a/package-lock.json b/package-lock.json index 255570a..ef5f222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "node-static", - "version": "0.7.11", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 986e053..efa8ff0 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "request": "latest", "vows": "latest" }, - "version": "0.7.11", + "version": "0.1.0", "engines": { "node": ">=10.0.0" }, From 98d490ec62613d6c76bcb2c4fe2683c91dab3d74 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:03:53 +0800 Subject: [PATCH 23/50] - Docs: Fix typo --- lib/node-static.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node-static.js b/lib/node-static.js index eeed2d3..00711f1 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -218,7 +218,7 @@ Server.prototype.gzipOk = function (req, contentType) { } /* Send a gzipped version of the file if the options and the client indicate gzip is enabled and - * we find a .gz file mathing the static resource requested. + * we find a .gz file matching the static resource requested. */ Server.prototype.respondGzip = function (pathname, status, contentType, _headers, files, stat, req, res, finish) { const that = this; From 798e5a37335d69f67187f26774f36b038cad0d3b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:05:15 +0800 Subject: [PATCH 24/50] - git: Ignore `.idea` --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 073cfe2..7d6c6d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ npm-debug.log node_modules +.idea From 067349456b83deaed133cf28eb461b0e9a05fe77 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:17:50 +0800 Subject: [PATCH 25/50] - Add another fs.stat guard --- lib/node-static/util.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/node-static/util.js b/lib/node-static/util.js index b4b794d..89bdad4 100644 --- a/lib/node-static/util.js +++ b/lib/node-static/util.js @@ -8,13 +8,17 @@ exports.mstat = function (dir, files, callback) { const file = files.shift(); if (file) { - fs.stat(path.join(dir, file), function (e, stat) { - if (e) { - callback(e); - } else { - mstat(files, stats.concat([stat])); - } - }); + try { + fs.stat(path.join(dir, file), function (e, stat) { + if (e) { + callback(e); + } else { + mstat(files, stats.concat([stat])); + } + }); + } catch (e) { + callback(e); + } } else { callback(null, { size: stats.reduce(function (total, stat) { From d29889171f1ffb854c7691341bf2744a5b74ccea Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:43:12 +0800 Subject: [PATCH 26/50] - npm: Update lock file --- package-lock.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef5f222..955c9aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,12 @@ { - "name": "node-static", + "name": "@brettz9/node-static", "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.7.11", + "name": "@brettz9/node-static", + "version": "0.1.0", "license": "MIT", "dependencies": { "colors": ">=0.6.0", @@ -21,7 +22,7 @@ "vows": "latest" }, "engines": { - "node": ">= 0.4.1" + "node": ">=10.0.0" } }, "node_modules/@babel/code-frame": { From eeae4502fb18680f9273cf7bd069f1dd6efefa85 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:44:31 +0800 Subject: [PATCH 27/50] - Optimization: Remove unused `colors` --- CHANGES.md | 1 + bin/cli.js | 2 -- package-lock.json | 14 -------------- package.json | 1 - 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4caa9fa..0620891 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,7 @@ Fork from `node-static` - Enhancement: Respect static `--cache 0` (@matthew-andrews) - Enhancement: New option: `defaultExtension` (@fmalk) - Optimization: 'use strict' directive +- Optimization: Remove unused `colors` - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) - npm: Set engines to 10.11.0+ diff --git a/bin/cli.js b/bin/cli.js index 8170635..5a4413a 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -58,8 +58,6 @@ const argv = require('optimist') const dir = argv._[0] || '.'; -// const colors = require('colors'); - const log = function(request, response, statusCode) { const d = new Date(); const seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(), diff --git a/package-lock.json b/package-lock.json index 955c9aa..8aafaca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "colors": ">=0.6.0", "mime": "^1.2.9", "optimist": ">=0.3.4" }, @@ -358,14 +357,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1990,11 +1981,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", diff --git a/package.json b/package.json index efa8ff0..0203471 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ }, "license": "MIT", "dependencies": { - "colors": ">=0.6.0", "mime": "^1.2.9", "optimist": ">=0.3.4" }, From 5a2873b082544e272b1f0f3973cc82498188a573 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 11:55:23 +0800 Subject: [PATCH 28/50] - npm: Update `mime` (updating to latest minor update only) - ncu: Add `.ncurc.js` to prevent `mime` being reported for updates (2.0 seems may be buggy and would need to investigate) --- .ncurc.js | 10 ++++++++++ CHANGES.md | 1 + package-lock.json | 2 +- package.json | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .ncurc.js diff --git a/.ncurc.js b/.ncurc.js new file mode 100644 index 0000000..e61002c --- /dev/null +++ b/.ncurc.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = { + reject: [ + // Todo: mime@2 appears buggy with custom `define` (even after + // `lookup`->`getType`); would need to investigate, but preventing + // updates for now. + 'mime' + ] +}; diff --git a/CHANGES.md b/CHANGES.md index 0620891..2220f2c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ Fork from `node-static` - Optimization: Remove unused `colors` - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) +- npm: Update `mime` (updating to latest minor update only) - npm: Set engines to 10.11.0+ ### Dev-facing diff --git a/package-lock.json b/package-lock.json index 8aafaca..428cd4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "mime": "^1.2.9", + "mime": "^1.4.1", "optimist": ">=0.3.4" }, "bin": { diff --git a/package.json b/package.json index 0203471..2769e4c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "license": "MIT", "dependencies": { - "mime": "^1.2.9", + "mime": "^1.4.1", "optimist": ">=0.3.4" }, "devDependencies": { From 69d9f5447440be37f8631ce159d4b637ab362d5f Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 13:21:23 +0800 Subject: [PATCH 29/50] - Refactoring: Use safer non-prototype version of `colors` (had indeed been in use) --- CHANGES.md | 4 ++-- bin/cli.js | 7 ++++--- package-lock.json | 14 ++++++++++++++ package.json | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cb39003..3dd0b0b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,16 +18,16 @@ Fork from `node-static` - Enhancement: Respect static `--cache 0` (@matthew-andrews) - Enhancement: New option: `defaultExtension` (@fmalk) - Optimization: 'use strict' directive -- Optimization: Remove unused `colors` - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) -- npm: Update `mime` (@fidian) +- npm: Update `mime` and `colors` (@fidian) - npm: Set engines to 10.11.0+ ### Dev-facing - Linting: Prefer const, no-var, fix indent, comment-out unused, prefer `startsWith` and `includes` +- Refactoring: Use safer non-prototype version of `colors` - Maintenance: Add `.editorconfig` - Testing: Add test for `null` and non-`null` serverInfo - Testing: Allow tests at end (@fmalk) diff --git a/bin/cli.js b/bin/cli.js index ae813d2..3a83b76 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -35,7 +35,8 @@ const fs = require('fs'), tty = require('tty'), url = require('url'), statik = require('./../lib/node-static'), - neodoc = require('neodoc'); + neodoc = require('neodoc'), + colors = require('colors/safe'); const args = neodoc.run(help(), { laxPlacement: true, @@ -54,8 +55,8 @@ const log = function(request, response, statusCode) { line = datestr + ' [' + response.statusCode + ']: ' + request.url; let colorized = line; if (tty.isatty(process.stdout.fd)) - colorized = (response.statusCode >= 500) ? line.red.bold : - (response.statusCode >= 400) ? line.red : + colorized = (response.statusCode >= 500) ? colors.red.bold(line) : + (response.statusCode >= 400) ? colors.red(line) : line; console.log(colorized); }; diff --git a/package-lock.json b/package-lock.json index 72492c7..66ef90a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { + "colors": "^1.4.0", "mime": "^2.5.2", "neodoc": "^2.0.2" }, @@ -357,6 +358,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -1970,6 +1979,11 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", diff --git a/package.json b/package.json index c7860c0..1f97e8e 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ }, "license": "MIT", "dependencies": { + "colors": "^1.4.0", "mime": "^2.5.2", "neodoc": "^2.0.2" }, From 457343354cf0ec8057f842c974331038d4297cfc Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 13:25:29 +0800 Subject: [PATCH 30/50] - Fix bugs/homepage URL --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1f97e8e..fc53a23 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,9 @@ "node": ">=10.0.0" }, "bugs": { - "url": "https://github.com/cloudhead/node-static/issues" + "url": "https://github.com/brettz9/node-static/issues" }, - "homepage": "https://github.com/cloudhead/node-static", + "homepage": "https://github.com/brettz9/node-static", "directories": { "example": "examples", "test": "test" From 3d70b2e2c643f76182d9b8e9299c99659de190db Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 13:35:36 +0800 Subject: [PATCH 31/50] - Docs: Add missing credit to CHANGES --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 3dd0b0b..1e49e65 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,7 @@ Fork from `node-static` ### User-facing - Security: Fix dependency vulnerabilities by switching from `optimist` to - `neodoc` + `neodoc` (@fidian) - Fix: Avoid octal (@bgao / @Ilrilan) - Fix: Support `bytes=0-0` Range header (@prajwalkman) - Fix: For `spa`, allow dots after path (@gjuchault) From 8e3059ea5680074460aa61405c93ccba5db872b4 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 13:36:12 +0800 Subject: [PATCH 32/50] - Docs: Code --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 1e49e65..e2dfac9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,7 +21,7 @@ Fork from `node-static` - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) - npm: Update `mime` and `colors` (@fidian) -- npm: Set engines to 10.11.0+ +- npm: Set `engines` to 10.11.0+ ### Dev-facing From 26a4874dd8d12a4d54ea27292a20c9b5a0ff5e62 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:10:38 +0800 Subject: [PATCH 33/50] - Testing: Add checks for supposed direct node-static unauthorized file access vulnerability - https://www.npmjs.com/advisories/1206 --- CHANGES.md | 1 + lib/node-static.js | 2 +- test/fixtures/there/index.html | 2 ++ test/fixtures/thereat/index.html | 10 ++++++++++ test/integration/node-static-test.js | 21 +++++++++++++++++++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/thereat/index.html diff --git a/CHANGES.md b/CHANGES.md index e2dfac9..d4890af 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,7 @@ Fork from `node-static` prefer `startsWith` and `includes` - Refactoring: Use safer non-prototype version of `colors` - Maintenance: Add `.editorconfig` +- Testing: Add checks for supposed direct node-static vulnerabilities - Testing: Add test for `null` and non-`null` serverInfo - Testing: Allow tests at end (@fmalk) - npm: Add eslint devDep. and script diff --git a/lib/node-static.js b/lib/node-static.js index bd14beb..202a9ee 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -21,7 +21,7 @@ function tryStat(p, callback) { } const Server = function (root, options) { - if (root && (typeof(root) === 'object')) { options = root; root = null } + if (root && typeof root === 'object') { options = root; root = null } // resolve() doesn't normalize (to lowercase) drive letters on Windows this.root = path.normalize(path.resolve(root || '.')); diff --git a/test/fixtures/there/index.html b/test/fixtures/there/index.html index 6798b09..785e0e2 100644 --- a/test/fixtures/there/index.html +++ b/test/fixtures/there/index.html @@ -1,5 +1,7 @@ + + Other page diff --git a/test/fixtures/thereat/index.html b/test/fixtures/thereat/index.html new file mode 100644 index 0000000..785e0e2 --- /dev/null +++ b/test/fixtures/thereat/index.html @@ -0,0 +1,10 @@ + + + + + Other page + + + hello there! + + diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index aebefb4..c2e3d0c 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -86,10 +86,31 @@ suite.addBatch({ assert.equal(response.statusCode, 404); } } +}).addBatch({ + 'requesting a file not found (file with same initial letters)': { + topic : function(){ + fileServer = new statik.Server(__dirname + '/../fixtures/there'); + request.get(TEST_SERVER + '/there.html', this.callback); + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } + } +}).addBatch({ + 'requesting a file not found (directory with same initial letters)': { + topic : function(){ + fileServer = new statik.Server(__dirname + '/../fixtures/there'); + request.get(TEST_SERVER + '/thereat/index.html', this.callback); + }, + 'should respond with 404' : function(error, response, body){ + assert.equal(response.statusCode, 404); + } + } }) .addBatch({ 'requesting a malformed URI': { topic: function(){ + fileServer = new statik.Server(__dirname + '/../fixtures'); request.get(TEST_SERVER + '/a%AFc', this.callback); }, 'should respond with 400': function(error, response, body){ From 95487174caa8362f0e80acf85f8a9d158e941b90 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:29:48 +0800 Subject: [PATCH 34/50] - Use non-deprecated URL constructor for parsing; also appears it may fix https://www.npmjs.com/advisories/1207 --- bin/cli.js | 3 +-- lib/node-static.js | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 3a83b76..3876752 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -33,7 +33,6 @@ Options: const fs = require('fs'), tty = require('tty'), - url = require('url'), statik = require('./../lib/node-static'), neodoc = require('neodoc'), colors = require('colors/safe'); @@ -105,7 +104,7 @@ const server = require('http').createServer(function (request, response) { // Parsing catches: // npm start -- --spa --indexFile test/fixtures/there/index.html // with http://127.0.0.1:8080/test/fixtures/there?email=john.cena - if (args['spa'] && !url.parse(request.url).pathname.includes(".")) { + if (args['spa'] && !new URL(request.url, 'http://localhost').pathname.includes(".")) { file.serveFile(args['--index-file'], 200, {}, request, response); } else { file.serve(request, response, callback); diff --git a/lib/node-static.js b/lib/node-static.js index 202a9ee..cc4e53c 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -4,7 +4,6 @@ const fs = require('fs') , events = require('events') // , buffer = require('buffer') , http = require('http') - , url = require('url') , path = require('path') , mime = require('mime') , util = require('./node-static/util'); @@ -75,7 +74,7 @@ Server.prototype.serveDir = function (pathname, req, res, finish) { if (!e) { const status = 200; const headers = {}; - const originalPathname = decodeURI(url.parse(req.url).pathname); + const originalPathname = decodeURI(new URL(req.url, 'http://localhost').pathname); if (originalPathname.length && originalPathname.charAt(originalPathname.length - 1) !== '/') { return finish(301, { 'Location': originalPathname + '/' }); } else { @@ -205,7 +204,7 @@ Server.prototype.serve = function (req, res, callback) { }; try { - pathname = decodeURI(url.parse(req.url).pathname); + pathname = decodeURI(new URL(req.url, 'http://localhost').pathname); } catch(e) { return process.nextTick(function() { From 490b861fda0307dc8dbcbc9982b8873b1eb968bc Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:54:38 +0800 Subject: [PATCH 35/50] - Testing: Add `example.com` file to confirm https://www.npmjs.com/advisories/1207 is indeed fixed --- test/fixtures/example.com/index.html | 10 ++++++++++ test/integration/node-static-test.js | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/fixtures/example.com/index.html diff --git a/test/fixtures/example.com/index.html b/test/fixtures/example.com/index.html new file mode 100644 index 0000000..785e0e2 --- /dev/null +++ b/test/fixtures/example.com/index.html @@ -0,0 +1,10 @@ + + + + + Other page + + + hello there! + + diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index 4266aa6..c077a09 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -441,6 +441,19 @@ suite.addBatch({ } } }) + .addBatch({ + 'serving subdirectory embedding website name (should not redirect)': { + topic : function(){ + request.get({ url: TEST_SERVER + '//example.com', followRedirect: false }, this.callback); // without trailing slash + }, + 'should respond with 200' : function(error, response, body){ + assert.equal(response.statusCode, 200); + }, + 'should respond with text/html': function(error, response, body){ + assert.equal(response.headers['content-type'], 'text/html'); + } + } + }) .addBatch({ 'redirecting to subdirectory index': { topic : function(){ From f09dd8243626e544f47e827ae93eb19b94b000b3 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:55:47 +0800 Subject: [PATCH 36/50] - Add DOCTYPE in fixtures (for suppressing IDE validation) --- test/fixtures/index.html | 1 + test/fixtures/there.html | 1 + 2 files changed, 2 insertions(+) diff --git a/test/fixtures/index.html b/test/fixtures/index.html index eee1c7a..489a4d3 100644 --- a/test/fixtures/index.html +++ b/test/fixtures/index.html @@ -1,3 +1,4 @@ + Awesome page diff --git a/test/fixtures/there.html b/test/fixtures/there.html index 5d47763..c6a1aa7 100644 --- a/test/fixtures/there.html +++ b/test/fixtures/there.html @@ -1,3 +1,4 @@ + Awesome page From c4009f6fb2965317f6e7681835e03e7981aa6ecf Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:58:01 +0800 Subject: [PATCH 37/50] - Docs: Give credit in CHANGES --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index d4890af..04cbae2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Fork from `node-static` - Enhancement: Time display logging with leading 0 (@mauris) - Enhancement: Respect static `--cache 0` (@matthew-andrews) - Enhancement: New option: `defaultExtension` (@fmalk) +- Enhancement: Added glob matching for setting cache headers (@lightswitch05) - Optimization: 'use strict' directive - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) From f876086b8f911d86612999c4436e91b8a4defc20 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 14:59:16 +0800 Subject: [PATCH 38/50] - Docs: Set off code --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 04cbae2..21193ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,7 +30,7 @@ Fork from `node-static` prefer `startsWith` and `includes` - Refactoring: Use safer non-prototype version of `colors` - Maintenance: Add `.editorconfig` -- Testing: Add checks for supposed direct node-static vulnerabilities +- Testing: Add checks for supposed direct `node-static` vulnerabilities - Testing: Add test for `null` and non-`null` serverInfo - Testing: Allow tests at end (@fmalk) - npm: Add eslint devDep. and script From cdeb737fae5f64628a3b1a85c13ecf8bd17365f4 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 15:00:19 +0800 Subject: [PATCH 39/50] - npm: Update `minimatch` --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index e74fc48..ae01972 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "colors": "^1.4.0", "mime": "^2.5.2", - "minimatch": "^3.0.3", + "minimatch": "^3.0.4", "neodoc": "^2.0.2" }, "bin": { diff --git a/package.json b/package.json index 73fb952..d08fd13 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "dependencies": { "colors": "^1.4.0", "mime": "^2.5.2", - "minimatch": "^3.0.3", + "minimatch": "^3.0.4", "neodoc": "^2.0.2" }, "devDependencies": { From f0794df3087fb7d04b33e0eb178341e02203d735 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 15:04:20 +0800 Subject: [PATCH 40/50] - Remove ncurc file (already updated) --- .ncurc.js | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .ncurc.js diff --git a/.ncurc.js b/.ncurc.js deleted file mode 100644 index e61002c..0000000 --- a/.ncurc.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = { - reject: [ - // Todo: mime@2 appears buggy with custom `define` (even after - // `lookup`->`getType`); would need to investigate, but preventing - // updates for now. - 'mime' - ] -}; From 94045ce9d42039cfed0252cd4e618ab291c505c4 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 15:06:34 +0800 Subject: [PATCH 41/50] - License: Add own name - npm: Add to ignore file --- .npmignore | 2 ++ LICENSE | 1 + 2 files changed, 3 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..2105b0d --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +test +benchmark diff --git a/LICENSE b/LICENSE index 8f85526..9acd794 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ Copyright (c) 2010-14 Alexis Sellier +Copyright (c) 2021 Brett Zamir Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 813583194918e37e3a339a37ab137a663312e44f Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 29 Mar 2021 15:14:56 +0800 Subject: [PATCH 42/50] - Update/fix: Protect additional `fs.stat` call (for `defaultExtension`) - Refactoring: Reorder packge.json - npm: Bump to 0.1.1 --- CHANGES.md | 4 ++++ lib/node-static.js | 2 +- package-lock.json | 4 ++-- package.json | 24 ++++++++++++------------ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 21193ed..2335f94 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGES for `@brettz9/node-static` +## 0.1.1 + +- Update/fix: Protect additional `fs.stat` call (for `defaultExtension`) + ## 0.1.0 Fork from `node-static` diff --git a/lib/node-static.js b/lib/node-static.js index 2aed0e6..541c7c6 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -161,7 +161,7 @@ Server.prototype.servePath = function (pathname, status, headers, req, res, fini if (e) { // possibly not found, check default extension if (that.defaultExtension) { - fs.stat(pathname+that.defaultExtension, function(e2, stat2) { + tryStat(pathname + that.defaultExtension, function(e2, stat2) { if (e2) { // really not found finish(404, {}); diff --git a/package-lock.json b/package-lock.json index ae01972..5b67f11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@brettz9/node-static", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@brettz9/node-static", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "colors": "^1.4.0", diff --git a/package.json b/package.json index d08fd13..c970167 100644 --- a/package.json +++ b/package.json @@ -1,32 +1,33 @@ { "name": "@brettz9/node-static", + "version": "0.1.1", "description": "simple, compliant file streaming module for node", - "keywords": [ - "http", - "static", - "file", - "server" - ], "author": "Brett Zamir", "contributors": [ "Alexis Sellier ", "Pablo Cantero ", "Ionică Bizău " ], + "main": "./lib/node-static", + "license": "MIT", + "bin": { + "static": "bin/cli.js" + }, + "keywords": [ + "http", + "static", + "file", + "server" + ], "repository": { "type": "git", "url": "http://github.com/brettz9/node-static" }, - "main": "./lib/node-static", "scripts": { "start": "./bin/cli.js", "lint": "eslint .", "test": "vows --spec --isolate" }, - "bin": { - "static": "bin/cli.js" - }, - "license": "MIT", "dependencies": { "colors": "^1.4.0", "mime": "^2.5.2", @@ -38,7 +39,6 @@ "request": "latest", "vows": "latest" }, - "version": "0.1.0", "engines": { "node": ">=10.0.0" }, From 07534e7a31e3d031193fb79f0f63de0adf6b3261 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 08:04:41 +0800 Subject: [PATCH 43/50] - Docs: Detail some changes from fork --- CHANGES.md | 2 ++ README.md | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2335f94..d81587c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## 0.1.1 +### User-facing + - Update/fix: Protect additional `fs.stat` call (for `defaultExtension`) ## 0.1.0 diff --git a/README.md b/README.md index c9fc767..a9b576e 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,24 @@ > a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org) -A maintained fork of `node-static`. `node-static` was inspired by some of the -other static-file serving modules out there, such as node-paperboy and antinode. - -`@brettz9/node-static` understands and supports *conditional GET* and *HEAD* requests. +A maintained fork of `node-static`. Currently offers these additional features: + +1. Fixes for vulnerabilities: + 1. [Unauthorized File Access](https://www.npmjs.com/advisories/1206) + 1. [Open Redirect](https://www.npmjs.com/advisories/1207) + 1. [Denial of Service](https://www.npmjs.com/advisories/1208) + 1. Avoids dependencies with vulnerabilities +1. Important fixes: + 1. Important octal fix (and uses strict mode) + 1. Avoids crashes with `fs.stat` checks +1. A numbe of other fixes and enhancements detailed in + [CHANGES.md](./CHANGES.md). + +The project was inspired by some of the other static-file serving modules out +there, such as node-paperboy and antinode. + +`@brettz9/node-static` understands and supports *conditional GET* and *HEAD* +requests. # Synopsis From dc5ce7ed3bbb8aa1fd45f1acca492a6a01674c93 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 08:26:02 +0800 Subject: [PATCH 44/50] - Docs: CHANGES clarifications --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d81587c..5c38c5c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,7 @@ Fork from `node-static` ### User-facing +- **Breaking change** (npm): Set `engines` to 10.11.0+ - Security: Fix dependency vulnerabilities by switching from `optimist` to `neodoc` (@fidian) - Fix: Avoid octal (@bgao / @Ilrilan) @@ -27,8 +28,8 @@ Fork from `node-static` - Optimization: 'use strict' directive - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) +- Docs: Add `CHANGES.md` - npm: Update `mime` and `colors` (@fidian) -- npm: Set `engines` to 10.11.0+ ### Dev-facing From 03c87d2816bdb1ff76822e38cda1411c1b305a08 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 08:36:53 +0800 Subject: [PATCH 45/50] - Docs (CHANGES): Denote security fix --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5c38c5c..61f0094 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ Fork from `node-static` - **Breaking change** (npm): Set `engines` to 10.11.0+ - Security: Fix dependency vulnerabilities by switching from `optimist` to `neodoc` (@fidian) +- Security: Update `mime` and `colors` (@fidian) - Fix: Avoid octal (@bgao / @Ilrilan) - Fix: Support `bytes=0-0` Range header (@prajwalkman) - Fix: For `spa`, allow dots after path (@gjuchault) @@ -29,7 +30,6 @@ Fork from `node-static` - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) - Docs: Add `CHANGES.md` -- npm: Update `mime` and `colors` (@fidian) ### Dev-facing From 0392e649efc3d5f0e1724e8bc1bc5ec79241b63d Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 08:44:16 +0800 Subject: [PATCH 46/50] - Docs (CHANGES): Further security fix denotations --- CHANGES.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 61f0094..375821d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,9 +16,13 @@ Fork from `node-static` - Security: Fix dependency vulnerabilities by switching from `optimist` to `neodoc` (@fidian) - Security: Update `mime` and `colors` (@fidian) +- Security: Support `bytes=0-0` Range header; fixes + Unauthorized File Access issue + (@prajwalkman). - Fix: Avoid octal (@bgao / @Ilrilan) -- Fix: Support `bytes=0-0` Range header (@prajwalkman) - Fix: For `spa`, allow dots after path (@gjuchault) +- Security Update/fix: Use `URL` constructor over deprecated `url.parse`; + should fix Open Redirect issue - Update/fix: Protect `fs.stat` calls from bad path arguments (@brpvieira) - Enhancement: Allow access with local ip (@flyingsky) - Enhancement: Allow `serverInfo` to be `null` (@martindale) From cab19a6883758590cafdb56c7b6a07017914ca1c Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 09:12:15 +0800 Subject: [PATCH 47/50] - Docs (CHANGES): Fix labeling of issue and indicate security fixes and potential fix --- CHANGES.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 375821d..063451e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,14 +16,18 @@ Fork from `node-static` - Security: Fix dependency vulnerabilities by switching from `optimist` to `neodoc` (@fidian) - Security: Update `mime` and `colors` (@fidian) -- Security: Support `bytes=0-0` Range header; fixes - Unauthorized File Access issue - (@prajwalkman). -- Fix: Avoid octal (@bgao / @Ilrilan) -- Fix: For `spa`, allow dots after path (@gjuchault) - Security Update/fix: Use `URL` constructor over deprecated `url.parse`; should fix Open Redirect issue -- Update/fix: Protect `fs.stat` calls from bad path arguments (@brpvieira) +- Security Update/fix: Protect `fs.stat` calls from bad path arguments; fixes + Denial of Service issue + (@brpvieira) +- Security fix?: The Unauthorized File Access issue + does not appear to be an issue + per testing (if it ever was); if you can provide a test case where it + fails, please report +- Fix: Support `bytes=0-0` Range header (@prajwalkman) +- Fix: Avoid octal (@bgao / @Ilrilan) +- Fix: For `spa`, allow dots after path (@gjuchault) - Enhancement: Allow access with local ip (@flyingsky) - Enhancement: Allow `serverInfo` to be `null` (@martindale) - Enhancement: Time display logging with leading 0 (@mauris) @@ -31,6 +35,7 @@ Fork from `node-static` - Enhancement: New option: `defaultExtension` (@fmalk) - Enhancement: Added glob matching for setting cache headers (@lightswitch05) - Optimization: 'use strict' directive +- Docs: For examples (and internally) avoid `static` reserved word - Docs: Fix header example (@emmanouil) - Docs: Sp. (@EdwardBetts) - Docs: Add `CHANGES.md` From 97d7ce7c46423c4c1f061512fa05cd154f29542b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 09:15:52 +0800 Subject: [PATCH 48/50] - Testing: Add `nyc` for coverage --- CHANGES.md | 11 + package-lock.json | 2132 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 4 +- 3 files changed, 2139 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 063451e..0103ad2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,16 @@ # CHANGES for `@brettz9/node-static` +## ? (UNRELEASED) + +### User-facing + +- Docs (README): Detail some changes from fork +- Docs (CHANGES): clarifications + +### Dev-facing + +- Testing: Add `nyc` for coverage + ## 0.1.1 ### User-facing diff --git a/package-lock.json b/package-lock.json index 5b67f11..8286ad6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ }, "devDependencies": { "eslint": "^7.23.0", + "nyc": "^15.1.0", "request": "latest", "vows": "latest" }, @@ -35,12 +36,211 @@ "@babel/highlight": "^7.10.4" } }, + "node_modules/@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, + "node_modules/@babel/core": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", + "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.13", + "@babel/helper-module-transforms": "^7.13.14", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", + "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.13.12", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, + "node_modules/@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "node_modules/@babel/helpers": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, "node_modules/@babel/highlight": { "version": "7.13.10", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", @@ -114,6 +314,83 @@ "node": ">=4" } }, + "node_modules/@babel/parser": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", @@ -158,6 +435,40 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -179,6 +490,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -228,6 +552,24 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -308,6 +650,44 @@ "concat-map": "0.0.1" } }, + "node_modules/browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -317,6 +697,21 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001204", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", + "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "dev": true + }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -339,6 +734,26 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -357,6 +772,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, "node_modules/colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", @@ -377,11 +798,32 @@ "node": ">= 0.8" } }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/convert-source-map/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -431,12 +873,33 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "node_modules/default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -477,6 +940,12 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/electron-to-chromium": { + "version": "1.3.702", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.702.tgz", + "integrity": "sha512-qJVUKFWQnF6wP7MmTngDkmm8/KPzaiTXNFOAg5j7DSa6J7kPou7mTBqC8jpUOxauQWwHR3pn4dMRdV8IE1xdtA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -495,6 +964,21 @@ "node": ">=8.6" } }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -754,6 +1238,36 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -773,6 +1287,19 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -796,18 +1323,65 @@ "node": ">= 0.12" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/functional-red-black-tree": { + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -864,6 +1438,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -896,6 +1476,37 @@ "node": ">=8" } }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -945,6 +1556,15 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -991,12 +1611,30 @@ "node": ">=0.10.0" } }, + "node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1009,6 +1647,119 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1034,6 +1785,18 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1058,6 +1821,21 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -1086,12 +1864,30 @@ "node": ">= 0.8.0" } }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1104,6 +1900,30 @@ "node": ">=10" } }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/mime": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", @@ -1147,6 +1967,12 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1175,6 +2001,74 @@ "node": ">=0.10.0" } }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -1210,6 +2104,69 @@ "node": ">= 0.8.0" } }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -1222,6 +2179,15 @@ "node": ">=6" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1246,6 +2212,18 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -1255,6 +2233,18 @@ "node": ">= 0.8.0" } }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -1300,6 +2290,18 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -1332,6 +2334,15 @@ "node": ">= 6" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -1341,6 +2352,12 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -1406,6 +2423,12 @@ "node": ">=10" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -1427,6 +2450,12 @@ "node": ">=8" } }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -1444,6 +2473,32 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1496,6 +2551,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -1557,12 +2621,35 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -1618,6 +2705,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -1685,6 +2781,12 @@ "node": ">= 8" } }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -1694,17 +2796,84 @@ "node": ">=0.10.0" } }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } } }, "dependencies": { @@ -1717,12 +2886,199 @@ "@babel/highlight": "^7.10.4" } }, + "@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, + "@babel/core": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", + "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.13", + "@babel/helper-module-transforms": "^7.13.14", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "dev": true, + "requires": { + "@babel/types": "^7.13.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", + "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.12", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-module-transforms": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, + "@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "requires": { + "@babel/types": "^7.13.12" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, + "requires": { + "@babel/types": "^7.12.13" + } + }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", "dev": true }, + "@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "dev": true, + "requires": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, "@babel/highlight": { "version": "7.13.10", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", @@ -1786,6 +3142,78 @@ } } }, + "@babel/parser": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "dev": true + }, + "@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + } + } + }, + "@babel/traverse": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, "@eslint/eslintrc": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", @@ -1820,6 +3248,33 @@ } } }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -1833,6 +3288,16 @@ "dev": true, "requires": {} }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1866,6 +3331,21 @@ "color-convert": "^2.0.1" } }, + "append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "requires": { + "default-require-extensions": "^3.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -1937,12 +3417,49 @@ "concat-map": "0.0.1" } }, + "browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + } + }, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001204", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001204.tgz", + "integrity": "sha512-JUdjWpcxfJ9IPamy2f5JaRDCaqJOxDzOSKtbdx4rH9VivMd1vIzoPumsJa9LoMIi4Fx2BV2KZOxWhNkBjaYivQ==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -1959,6 +3476,23 @@ "supports-color": "^7.1.0" } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1974,6 +3508,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", @@ -1988,11 +3528,34 @@ "delayed-stream": "~1.0.0" } }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2028,12 +3591,27 @@ "ms": "2.1.2" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "requires": { + "strip-bom": "^4.0.0" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2065,6 +3643,12 @@ "safer-buffer": "^2.1.0" } }, + "electron-to-chromium": { + "version": "1.3.702", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.702.tgz", + "integrity": "sha512-qJVUKFWQnF6wP7MmTngDkmm8/KPzaiTXNFOAg5j7DSa6J7kPou7mTBqC8jpUOxauQWwHR3pn4dMRdV8IE1xdtA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2080,6 +3664,18 @@ "ansi-colors": "^4.1.1" } }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2280,6 +3876,27 @@ "flat-cache": "^3.0.4" } }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -2296,6 +3913,16 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -2313,6 +3940,12 @@ "mime-types": "^2.1.12" } }, + "fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2325,6 +3958,24 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -2366,6 +4017,12 @@ "type-fest": "^0.20.2" } }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2388,6 +4045,30 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "requires": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -2421,6 +4102,12 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2458,12 +4145,24 @@ "is-extglob": "^2.1.1" } }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2476,6 +4175,96 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2498,6 +4287,12 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2522,6 +4317,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -2544,12 +4348,27 @@ "type-check": "~0.4.0" } }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2559,6 +4378,23 @@ "yallist": "^4.0.0" } }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "mime": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", @@ -2587,6 +4423,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2614,6 +4456,64 @@ } } }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "requires": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -2643,6 +4543,51 @@ "word-wrap": "^1.2.3" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2652,6 +4597,12 @@ "callsites": "^3.0.0" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2670,12 +4621,30 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -2706,6 +4675,15 @@ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -2734,12 +4712,24 @@ "uuid": "^3.3.2" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2776,6 +4766,12 @@ "lru-cache": "^6.0.0" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2791,6 +4787,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, "slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -2802,6 +4804,26 @@ "is-fullwidth-code-point": "^3.0.0" } }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "requires": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -2845,6 +4867,12 @@ "ansi-regex": "^5.0.0" } }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2892,12 +4920,29 @@ } } }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -2938,6 +4983,15 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2990,23 +5044,87 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/package.json b/package.json index c970167..75c89c4 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "scripts": { "start": "./bin/cli.js", "lint": "eslint .", - "test": "vows --spec --isolate" + "vows": "vows --spec --isolate", + "test": "nyc npm run vows" }, "dependencies": { "colors": "^1.4.0", @@ -36,6 +37,7 @@ }, "devDependencies": { "eslint": "^7.23.0", + "nyc": "^15.1.0", "request": "latest", "vows": "latest" }, From 6fa3ace7a6b844fc1ef363b613cb362ec7b3d251 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 30 Mar 2021 09:22:25 +0800 Subject: [PATCH 49/50] - Docs (CHANGES): Fix --- CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0103ad2..cc0e047 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,7 @@ ### User-facing - Docs (README): Detail some changes from fork -- Docs (CHANGES): clarifications +- Docs (CHANGES): Clarifications ### Dev-facing @@ -59,6 +59,6 @@ Fork from `node-static` - Maintenance: Add `.editorconfig` - Testing: Add checks for supposed direct `node-static` vulnerabilities - Testing: Add test for `null` and non-`null` serverInfo -- Testing: Allow tests at end (@fmalk) +- Testing: Allow tests to end (@fmalk) - npm: Add eslint devDep. and script - npm: Add lock file From c2033de22184d436b874a488fb9f0f8a8e6b91bb Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Fri, 21 May 2021 17:24:37 +0800 Subject: [PATCH 50/50] Revert scoping changes; line breaks; use of `const` in README --- CHANGES.md | 22 +---- README.md | 130 +++++++++++++-------------- benchmark/node-static-0.3.0.txt | 2 +- bin/cli.js | 2 +- examples/file-server.js | 2 +- lib/node-static.js | 2 +- package-lock.json | 4 +- package.json | 14 +-- test/integration/node-static-test.js | 6 +- 9 files changed, 81 insertions(+), 103 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cc0e047..b190d49 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,28 +1,9 @@ -# CHANGES for `@brettz9/node-static` +# CHANGES for `node-static` ## ? (UNRELEASED) ### User-facing -- Docs (README): Detail some changes from fork -- Docs (CHANGES): Clarifications - -### Dev-facing - -- Testing: Add `nyc` for coverage - -## 0.1.1 - -### User-facing - -- Update/fix: Protect additional `fs.stat` call (for `defaultExtension`) - -## 0.1.0 - -Fork from `node-static` - -### User-facing - - **Breaking change** (npm): Set `engines` to 10.11.0+ - Security: Fix dependency vulnerabilities by switching from `optimist` to `neodoc` (@fidian) @@ -60,5 +41,6 @@ Fork from `node-static` - Testing: Add checks for supposed direct `node-static` vulnerabilities - Testing: Add test for `null` and non-`null` serverInfo - Testing: Allow tests to end (@fmalk) +- Testing: Add `nyc` for coverage - npm: Add eslint devDep. and script - npm: Add lock file diff --git a/README.md b/README.md index a9b576e..5466c80 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,20 @@ -# @brettz9/node-static +# node-static > a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org) -A maintained fork of `node-static`. Currently offers these additional features: - -1. Fixes for vulnerabilities: - 1. [Unauthorized File Access](https://www.npmjs.com/advisories/1206) - 1. [Open Redirect](https://www.npmjs.com/advisories/1207) - 1. [Denial of Service](https://www.npmjs.com/advisories/1208) - 1. Avoids dependencies with vulnerabilities -1. Important fixes: - 1. Important octal fix (and uses strict mode) - 1. Avoids crashes with `fs.stat` checks -1. A numbe of other fixes and enhancements detailed in - [CHANGES.md](./CHANGES.md). - -The project was inspired by some of the other static-file serving modules out +node-static understands and supports *conditional GET* and *HEAD* requests. +node-static was inspired by some of the other static-file serving modules out there, such as node-paperboy and antinode. -`@brettz9/node-static` understands and supports *conditional GET* and *HEAD* -requests. - # Synopsis ```js -const statik = require('@brettz9/node-static'); +const statik = require('node-static'); // -// Create a @brettz9/node-static server instance to serve the './public' folder +// Create a node-static server instance to serve the './public' folder // -var file = new statik.Server('./public'); +const file = new statik.Server('./public'); require('http').createServer(function (request, response) { request.addListener('end', function () { @@ -44,7 +29,7 @@ require('http').createServer(function (request, response) { API --- -### Creating a @brettz9/node-static Server # +### Creating a node-static Server Creating a file server instance is as simple as: @@ -52,30 +37,30 @@ Creating a file server instance is as simple as: new statik.Server(); ``` -This will serve files in the current directory. If you want to serve files in a specific -directory, pass it as the first argument: +This will serve files in the current directory. If you want to serve files in +a specific directory, pass it as the first argument: ```js new statik.Server('./public'); ``` You can also specify how long the client is supposed to cache the files -@brettz9/node-static serves: +node-static serves: ```js new statik.Server('./public', { cache: 3600 }); ``` -This will set the `Cache-Control` header, telling clients to cache the file for an hour. -This is the default setting. +This will set the `Cache-Control` header, telling clients to cache the file for +an hour. This is the default setting. -### Serving files under a directory # +### Serving files under a directory -To serve files under a directory, simply call the `serve` method on a `Server` instance, passing it -the HTTP request and response object: +To serve files under a directory, simply call the `serve` method on a `Server` +instance, passing it the HTTP request and response object: ```js -var statik = require('@brettz9/node-static'); +const statik = require('node-static'); var fileServer = new statik.Server('./public'); @@ -86,23 +71,28 @@ require('http').createServer(function (request, response) { }).listen(8080); ``` -### Serving specific files # +### Serving specific files -If you want to serve a specific file, like an error page for example, use the `serveFile` method: +If you want to serve a specific file, like an error page for example, use the +`serveFile` method: ```js fileServer.serveFile('/error.html', 500, {}, request, response); ``` -This will serve the `error.html` file, from under the file root directory, with a `500` status code. -For example, you could serve an error page, when the initial request wasn't found: +This will serve the `error.html` file, from under the file root directory, with +a `500` status code. +For example, you could serve an error page, when the initial request wasn't +found: ```js require('http').createServer(function (request, response) { request.addListener('end', function () { fileServer.serve(request, response, function (e, res) { if (e && (e.status === 404)) { // If the file wasn't found - fileServer.serveFile('/not-found.html', 404, {}, request, response); + fileServer.serveFile( + '/not-found.html', 404, {}, request, response + ); } }); }).resume(); @@ -111,21 +101,24 @@ require('http').createServer(function (request, response) { More on intercepting errors bellow. -### Intercepting errors & Listening # +### Intercepting errors & Listening -An optional callback can be passed as last argument, it will be called every time a file -has been served successfully, or if there was an error serving the file: +An optional callback can be passed as last argument, it will be called every +time a file has been served successfully, or if there was an error serving the +file: ```js -var statik = require('@brettz9/node-static'); +const statik = require('node-static'); -var fileServer = new statik.Server('./public'); +const fileServer = new statik.Server('./public'); require('http').createServer(function (request, response) { request.addListener('end', function () { fileServer.serve(request, response, function (err, result) { if (err) { // There was an error serving the file - console.error("Error serving " + request.url + " - " + err.message); + console.error( + "Error serving " + request.url + " - " + err.message + ); // Respond to the client response.writeHead(err.status, err.headers); @@ -137,9 +130,8 @@ require('http').createServer(function (request, response) { ``` Note that if you pass a callback, and there is an error serving the file, -@brettz9/node-static *will not* respond to the client. This gives you the -opportunity to re-route the request, -or handle it differently. +node-static *will not* respond to the client. This gives you the opportunity +to re-route the request, or handle it differently. For example, you may want to interpret a request as a static request, but if the file isn't found, send it to an application. @@ -152,11 +144,12 @@ fileServer.serve(request, response).addListener('error', function (err) { }); ``` -With this method, you don't have to explicitly send the response back, in case of an error. +With this method, you don't have to explicitly send the response back, in case +of an error. -### Options when creating an instance of `Server` # +### Options when creating an instance of `Server` -#### `cache` # +#### `cache` Sets the `Cache-Control` header. @@ -165,20 +158,21 @@ example: `{ cache: {'**/*.css': 300}}` will set the max-age for all CSS files to Passing a number will set the cache duration to that number of seconds. Passing `false` will disable the `Cache-Control` header. -Passing a object with [minimatch glob pattern](https://github.com/isaacs/minimatch) keys and number values will set cache max-age for any matching paths. +Passing a object with [minimatch glob pattern](https://github.com/isaacs/minimatch) +keys and number values will set cache max-age for any matching paths. > Defaults to `3600` -#### `serverInfo` # +#### `serverInfo` Sets the `Server` header. example: `{ serverInfo: "myserver" }` -> Defaults to `@brettz9/node-static/{version}` +> Defaults to `node-static/{version}` -#### `headers` # +#### `headers` Sets response headers. @@ -186,24 +180,25 @@ example: `{ headers: { 'X-Hello': 'World!' } }` > defaults to `{}` -#### `gzip` # +#### `gzip` -Enable support for sending compressed responses. This will enable a check for a -file with the same name plus '.gz' in the same folder. If the compressed file is -found and the client has indicated support for gzip file transfer, the contents -of the .gz file will be sent in place of the uncompressed file along with a -Content-Encoding: gzip header to inform the client the data has been compressed. +Enable support for sending compressed responses. This will enable a check for +a file with the same name plus '.gz' in the same folder. If the compressed +file is found and the client has indicated support for gzip file transfer, +the contents of the .gz file will be sent in place of the uncompressed file +along with a Content-Encoding: gzip header to inform the client the data has +been compressed. example: `{ gzip: true }` example: `{ gzip: /^\/text/ }` Passing `true` will enable this check for all files. -Passing a RegExp instance will only enable this check if the content-type of the -respond would match that RegExp using its test() method. +Passing a RegExp instance will only enable this check if the content-type of +the respond would match that RegExp using its test() method. > Defaults to `false` -#### `indexFile` # +#### `indexFile` Choose a custom index file when serving up directories. @@ -211,10 +206,11 @@ example: `{ indexFile: "index.htm" }` > Defaults to `index.html` -#### `defaultExtension` # +#### `defaultExtension` Choose a default extension when serving files. -A request to '/myFile' would check for a `myFile` folder (first) then a `myFile.html` (second). +A request to '/myFile' would check for a `myFile` folder (first) then a +`myFile.html` (second). example: `{ defaultExtension: "html" }` @@ -224,15 +220,15 @@ example: `{ defaultExtension: "html" }` Command Line Interface ---------------------- -`@brettz9/node-static` also provides a CLI. +`node-static` also provides a CLI. -### Installation # +### Installation ```sh -$ npm install -g @brettz9/node-static +$ npm install -g node-static ``` -### Example Usage # +### Example Usage ```sh # serve up the current directory diff --git a/benchmark/node-static-0.3.0.txt b/benchmark/node-static-0.3.0.txt index 1367d7c..c6083ea 100644 --- a/benchmark/node-static-0.3.0.txt +++ b/benchmark/node-static-0.3.0.txt @@ -5,7 +5,7 @@ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient) -Server Software: @brettz9/node-static/0.3.0 +Server Software: node-static/0.3.0 Server Hostname: 127.0.0.1 Server Port: 8080 diff --git a/bin/cli.js b/bin/cli.js index 3876752..f2837aa 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -63,7 +63,7 @@ const log = function(request, response, statusCode) { const options = {}; if (args['--version']) { - console.log('@brettz9/node-static', statik.version.join('.')); + console.log('node-static', statik.version.join('.')); process.exit(0); } diff --git a/examples/file-server.js b/examples/file-server.js index 7364af3..64d5a2f 100644 --- a/examples/file-server.js +++ b/examples/file-server.js @@ -19,4 +19,4 @@ require('http').createServer(function (request, response) { }); }).listen(8080); -console.log("> @brettz9/node-static is listening on http://127.0.0.1:8080"); +console.log("> node-static is listening on http://127.0.0.1:8080"); diff --git a/lib/node-static.js b/lib/node-static.js index 541c7c6..f4e9fa1 100644 --- a/lib/node-static.js +++ b/lib/node-static.js @@ -46,7 +46,7 @@ const Server = function (root, options) { if ('serverInfo' in this.options && this.options.serverInfo) { this.serverInfo = this.options.serverInfo.toString(); } else { - this.serverInfo = '@brettz9/node-static/' + version.join('.'); + this.serverInfo = 'node-static/' + version.join('.'); } if ('defaultExtension' in this.options) { diff --git a/package-lock.json b/package-lock.json index 8286ad6..a461176 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@brettz9/node-static", + "name": "node-static", "version": "0.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@brettz9/node-static", + "name": "node-static", "version": "0.1.1", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 75c89c4..c7bd881 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "@brettz9/node-static", + "name": "node-static", "version": "0.1.1", "description": "simple, compliant file streaming module for node", - "author": "Brett Zamir", + "author": "Alexis Sellier ", "contributors": [ - "Alexis Sellier ", "Pablo Cantero ", - "Ionică Bizău " + "Ionică Bizău ", + "Brett Zamir" ], "main": "./lib/node-static", "license": "MIT", @@ -21,7 +21,7 @@ ], "repository": { "type": "git", - "url": "http://github.com/brettz9/node-static" + "url": "http://github.com/cloudhead/node-static" }, "scripts": { "start": "./bin/cli.js", @@ -45,9 +45,9 @@ "node": ">=10.0.0" }, "bugs": { - "url": "https://github.com/brettz9/node-static/issues" + "url": "https://github.com/cloudhead/node-static/issues" }, - "homepage": "https://github.com/brettz9/node-static", + "homepage": "https://github.com/cloudhead/node-static", "directories": { "example": "examples", "test": "test" diff --git a/test/integration/node-static-test.js b/test/integration/node-static-test.js index c077a09..997182c 100644 --- a/test/integration/node-static-test.js +++ b/test/integration/node-static-test.js @@ -6,7 +6,7 @@ const vows = require('vows') , statik = require('../../lib/node-static'); let fileServer = new statik.Server(__dirname + '/../fixtures'); -const suite = vows.describe('@brettz9/node-static'); +const suite = vows.describe('node-static'); const TEST_PORT = 8080; const TEST_SERVER = 'http://localhost:' + TEST_PORT; const version = statik.version.join('.'); @@ -20,8 +20,8 @@ const headers = { } } } -headers['requesting headers']['should respond with @brettz9/node-static/' + version] = function(error, response, body){ - assert.equal(response.headers['server'], '@brettz9/node-static/' + version); +headers['requesting headers']['should respond with node-static/' + version] = function(error, response, body){ + assert.equal(response.headers['server'], 'node-static/' + version); } suite.addBatch({