updated npm modules
This commit is contained in:
34
node_modules/send/HISTORY.md
generated
vendored
34
node_modules/send/HISTORY.md
generated
vendored
@@ -1,3 +1,37 @@
|
||||
0.17.1 / 2019-05-10
|
||||
===================
|
||||
|
||||
* Set stricter CSP header in redirect & error responses
|
||||
* deps: range-parser@~1.2.1
|
||||
|
||||
0.17.0 / 2019-05-03
|
||||
===================
|
||||
|
||||
* deps: http-errors@~1.7.2
|
||||
- Set constructor name when possible
|
||||
- Use `toidentifier` module to make class names
|
||||
- deps: depd@~1.1.2
|
||||
- deps: setprototypeof@1.1.1
|
||||
- deps: statuses@'>= 1.5.0 < 2'
|
||||
* deps: mime@1.6.0
|
||||
- Add extensions for JPEG-2000 images
|
||||
- Add new `font/*` types from IANA
|
||||
- Add WASM mapping
|
||||
- Update `.bdoc` to `application/bdoc`
|
||||
- Update `.bmp` to `image/bmp`
|
||||
- Update `.m4a` to `audio/mp4`
|
||||
- Update `.rtf` to `application/rtf`
|
||||
- Update `.wav` to `audio/wav`
|
||||
- Update `.xml` to `application/xml`
|
||||
- Update generic extensions to `application/octet-stream`:
|
||||
`.deb`, `.dll`, `.dmg`, `.exe`, `.iso`, `.msi`
|
||||
- Use mime-score module to resolve extension conflicts
|
||||
* deps: ms@2.1.1
|
||||
- Add `week`/`w` support
|
||||
- Fix negative number handling
|
||||
* deps: statuses@~1.5.0
|
||||
* perf: remove redundant `path.normalize` call
|
||||
|
||||
0.16.2 / 2018-02-07
|
||||
===================
|
||||
|
||||
|
||||
65
node_modules/send/README.md
generated
vendored
65
node_modules/send/README.md
generated
vendored
@@ -1,7 +1,7 @@
|
||||
# send
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
||||
[![Linux Build][travis-image]][travis-url]
|
||||
[![Windows Build][appveyor-image]][appveyor-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
@@ -174,7 +174,27 @@ $ npm test
|
||||
|
||||
## Examples
|
||||
|
||||
### Small example
|
||||
### Serve a specific file
|
||||
|
||||
This simple example will send a specific file to all requests.
|
||||
|
||||
```js
|
||||
var http = require('http')
|
||||
var send = require('send')
|
||||
|
||||
var server = http.createServer(function onRequest (req, res) {
|
||||
send(req, '/path/to/index.html')
|
||||
.pipe(res)
|
||||
})
|
||||
|
||||
server.listen(3000)
|
||||
```
|
||||
|
||||
### Serve all files from a directory
|
||||
|
||||
This simple example will just serve up all the files in a
|
||||
given directory as the top-level. For example, a request
|
||||
`GET /foo.txt` will send back `/www/public/foo.txt`.
|
||||
|
||||
```js
|
||||
var http = require('http')
|
||||
@@ -182,7 +202,8 @@ var parseUrl = require('parseurl')
|
||||
var send = require('send')
|
||||
|
||||
var server = http.createServer(function onRequest (req, res) {
|
||||
send(req, parseUrl(req).pathname).pipe(res)
|
||||
send(req, parseUrl(req).pathname, { root: '/www/public' })
|
||||
.pipe(res)
|
||||
})
|
||||
|
||||
server.listen(3000)
|
||||
@@ -204,7 +225,8 @@ send.mime.define({
|
||||
})
|
||||
|
||||
var server = http.createServer(function onRequest (req, res) {
|
||||
send(req, parseUrl(req).pathname).pipe(res)
|
||||
send(req, parseUrl(req).pathname, { root: '/www/public' })
|
||||
.pipe(res)
|
||||
})
|
||||
|
||||
server.listen(3000)
|
||||
@@ -224,9 +246,9 @@ var send = require('send')
|
||||
// Transfer arbitrary files from within /www/example.com/public/*
|
||||
// with a custom handler for directory listing
|
||||
var server = http.createServer(function onRequest (req, res) {
|
||||
send(req, parseUrl(req).pathname, {index: false, root: '/www/example.com/public'})
|
||||
.once('directory', directory)
|
||||
.pipe(res)
|
||||
send(req, parseUrl(req).pathname, { index: false, root: '/www/public' })
|
||||
.once('directory', directory)
|
||||
.pipe(res)
|
||||
})
|
||||
|
||||
server.listen(3000)
|
||||
@@ -280,11 +302,11 @@ var server = http.createServer(function onRequest (req, res) {
|
||||
|
||||
// transfer arbitrary files from within
|
||||
// /www/example.com/public/*
|
||||
send(req, parseUrl(req).pathname, {root: '/www/example.com/public'})
|
||||
.on('error', error)
|
||||
.on('directory', redirect)
|
||||
.on('headers', headers)
|
||||
.pipe(res)
|
||||
send(req, parseUrl(req).pathname, { root: '/www/public' })
|
||||
.on('error', error)
|
||||
.on('directory', redirect)
|
||||
.on('headers', headers)
|
||||
.pipe(res)
|
||||
})
|
||||
|
||||
server.listen(3000)
|
||||
@@ -294,13 +316,14 @@ server.listen(3000)
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/send.svg
|
||||
[npm-url]: https://npmjs.org/package/send
|
||||
[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux
|
||||
[travis-url]: https://travis-ci.org/pillarjs/send
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows
|
||||
[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/send/master?label=windows
|
||||
[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
|
||||
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master
|
||||
[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
|
||||
[downloads-image]: https://img.shields.io/npm/dm/send.svg
|
||||
[downloads-url]: https://npmjs.org/package/send
|
||||
[node-image]: https://badgen.net/npm/node/send
|
||||
[node-url]: https://nodejs.org/en/download/
|
||||
[npm-downloads-image]: https://badgen.net/npm/dm/send
|
||||
[npm-url]: https://npmjs.org/package/send
|
||||
[npm-version-image]: https://badgen.net/npm/v/send
|
||||
[travis-image]: https://badgen.net/travis/pillarjs/send/master?label=linux
|
||||
[travis-url]: https://travis-ci.org/pillarjs/send
|
||||
|
||||
7
node_modules/send/index.js
generated
vendored
7
node_modules/send/index.js
generated
vendored
@@ -288,7 +288,7 @@ SendStream.prototype.error = function error (status, err) {
|
||||
res.statusCode = status
|
||||
res.setHeader('Content-Type', 'text/html; charset=UTF-8')
|
||||
res.setHeader('Content-Length', Buffer.byteLength(doc))
|
||||
res.setHeader('Content-Security-Policy', "default-src 'self'")
|
||||
res.setHeader('Content-Security-Policy', "default-src 'none'")
|
||||
res.setHeader('X-Content-Type-Options', 'nosniff')
|
||||
res.end(doc)
|
||||
}
|
||||
@@ -493,7 +493,7 @@ SendStream.prototype.redirect = function redirect (path) {
|
||||
res.statusCode = 301
|
||||
res.setHeader('Content-Type', 'text/html; charset=UTF-8')
|
||||
res.setHeader('Content-Length', Buffer.byteLength(doc))
|
||||
res.setHeader('Content-Security-Policy', "default-src 'self'")
|
||||
res.setHeader('Content-Security-Policy', "default-src 'none'")
|
||||
res.setHeader('X-Content-Type-Options', 'nosniff')
|
||||
res.setHeader('Location', loc)
|
||||
res.end(doc)
|
||||
@@ -546,7 +546,6 @@ SendStream.prototype.pipe = function pipe (res) {
|
||||
|
||||
// join / normalize from optional root dir
|
||||
path = normalize(join(root, path))
|
||||
root = normalize(root + sep)
|
||||
} else {
|
||||
// ".." is malicious without "root"
|
||||
if (UP_PATH_REGEXP.test(path)) {
|
||||
@@ -669,7 +668,7 @@ SendStream.prototype.send = function send (path, stat) {
|
||||
|
||||
// 416 Requested Range Not Satisfiable
|
||||
return this.error(416, {
|
||||
headers: {'Content-Range': res.getHeader('Content-Range')}
|
||||
headers: { 'Content-Range': res.getHeader('Content-Range') }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
52
node_modules/send/package.json
generated
vendored
52
node_modules/send/package.json
generated
vendored
@@ -1,29 +1,27 @@
|
||||
{
|
||||
"_from": "send@0.16.2",
|
||||
"_id": "send@0.16.2",
|
||||
"_from": "send@0.17.1",
|
||||
"_id": "send@0.17.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
|
||||
"_integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
|
||||
"_location": "/send",
|
||||
"_phantomChildren": {
|
||||
"ms": "2.0.0"
|
||||
},
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "send@0.16.2",
|
||||
"raw": "send@0.17.1",
|
||||
"name": "send",
|
||||
"escapedName": "send",
|
||||
"rawSpec": "0.16.2",
|
||||
"rawSpec": "0.17.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.16.2"
|
||||
"fetchSpec": "0.17.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/express",
|
||||
"/serve-static"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
|
||||
"_shasum": "6ecca1e0f8c156d141597559848df64730a6bbc1",
|
||||
"_spec": "send@0.16.2",
|
||||
"_resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
|
||||
"_shasum": "c1d8b059f7900f7466dd4938bdc44e11ddb376c8",
|
||||
"_spec": "send@0.17.1",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\express",
|
||||
"author": {
|
||||
"name": "TJ Holowaychuk",
|
||||
@@ -55,27 +53,27 @@
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "~1.6.2",
|
||||
"mime": "1.4.1",
|
||||
"ms": "2.0.0",
|
||||
"http-errors": "~1.7.2",
|
||||
"mime": "1.6.0",
|
||||
"ms": "2.1.1",
|
||||
"on-finished": "~2.3.0",
|
||||
"range-parser": "~1.2.0",
|
||||
"statuses": "~1.4.0"
|
||||
"range-parser": "~1.2.1",
|
||||
"statuses": "~1.5.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Better streaming static file server with Range and conditional-GET support",
|
||||
"devDependencies": {
|
||||
"after": "0.8.2",
|
||||
"eslint": "3.19.0",
|
||||
"eslint-config-standard": "10.2.1",
|
||||
"eslint-plugin-import": "2.8.0",
|
||||
"eslint-plugin-markdown": "1.0.0-beta.6",
|
||||
"eslint-plugin-node": "5.2.1",
|
||||
"eslint-plugin-promise": "3.6.0",
|
||||
"eslint-plugin-standard": "3.0.1",
|
||||
"eslint": "5.16.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.17.2",
|
||||
"eslint-plugin-markdown": "1.0.0",
|
||||
"eslint-plugin-node": "8.0.1",
|
||||
"eslint-plugin-promise": "4.1.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "2.5.3",
|
||||
"supertest": "1.1.0"
|
||||
"mocha": "6.1.4",
|
||||
"supertest": "4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
@@ -104,5 +102,5 @@
|
||||
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot"
|
||||
},
|
||||
"version": "0.16.2"
|
||||
"version": "0.17.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user