aboutsummaryrefslogtreecommitdiffstats
path: root/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler
diff options
context:
space:
mode:
Diffstat (limited to 'dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler')
-rw-r--r--dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md57
-rw-r--r--dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE22
-rw-r--r--dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md133
-rw-r--r--dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js171
-rw-r--r--dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json79
5 files changed, 0 insertions, 462 deletions
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md
deleted file mode 100644
index 6f5cb71f..00000000
--- a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/HISTORY.md
+++ /dev/null
@@ -1,57 +0,0 @@
-0.3.3 / 2015-01-01
-==================
-
- * deps: debug@~2.1.1
- * deps: on-finished@~2.2.0
-
-0.3.2 / 2014-10-22
-==================
-
- * deps: on-finished@~2.1.1
- - Fix handling of pipelined requests
-
-0.3.1 / 2014-10-16
-==================
-
- * deps: debug@~2.1.0
- - Implement `DEBUG_FD` env variable support
-
-0.3.0 / 2014-09-17
-==================
-
- * Terminate in progress response only on error
- * Use `on-finished` to determine request status
-
-0.2.0 / 2014-09-03
-==================
-
- * Set `X-Content-Type-Options: nosniff` header
- * deps: debug@~2.0.0
-
-0.1.0 / 2014-07-16
-==================
-
- * Respond after request fully read
- - prevents hung responses and socket hang ups
- * deps: debug@1.0.4
-
-0.0.3 / 2014-07-11
-==================
-
- * deps: debug@1.0.3
- - Add support for multiple wildcards in namespaces
-
-0.0.2 / 2014-06-19
-==================
-
- * Handle invalid status codes
-
-0.0.1 / 2014-06-05
-==================
-
- * deps: debug@1.0.2
-
-0.0.0 / 2014-06-05
-==================
-
- * Extracted from connect/express
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE
deleted file mode 100644
index eda23054..00000000
--- a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
-
-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/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md
deleted file mode 100644
index 2015ac0c..00000000
--- a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/README.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# finalhandler
-
-[![NPM Version][npm-image]][npm-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Node.js Version][node-image]][node-url]
-[![Build Status][travis-image]][travis-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-Node.js function to invoke as the final step to respond to HTTP request.
-
-## Installation
-
-```sh
-$ npm install finalhandler
-```
-
-## API
-
-```js
-var finalhandler = require('finalhandler')
-```
-
-### finalhandler(req, res, [options])
-
-Returns function to be invoked as the final step for the given `req` and `res`.
-This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will
-write out a 404 response to the `res`. If it is truthy, an error response will
-be written out to the `res`, and `res.statusCode` is set from `err.status`.
-
-The final handler will also unpipe anything from `req` when it is invoked.
-
-#### options.env
-
-By default, the environment is determined by `NODE_ENV` variable, but it can be
-overridden by this option.
-
-#### options.onerror
-
-Provide a function to be called with the `err` when it exists. Can be used for
-writing errors to a central location without excessive function generation. Called
-as `onerror(err, req, res)`.
-
-## Examples
-
-### always 404
-
-```js
-var finalhandler = require('finalhandler')
-var http = require('http')
-
-var server = http.createServer(function (req, res) {
- var done = finalhandler(req, res)
- done()
-})
-
-server.listen(3000)
-```
-
-### perform simple action
-
-```js
-var finalhandler = require('finalhandler')
-var fs = require('fs')
-var http = require('http')
-
-var server = http.createServer(function (req, res) {
- var done = finalhandler(req, res)
-
- fs.readFile('index.html', function (err, buf) {
- if (err) return done(err)
- res.setHeader('Content-Type', 'text/html')
- res.end(buf)
- })
-})
-
-server.listen(3000)
-```
-
-### use with middleware-style functions
-
-```js
-var finalhandler = require('finalhandler')
-var http = require('http')
-var serveStatic = require('serve-static')
-
-var serve = serveStatic('public')
-
-var server = http.createServer(function (req, res) {
- var done = finalhandler(req, res)
- serve(req, res, done)
-})
-
-server.listen(3000)
-```
-
-### keep log of all errors
-
-```js
-var finalhandler = require('finalhandler')
-var fs = require('fs')
-var http = require('http')
-
-var server = http.createServer(function (req, res) {
- var done = finalhandler(req, res, {onerror: logerror})
-
- fs.readFile('index.html', function (err, buf) {
- if (err) return done(err)
- res.setHeader('Content-Type', 'text/html')
- res.end(buf)
- })
-})
-
-server.listen(3000)
-
-function logerror(err) {
- console.error(err.stack || err.toString())
-}
-```
-
-## License
-
-[MIT](LICENSE)
-
-[npm-image]: https://img.shields.io/npm/v/finalhandler.svg?style=flat
-[npm-url]: https://npmjs.org/package/finalhandler
-[node-image]: https://img.shields.io/node/v/finalhandler.svg?style=flat
-[node-url]: http://nodejs.org/download/
-[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg?style=flat
-[travis-url]: https://travis-ci.org/pillarjs/finalhandler
-[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg?style=flat
-[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master
-[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg?style=flat
-[downloads-url]: https://npmjs.org/package/finalhandler
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js
deleted file mode 100644
index bb2bb583..00000000
--- a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/index.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/*!
- * finalhandler
- * Copyright(c) 2014 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var debug = require('debug')('finalhandler')
-var escapeHtml = require('escape-html')
-var http = require('http')
-var onFinished = require('on-finished')
-
-/**
- * Variables.
- */
-
-/* istanbul ignore next */
-var defer = typeof setImmediate === 'function'
- ? setImmediate
- : function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }
-var isFinished = onFinished.isFinished
-
-/**
- * Module exports.
- */
-
-module.exports = finalhandler
-
-/**
- * Final handler:
- *
- * @param {Request} req
- * @param {Response} res
- * @param {Object} [options]
- * @return {Function}
- * @api public
- */
-
-function finalhandler(req, res, options) {
- options = options || {}
-
- // get environment
- var env = options.env || process.env.NODE_ENV || 'development'
-
- // get error callback
- var onerror = options.onerror
-
- return function (err) {
- var msg
-
- // ignore 404 on in-flight response
- if (!err && res._header) {
- debug('cannot 404 after headers sent')
- return
- }
-
- // unhandled error
- if (err) {
- // default status code to 500
- if (!res.statusCode || res.statusCode < 400) {
- res.statusCode = 500
- }
-
- // respect err.status
- if (err.status) {
- res.statusCode = err.status
- }
-
- // production gets a basic error message
- var msg = env === 'production'
- ? http.STATUS_CODES[res.statusCode]
- : err.stack || err.toString()
- msg = escapeHtml(msg)
- .replace(/\n/g, '<br>')
- .replace(/ /g, ' &nbsp;') + '\n'
- } else {
- res.statusCode = 404
- msg = 'Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl || req.url) + '\n'
- }
-
- debug('default %s', res.statusCode)
-
- // schedule onerror callback
- if (err && onerror) {
- defer(onerror, err, req, res)
- }
-
- // cannot actually respond
- if (res._header) {
- return req.socket.destroy()
- }
-
- send(req, res, res.statusCode, msg)
- }
-}
-
-/**
- * Send response.
- *
- * @param {IncomingMessage} req
- * @param {OutgoingMessage} res
- * @param {number} status
- * @param {string} body
- * @api private
- */
-
-function send(req, res, status, body) {
- function write() {
- res.statusCode = status
-
- // security header for content sniffing
- res.setHeader('X-Content-Type-Options', 'nosniff')
-
- // standard headers
- res.setHeader('Content-Type', 'text/html; charset=utf-8')
- res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8'))
-
- if (req.method === 'HEAD') {
- res.end()
- return
- }
-
- res.end(body, 'utf8')
- }
-
- if (isFinished(req)) {
- write()
- return
- }
-
- // unpipe everything from the request
- unpipe(req)
-
- // flush the request
- onFinished(req, write)
- req.resume()
-}
-
-/**
- * Unpipe everything from a stream.
- *
- * @param {Object} stream
- * @api private
- */
-
-/* istanbul ignore next: implementation differs between versions */
-function unpipe(stream) {
- if (typeof stream.unpipe === 'function') {
- // new-style
- stream.unpipe()
- return
- }
-
- // Node.js 0.8 hack
- var listener
- var listeners = stream.listeners('close')
-
- for (var i = 0; i < listeners.length; i++) {
- listener = listeners[i]
-
- if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
- continue
- }
-
- // invoke the listener
- listener.call(stream)
- }
-}
diff --git a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json b/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json
deleted file mode 100644
index 4eba2235..00000000
--- a/dgbuilder/dgeflows/node_modules/express/node_modules/finalhandler/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "name": "finalhandler",
- "description": "Node.js final http responder",
- "version": "0.3.3",
- "author": {
- "name": "Douglas Christopher Wilson",
- "email": "doug@somethingdoug.com"
- },
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/pillarjs/finalhandler"
- },
- "dependencies": {
- "debug": "~2.1.1",
- "escape-html": "1.0.1",
- "on-finished": "~2.2.0"
- },
- "devDependencies": {
- "istanbul": "0.3.5",
- "mocha": "~2.1.0",
- "readable-stream": "~1.0.33",
- "supertest": "~0.15.0"
- },
- "files": [
- "LICENSE",
- "HISTORY.md",
- "index.js"
- ],
- "engines": {
- "node": ">= 0.8"
- },
- "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/"
- },
- "gitHead": "dfce5042f996ba93ac85b9282e6d1cae1561acc6",
- "bugs": {
- "url": "https://github.com/pillarjs/finalhandler/issues"
- },
- "homepage": "https://github.com/pillarjs/finalhandler",
- "_id": "finalhandler@0.3.3",
- "_shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426",
- "_from": "finalhandler@0.3.3",
- "_npmVersion": "1.4.28",
- "_npmUser": {
- "name": "dougwilson",
- "email": "doug@somethingdoug.com"
- },
- "maintainers": [
- {
- "name": "dougwilson",
- "email": "doug@somethingdoug.com"
- },
- {
- "name": "jongleberry",
- "email": "jonathanrichardong@gmail.com"
- },
- {
- "name": "shtylman",
- "email": "shtylman@gmail.com"
- },
- {
- "name": "tjholowaychuk",
- "email": "tj@vision-media.ca"
- },
- {
- "name": "fishrock123",
- "email": "fishrock123@rocketmail.com"
- }
- ],
- "dist": {
- "shasum": "b1a09aa1e6a607b3541669b09bcb727f460cd426",
- "tarball": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.3.3.tgz"
-}