step-node-agent 3.21.0 → 3.21.2
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/node_modules/body-parser/HISTORY.md +8 -0
- package/node_modules/body-parser/README.md +11 -10
- package/node_modules/body-parser/lib/types/json.js +15 -4
- package/node_modules/body-parser/package.json +8 -8
- package/node_modules/express/node_modules/body-parser/HISTORY.md +657 -0
- package/node_modules/express/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/express/node_modules/body-parser/README.md +464 -0
- package/node_modules/express/node_modules/body-parser/SECURITY.md +25 -0
- package/node_modules/express/node_modules/body-parser/index.js +156 -0
- package/node_modules/express/node_modules/body-parser/lib/read.js +205 -0
- package/node_modules/express/node_modules/body-parser/lib/types/json.js +236 -0
- package/node_modules/express/node_modules/body-parser/lib/types/raw.js +101 -0
- package/node_modules/express/node_modules/body-parser/lib/types/text.js +121 -0
- package/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js +284 -0
- package/node_modules/express/node_modules/body-parser/package.json +56 -0
- package/node_modules/express/node_modules/raw-body/HISTORY.md +303 -0
- package/node_modules/express/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/express/node_modules/raw-body/README.md +223 -0
- package/node_modules/express/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/express/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/express/node_modules/raw-body/index.js +329 -0
- package/node_modules/express/node_modules/raw-body/package.json +49 -0
- package/node_modules/graceful-fs/package.json +6 -3
- package/node_modules/graceful-fs/polyfills.js +1 -1
- package/node_modules/raw-body/HISTORY.md +5 -0
- package/node_modules/raw-body/README.md +1 -1
- package/node_modules/raw-body/index.js +7 -0
- package/node_modules/raw-body/package.json +7 -7
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# body-parser
|
|
2
2
|
|
|
3
|
-
[![NPM Version][npm-image]][npm-url]
|
|
4
|
-
[![NPM Downloads][downloads-image]][
|
|
5
|
-
[![Build Status][
|
|
3
|
+
[![NPM Version][npm-version-image]][npm-url]
|
|
4
|
+
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
|
+
[![Build Status][ci-image]][ci-url]
|
|
6
6
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
7
7
|
|
|
8
8
|
Node.js body parsing middleware.
|
|
@@ -454,11 +454,12 @@ app.use(bodyParser.text({ type: 'text/html' }))
|
|
|
454
454
|
|
|
455
455
|
[MIT](LICENSE)
|
|
456
456
|
|
|
457
|
-
[
|
|
458
|
-
[
|
|
459
|
-
[coveralls-image]: https://
|
|
457
|
+
[ci-image]: https://badgen.net/github/checks/expressjs/body-parser/master?label=ci
|
|
458
|
+
[ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml
|
|
459
|
+
[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/body-parser/master
|
|
460
460
|
[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
|
|
461
|
-
[
|
|
462
|
-
[
|
|
463
|
-
[
|
|
464
|
-
[
|
|
461
|
+
[node-version-image]: https://badgen.net/npm/node/body-parser
|
|
462
|
+
[node-version-url]: https://nodejs.org/en/download
|
|
463
|
+
[npm-downloads-image]: https://badgen.net/npm/dm/body-parser
|
|
464
|
+
[npm-url]: https://npmjs.org/package/body-parser
|
|
465
|
+
[npm-version-image]: https://badgen.net/npm/v/body-parser
|
|
@@ -39,6 +39,9 @@ module.exports = json
|
|
|
39
39
|
|
|
40
40
|
var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex
|
|
41
41
|
|
|
42
|
+
var JSON_SYNTAX_CHAR = '#'
|
|
43
|
+
var JSON_SYNTAX_REGEXP = /#+/g
|
|
44
|
+
|
|
42
45
|
/**
|
|
43
46
|
* Create a middleware to parse JSON bodies.
|
|
44
47
|
*
|
|
@@ -152,15 +155,23 @@ function json (options) {
|
|
|
152
155
|
|
|
153
156
|
function createStrictSyntaxError (str, char) {
|
|
154
157
|
var index = str.indexOf(char)
|
|
155
|
-
var partial =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
var partial = ''
|
|
159
|
+
|
|
160
|
+
if (index !== -1) {
|
|
161
|
+
partial = str.substring(0, index) + JSON_SYNTAX_CHAR
|
|
162
|
+
|
|
163
|
+
for (var i = index + 1; i < str.length; i++) {
|
|
164
|
+
partial += JSON_SYNTAX_CHAR
|
|
165
|
+
}
|
|
166
|
+
}
|
|
158
167
|
|
|
159
168
|
try {
|
|
160
169
|
JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation')
|
|
161
170
|
} catch (e) {
|
|
162
171
|
return normalizeJsonSyntaxError(e, {
|
|
163
|
-
message: e.message.replace(
|
|
172
|
+
message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) {
|
|
173
|
+
return str.substring(index, index + placeholder.length)
|
|
174
|
+
}),
|
|
164
175
|
stack: e.stack
|
|
165
176
|
})
|
|
166
177
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "body-parser",
|
|
3
3
|
"description": "Node.js body parsing middleware",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "expressjs/body-parser",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"bytes": "3.1.2",
|
|
13
|
-
"content-type": "~1.0.
|
|
13
|
+
"content-type": "~1.0.5",
|
|
14
14
|
"debug": "2.6.9",
|
|
15
15
|
"depd": "2.0.0",
|
|
16
16
|
"destroy": "1.2.0",
|
|
@@ -18,23 +18,23 @@
|
|
|
18
18
|
"iconv-lite": "0.4.24",
|
|
19
19
|
"on-finished": "2.4.1",
|
|
20
20
|
"qs": "6.11.0",
|
|
21
|
-
"raw-body": "2.5.
|
|
21
|
+
"raw-body": "2.5.2",
|
|
22
22
|
"type-is": "~1.6.18",
|
|
23
23
|
"unpipe": "1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"eslint": "8.
|
|
26
|
+
"eslint": "8.34.0",
|
|
27
27
|
"eslint-config-standard": "14.1.1",
|
|
28
|
-
"eslint-plugin-import": "2.
|
|
28
|
+
"eslint-plugin-import": "2.27.5",
|
|
29
29
|
"eslint-plugin-markdown": "3.0.0",
|
|
30
30
|
"eslint-plugin-node": "11.1.0",
|
|
31
|
-
"eslint-plugin-promise": "6.
|
|
31
|
+
"eslint-plugin-promise": "6.1.1",
|
|
32
32
|
"eslint-plugin-standard": "4.1.0",
|
|
33
33
|
"methods": "1.1.2",
|
|
34
|
-
"mocha": "10.
|
|
34
|
+
"mocha": "10.2.0",
|
|
35
35
|
"nyc": "15.1.0",
|
|
36
36
|
"safe-buffer": "5.2.1",
|
|
37
|
-
"supertest": "6.3.
|
|
37
|
+
"supertest": "6.3.3"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
40
|
"lib/",
|