@quantiya/codevibe-claude-plugin 1.0.36 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/bin/codevibe-claude +17 -3
- package/dist/server.js +13 -13
- package/hooks/stop.sh +30 -10
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +56 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +30 -30
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +16 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/body-parser/README.md +18 -18
- package/node_modules/body-parser/index.js +6 -15
- package/node_modules/body-parser/lib/read.js +17 -20
- package/node_modules/body-parser/lib/types/json.js +8 -16
- package/node_modules/body-parser/lib/types/raw.js +3 -4
- package/node_modules/body-parser/lib/types/text.js +3 -4
- package/node_modules/body-parser/lib/types/urlencoded.js +8 -8
- package/node_modules/body-parser/lib/utils.js +11 -9
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/content-disposition/README.md +7 -8
- package/node_modules/content-disposition/index.js +118 -40
- package/node_modules/content-disposition/package.json +8 -11
- package/node_modules/express/Readme.md +39 -29
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +5 -6
- package/node_modules/express/lib/response.js +14 -0
- package/node_modules/express/lib/utils.js +3 -1
- package/node_modules/express/package.json +6 -5
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/README.md +26 -23
- package/node_modules/finalhandler/package.json +13 -9
- package/node_modules/graphql/execution/execute.d.ts +14 -1
- package/node_modules/graphql/execution/execute.js +63 -13
- package/node_modules/graphql/execution/execute.mjs +63 -13
- package/node_modules/graphql/execution/subscribe.js +1 -0
- package/node_modules/graphql/execution/subscribe.mjs +2 -0
- package/node_modules/graphql/execution/values.js +4 -4
- package/node_modules/graphql/execution/values.mjs +4 -4
- package/node_modules/graphql/index.d.ts +1 -0
- package/node_modules/graphql/language/ast.d.ts +10 -1
- package/node_modules/graphql/language/ast.js +8 -1
- package/node_modules/graphql/language/ast.mjs +8 -1
- package/node_modules/graphql/language/directiveLocation.d.ts +1 -0
- package/node_modules/graphql/language/directiveLocation.js +1 -0
- package/node_modules/graphql/language/directiveLocation.mjs +1 -0
- package/node_modules/graphql/language/index.d.ts +1 -0
- package/node_modules/graphql/language/kinds.d.ts +1 -0
- package/node_modules/graphql/language/kinds.js +1 -0
- package/node_modules/graphql/language/kinds.mjs +1 -0
- package/node_modules/graphql/language/parser.d.ts +14 -0
- package/node_modules/graphql/language/parser.js +33 -0
- package/node_modules/graphql/language/parser.mjs +33 -0
- package/node_modules/graphql/language/predicates.js +3 -1
- package/node_modules/graphql/language/predicates.mjs +5 -1
- package/node_modules/graphql/language/printer.js +13 -1
- package/node_modules/graphql/language/printer.mjs +13 -1
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/type/directives.d.ts +9 -1
- package/node_modules/graphql/type/directives.js +10 -1
- package/node_modules/graphql/type/directives.mjs +10 -1
- package/node_modules/graphql/type/introspection.js +24 -1
- package/node_modules/graphql/type/introspection.mjs +24 -1
- package/node_modules/graphql/utilities/buildASTSchema.js +4 -0
- package/node_modules/graphql/utilities/buildASTSchema.mjs +4 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +1 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +1 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +2 -2
- package/node_modules/graphql/utilities/coerceInputValue.mjs +2 -2
- package/node_modules/graphql/utilities/extendSchema.js +58 -3
- package/node_modules/graphql/utilities/extendSchema.mjs +58 -3
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +16 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +31 -38
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +31 -38
- package/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +1 -0
- package/node_modules/graphql/utilities/printSchema.js +1 -0
- package/node_modules/graphql/utilities/printSchema.mjs +1 -0
- package/node_modules/graphql/utilities/valueFromAST.js +12 -2
- package/node_modules/graphql/utilities/valueFromAST.mjs +12 -2
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +4 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +4 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +12 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +12 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +5 -11
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -11
- package/node_modules/graphql/validation/validate.js +12 -0
- package/node_modules/graphql/validation/validate.mjs +13 -2
- package/node_modules/graphql/version.js +2 -2
- package/node_modules/graphql/version.mjs +2 -2
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/iconv-lite/lib/index.d.ts +114 -26
- package/node_modules/iconv-lite/lib/index.js +39 -40
- package/node_modules/iconv-lite/package.json +13 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/node_modules/node-abi/abi_registry.json +10 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/README.md +19 -4
- package/node_modules/{semver → node-abi/node_modules/semver}/bin/semver.js +14 -10
- package/node_modules/node-abi/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/index.js +2 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/internal/re.js +1 -1
- package/node_modules/{semver → node-abi/node_modules/semver}/package.json +3 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +5 -4
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.d.ts +3 -0
- package/node_modules/path-to-regexp/dist/index.js +215 -193
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +190 -0
- package/node_modules/qs/README.md +29 -4
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +94 -49
- package/node_modules/qs/lib/utils.js +85 -11
- package/node_modules/qs/package.json +10 -9
- package/node_modules/qs/test/parse.js +391 -13
- package/node_modules/qs/test/stringify.js +16 -3
- package/node_modules/qs/test/utils.js +173 -3
- package/node_modules/send/package.json +11 -8
- package/node_modules/serve-static/README.md +23 -23
- package/node_modules/serve-static/package.json +6 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/node_modules/uuid/dist/v35.js +3 -0
- package/node_modules/uuid/dist/v6.js +3 -0
- package/node_modules/uuid/dist-node/v35.js +3 -0
- package/node_modules/uuid/dist-node/v6.js +3 -0
- package/node_modules/uuid/package.json +1 -1
- package/node_modules/ws/index.js +15 -6
- package/node_modules/ws/lib/constants.js +1 -0
- package/node_modules/ws/lib/permessage-deflate.js +6 -6
- package/node_modules/ws/lib/websocket-server.js +10 -6
- package/node_modules/ws/lib/websocket.js +19 -14
- package/node_modules/ws/package.json +4 -3
- package/node_modules/ws/wrapper.mjs +14 -1
- package/package.json +2 -2
- package/node_modules/content-disposition/HISTORY.md +0 -72
- package/node_modules/express/History.md +0 -3858
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/iconv-lite/Changelog.md +0 -236
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/send/HISTORY.md +0 -580
- package/node_modules/serve-static/HISTORY.md +0 -516
- /package/node_modules/{semver → node-abi/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/comparator.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/range.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/semver.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/coerce.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/diff.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/inc.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/parse.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/constants.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/lrucache.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/parse-options.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/intersects.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/subset.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/valid.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/index.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/license +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/package.json +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/readme.md +0 -0
|
@@ -2,25 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
**Fast, unopinionated, minimalist web framework for [Node.js](https://nodejs.org).**
|
|
4
4
|
|
|
5
|
-
**This project has a [Code of Conduct]
|
|
5
|
+
**This project has a [Code of Conduct].**
|
|
6
6
|
|
|
7
7
|
## Table of contents
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
- [Table of contents](#table-of-contents)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Features](#features)
|
|
12
|
+
- [Docs \& Community](#docs--community)
|
|
13
|
+
- [Quick Start](#quick-start)
|
|
14
|
+
- [Philosophy](#philosophy)
|
|
15
|
+
- [Examples](#examples)
|
|
16
|
+
- [Contributing](#contributing)
|
|
17
|
+
- [Security Issues](#security-issues)
|
|
18
|
+
- [Running Tests](#running-tests)
|
|
19
|
+
- [Current project team members](#current-project-team-members)
|
|
20
|
+
- [TC (Technical Committee)](#tc-technical-committee)
|
|
21
|
+
- [TC emeriti members](#tc-emeriti-members)
|
|
22
|
+
- [Triagers](#triagers)
|
|
23
|
+
- [Emeritus Triagers](#emeritus-triagers)
|
|
24
|
+
- [License](#license)
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
[![NPM Version][npm-version-image]][npm-url]
|
|
23
28
|
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]
|
|
29
|
+
[![Linux Build][github-actions-ci-image]][github-actions-ci-url]
|
|
30
|
+
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
24
31
|
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
|
|
25
32
|
|
|
26
33
|
|
|
@@ -33,7 +40,9 @@ app.get('/', (req, res) => {
|
|
|
33
40
|
res.send('Hello World')
|
|
34
41
|
})
|
|
35
42
|
|
|
36
|
-
app.listen(3000)
|
|
43
|
+
app.listen(3000, () => {
|
|
44
|
+
console.log('Server is running on http://localhost:3000')
|
|
45
|
+
})
|
|
37
46
|
```
|
|
38
47
|
|
|
39
48
|
## Installation
|
|
@@ -137,18 +146,15 @@ node examples/content-negotiation
|
|
|
137
146
|
|
|
138
147
|
## Contributing
|
|
139
148
|
|
|
140
|
-
[![Linux Build][github-actions-ci-image]][github-actions-ci-url]
|
|
141
|
-
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
142
|
-
|
|
143
149
|
The Express.js project welcomes all constructive contributions. Contributions take many forms,
|
|
144
150
|
from code for bug fixes and enhancements, to additions and fixes to documentation, additional
|
|
145
151
|
tests, triaging incoming pull requests and issues, and more!
|
|
146
152
|
|
|
147
|
-
See the [Contributing Guide]
|
|
153
|
+
See the [Contributing Guide] for more technical details on contributing.
|
|
148
154
|
|
|
149
155
|
### Security Issues
|
|
150
156
|
|
|
151
|
-
If you discover a security vulnerability in Express, please see [Security Policies and Procedures](
|
|
157
|
+
If you discover a security vulnerability in Express, please see [Security Policies and Procedures](SECURITY.md).
|
|
152
158
|
|
|
153
159
|
### Running Tests
|
|
154
160
|
|
|
@@ -164,7 +170,9 @@ Then run `npm test`:
|
|
|
164
170
|
npm test
|
|
165
171
|
```
|
|
166
172
|
|
|
167
|
-
##
|
|
173
|
+
## Current project team members
|
|
174
|
+
|
|
175
|
+
For information about the governance of the express.js project, see [GOVERNANCE.md](https://github.com/expressjs/discussions/blob/HEAD/docs/GOVERNANCE.md).
|
|
168
176
|
|
|
169
177
|
The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
170
178
|
|
|
@@ -200,13 +208,11 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
|
200
208
|
* [bjohansebas](https://github.com/bjohansebas) - **Sebastian Beltran**
|
|
201
209
|
* [carpasse](https://github.com/carpasse) - **Carlos Serrano**
|
|
202
210
|
* [CBID2](https://github.com/CBID2) - **Christine Belzie**
|
|
203
|
-
* [dpopp07](https://github.com/dpopp07) - **Dustin Popp**
|
|
204
211
|
* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him)
|
|
205
|
-
* [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi**
|
|
206
212
|
* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him)
|
|
207
213
|
* [Phillip9587](https://github.com/Phillip9587) - **Phillip Barta**
|
|
208
|
-
* [
|
|
209
|
-
|
|
214
|
+
* [efekrskl](https://github.com/efekrskl) - **Efe Karasakal**
|
|
215
|
+
|
|
210
216
|
|
|
211
217
|
<details>
|
|
212
218
|
<summary>Triagers emeriti members</summary>
|
|
@@ -245,7 +251,10 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
|
245
251
|
* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him)
|
|
246
252
|
* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego**
|
|
247
253
|
* [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin**
|
|
248
|
-
|
|
254
|
+
* [dpopp07](https://github.com/dpopp07) - **Dustin Popp**
|
|
255
|
+
* [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger**
|
|
256
|
+
* [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi**
|
|
257
|
+
|
|
249
258
|
</details>
|
|
250
259
|
|
|
251
260
|
|
|
@@ -253,14 +262,15 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
|
|
|
253
262
|
|
|
254
263
|
[MIT](LICENSE)
|
|
255
264
|
|
|
256
|
-
[coveralls-image]: https://
|
|
265
|
+
[coveralls-image]: https://img.shields.io/coverallsCoverage/github/expressjs/express?branch=master
|
|
257
266
|
[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master
|
|
258
|
-
[github-actions-ci-image]: https://
|
|
267
|
+
[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/expressjs/express/ci.yml?branch=master&label=ci
|
|
259
268
|
[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml
|
|
260
|
-
[npm-downloads-image]: https://
|
|
269
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/express
|
|
261
270
|
[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true
|
|
262
271
|
[npm-url]: https://npmjs.org/package/express
|
|
263
|
-
[npm-version-image]: https://
|
|
272
|
+
[npm-version-image]: https://img.shields.io/npm/v/express
|
|
264
273
|
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge
|
|
265
274
|
[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/express
|
|
266
|
-
[Code of Conduct]: https://github.com/expressjs/
|
|
275
|
+
[Code of Conduct]: https://github.com/expressjs/.github/blob/HEAD/CODE_OF_CONDUCT.md
|
|
276
|
+
[Contributing Guide]: https://github.com/expressjs/.github/blob/HEAD/CONTRIBUTING.md
|
|
@@ -597,7 +597,7 @@ app.render = function render(name, options, callback) {
|
|
|
597
597
|
|
|
598
598
|
app.listen = function listen() {
|
|
599
599
|
var server = http.createServer(this)
|
|
600
|
-
var args =
|
|
600
|
+
var args = slice.call(arguments)
|
|
601
601
|
if (typeof args[args.length - 1] === 'function') {
|
|
602
602
|
var done = args[args.length - 1] = once(args[args.length - 1])
|
|
603
603
|
server.once('error', done)
|
|
@@ -169,9 +169,8 @@ req.acceptsCharsets = function(){
|
|
|
169
169
|
* @public
|
|
170
170
|
*/
|
|
171
171
|
|
|
172
|
-
req.acceptsLanguages = function(){
|
|
173
|
-
|
|
174
|
-
return accept.languages.apply(accept, arguments);
|
|
172
|
+
req.acceptsLanguages = function(...languages) {
|
|
173
|
+
return accepts(this).languages(...languages);
|
|
175
174
|
};
|
|
176
175
|
|
|
177
176
|
/**
|
|
@@ -283,12 +282,12 @@ req.is = function is(types) {
|
|
|
283
282
|
*/
|
|
284
283
|
|
|
285
284
|
defineGetter(req, 'protocol', function protocol(){
|
|
286
|
-
var proto = this.
|
|
285
|
+
var proto = this.socket.encrypted
|
|
287
286
|
? 'https'
|
|
288
287
|
: 'http';
|
|
289
288
|
var trust = this.app.get('trust proxy fn');
|
|
290
289
|
|
|
291
|
-
if (!trust(this.
|
|
290
|
+
if (!trust(this.socket.remoteAddress, 0)) {
|
|
292
291
|
return proto;
|
|
293
292
|
}
|
|
294
293
|
|
|
@@ -407,7 +406,7 @@ defineGetter(req, 'host', function host(){
|
|
|
407
406
|
var trust = this.app.get('trust proxy fn');
|
|
408
407
|
var val = this.get('X-Forwarded-Host');
|
|
409
408
|
|
|
410
|
-
if (!val || !trust(this.
|
|
409
|
+
if (!val || !trust(this.socket.remoteAddress, 0)) {
|
|
411
410
|
val = this.get('Host');
|
|
412
411
|
} else if (val.indexOf(',') !== -1) {
|
|
413
412
|
// Note: X-Forwarded-Host is normally only ever a
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
var contentDisposition = require('content-disposition');
|
|
16
16
|
var createError = require('http-errors')
|
|
17
|
+
var deprecate = require('depd')('express');
|
|
17
18
|
var encodeUrl = require('encodeurl');
|
|
18
19
|
var escapeHtml = require('escape-html');
|
|
19
20
|
var http = require('node:http');
|
|
@@ -31,6 +32,7 @@ var send = require('send');
|
|
|
31
32
|
var extname = path.extname;
|
|
32
33
|
var resolve = path.resolve;
|
|
33
34
|
var vary = require('vary');
|
|
35
|
+
const { Buffer } = require('node:buffer');
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* Response prototype.
|
|
@@ -825,6 +827,18 @@ res.redirect = function redirect(url) {
|
|
|
825
827
|
address = arguments[1]
|
|
826
828
|
}
|
|
827
829
|
|
|
830
|
+
if (!address) {
|
|
831
|
+
deprecate('Provide a url argument');
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
if (typeof address !== 'string') {
|
|
835
|
+
deprecate('Url must be a string');
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
if (typeof status !== 'number') {
|
|
839
|
+
deprecate('Status must be a number');
|
|
840
|
+
}
|
|
841
|
+
|
|
828
842
|
// Set location header
|
|
829
843
|
address = this.location(address).get('Location');
|
|
830
844
|
|
|
@@ -18,7 +18,9 @@ var etag = require('etag');
|
|
|
18
18
|
var mime = require('mime-types')
|
|
19
19
|
var proxyaddr = require('proxy-addr');
|
|
20
20
|
var qs = require('qs');
|
|
21
|
-
var querystring = require('querystring');
|
|
21
|
+
var querystring = require('node:querystring');
|
|
22
|
+
const { Buffer } = require('node:buffer');
|
|
23
|
+
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* A list of lowercased HTTP methods that are supported by Node.js.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express",
|
|
3
3
|
"description": "Fast, unopinionated, minimalist web framework",
|
|
4
|
-
"version": "5.1
|
|
4
|
+
"version": "5.2.1",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|
|
@@ -33,12 +33,13 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"accepts": "^2.0.0",
|
|
36
|
-
"body-parser": "^2.2.
|
|
36
|
+
"body-parser": "^2.2.1",
|
|
37
37
|
"content-disposition": "^1.0.0",
|
|
38
38
|
"content-type": "^1.0.5",
|
|
39
39
|
"cookie": "^0.7.1",
|
|
40
40
|
"cookie-signature": "^1.2.1",
|
|
41
41
|
"debug": "^4.4.0",
|
|
42
|
+
"depd": "^2.0.0",
|
|
42
43
|
"encodeurl": "^2.0.0",
|
|
43
44
|
"escape-html": "^1.0.3",
|
|
44
45
|
"etag": "^1.8.1",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"after": "0.8.2",
|
|
65
66
|
"connect-redis": "^8.0.1",
|
|
66
67
|
"cookie-parser": "1.4.7",
|
|
67
|
-
"cookie-session": "2.1.
|
|
68
|
+
"cookie-session": "2.1.1",
|
|
68
69
|
"ejs": "^3.1.10",
|
|
69
70
|
"eslint": "8.47.0",
|
|
70
71
|
"express-session": "^1.18.1",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"marked": "^15.0.3",
|
|
73
74
|
"method-override": "3.0.0",
|
|
74
75
|
"mocha": "^10.7.3",
|
|
75
|
-
"morgan": "1.10.
|
|
76
|
+
"morgan": "1.10.1",
|
|
76
77
|
"nyc": "^17.1.0",
|
|
77
78
|
"pbkdf2-password": "1.2.1",
|
|
78
79
|
"supertest": "^6.3.0",
|
|
@@ -83,13 +84,13 @@
|
|
|
83
84
|
},
|
|
84
85
|
"files": [
|
|
85
86
|
"LICENSE",
|
|
86
|
-
"History.md",
|
|
87
87
|
"Readme.md",
|
|
88
88
|
"index.js",
|
|
89
89
|
"lib/"
|
|
90
90
|
],
|
|
91
91
|
"scripts": {
|
|
92
92
|
"lint": "eslint .",
|
|
93
|
+
"lint:fix": "eslint . --fix",
|
|
93
94
|
"test": "mocha --require test/support/env --reporter spec --check-leaks test/ test/acceptance/",
|
|
94
95
|
"test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test",
|
|
95
96
|
"test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[![Node.js Version][node-image]][node-url]
|
|
6
6
|
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
|
+
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
|
|
8
9
|
|
|
9
10
|
Node.js function to invoke as the final step to respond to HTTP request.
|
|
10
11
|
|
|
@@ -21,7 +22,7 @@ $ npm install finalhandler
|
|
|
21
22
|
## API
|
|
22
23
|
|
|
23
24
|
```js
|
|
24
|
-
|
|
25
|
+
const finalhandler = require('finalhandler')
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
### finalhandler(req, res, [options])
|
|
@@ -59,11 +60,11 @@ as `onerror(err, req, res)`.
|
|
|
59
60
|
### always 404
|
|
60
61
|
|
|
61
62
|
```js
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
const finalhandler = require('finalhandler')
|
|
64
|
+
const http = require('http')
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const server = http.createServer((req, res) => {
|
|
67
|
+
const done = finalhandler(req, res)
|
|
67
68
|
done()
|
|
68
69
|
})
|
|
69
70
|
|
|
@@ -73,14 +74,14 @@ server.listen(3000)
|
|
|
73
74
|
### perform simple action
|
|
74
75
|
|
|
75
76
|
```js
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const finalhandler = require('finalhandler')
|
|
78
|
+
const fs = require('fs')
|
|
79
|
+
const http = require('http')
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
const server = http.createServer((req, res) => {
|
|
82
|
+
const done = finalhandler(req, res)
|
|
82
83
|
|
|
83
|
-
fs.readFile('index.html',
|
|
84
|
+
fs.readFile('index.html', (err, buf) => {
|
|
84
85
|
if (err) return done(err)
|
|
85
86
|
res.setHeader('Content-Type', 'text/html')
|
|
86
87
|
res.end(buf)
|
|
@@ -93,14 +94,14 @@ server.listen(3000)
|
|
|
93
94
|
### use with middleware-style functions
|
|
94
95
|
|
|
95
96
|
```js
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
const finalhandler = require('finalhandler')
|
|
98
|
+
const http = require('http')
|
|
99
|
+
const serveStatic = require('serve-static')
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
const serve = serveStatic('public')
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
const server = http.createServer((req, res) => {
|
|
104
|
+
const done = finalhandler(req, res)
|
|
104
105
|
serve(req, res, done)
|
|
105
106
|
})
|
|
106
107
|
|
|
@@ -110,14 +111,14 @@ server.listen(3000)
|
|
|
110
111
|
### keep log of all errors
|
|
111
112
|
|
|
112
113
|
```js
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
const finalhandler = require('finalhandler')
|
|
115
|
+
const fs = require('fs')
|
|
116
|
+
const http = require('http')
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
const server = http.createServer((req, res) => {
|
|
119
|
+
const done = finalhandler(req, res, { onerror: logerror })
|
|
119
120
|
|
|
120
|
-
fs.readFile('index.html',
|
|
121
|
+
fs.readFile('index.html', (err, buf) => {
|
|
121
122
|
if (err) return done(err)
|
|
122
123
|
res.setHeader('Content-Type', 'text/html')
|
|
123
124
|
res.end(buf)
|
|
@@ -145,3 +146,5 @@ function logerror (err) {
|
|
|
145
146
|
[downloads-url]: https://npmjs.org/package/finalhandler
|
|
146
147
|
[github-actions-ci-image]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml/badge.svg
|
|
147
148
|
[github-actions-ci-url]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml
|
|
149
|
+
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/pillarjs/finalhandler/badge
|
|
150
|
+
[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/pillarjs/finalhandler
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finalhandler",
|
|
3
3
|
"description": "Node.js final http responder",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "pillarjs/finalhandler",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/express"
|
|
11
|
+
},
|
|
8
12
|
"dependencies": {
|
|
9
13
|
"debug": "^4.4.0",
|
|
10
14
|
"encodeurl": "^2.0.0",
|
|
@@ -14,13 +18,13 @@
|
|
|
14
18
|
"statuses": "^2.0.1"
|
|
15
19
|
},
|
|
16
20
|
"devDependencies": {
|
|
17
|
-
"eslint": "7.32.0",
|
|
18
|
-
"eslint-config-standard": "14.1.1",
|
|
19
|
-
"eslint-plugin-import": "2.
|
|
20
|
-
"eslint-plugin-markdown": "2.2.1",
|
|
21
|
-
"eslint-plugin-node": "11.1.0",
|
|
22
|
-
"eslint-plugin-promise": "5.2.0",
|
|
23
|
-
"eslint-plugin-standard": "4.1.0",
|
|
21
|
+
"eslint": "^7.32.0",
|
|
22
|
+
"eslint-config-standard": "^14.1.1",
|
|
23
|
+
"eslint-plugin-import": "^2.31.0",
|
|
24
|
+
"eslint-plugin-markdown": "^2.2.1",
|
|
25
|
+
"eslint-plugin-node": "^11.1.0",
|
|
26
|
+
"eslint-plugin-promise": "^5.2.0",
|
|
27
|
+
"eslint-plugin-standard": "^4.1.0",
|
|
24
28
|
"mocha": "^11.0.1",
|
|
25
29
|
"nyc": "^17.1.0",
|
|
26
30
|
"supertest": "^7.0.0"
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
"index.js"
|
|
32
36
|
],
|
|
33
37
|
"engines": {
|
|
34
|
-
"node": ">= 0.
|
|
38
|
+
"node": ">= 18.0.0"
|
|
35
39
|
},
|
|
36
40
|
"scripts": {
|
|
37
41
|
"lint": "eslint .",
|
|
@@ -55,7 +55,18 @@ export interface ExecutionContext {
|
|
|
55
55
|
fieldResolver: GraphQLFieldResolver<any, any>;
|
|
56
56
|
typeResolver: GraphQLTypeResolver<any, any>;
|
|
57
57
|
subscribeFieldResolver: GraphQLFieldResolver<any, any>;
|
|
58
|
-
|
|
58
|
+
collectedErrors: CollectedErrors;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
declare class CollectedErrors {
|
|
64
|
+
private _errorPositions;
|
|
65
|
+
private _errors;
|
|
66
|
+
constructor();
|
|
67
|
+
get errors(): ReadonlyArray<GraphQLError>;
|
|
68
|
+
add(error: GraphQLError, path: Path | undefined): void;
|
|
69
|
+
private _hasNulledPosition;
|
|
59
70
|
}
|
|
60
71
|
/**
|
|
61
72
|
* The result of GraphQL execution.
|
|
@@ -121,6 +132,7 @@ export declare function executeSync(args: ExecutionArgs): ExecutionResult;
|
|
|
121
132
|
* Essential assertions before executing to provide developer feedback for
|
|
122
133
|
* improper use of the GraphQL library.
|
|
123
134
|
*
|
|
135
|
+
* @deprecated will be removed in v17 in favor of assertValidSchema() and TS checks
|
|
124
136
|
* @internal
|
|
125
137
|
*/
|
|
126
138
|
export declare function assertValidExecutionArguments(
|
|
@@ -188,3 +200,4 @@ export declare function getFieldDef(
|
|
|
188
200
|
parentType: GraphQLObjectType,
|
|
189
201
|
fieldNode: FieldNode,
|
|
190
202
|
): Maybe<GraphQLField<unknown, unknown>>;
|
|
203
|
+
export {};
|
|
@@ -91,6 +91,55 @@ const collectSubfields = (0, _memoize.memoize3)(
|
|
|
91
91
|
* and the fragments defined in the query document
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
class CollectedErrors {
|
|
98
|
+
constructor() {
|
|
99
|
+
this._errorPositions = new Set();
|
|
100
|
+
this._errors = [];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
get errors() {
|
|
104
|
+
return this._errors;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
add(error, path) {
|
|
108
|
+
// Do not modify errors list if the execution position for this error or
|
|
109
|
+
// any of its ancestors has already been nulled via error propagation.
|
|
110
|
+
// This check should be unnecessary for implementations able to implement
|
|
111
|
+
// actual cancellation.
|
|
112
|
+
if (this._hasNulledPosition(path)) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
this._errorPositions.add(path);
|
|
117
|
+
|
|
118
|
+
this._errors.push(error);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_hasNulledPosition(startPath) {
|
|
122
|
+
let path = startPath;
|
|
123
|
+
|
|
124
|
+
while (path !== undefined) {
|
|
125
|
+
if (this._errorPositions.has(path)) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
path = path.prev;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return this._errorPositions.has(undefined);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The result of GraphQL execution.
|
|
137
|
+
*
|
|
138
|
+
* - `errors` is included when any errors occurred as a non-empty array.
|
|
139
|
+
* - `data` is the result of a successful execution of the query.
|
|
140
|
+
* - `extensions` is reserved for adding non-standard properties.
|
|
141
|
+
*/
|
|
142
|
+
|
|
94
143
|
/**
|
|
95
144
|
* Implements the "Executing requests" section of the GraphQL specification.
|
|
96
145
|
*
|
|
@@ -137,18 +186,18 @@ function execute(args) {
|
|
|
137
186
|
|
|
138
187
|
if ((0, _isPromise.isPromise)(result)) {
|
|
139
188
|
return result.then(
|
|
140
|
-
(data) => buildResponse(data, exeContext.errors),
|
|
189
|
+
(data) => buildResponse(data, exeContext.collectedErrors.errors),
|
|
141
190
|
(error) => {
|
|
142
|
-
exeContext.
|
|
143
|
-
return buildResponse(null, exeContext.errors);
|
|
191
|
+
exeContext.collectedErrors.add(error, undefined);
|
|
192
|
+
return buildResponse(null, exeContext.collectedErrors.errors);
|
|
144
193
|
},
|
|
145
194
|
);
|
|
146
195
|
}
|
|
147
196
|
|
|
148
|
-
return buildResponse(result, exeContext.errors);
|
|
197
|
+
return buildResponse(result, exeContext.collectedErrors.errors);
|
|
149
198
|
} catch (error) {
|
|
150
|
-
exeContext.
|
|
151
|
-
return buildResponse(null, exeContext.errors);
|
|
199
|
+
exeContext.collectedErrors.add(error, undefined);
|
|
200
|
+
return buildResponse(null, exeContext.collectedErrors.errors);
|
|
152
201
|
}
|
|
153
202
|
}
|
|
154
203
|
/**
|
|
@@ -185,6 +234,7 @@ function buildResponse(data, errors) {
|
|
|
185
234
|
* Essential assertions before executing to provide developer feedback for
|
|
186
235
|
* improper use of the GraphQL library.
|
|
187
236
|
*
|
|
237
|
+
* @deprecated will be removed in v17 in favor of assertValidSchema() and TS checks
|
|
188
238
|
* @internal
|
|
189
239
|
*/
|
|
190
240
|
|
|
@@ -319,7 +369,7 @@ function buildExecutionContext(args) {
|
|
|
319
369
|
subscribeFieldResolver !== null && subscribeFieldResolver !== void 0
|
|
320
370
|
? subscribeFieldResolver
|
|
321
371
|
: defaultFieldResolver,
|
|
322
|
-
|
|
372
|
+
collectedErrors: new CollectedErrors(),
|
|
323
373
|
};
|
|
324
374
|
}
|
|
325
375
|
/**
|
|
@@ -524,7 +574,7 @@ function executeField(exeContext, parentType, source, fieldNodes, path) {
|
|
|
524
574
|
fieldNodes,
|
|
525
575
|
(0, _Path.pathToArray)(path),
|
|
526
576
|
);
|
|
527
|
-
return handleFieldError(error, returnType, exeContext);
|
|
577
|
+
return handleFieldError(error, returnType, path, exeContext);
|
|
528
578
|
});
|
|
529
579
|
}
|
|
530
580
|
|
|
@@ -535,7 +585,7 @@ function executeField(exeContext, parentType, source, fieldNodes, path) {
|
|
|
535
585
|
fieldNodes,
|
|
536
586
|
(0, _Path.pathToArray)(path),
|
|
537
587
|
);
|
|
538
|
-
return handleFieldError(error, returnType, exeContext);
|
|
588
|
+
return handleFieldError(error, returnType, path, exeContext);
|
|
539
589
|
}
|
|
540
590
|
}
|
|
541
591
|
/**
|
|
@@ -559,7 +609,7 @@ function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {
|
|
|
559
609
|
};
|
|
560
610
|
}
|
|
561
611
|
|
|
562
|
-
function handleFieldError(error, returnType, exeContext) {
|
|
612
|
+
function handleFieldError(error, returnType, path, exeContext) {
|
|
563
613
|
// If the field type is non-nullable, then it is resolved without any
|
|
564
614
|
// protection from errors, however it still properly locates the error.
|
|
565
615
|
if ((0, _definition.isNonNullType)(returnType)) {
|
|
@@ -567,7 +617,7 @@ function handleFieldError(error, returnType, exeContext) {
|
|
|
567
617
|
} // Otherwise, error protection is applied, logging the error and resolving
|
|
568
618
|
// a null value for this field if one is encountered.
|
|
569
619
|
|
|
570
|
-
exeContext.
|
|
620
|
+
exeContext.collectedErrors.add(error, path);
|
|
571
621
|
return null;
|
|
572
622
|
}
|
|
573
623
|
/**
|
|
@@ -732,7 +782,7 @@ function completeListValue(
|
|
|
732
782
|
fieldNodes,
|
|
733
783
|
(0, _Path.pathToArray)(itemPath),
|
|
734
784
|
);
|
|
735
|
-
return handleFieldError(error, itemType, exeContext);
|
|
785
|
+
return handleFieldError(error, itemType, itemPath, exeContext);
|
|
736
786
|
});
|
|
737
787
|
}
|
|
738
788
|
|
|
@@ -743,7 +793,7 @@ function completeListValue(
|
|
|
743
793
|
fieldNodes,
|
|
744
794
|
(0, _Path.pathToArray)(itemPath),
|
|
745
795
|
);
|
|
746
|
-
return handleFieldError(error, itemType, exeContext);
|
|
796
|
+
return handleFieldError(error, itemType, itemPath, exeContext);
|
|
747
797
|
}
|
|
748
798
|
});
|
|
749
799
|
return containsPromise ? Promise.all(completedResults) : completedResults;
|