Started adding slash commands, doesn't work though

This commit is contained in:
ION606
2022-09-26 15:41:20 +00:00
parent b6495eb886
commit ec4c1200d5
2214 changed files with 159174 additions and 42761 deletions
+8
View File
@@ -1,3 +1,11 @@
1.2.0 / 2022-03-22
==================
* Remove set content headers that break response
* deps: on-finished@2.4.1
* deps: statuses@2.0.1
- Rename `425 Unordered Collection` to standard `425 Too Early`
1.1.2 / 2019-05-09
==================
+1 -1
View File
@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2014-2017 Douglas Christopher Wilson <doug@somethingdoug.com>
Copyright (c) 2014-2022 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
+5 -6
View File
@@ -3,7 +3,7 @@
[![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]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Node.js function to invoke as the final step to respond to HTTP request.
@@ -20,8 +20,6 @@ $ npm install finalhandler
## API
<!-- eslint-disable no-unused-vars -->
```js
var finalhandler = require('finalhandler')
```
@@ -31,7 +29,8 @@ var finalhandler = require('finalhandler')
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`.
be written out to the `res` or `res` will be terminated if a response has already
started.
When an error is written, the following information is added to the response:
@@ -140,9 +139,9 @@ function logerror (err) {
[npm-url]: https://npmjs.org/package/finalhandler
[node-image]: https://img.shields.io/node/v/finalhandler.svg
[node-url]: https://nodejs.org/en/download
[travis-image]: https://img.shields.io/travis/pillarjs/finalhandler.svg
[travis-url]: https://travis-ci.org/pillarjs/finalhandler
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg
[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master
[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg
[downloads-url]: https://npmjs.org/package/finalhandler
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/pillarjs/finalhandler/ci/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/pillarjs/finalhandler?query=workflow%3Aci
+25
View File
@@ -0,0 +1,25 @@
# Security Policies and Procedures
## Reporting a Bug
The `finalhandler` team and community take all security bugs seriously. Thank
you for improving the security of Express. We appreciate your efforts and
responsible disclosure and will make every effort to acknowledge your
contributions.
Report security bugs by emailing the current owner(s) of `finalhandler`. This
information can be found in the npm registry using the command
`npm owner ls finalhandler`.
If unsure or unable to get the information from the above, open an issue
in the [project issue tracker](https://github.com/pillarjs/finalhandler/issues)
asking for the current contact information.
To ensure the timely response to your report, please ensure that the entirety
of the report is contained within the email body and not solely behind a web
link or an attachment.
At least one owner will acknowledge your email within 48 hours, and will send a
more detailed response within 48 hours indicating the next steps in handling
your report. After the initial reply to your report, the owners will
endeavor to keep you informed of the progress towards a fix and full
announcement, and may ask for additional information or guidance.
+8 -3
View File
@@ -1,6 +1,6 @@
/*!
* finalhandler
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* Copyright(c) 2014-2022 Douglas Christopher Wilson
* MIT Licensed
*/
@@ -181,7 +181,7 @@ function getErrorMessage (err, status, env) {
}
}
return msg || statuses[status]
return msg || statuses.message[status]
}
/**
@@ -276,7 +276,12 @@ function send (req, res, status, headers, message) {
// response status
res.statusCode = status
res.statusMessage = statuses[status]
res.statusMessage = statuses.message[status]
// remove any content headers
res.removeHeader('Content-Encoding')
res.removeHeader('Content-Language')
res.removeHeader('Content-Range')
// response headers
setHeaders(res, headers)
+18 -17
View File
@@ -1,7 +1,7 @@
{
"name": "finalhandler",
"description": "Node.js final http responder",
"version": "1.1.2",
"version": "1.2.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"repository": "pillarjs/finalhandler",
@@ -9,37 +9,38 @@
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "~2.3.0",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
"statuses": "~1.5.0",
"statuses": "2.0.1",
"unpipe": "~1.0.0"
},
"devDependencies": {
"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": "6.1.4",
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.2.2",
"nyc": "15.1.0",
"readable-stream": "2.3.6",
"safe-buffer": "5.1.2",
"supertest": "4.0.2"
"safe-buffer": "5.2.1",
"supertest": "6.2.2"
},
"files": [
"LICENSE",
"HISTORY.md",
"SECURITY.md",
"index.js"
],
"engines": {
"node": ">= 0.8"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}