Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/253650
Change subject: Add finalhandler as a top-level dep
......................................................................
Add finalhandler as a top-level dep
Change-Id: I2f6632e107e8dcc99b345af2cb5a273531bc5886
---
R node_modules/finalhandler/HISTORY.md
R node_modules/finalhandler/LICENSE
R node_modules/finalhandler/README.md
R node_modules/finalhandler/index.js
A node_modules/finalhandler/node_modules/debug/.jshintrc
A node_modules/finalhandler/node_modules/debug/.npmignore
A node_modules/finalhandler/node_modules/debug/History.md
A node_modules/finalhandler/node_modules/debug/Makefile
A node_modules/finalhandler/node_modules/debug/Readme.md
A node_modules/finalhandler/node_modules/debug/bower.json
A node_modules/finalhandler/node_modules/debug/browser.js
A node_modules/finalhandler/node_modules/debug/component.json
A node_modules/finalhandler/node_modules/debug/debug.js
A node_modules/finalhandler/node_modules/debug/node.js
A node_modules/finalhandler/node_modules/debug/node_modules/ms/.npmignore
A node_modules/finalhandler/node_modules/debug/node_modules/ms/History.md
A node_modules/finalhandler/node_modules/debug/node_modules/ms/LICENSE
A node_modules/finalhandler/node_modules/debug/node_modules/ms/README.md
A node_modules/finalhandler/node_modules/debug/node_modules/ms/index.js
A node_modules/finalhandler/node_modules/debug/node_modules/ms/package.json
A node_modules/finalhandler/node_modules/debug/package.json
A node_modules/finalhandler/node_modules/escape-html/LICENSE
A node_modules/finalhandler/node_modules/escape-html/Readme.md
A node_modules/finalhandler/node_modules/escape-html/index.js
A node_modules/finalhandler/node_modules/escape-html/package.json
A node_modules/finalhandler/node_modules/on-finished/HISTORY.md
A node_modules/finalhandler/node_modules/on-finished/LICENSE
A node_modules/finalhandler/node_modules/on-finished/README.md
A node_modules/finalhandler/node_modules/on-finished/index.js
A
node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/LICENSE
A
node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/README.md
A
node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/index.js
A
node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/package.json
A node_modules/finalhandler/node_modules/on-finished/package.json
R node_modules/finalhandler/node_modules/unpipe/HISTORY.md
R node_modules/finalhandler/node_modules/unpipe/LICENSE
R node_modules/finalhandler/node_modules/unpipe/README.md
R node_modules/finalhandler/node_modules/unpipe/index.js
R node_modules/finalhandler/node_modules/unpipe/package.json
R node_modules/finalhandler/package.json
M src
41 files changed, 2,230 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy
refs/changes/50/253650/1
diff --git a/node_modules/express/node_modules/finalhandler/HISTORY.md
b/node_modules/finalhandler/HISTORY.md
similarity index 100%
rename from node_modules/express/node_modules/finalhandler/HISTORY.md
rename to node_modules/finalhandler/HISTORY.md
diff --git a/node_modules/express/node_modules/finalhandler/LICENSE
b/node_modules/finalhandler/LICENSE
similarity index 100%
rename from node_modules/express/node_modules/finalhandler/LICENSE
rename to node_modules/finalhandler/LICENSE
diff --git a/node_modules/express/node_modules/finalhandler/README.md
b/node_modules/finalhandler/README.md
similarity index 100%
rename from node_modules/express/node_modules/finalhandler/README.md
rename to node_modules/finalhandler/README.md
diff --git a/node_modules/express/node_modules/finalhandler/index.js
b/node_modules/finalhandler/index.js
similarity index 100%
rename from node_modules/express/node_modules/finalhandler/index.js
rename to node_modules/finalhandler/index.js
diff --git a/node_modules/finalhandler/node_modules/debug/.jshintrc
b/node_modules/finalhandler/node_modules/debug/.jshintrc
new file mode 100644
index 0000000..299877f
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/.jshintrc
@@ -0,0 +1,3 @@
+{
+ "laxbreak": true
+}
diff --git a/node_modules/finalhandler/node_modules/debug/.npmignore
b/node_modules/finalhandler/node_modules/debug/.npmignore
new file mode 100644
index 0000000..7e6163d
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/.npmignore
@@ -0,0 +1,6 @@
+support
+test
+examples
+example
+*.sock
+dist
diff --git a/node_modules/finalhandler/node_modules/debug/History.md
b/node_modules/finalhandler/node_modules/debug/History.md
new file mode 100644
index 0000000..854c971
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/History.md
@@ -0,0 +1,195 @@
+
+2.2.0 / 2015-05-09
+==================
+
+ * package: update "ms" to v0.7.1 (#202, @dougwilson)
+ * README: add logging to file example (#193, @DanielOchoa)
+ * README: fixed a typo (#191, @amir-s)
+ * browser: expose `storage` (#190, @stephenmathieson)
+ * Makefile: add a `distclean` target (#189, @stephenmathieson)
+
+2.1.3 / 2015-03-13
+==================
+
+ * Updated stdout/stderr example (#186)
+ * Updated example/stdout.js to match debug current behaviour
+ * Renamed example/stderr.js to stdout.js
+ * Update Readme.md (#184)
+ * replace high intensity foreground color for bold (#182, #183)
+
+2.1.2 / 2015-03-01
+==================
+
+ * dist: recompile
+ * update "ms" to v0.7.0
+ * package: update "browserify" to v9.0.3
+ * component: fix "ms.js" repo location
+ * changed bower package name
+ * updated documentation about using debug in a browser
+ * fix: security error on safari (#167, #168, @yields)
+
+2.1.1 / 2014-12-29
+==================
+
+ * browser: use `typeof` to check for `console` existence
+ * browser: check for `console.log` truthiness (fix IE 8/9)
+ * browser: add support for Chrome apps
+ * Readme: added Windows usage remarks
+ * Add `bower.json` to properly support bower install
+
+2.1.0 / 2014-10-15
+==================
+
+ * node: implement `DEBUG_FD` env variable support
+ * package: update "browserify" to v6.1.0
+ * package: add "license" field to package.json (#135, @panuhorsmalahti)
+
+2.0.0 / 2014-09-01
+==================
+
+ * package: update "browserify" to v5.11.0
+ * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
+
+1.0.4 / 2014-07-15
+==================
+
+ * dist: recompile
+ * example: remove `console.info()` log usage
+ * example: add "Content-Type" UTF-8 header to browser example
+ * browser: place %c marker after the space character
+ * browser: reset the "content" color via `color: inherit`
+ * browser: add colors support for Firefox >= v31
+ * debug: prefer an instance `log()` function over the global one (#119)
+ * Readme: update documentation about styled console logs for FF v31 (#116,
@wryk)
+
+1.0.3 / 2014-07-09
+==================
+
+ * Add support for multiple wildcards in namespaces (#122, @seegno)
+ * browser: fix lint
+
+1.0.2 / 2014-06-10
+==================
+
+ * browser: update color palette (#113, @gscottolson)
+ * common: make console logging function configurable (#108, @timoxley)
+ * node: fix %o colors on old node <= 0.8.x
+ * Makefile: find node path using shell/which (#109, @timoxley)
+
+1.0.1 / 2014-06-06
+==================
+
+ * browser: use `removeItem()` to clear localStorage
+ * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
+ * package: add "contributors" section
+ * node: fix comment typo
+ * README: list authors
+
+1.0.0 / 2014-06-04
+==================
+
+ * make ms diff be global, not be scope
+ * debug: ignore empty strings in enable()
+ * node: make DEBUG_COLORS able to disable coloring
+ * *: export the `colors` array
+ * npmignore: don't publish the `dist` dir
+ * Makefile: refactor to use browserify
+ * package: add "browserify" as a dev dependency
+ * Readme: add Web Inspector Colors section
+ * node: reset terminal color for the debug content
+ * node: map "%o" to `util.inspect()`
+ * browser: map "%j" to `JSON.stringify()`
+ * debug: add custom "formatters"
+ * debug: use "ms" module for humanizing the diff
+ * Readme: add "bash" syntax highlighting
+ * browser: add Firebug color support
+ * browser: add colors for WebKit browsers
+ * node: apply log to `console`
+ * rewrite: abstract common logic for Node & browsers
+ * add .jshintrc file
+
+0.8.1 / 2014-04-14
+==================
+
+ * package: re-add the "component" section
+
+0.8.0 / 2014-03-30
+==================
+
+ * add `enable()` method for nodejs. Closes #27
+ * change from stderr to stdout
+ * remove unnecessary index.js file
+
+0.7.4 / 2013-11-13
+==================
+
+ * remove "browserify" key from package.json (fixes something in browserify)
+
+0.7.3 / 2013-10-30
+==================
+
+ * fix: catch localStorage security error when cookies are blocked (Chrome)
+ * add debug(err) support. Closes #46
+ * add .browser prop to package.json. Closes #42
+
+0.7.2 / 2013-02-06
+==================
+
+ * fix package.json
+ * fix: Mobile Safari (private mode) is broken with debug
+ * fix: Use unicode to send escape character to shell instead of octal to
work with strict mode javascript
+
+0.7.1 / 2013-02-05
+==================
+
+ * add repository URL to package.json
+ * add DEBUG_COLORED to force colored output
+ * add browserify support
+ * fix component. Closes #24
+
+0.7.0 / 2012-05-04
+==================
+
+ * Added .component to package.json
+ * Added debug.component.js build
+
+0.6.0 / 2012-03-16
+==================
+
+ * Added support for "-" prefix in DEBUG [Vinay Pulim]
+ * Added `.enabled` flag to the node version [TooTallNate]
+
+0.5.0 / 2012-02-02
+==================
+
+ * Added: humanize diffs. Closes #8
+ * Added `debug.disable()` to the CS variant
+ * Removed padding. Closes #10
+ * Fixed: persist client-side variant again. Closes #9
+
+0.4.0 / 2012-02-01
+==================
+
+ * Added browser variant support for older browsers [TooTallNate]
+ * Added `debug.enable('project:*')` to browser variant [TooTallNate]
+ * Added padding to diff (moved it to the right)
+
+0.3.0 / 2012-01-26
+==================
+
+ * Added millisecond diff when isatty, otherwise UTC string
+
+0.2.0 / 2012-01-22
+==================
+
+ * Added wildcard support
+
+0.1.0 / 2011-12-02
+==================
+
+ * Added: remove colors unless stderr isatty [TooTallNate]
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
diff --git a/node_modules/finalhandler/node_modules/debug/Makefile
b/node_modules/finalhandler/node_modules/debug/Makefile
new file mode 100644
index 0000000..5cf4a59
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/Makefile
@@ -0,0 +1,36 @@
+
+# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
+THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
+
+# BIN directory
+BIN := $(THIS_DIR)/node_modules/.bin
+
+# applications
+NODE ?= $(shell which node)
+NPM ?= $(NODE) $(shell which npm)
+BROWSERIFY ?= $(NODE) $(BIN)/browserify
+
+all: dist/debug.js
+
+install: node_modules
+
+clean:
+ @rm -rf dist
+
+dist:
+ @mkdir -p $@
+
+dist/debug.js: node_modules browser.js debug.js dist
+ @$(BROWSERIFY) \
+ --standalone debug \
+ . > $@
+
+distclean: clean
+ @rm -rf node_modules
+
+node_modules: package.json
+ @NODE_ENV= $(NPM) install
+ @touch node_modules
+
+.PHONY: all install clean distclean
diff --git a/node_modules/finalhandler/node_modules/debug/Readme.md
b/node_modules/finalhandler/node_modules/debug/Readme.md
new file mode 100644
index 0000000..b4f45e3
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/Readme.md
@@ -0,0 +1,188 @@
+# debug
+
+ tiny node.js debugging utility modelled after node core's debugging
technique.
+
+## Installation
+
+```bash
+$ npm install debug
+```
+
+## Usage
+
+ With `debug` you simply invoke the exported function to generate your debug
function, passing it a name which will determine if a noop function is
returned, or a decorated `console.error`, so all of the `console` format string
goodies you're used to work fine. A unique color is selected per-function for
visibility.
+
+Example _app.js_:
+
+```js
+var debug = require('debug')('http')
+ , http = require('http')
+ , name = 'My App';
+
+// fake app
+
+debug('booting %s', name);
+
+http.createServer(function(req, res){
+ debug(req.method + ' ' + req.url);
+ res.end('hello\n');
+}).listen(3000, function(){
+ debug('listening');
+});
+
+// fake worker of some kind
+
+require('./worker');
+```
+
+Example _worker.js_:
+
+```js
+var debug = require('debug')('worker');
+
+setInterval(function(){
+ debug('doing some work');
+}, 1000);
+```
+
+ The __DEBUG__ environment variable is then used to enable these based on
space or comma-delimited names. Here are some examples:
+
+ 
+
+ 
+
+#### Windows note
+
+ On Windows the environment variable is set using the `set` command.
+
+ ```cmd
+ set DEBUG=*,-not_this
+ ```
+
+Then, run the program to be debugged as usual.
+
+## Millisecond diff
+
+ When actively developing an application it can be useful to see when the
time spent between one `debug()` call and the next. Suppose for example you
invoke `debug()` before requesting a resource, and after as well, the "+NNNms"
will show you how much time was spent between calls.
+
+ 
+
+ When stdout is not a TTY, `Date#toUTCString()` is used, making it more
useful for logging the debug information as shown below:
+
+ 
+
+## Conventions
+
+ If you're using this in one or more of your libraries, you _should_ use the
name of your library so that developers may toggle debugging as desired without
guessing names. If you have more than one debuggers you _should_ prefix them
with your library name and use ":" to separate features. For example
"bodyParser" from Connect would then be "connect:bodyParser".
+
+## Wildcards
+
+ The `*` character may be used as a wildcard. Suppose for example your
library has debuggers named "connect:bodyParser", "connect:compress",
"connect:session", instead of listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
+
+ You can also exclude specific debuggers by prefixing them with a "-"
character. For example, `DEBUG=*,-connect:*` would include all debuggers
except those starting with "connect:".
+
+## Browser support
+
+ Debug works in the browser as well, currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. Somewhere in the code on your page, include:
+
+```js
+window.myDebug = require("debug");
+```
+
+ ("debug" is a global object in the browser so we give this object a
different name.) When your page is open in the browser, type the following in
the console:
+
+```js
+myDebug.enable("worker:*")
+```
+
+ Refresh the page. Debug output will continue to be sent to the console until
it is disabled by typing `myDebug.disable()` in the console.
+
+```js
+a = debug('worker:a');
+b = debug('worker:b');
+
+setInterval(function(){
+ a('doing some work');
+}, 1000);
+
+setInterval(function(){
+ b('doing some work');
+}, 1200);
+```
+
+#### Web Inspector Colors
+
+ Colors are also enabled on "Web Inspectors" that understand the `%c`
formatting
+ option. These are WebKit web inspectors, Firefox ([since version
+
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
+ and the Firebug plugin for Firefox (any version).
+
+ Colored output looks something like:
+
+

+
+### stderr vs stdout
+
+You can set an alternative logging method per-namespace by overriding the
`log` method on a per-namespace or globally:
+
+Example _stdout.js_:
+
+```js
+var debug = require('debug');
+var error = debug('app:error');
+
+// by default stderr is used
+error('goes to stderr!');
+
+var log = debug('app:log');
+// set this namespace to log via console.log
+log.log = console.log.bind(console); // don't forget to bind to console!
+log('goes to stdout');
+error('still goes to stderr!');
+
+// set all output to go via console.info
+// overrides all per-namespace log settings
+debug.log = console.info.bind(console);
+error('now goes to stdout via console.info');
+log('still goes to stdout, but via console.info now');
+```
+
+### Save debug output to a file
+
+You can save all debug statements to a file by piping them.
+
+Example:
+
+```bash
+$ DEBUG_FD=3 node your-app.js 3> whatever.log
+```
+
+## Authors
+
+ - TJ Holowaychuk
+ - Nathan Rajlich
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/finalhandler/node_modules/debug/bower.json
b/node_modules/finalhandler/node_modules/debug/bower.json
new file mode 100644
index 0000000..6af573f
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "visionmedia-debug",
+ "main": "dist/debug.js",
+ "version": "2.2.0",
+ "homepage": "https://github.com/visionmedia/debug",
+ "authors": [
+ "TJ Holowaychuk <[email protected]>"
+ ],
+ "description": "visionmedia-debug",
+ "moduleType": [
+ "amd",
+ "es6",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "visionmedia",
+ "debug"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/node_modules/finalhandler/node_modules/debug/browser.js
b/node_modules/finalhandler/node_modules/debug/browser.js
new file mode 100644
index 0000000..7c76452
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/browser.js
@@ -0,0 +1,168 @@
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+ && 'undefined' != typeof chrome.storage
+ ? chrome.storage.local
+ : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ 'lightseagreen',
+ 'forestgreen',
+ 'goldenrod',
+ 'dodgerblue',
+ 'darkorchid',
+ 'crimson'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+ // is webkit? http://stackoverflow.com/a/16459606/376773
+ return ('WebkitAppearance' in document.documentElement.style) ||
+ // is firebug? http://stackoverflow.com/a/398120/376773
+ (window.console && (console.firebug || (console.exception &&
console.table))) ||
+ // is firefox >= v31?
+ //
https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) &&
parseInt(RegExp.$1, 10) >= 31);
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+ return JSON.stringify(v);
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+
+ args[0] = (useColors ? '%c' : '')
+ + this.namespace
+ + (useColors ? ' %c' : ' ')
+ + args[0]
+ + (useColors ? '%c ' : ' ')
+ + '+' + exports.humanize(this.diff);
+
+ if (!useColors) return args;
+
+ var c = 'color: ' + this.color;
+ args = [args[0], c, 'color:
inherit'].concat(Array.prototype.slice.call(args, 1));
+
+ // the final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ var index = 0;
+ var lastC = 0;
+ args[0].replace(/%[a-z%]/g, function(match) {
+ if ('%%' === match) return;
+ index++;
+ if ('%c' === match) {
+ // we only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+ return args;
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+ // this hackery is required for IE8/9, where
+ // the `console.log` function doesn't have 'apply'
+ return 'object' === typeof console
+ && console.log
+ && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ try {
+ if (null == namespaces) {
+ exports.storage.removeItem('debug');
+ } else {
+ exports.storage.debug = namespaces;
+ }
+ } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ var r;
+ try {
+ r = exports.storage.debug;
+ } catch(e) {}
+ return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage(){
+ try {
+ return window.localStorage;
+ } catch (e) {}
+}
diff --git a/node_modules/finalhandler/node_modules/debug/component.json
b/node_modules/finalhandler/node_modules/debug/component.json
new file mode 100644
index 0000000..ca10637
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "debug",
+ "repo": "visionmedia/debug",
+ "description": "small debugging utility",
+ "version": "2.2.0",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "main": "browser.js",
+ "scripts": [
+ "browser.js",
+ "debug.js"
+ ],
+ "dependencies": {
+ "rauchg/ms.js": "0.7.1"
+ }
+}
diff --git a/node_modules/finalhandler/node_modules/debug/debug.js
b/node_modules/finalhandler/node_modules/debug/debug.js
new file mode 100644
index 0000000..7571a86
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/debug.js
@@ -0,0 +1,197 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = debug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = require('ms');
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lowercased letter, i.e. "n".
+ */
+
+exports.formatters = {};
+
+/**
+ * Previously assigned color.
+ */
+
+var prevColor = 0;
+
+/**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
+ * Select a color.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor() {
+ return exports.colors[prevColor++ % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function debug(namespace) {
+
+ // define the `disabled` version
+ function disabled() {
+ }
+ disabled.enabled = false;
+
+ // define the `enabled` version
+ function enabled() {
+
+ var self = enabled;
+
+ // set `diff` timestamp
+ var curr = +new Date();
+ var ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ // add the `color` if not set
+ if (null == self.useColors) self.useColors = exports.useColors();
+ if (null == self.color && self.useColors) self.color = selectColor();
+
+ var args = Array.prototype.slice.call(arguments);
+
+ args[0] = exports.coerce(args[0]);
+
+ if ('string' !== typeof args[0]) {
+ // anything else let's inspect with %o
+ args = ['%o'].concat(args);
+ }
+
+ // apply any `formatters` transformations
+ var index = 0;
+ args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {
+ // if we encounter an escaped % then don't increase the array index
+ if (match === '%%') return match;
+ index++;
+ var formatter = exports.formatters[format];
+ if ('function' === typeof formatter) {
+ var val = args[index];
+ match = formatter.call(self, val);
+
+ // now we need to remove `args[index]` since it's inlined in the
`format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ if ('function' === typeof exports.formatArgs) {
+ args = exports.formatArgs.apply(self, args);
+ }
+ var logFn = enabled.log || exports.log || console.log.bind(console);
+ logFn.apply(self, args);
+ }
+ enabled.enabled = true;
+
+ var fn = exports.enabled(namespace) ? enabled : disabled;
+
+ fn.namespace = namespace;
+
+ return fn;
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+ exports.save(namespaces);
+
+ var split = (namespaces || '').split(/[\s,]+/);
+ var len = split.length;
+
+ for (var i = 0; i < len; i++) {
+ if (!split[i]) continue; // ignore empty strings
+ namespaces = split[i].replace(/\*/g, '.*?');
+ if (namespaces[0] === '-') {
+ exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ exports.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+ exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+ var i, len;
+ for (i = 0, len = exports.skips.length; i < len; i++) {
+ if (exports.skips[i].test(name)) {
+ return false;
+ }
+ }
+ for (i = 0, len = exports.names.length; i < len; i++) {
+ if (exports.names[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+ if (val instanceof Error) return val.stack || val.message;
+ return val;
+}
diff --git a/node_modules/finalhandler/node_modules/debug/node.js
b/node_modules/finalhandler/node_modules/debug/node.js
new file mode 100644
index 0000000..1d392a8
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node.js
@@ -0,0 +1,209 @@
+
+/**
+ * Module dependencies.
+ */
+
+var tty = require('tty');
+var util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = require('./debug');
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+/**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ * $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+var stream = 1 === fd ? process.stdout :
+ 2 === fd ? process.stderr :
+ createWritableStdioStream(fd);
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ var debugColors = (process.env.DEBUG_COLORS || '').trim().toLowerCase();
+ if (0 === debugColors.length) {
+ return tty.isatty(fd);
+ } else {
+ return '0' !== debugColors
+ && 'no' !== debugColors
+ && 'false' !== debugColors
+ && 'disabled' !== debugColors;
+ }
+}
+
+/**
+ * Map %o to `util.inspect()`, since Node doesn't do that out of the box.
+ */
+
+var inspect = (4 === util.inspect.length ?
+ // node <= 0.8.x
+ function (v, colors) {
+ return util.inspect(v, void 0, void 0, colors);
+ } :
+ // node > 0.8.x
+ function (v, colors) {
+ return util.inspect(v, { colors: colors });
+ }
+);
+
+exports.formatters.o = function(v) {
+ return inspect(v, this.useColors)
+ .replace(/\s*\n\s*/g, ' ');
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs() {
+ var args = arguments;
+ var useColors = this.useColors;
+ var name = this.namespace;
+
+ if (useColors) {
+ var c = this.color;
+
+ args[0] = ' \u001b[3' + c + ';1m' + name + ' '
+ + '\u001b[0m'
+ + args[0] + '\u001b[3' + c + 'm'
+ + ' +' + exports.humanize(this.diff) + '\u001b[0m';
+ } else {
+ args[0] = new Date().toUTCString()
+ + ' ' + name + ' ' + args[0];
+ }
+ return args;
+}
+
+/**
+ * Invokes `console.error()` with the specified arguments.
+ */
+
+function log() {
+ return stream.write(util.format.apply(this, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+ if (null == namespaces) {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ } else {
+ process.env.DEBUG = namespaces;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+ var stream;
+ var tty_wrap = process.binding('tty_wrap');
+
+ // Note stream._type is used for test-module-load-list.js
+
+ switch (tty_wrap.guessHandleType(fd)) {
+ case 'TTY':
+ stream = new tty.WriteStream(fd);
+ stream._type = 'tty';
+
+ // Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ case 'FILE':
+ var fs = require('fs');
+ stream = new fs.SyncWriteStream(fd, { autoClose: false });
+ stream._type = 'fs';
+ break;
+
+ case 'PIPE':
+ case 'TCP':
+ var net = require('net');
+ stream = new net.Socket({
+ fd: fd,
+ readable: false,
+ writable: true
+ });
+
+ // FIXME Should probably have an option in net.Socket to create a
+ // stream from an existing fd which is writable only. But for now
+ // we'll just add this hack and set the `readable` member to false.
+ // Test: ./node test/fixtures/echo.js < /etc/passwd
+ stream.readable = false;
+ stream.read = null;
+ stream._type = 'pipe';
+
+ // FIXME Hack to have stream not keep the event loop alive.
+ // See https://github.com/joyent/node/issues/1726
+ if (stream._handle && stream._handle.unref) {
+ stream._handle.unref();
+ }
+ break;
+
+ default:
+ // Probably an error on in uv_guess_handle()
+ throw new Error('Implement me. Unknown stream file type!');
+ }
+
+ // For supporting legacy API we put the FD here.
+ stream.fd = fd;
+
+ stream._isStdio = true;
+
+ return stream;
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/.npmignore
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/.npmignore
new file mode 100644
index 0000000..d1aa0ce
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/.npmignore
@@ -0,0 +1,5 @@
+node_modules
+test
+History.md
+Makefile
+component.json
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/History.md
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/History.md
new file mode 100644
index 0000000..32fdfc1
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/History.md
@@ -0,0 +1,66 @@
+
+0.7.1 / 2015-04-20
+==================
+
+ * prevent extraordinary long inputs (@evilpacket)
+ * Fixed broken readme link
+
+0.7.0 / 2014-11-24
+==================
+
+ * add time abbreviations, updated tests and readme for the new units
+ * fix example in the readme.
+ * add LICENSE file
+
+0.6.2 / 2013-12-05
+==================
+
+ * Adding repository section to package.json to suppress warning from NPM.
+
+0.6.1 / 2013-05-10
+==================
+
+ * fix singularization [visionmedia]
+
+0.6.0 / 2013-03-15
+==================
+
+ * fix minutes
+
+0.5.1 / 2013-02-24
+==================
+
+ * add component namespace
+
+0.5.0 / 2012-11-09
+==================
+
+ * add short formatting as default and .long option
+ * add .license property to component.json
+ * add version to component.json
+
+0.4.0 / 2012-10-22
+==================
+
+ * add rounding to fix crazy decimals
+
+0.3.0 / 2012-09-07
+==================
+
+ * fix `ms(<String>)` [visionmedia]
+
+0.2.0 / 2012-09-03
+==================
+
+ * add component.json [visionmedia]
+ * add days support [visionmedia]
+ * add hours support [visionmedia]
+ * add minutes support [visionmedia]
+ * add seconds support [visionmedia]
+ * add ms string support [visionmedia]
+ * refactor tests to facilitate ms(number) [visionmedia]
+
+0.1.0 / 2012-03-07
+==================
+
+ * Initial release
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/LICENSE
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/LICENSE
new file mode 100644
index 0000000..6c07561
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2014 Guillermo Rauch <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/README.md
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/README.md
new file mode 100644
index 0000000..9b4fd03
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/README.md
@@ -0,0 +1,35 @@
+# ms.js: miliseconds conversion utility
+
+```js
+ms('2 days') // 172800000
+ms('1d') // 86400000
+ms('10h') // 36000000
+ms('2.5 hrs') // 9000000
+ms('2h') // 7200000
+ms('1m') // 60000
+ms('5s') // 5000
+ms('100') // 100
+```
+
+```js
+ms(60000) // "1m"
+ms(2 * 60000) // "2m"
+ms(ms('10 hours')) // "10h"
+```
+
+```js
+ms(60000, { long: true }) // "1 minute"
+ms(2 * 60000, { long: true }) // "2 minutes"
+ms(ms('10 hours'), { long: true }) // "10 hours"
+```
+
+- Node/Browser compatible. Published as
[`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download).
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as
+a number (e.g: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of
+equivalent ms is returned.
+
+## License
+
+MIT
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/index.js
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/index.js
new file mode 100644
index 0000000..4f92771
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/index.js
@@ -0,0 +1,125 @@
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ * - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} options
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options){
+ options = options || {};
+ if ('string' == typeof val) return parse(val);
+ return options.long
+ ? long(val)
+ : short(val);
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+ str = '' + str;
+ if (str.length > 10000) return;
+ var match = /^((?:\d+)?\.?\d+)
*(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
+ if (!match) return;
+ var n = parseFloat(match[1]);
+ var type = (match[2] || 'ms').toLowerCase();
+ switch (type) {
+ case 'years':
+ case 'year':
+ case 'yrs':
+ case 'yr':
+ case 'y':
+ return n * y;
+ case 'days':
+ case 'day':
+ case 'd':
+ return n * d;
+ case 'hours':
+ case 'hour':
+ case 'hrs':
+ case 'hr':
+ case 'h':
+ return n * h;
+ case 'minutes':
+ case 'minute':
+ case 'mins':
+ case 'min':
+ case 'm':
+ return n * m;
+ case 'seconds':
+ case 'second':
+ case 'secs':
+ case 'sec':
+ case 's':
+ return n * s;
+ case 'milliseconds':
+ case 'millisecond':
+ case 'msecs':
+ case 'msec':
+ case 'ms':
+ return n;
+ }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function short(ms) {
+ if (ms >= d) return Math.round(ms / d) + 'd';
+ if (ms >= h) return Math.round(ms / h) + 'h';
+ if (ms >= m) return Math.round(ms / m) + 'm';
+ if (ms >= s) return Math.round(ms / s) + 's';
+ return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function long(ms) {
+ return plural(ms, d, 'day')
+ || plural(ms, h, 'hour')
+ || plural(ms, m, 'minute')
+ || plural(ms, s, 'second')
+ || ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+ if (ms < n) return;
+ if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
+ return Math.ceil(ms / n) + ' ' + name + 's';
+}
diff --git
a/node_modules/finalhandler/node_modules/debug/node_modules/ms/package.json
b/node_modules/finalhandler/node_modules/debug/node_modules/ms/package.json
new file mode 100644
index 0000000..a234eb5
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/node_modules/ms/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "ms",
+ "version": "0.7.1",
+ "description": "Tiny ms conversion utility",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/guille/ms.js.git"
+ },
+ "main": "./index",
+ "devDependencies": {
+ "mocha": "*",
+ "expect.js": "*",
+ "serve": "*"
+ },
+ "component": {
+ "scripts": {
+ "ms/index.js": "index.js"
+ }
+ },
+ "readme": "# ms.js: miliseconds conversion utility\n\n```js\nms('2 days')
// 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5
hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s')
// 5000\nms('100') // 100\n```\n\n```js\nms(60000) //
\"1m\"\nms(2 * 60000) // \"2m\"\nms(ms('10 hours')) //
\"10h\"\n```\n\n```js\nms(60000, { long: true }) // \"1
minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(ms('10
hours'), { long: true }) // \"10 hours\"\n```\n\n- Node/Browser compatible.
Published as [`ms`](https://www.npmjs.org/package/ms) in
[NPM](http://nodejs.org/download).\n- If a number is supplied to `ms`, a string
with a unit is returned.\n- If a string that contains the number is supplied,
it returns it as\na number (e.g: it returns `100` for `'100'`).\n- If you pass
a string with a number and a valid unit, the number of\nequivalent ms is
returned.\n\n## License\n\nMIT\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/guille/ms.js/issues"
+ },
+ "homepage": "https://github.com/guille/ms.js#readme",
+ "_id": "[email protected]",
+ "_shasum": "9cd13c03adbff25b65effde7ce864ee952017098",
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "_from": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
+}
diff --git a/node_modules/finalhandler/node_modules/debug/package.json
b/node_modules/finalhandler/node_modules/debug/package.json
new file mode 100644
index 0000000..d6214b8
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/debug/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "debug",
+ "version": "2.2.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "[email protected]"
+ },
+ "contributors": [
+ {
+ "name": "Nathan Rajlich",
+ "email": "[email protected]",
+ "url": "http://n8.io"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "ms": "0.7.1"
+ },
+ "devDependencies": {
+ "browserify": "9.0.3",
+ "mocha": "*"
+ },
+ "main": "./node.js",
+ "browser": "./browser.js",
+ "component": {
+ "scripts": {
+ "debug/index.js": "browser.js",
+ "debug/debug.js": "debug.js"
+ }
+ },
+ "readme": "# debug\n\n tiny node.js debugging utility modelled after node
core's debugging technique.\n\n## Installation\n\n```bash\n$ npm install
debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function
to generate your debug function, passing it a name which will determine if a
noop function is returned, or a decorated `console.error`, so all of the
`console` format string goodies you're used to work fine. A unique color is
selected per-function for visibility.\n\nExample _app.js_:\n\n```js\nvar debug
= require('debug')('http')\n , http = require('http')\n , name = 'My
App';\n\n// fake app\n\ndebug('booting %s',
name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' +
req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n
debug('listening');\n});\n\n// fake worker of some
kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug =
require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some
work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to
enable these based on space or comma-delimited names. Here are some
examples:\n\n \n\n \n\n####
Windows note\n\n On Windows the environment variable is set using the `set`
command.\n\n ```cmd\n set DEBUG=*,-not_this\n ```\n\nThen, run the program to
be debugged as usual.\n\n## Millisecond diff\n\n When actively developing an
application it can be useful to see when the time spent between one `debug()`
call and the next. Suppose for example you invoke `debug()` before requesting a
resource, and after as well, the \"+NNNms\" will show you how much time was
spent between calls.\n\n
\n\n When stdout
is not a TTY, `Date#toUTCString()` is used, making it more useful for logging
the debug information as shown below:\n\n
\n\n##
Conventions\n\n If you're using this in one or more of your libraries, you
_should_ use the name of your library so that developers may toggle debugging
as desired without guessing names. If you have more than one debuggers you
_should_ prefix them with your library name and use \":\" to separate features.
For example \"bodyParser\" from Connect would then be
\"connect:bodyParser\".\n\n## Wildcards\n\n The `*` character may be used as a
wildcard. Suppose for example your library has debuggers named
\"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of
listing all three with
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
`DEBUG=connect:*`, or to run everything using this module simply use
`DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with
a \"-\" character. For example, `DEBUG=*,-connect:*` would include all
debuggers except those starting with \"connect:\".\n\n## Browser support\n\n
Debug works in the browser as well, currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. Somewhere in the code on your page,
include:\n\n```js\nwindow.myDebug = require(\"debug\");\n```\n\n (\"debug\" is
a global object in the browser so we give this object a different name.) When
your page is open in the browser, type the following in the
console:\n\n```js\nmyDebug.enable(\"worker:*\")\n```\n\n Refresh the page.
Debug output will continue to be sent to the console until it is disabled by
typing `myDebug.disable()` in the console.\n\n```js\na = debug('worker:a');\nb
= debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n},
1000);\n\nsetInterval(function(){\n b('doing some work');\n},
1200);\n```\n\n#### Web Inspector Colors\n\n Colors are also enabled on \"Web
Inspectors\" that understand the `%c` formatting\n option. These are WebKit
web inspectors, Firefox ([since version\n
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))\n
and the Firebug plugin for Firefox (any version).\n\n Colored output looks
something like:\n\n
\n\n###
stderr vs stdout\n\nYou can set an alternative logging method per-namespace by
overriding the `log` method on a per-namespace or globally:\n\nExample
_stdout.js_:\n\n```js\nvar debug = require('debug');\nvar error =
debug('app:error');\n\n// by default stderr is used\nerror('goes to
stderr!');\n\nvar log = debug('app:log');\n// set this namespace to log via
console.log\nlog.log = console.log.bind(console); // don't forget to bind to
console!\nlog('goes to stdout');\nerror('still goes to stderr!');\n\n// set all
output to go via console.info\n// overrides all per-namespace log
settings\ndebug.log = console.info.bind(console);\nerror('now goes to stdout
via console.info');\nlog('still goes to stdout, but via console.info
now');\n```\n\n### Save debug output to a file\n\nYou can save all debug
statements to a file by piping them.\n\nExample:\n\n```bash\n$ DEBUG_FD=3 node
your-app.js 3> whatever.log\n```\n\n## Authors\n\n - TJ Holowaychuk\n - Nathan
Rajlich\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 TJ Holowaychuk
<[email protected]>\n\nPermission is hereby granted, free of charge,
to any person obtaining\na copy of this software and associated documentation
files (the\n'Software'), to deal in the Software without restriction,
including\nwithout limitation the rights to use, copy, modify, merge,
publish,\ndistribute, sublicense, and/or sell copies of the Software, and
to\npermit persons to whom the Software is furnished to do so, subject to\nthe
following conditions:\n\nThe above copyright notice and this permission notice
shall be\nincluded in all copies or substantial portions of the
Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY
KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "Readme.md",
+ "bugs": {
+ "url": "https://github.com/visionmedia/debug/issues"
+ },
+ "homepage": "https://github.com/visionmedia/debug#readme",
+ "_id": "[email protected]",
+ "_shasum": "f87057e995b1a1f6ae6a4960664137bc56f039da",
+ "_resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "_from": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz"
+}
diff --git a/node_modules/finalhandler/node_modules/escape-html/LICENSE
b/node_modules/finalhandler/node_modules/escape-html/LICENSE
new file mode 100644
index 0000000..a3f0274
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/escape-html/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012-2013 TJ Holowaychuk
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/finalhandler/node_modules/escape-html/Readme.md
b/node_modules/finalhandler/node_modules/escape-html/Readme.md
new file mode 100644
index 0000000..2cfcc99
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/escape-html/Readme.md
@@ -0,0 +1,15 @@
+
+# escape-html
+
+ Escape HTML entities
+
+## Example
+
+```js
+var escape = require('escape-html');
+escape(str);
+```
+
+## License
+
+ MIT
\ No newline at end of file
diff --git a/node_modules/finalhandler/node_modules/escape-html/index.js
b/node_modules/finalhandler/node_modules/escape-html/index.js
new file mode 100644
index 0000000..d0f9256
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/escape-html/index.js
@@ -0,0 +1,29 @@
+/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * MIT Licensed
+ */
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = escapeHtml;
+
+/**
+ * Escape special characters in the given string of html.
+ *
+ * @param {string} str The string to escape for inserting into HTML
+ * @return {string}
+ * @public
+ */
+
+function escapeHtml(html) {
+ return String(html)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+}
diff --git a/node_modules/finalhandler/node_modules/escape-html/package.json
b/node_modules/finalhandler/node_modules/escape-html/package.json
new file mode 100644
index 0000000..fe8aaaf
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/escape-html/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "escape-html",
+ "description": "Escape HTML entities",
+ "version": "1.0.2",
+ "license": "MIT",
+ "keywords": [
+ "escape",
+ "html",
+ "utility"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/component/escape-html.git"
+ },
+ "files": [
+ "LICENSE",
+ "Readme.md",
+ "index.js"
+ ],
+ "readme": "\n# escape-html\n\n Escape HTML entities\n\n##
Example\n\n```js\nvar escape = require('escape-html');\nescape(str);\n```\n\n##
License\n\n MIT",
+ "readmeFilename": "Readme.md",
+ "bugs": {
+ "url": "https://github.com/component/escape-html/issues"
+ },
+ "homepage": "https://github.com/component/escape-html#readme",
+ "_id": "[email protected]",
+ "_shasum": "d77d32fa98e38c2f41ae85e9278e0e0e6ba1022c",
+ "_resolved":
"https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz",
+ "_from": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz"
+}
diff --git a/node_modules/finalhandler/node_modules/on-finished/HISTORY.md
b/node_modules/finalhandler/node_modules/on-finished/HISTORY.md
new file mode 100644
index 0000000..98ff0e9
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/on-finished/HISTORY.md
@@ -0,0 +1,88 @@
+2.3.0 / 2015-05-26
+==================
+
+ * Add defined behavior for HTTP `CONNECT` requests
+ * Add defined behavior for HTTP `Upgrade` requests
+ * deps: [email protected]
+
+2.2.1 / 2015-04-22
+==================
+
+ * Fix `isFinished(req)` when data buffered
+
+2.2.0 / 2014-12-22
+==================
+
+ * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+ * Fix handling of pipelined requests
+
+2.1.0 / 2014-08-16
+==================
+
+ * Check if `socket` is detached
+ * Return `undefined` for `isFinished` if state unknown
+
+2.0.0 / 2014-08-16
+==================
+
+ * Add `isFinished` function
+ * Move to `jshttp` organization
+ * Remove support for plain socket argument
+ * Rename to `on-finished`
+ * Support both `req` and `res` as arguments
+ * deps: [email protected]
+
+1.2.2 / 2014-06-10
+==================
+
+ * Reduce listeners added to emitters
+ - avoids "event emitter leak" warnings when used multiple times on same
request
+
+1.2.1 / 2014-06-08
+==================
+
+ * Fix returned value when already finished
+
+1.2.0 / 2014-06-05
+==================
+
+ * Call callback when called on already-finished socket
+
+1.1.4 / 2014-05-27
+==================
+
+ * Support node.js 0.8
+
+1.1.3 / 2014-04-30
+==================
+
+ * Make sure errors passed as instanceof `Error`
+
+1.1.2 / 2014-04-18
+==================
+
+ * Default the `socket` to passed-in object
+
+1.1.1 / 2014-01-16
+==================
+
+ * Rename module to `finished`
+
+1.1.0 / 2013-12-25
+==================
+
+ * Call callback when called on already-errored socket
+
+1.0.1 / 2013-12-20
+==================
+
+ * Actually pass the error to the callback
+
+1.0.0 / 2013-12-20
+==================
+
+ * Initial release
diff --git a/node_modules/finalhandler/node_modules/on-finished/LICENSE
b/node_modules/finalhandler/node_modules/on-finished/LICENSE
new file mode 100644
index 0000000..5931fd2
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/on-finished/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2013 Jonathan Ong <[email protected]>
+Copyright (c) 2014 Douglas Christopher Wilson <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/finalhandler/node_modules/on-finished/README.md
b/node_modules/finalhandler/node_modules/on-finished/README.md
new file mode 100644
index 0000000..a0e1157
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/on-finished/README.md
@@ -0,0 +1,154 @@
+# on-finished
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Execute a callback when a HTTP request closes, finishes, or errors.
+
+## Install
+
+```sh
+$ npm install on-finished
+```
+
+## API
+
+```js
+var onFinished = require('on-finished')
+```
+
+### onFinished(res, listener)
+
+Attach a listener to listen for the response to finish. The listener will
+be invoked only once when the response finished. If the response finished
+to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
+
+Listening to the end of a response would be used to close things associated
+with the response, like open files.
+
+Listener is invoked as `listener(err, res)`.
+
+```js
+onFinished(res, function (err, res) {
+ // clean up open fds, etc.
+ // err contains the error is request error'd
+})
+```
+
+### onFinished(req, listener)
+
+Attach a listener to listen for the request to finish. The listener will
+be invoked only once when the request finished. If the request finished
+to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
+
+Listening to the end of a request would be used to know when to continue
+after reading the data.
+
+Listener is invoked as `listener(err, req)`.
+
+```js
+var data = ''
+
+req.setEncoding('utf8')
+res.on('data', function (str) {
+ data += str
+})
+
+onFinished(req, function (err, req) {
+ // data is read unless there is err
+})
+```
+
+### onFinished.isFinished(res)
+
+Determine if `res` is already finished. This would be useful to check and
+not even start certain operations if the response has already finished.
+
+### onFinished.isFinished(req)
+
+Determine if `req` is already finished. This would be useful to check and
+not even start certain operations if the request has already finished.
+
+## Special Node.js requests
+
+### HTTP CONNECT method
+
+The meaning of the `CONNECT` method from RFC 7231, section 4.3.6:
+
+> The CONNECT method requests that the recipient establish a tunnel to
+> the destination origin server identified by the request-target and,
+> if successful, thereafter restrict its behavior to blind forwarding
+> of packets, in both directions, until the tunnel is closed. Tunnels
+> are commonly used to create an end-to-end virtual connection, through
+> one or more proxies, which can then be secured using TLS (Transport
+> Layer Security, [RFC5246]).
+
+In Node.js, these request objects come from the `'connect'` event on
+the HTTP server.
+
+When this module is used on a HTTP `CONNECT` request, the request is
+considered "finished" immediately, **due to limitations in the Node.js
+interface**. This means if the `CONNECT` request contains a request entity,
+the request will be considered "finished" even before it has been read.
+
+There is no such thing as a response object to a `CONNECT` request in
+Node.js, so there is no support for for one.
+
+### HTTP Upgrade request
+
+The meaning of the `Upgrade` header from RFC 7230, section 6.1:
+
+> The "Upgrade" header field is intended to provide a simple mechanism
+> for transitioning from HTTP/1.1 to some other protocol on the same
+> connection.
+
+In Node.js, these request objects come from the `'upgrade'` event on
+the HTTP server.
+
+When this module is used on a HTTP request with an `Upgrade` header, the
+request is considered "finished" immediately, **due to limitations in the
+Node.js interface**. This means if the `Upgrade` request contains a request
+entity, the request will be considered "finished" even before it has been
+read.
+
+There is no such thing as a response object to a `Upgrade` request in
+Node.js, so there is no support for for one.
+
+## Example
+
+The following code ensures that file descriptors are always closed
+once the response finishes.
+
+```js
+var destroy = require('destroy')
+var http = require('http')
+var onFinished = require('on-finished')
+
+http.createServer(function onRequest(req, res) {
+ var stream = fs.createReadStream('package.json')
+ stream.pipe(res)
+ onFinished(res, function (err) {
+ destroy(stream)
+ })
+})
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished/master.svg
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]:
https://img.shields.io/coveralls/jshttp/on-finished/master.svg
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg
+[downloads-url]: https://npmjs.org/package/on-finished
diff --git a/node_modules/finalhandler/node_modules/on-finished/index.js
b/node_modules/finalhandler/node_modules/on-finished/index.js
new file mode 100644
index 0000000..9abd98f
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/on-finished/index.js
@@ -0,0 +1,196 @@
+/*!
+ * on-finished
+ * Copyright(c) 2013 Jonathan Ong
+ * Copyright(c) 2014 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = onFinished
+module.exports.isFinished = isFinished
+
+/**
+ * Module dependencies.
+ * @private
+ */
+
+var first = require('ee-first')
+
+/**
+ * Variables.
+ * @private
+ */
+
+/* istanbul ignore next */
+var defer = typeof setImmediate === 'function'
+ ? setImmediate
+ : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
+
+/**
+ * Invoke callback when the response has finished, useful for
+ * cleaning up resources afterwards.
+ *
+ * @param {object} msg
+ * @param {function} listener
+ * @return {object}
+ * @public
+ */
+
+function onFinished(msg, listener) {
+ if (isFinished(msg) !== false) {
+ defer(listener, null, msg)
+ return msg
+ }
+
+ // attach the listener to the message
+ attachListener(msg, listener)
+
+ return msg
+}
+
+/**
+ * Determine if message is already finished.
+ *
+ * @param {object} msg
+ * @return {boolean}
+ * @public
+ */
+
+function isFinished(msg) {
+ var socket = msg.socket
+
+ if (typeof msg.finished === 'boolean') {
+ // OutgoingMessage
+ return Boolean(msg.finished || (socket && !socket.writable))
+ }
+
+ if (typeof msg.complete === 'boolean') {
+ // IncomingMessage
+ return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete
&& !msg.readable))
+ }
+
+ // don't know
+ return undefined
+}
+
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+ var eeMsg
+ var eeSocket
+ var finished = false
+
+ function onFinish(error) {
+ eeMsg.cancel()
+ eeSocket.cancel()
+
+ finished = true
+ callback(error)
+ }
+
+ // finished on first message event
+ eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+ function onSocket(socket) {
+ // remove listener
+ msg.removeListener('socket', onSocket)
+
+ if (finished) return
+ if (eeMsg !== eeSocket) return
+
+ // finished on first socket event
+ eeSocket = first([[socket, 'error', 'close']], onFinish)
+ }
+
+ if (msg.socket) {
+ // socket already assigned
+ onSocket(msg.socket)
+ return
+ }
+
+ // wait for socket to be assigned
+ msg.on('socket', onSocket)
+
+ if (msg.socket === undefined) {
+ // node.js 0.8 patch
+ patchAssignSocket(msg, onSocket)
+ }
+}
+
+/**
+ * Attach the listener to the message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function attachListener(msg, listener) {
+ var attached = msg.__onFinished
+
+ // create a private single listener with queue
+ if (!attached || !attached.queue) {
+ attached = msg.__onFinished = createListener(msg)
+ attachFinishedListener(msg, attached)
+ }
+
+ attached.queue.push(listener)
+}
+
+/**
+ * Create listener on message.
+ *
+ * @param {object} msg
+ * @return {function}
+ * @private
+ */
+
+function createListener(msg) {
+ function listener(err) {
+ if (msg.__onFinished === listener) msg.__onFinished = null
+ if (!listener.queue) return
+
+ var queue = listener.queue
+ listener.queue = null
+
+ for (var i = 0; i < queue.length; i++) {
+ queue[i](err, msg)
+ }
+ }
+
+ listener.queue = []
+
+ return listener
+}
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+ var assignSocket = res.assignSocket
+
+ if (typeof assignSocket !== 'function') return
+
+ // res.on('socket', callback) is broken in 0.8
+ res.assignSocket = function _assignSocket(socket) {
+ assignSocket.call(this, socket)
+ callback(socket)
+ }
+}
diff --git
a/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/LICENSE
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/LICENSE
new file mode 100644
index 0000000..a7ae8ee
--- /dev/null
+++
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/LICENSE
@@ -0,0 +1,22 @@
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong [email protected]
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git
a/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/README.md
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/README.md
new file mode 100644
index 0000000..cbd2478
--- /dev/null
+++
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/README.md
@@ -0,0 +1,80 @@
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted.
If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is
the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is
an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the
event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+ [ee1, 'close', 'end', 'error'],
+ [ee2, 'error']
+], function (err, ee, event, args) {
+ // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]:
http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]:
https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]:
https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
diff --git
a/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/index.js
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/index.js
new file mode 100644
index 0000000..501287c
--- /dev/null
+++
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/index.js
@@ -0,0 +1,95 @@
+/*!
+ * ee-first
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+'use strict'
+
+/**
+ * Module exports.
+ * @public
+ */
+
+module.exports = first
+
+/**
+ * Get the first event in a set of event emitters and event pairs.
+ *
+ * @param {array} stuff
+ * @param {function} done
+ * @public
+ */
+
+function first(stuff, done) {
+ if (!Array.isArray(stuff))
+ throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+ var cleanups = []
+
+ for (var i = 0; i < stuff.length; i++) {
+ var arr = stuff[i]
+
+ if (!Array.isArray(arr) || arr.length < 2)
+ throw new TypeError('each array member must be [ee, events...]')
+
+ var ee = arr[0]
+
+ for (var j = 1; j < arr.length; j++) {
+ var event = arr[j]
+ var fn = listener(event, callback)
+
+ // listen to the event
+ ee.on(event, fn)
+ // push this listener to the list of cleanups
+ cleanups.push({
+ ee: ee,
+ event: event,
+ fn: fn,
+ })
+ }
+ }
+
+ function callback() {
+ cleanup()
+ done.apply(null, arguments)
+ }
+
+ function cleanup() {
+ var x
+ for (var i = 0; i < cleanups.length; i++) {
+ x = cleanups[i]
+ x.ee.removeListener(x.event, x.fn)
+ }
+ }
+
+ function thunk(fn) {
+ done = fn
+ }
+
+ thunk.cancel = cleanup
+
+ return thunk
+}
+
+/**
+ * Create the event listener.
+ * @private
+ */
+
+function listener(event, done) {
+ return function onevent(arg1) {
+ var args = new Array(arguments.length)
+ var ee = this
+ var err = event === 'error'
+ ? arg1
+ : null
+
+ // copy args to prevent arguments escaping scope
+ for (var i = 0; i < args.length; i++) {
+ args[i] = arguments[i]
+ }
+
+ done(err, ee, event, args)
+ }
+}
diff --git
a/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/package.json
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/package.json
new file mode 100644
index 0000000..f929dbd
--- /dev/null
+++
b/node_modules/finalhandler/node_modules/on-finished/node_modules/ee-first/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "ee-first",
+ "description": "return the first event in a set of ee/event pairs",
+ "version": "1.1.1",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "[email protected]",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "[email protected]"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jonathanong/ee-first.git"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter
dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report
lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "readme": "# EE First\n\n[![NPM version][npm-image]][npm-url]\n[![Build
status][travis-image]][travis-url]\n[![Test
coverage][coveralls-image]][coveralls-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Gittip][gittip-image]][gittip-url]\n\nGet
the first event in a set of event emitters and event pairs,\nthen clean up
after itself.\n\n## Install\n\n```sh\n$ npm install ee-first\n```\n\n##
API\n\n```js\nvar first = require('ee-first')\n```\n\n### first(arr,
listener)\n\nInvoke `listener` on the first event from the list specified in
`arr`. `arr` is\nan array of arrays, with each array in the format `[ee,
...event]`. `listener`\nwill be called only once, the first time any of the
given events are emitted. If\n`error` is one of the listened events, then if
that fires first, the `listener`\nwill be given the `err` argument.\n\nThe
`listener` is invoked as `listener(err, ee, event, args)`, where `err` is
the\nfirst argument emitted from an `error` event, if applicable; `ee` is the
event\nemitter that fired; `event` is the string event name that fired; and
`args` is an\narray of the arguments that were emitted on the
event.\n\n```js\nvar ee1 = new EventEmitter()\nvar ee2 = new
EventEmitter()\n\nfirst([\n [ee1, 'close', 'end', 'error'],\n [ee2,
'error']\n], function (err, ee, event, args) {\n // listener
invoked\n})\n```\n\n#### .cancel()\n\nThe group of listeners can be cancelled
before being invoked and have all the event\nlisteners removed from the
underlying event emitters.\n\n```js\nvar thunk = first([\n [ee1, 'close',
'end', 'error'],\n [ee2, 'error']\n], function (err, ee, event, args) {\n //
listener invoked\n})\n\n// cancel and clean
up\nthunk.cancel()\n```\n\n[npm-image]:
https://img.shields.io/npm/v/ee-first.svg?style=flat-square\n[npm-url]:
https://npmjs.org/package/ee-first\n[github-tag]:
http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square\n[github-url]:
https://github.com/jonathanong/ee-first/tags\n[travis-image]:
https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square\n[travis-url]:
https://travis-ci.org/jonathanong/ee-first\n[coveralls-image]:
https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square\n[coveralls-url]:
https://coveralls.io/r/jonathanong/ee-first?branch=master\n[license-image]:
http://img.shields.io/npm/l/ee-first.svg?style=flat-square\n[license-url]:
LICENSE.md\n[downloads-image]:
http://img.shields.io/npm/dm/ee-first.svg?style=flat-square\n[downloads-url]:
https://npmjs.org/package/ee-first\n[gittip-image]:
https://img.shields.io/gittip/jonathanong.svg?style=flat-square\n[gittip-url]:
https://www.gittip.com/jonathanong/\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/jonathanong/ee-first/issues"
+ },
+ "homepage": "https://github.com/jonathanong/ee-first#readme",
+ "_id": "[email protected]",
+ "_shasum": "590c61156b0ae2f4f0255732a158b266bc56b21d",
+ "_resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "_from": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
+}
diff --git a/node_modules/finalhandler/node_modules/on-finished/package.json
b/node_modules/finalhandler/node_modules/on-finished/package.json
new file mode 100644
index 0000000..70db5fd
--- /dev/null
+++ b/node_modules/finalhandler/node_modules/on-finished/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "on-finished",
+ "description": "Execute a callback when a request closes, finishes, or
errors",
+ "version": "2.3.0",
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "[email protected]",
+ "url": "http://jongleberry.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/on-finished.git"
+ },
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "devDependencies": {
+ "istanbul": "0.3.9",
+ "mocha": "2.2.5"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "mocha --reporter spec --bail --check-leaks test/",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter
dot --check-leaks test/",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report
lcovonly -- --reporter spec --check-leaks test/"
+ },
+ "readme": "# on-finished\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM
Downloads][downloads-image]][downloads-url]\n[![Node.js
Version][node-version-image]][node-version-url]\n[![Build
Status][travis-image]][travis-url]\n[![Test
Coverage][coveralls-image]][coveralls-url]\n\nExecute a callback when a HTTP
request closes, finishes, or errors.\n\n## Install\n\n```sh\n$ npm install
on-finished\n```\n\n## API\n\n```js\nvar onFinished =
require('on-finished')\n```\n\n### onFinished(res, listener)\n\nAttach a
listener to listen for the response to finish. The listener will\nbe invoked
only once when the response finished. If the response finished\nto an error,
the first argument will contain the error. If the response\nhas already
finished, the listener will be invoked.\n\nListening to the end of a response
would be used to close things associated\nwith the response, like open
files.\n\nListener is invoked as `listener(err,
res)`.\n\n```js\nonFinished(res, function (err, res) {\n // clean up open fds,
etc.\n // err contains the error is request error'd\n})\n```\n\n###
onFinished(req, listener)\n\nAttach a listener to listen for the request to
finish. The listener will\nbe invoked only once when the request finished. If
the request finished\nto an error, the first argument will contain the error.
If the request\nhas already finished, the listener will be
invoked.\n\nListening to the end of a request would be used to know when to
continue\nafter reading the data.\n\nListener is invoked as `listener(err,
req)`.\n\n```js\nvar data = ''\n\nreq.setEncoding('utf8')\nres.on('data',
function (str) {\n data += str\n})\n\nonFinished(req, function (err, req) {\n
// data is read unless there is err\n})\n```\n\n###
onFinished.isFinished(res)\n\nDetermine if `res` is already finished. This
would be useful to check and\nnot even start certain operations if the response
has already finished.\n\n### onFinished.isFinished(req)\n\nDetermine if `req`
is already finished. This would be useful to check and\nnot even start certain
operations if the request has already finished.\n\n## Special Node.js
requests\n\n### HTTP CONNECT method\n\nThe meaning of the `CONNECT` method from
RFC 7231, section 4.3.6:\n\n> The CONNECT method requests that the recipient
establish a tunnel to\n> the destination origin server identified by the
request-target and,\n> if successful, thereafter restrict its behavior to blind
forwarding\n> of packets, in both directions, until the tunnel is closed.
Tunnels\n> are commonly used to create an end-to-end virtual connection,
through\n> one or more proxies, which can then be secured using TLS
(Transport\n> Layer Security, [RFC5246]).\n\nIn Node.js, these request objects
come from the `'connect'` event on\nthe HTTP server.\n\nWhen this module is
used on a HTTP `CONNECT` request, the request is\nconsidered \"finished\"
immediately, **due to limitations in the Node.js\ninterface**. This means if
the `CONNECT` request contains a request entity,\nthe request will be
considered \"finished\" even before it has been read.\n\nThere is no such thing
as a response object to a `CONNECT` request in\nNode.js, so there is no support
for for one.\n\n### HTTP Upgrade request\n\nThe meaning of the `Upgrade` header
from RFC 7230, section 6.1:\n\n> The \"Upgrade\" header field is intended to
provide a simple mechanism\n> for transitioning from HTTP/1.1 to some other
protocol on the same\n> connection.\n\nIn Node.js, these request objects come
from the `'upgrade'` event on\nthe HTTP server.\n\nWhen this module is used on
a HTTP request with an `Upgrade` header, the\nrequest is considered
\"finished\" immediately, **due to limitations in the\nNode.js interface**.
This means if the `Upgrade` request contains a request\nentity, the request
will be considered \"finished\" even before it has been\nread.\n\nThere is no
such thing as a response object to a `Upgrade` request in\nNode.js, so there is
no support for for one.\n\n## Example\n\nThe following code ensures that file
descriptors are always closed\nonce the response finishes.\n\n```js\nvar
destroy = require('destroy')\nvar http = require('http')\nvar onFinished =
require('on-finished')\n\nhttp.createServer(function onRequest(req, res) {\n
var stream = fs.createReadStream('package.json')\n stream.pipe(res)\n
onFinished(res, function (err) {\n destroy(stream)\n })\n})\n```\n\n##
License\n\n[MIT](LICENSE)\n\n[npm-image]:
https://img.shields.io/npm/v/on-finished.svg\n[npm-url]:
https://npmjs.org/package/on-finished\n[node-version-image]:
https://img.shields.io/node/v/on-finished.svg\n[node-version-url]:
http://nodejs.org/download/\n[travis-image]:
https://img.shields.io/travis/jshttp/on-finished/master.svg\n[travis-url]:
https://travis-ci.org/jshttp/on-finished\n[coveralls-image]:
https://img.shields.io/coveralls/jshttp/on-finished/master.svg\n[coveralls-url]:
https://coveralls.io/r/jshttp/on-finished?branch=master\n[downloads-image]:
https://img.shields.io/npm/dm/on-finished.svg\n[downloads-url]:
https://npmjs.org/package/on-finished\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/jshttp/on-finished/issues"
+ },
+ "homepage": "https://github.com/jshttp/on-finished#readme",
+ "_id": "[email protected]",
+ "_shasum": "20f1336481b083cd75337992a16971aa2d906947",
+ "_resolved":
"https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "_from": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
+}
diff --git
a/node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md
b/node_modules/finalhandler/node_modules/unpipe/HISTORY.md
similarity index 100%
rename from
node_modules/express/node_modules/finalhandler/node_modules/unpipe/HISTORY.md
rename to node_modules/finalhandler/node_modules/unpipe/HISTORY.md
diff --git
a/node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE
b/node_modules/finalhandler/node_modules/unpipe/LICENSE
similarity index 100%
rename from
node_modules/express/node_modules/finalhandler/node_modules/unpipe/LICENSE
rename to node_modules/finalhandler/node_modules/unpipe/LICENSE
diff --git
a/node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md
b/node_modules/finalhandler/node_modules/unpipe/README.md
similarity index 100%
rename from
node_modules/express/node_modules/finalhandler/node_modules/unpipe/README.md
rename to node_modules/finalhandler/node_modules/unpipe/README.md
diff --git
a/node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js
b/node_modules/finalhandler/node_modules/unpipe/index.js
similarity index 100%
rename from
node_modules/express/node_modules/finalhandler/node_modules/unpipe/index.js
rename to node_modules/finalhandler/node_modules/unpipe/index.js
diff --git
a/node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json
b/node_modules/finalhandler/node_modules/unpipe/package.json
similarity index 100%
rename from
node_modules/express/node_modules/finalhandler/node_modules/unpipe/package.json
rename to node_modules/finalhandler/node_modules/unpipe/package.json
diff --git a/node_modules/express/node_modules/finalhandler/package.json
b/node_modules/finalhandler/package.json
similarity index 100%
rename from node_modules/express/node_modules/finalhandler/package.json
rename to node_modules/finalhandler/package.json
diff --git a/src b/src
index 3a6f3b9..dbbbaf4 160000
--- a/src
+++ b/src
-Subproject commit 3a6f3b9ebaff36ef41b3f11ec36db4dea416a776
+Subproject commit dbbbaf443450fc9ed0a79d9a3b04432907d8f0b9
--
To view, visit https://gerrit.wikimedia.org/r/253650
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f6632e107e8dcc99b345af2cb5a273531bc5886
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits