@zuplo/cli 6.70.71 → 6.71.1
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/@fastify/reply-from/node_modules/undici/docs/docs/api/Client.md +3 -0
- package/node_modules/@fastify/reply-from/node_modules/undici/docs/docs/api/Cookies.md +27 -0
- package/node_modules/@fastify/reply-from/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/socks5-client.js +14 -4
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/socks5-utils.js +18 -4
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/agent.js +1 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/client-h1.js +69 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -0
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/pool.js +1 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +45 -34
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/util/cache.js +8 -2
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/cookies/parse.js +17 -25
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/websocket/receiver.js +80 -23
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/websocket/websocket.js +8 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/package.json +1 -1
- package/node_modules/@fastify/reply-from/node_modules/undici/types/client.d.ts +16 -0
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/axios/CHANGELOG.md +52 -1
- package/node_modules/axios/README.md +30 -2
- package/node_modules/axios/dist/axios.js +350 -134
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +355 -90
- package/node_modules/axios/dist/esm/axios.js +355 -90
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +399 -104
- package/node_modules/axios/index.d.cts +2 -0
- package/node_modules/axios/index.d.ts +2 -0
- package/node_modules/axios/lib/adapters/fetch.js +113 -37
- package/node_modules/axios/lib/adapters/http.js +132 -43
- package/node_modules/axios/lib/core/Axios.js +3 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +10 -7
- package/node_modules/axios/lib/core/buildFullPath.js +29 -1
- package/node_modules/axios/lib/core/mergeConfig.js +34 -0
- package/node_modules/axios/lib/defaults/transitional.js +1 -0
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +5 -3
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
- package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -3
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -3
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
- package/node_modules/axios/lib/helpers/toFormData.js +40 -10
- package/node_modules/axios/lib/utils.js +75 -11
- package/node_modules/axios/package.json +1 -1
- package/node_modules/body-parser/README.md +16 -1
- package/node_modules/body-parser/index.js +4 -20
- package/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +69 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/body-parser/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/body-parser/node_modules/http-errors/README.md +169 -0
- package/node_modules/body-parser/node_modules/http-errors/index.js +290 -0
- package/node_modules/body-parser/node_modules/http-errors/package.json +54 -0
- package/node_modules/body-parser/package.json +23 -10
- package/node_modules/form-data/CHANGELOG.md +29 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +14 -2
- package/node_modules/form-data/package.json +7 -7
- package/package.json +6 -6
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* http-errors
|
|
3
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Module dependencies.
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
var deprecate = require('depd')('http-errors')
|
|
16
|
+
var setPrototypeOf = require('setprototypeof')
|
|
17
|
+
var statuses = require('statuses')
|
|
18
|
+
var inherits = require('inherits')
|
|
19
|
+
var toIdentifier = require('toidentifier')
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Module exports.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
module.exports = createError
|
|
27
|
+
module.exports.HttpError = createHttpErrorConstructor()
|
|
28
|
+
module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError)
|
|
29
|
+
|
|
30
|
+
// Populate exports for all constructors
|
|
31
|
+
populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError)
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the code class of a status code.
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
function codeClass (status) {
|
|
39
|
+
return Number(String(status).charAt(0) + '00')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create a new HTTP Error.
|
|
44
|
+
*
|
|
45
|
+
* @returns {Error}
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
function createError () {
|
|
50
|
+
// so much arity going on ~_~
|
|
51
|
+
var err
|
|
52
|
+
var msg
|
|
53
|
+
var status = 500
|
|
54
|
+
var props = {}
|
|
55
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
56
|
+
var arg = arguments[i]
|
|
57
|
+
var type = typeof arg
|
|
58
|
+
if (type === 'object' && arg instanceof Error) {
|
|
59
|
+
err = arg
|
|
60
|
+
status = err.status || err.statusCode || status
|
|
61
|
+
} else if (type === 'number' && i === 0) {
|
|
62
|
+
status = arg
|
|
63
|
+
} else if (type === 'string') {
|
|
64
|
+
msg = arg
|
|
65
|
+
} else if (type === 'object') {
|
|
66
|
+
props = arg
|
|
67
|
+
} else {
|
|
68
|
+
throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (typeof status === 'number' && (status < 400 || status >= 600)) {
|
|
73
|
+
deprecate('non-error status code; use only 4xx or 5xx status codes')
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (typeof status !== 'number' ||
|
|
77
|
+
(!statuses.message[status] && (status < 400 || status >= 600))) {
|
|
78
|
+
status = 500
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// constructor
|
|
82
|
+
var HttpError = createError[status] || createError[codeClass(status)]
|
|
83
|
+
|
|
84
|
+
if (!err) {
|
|
85
|
+
// create error
|
|
86
|
+
err = HttpError
|
|
87
|
+
? new HttpError(msg)
|
|
88
|
+
: new Error(msg || statuses.message[status])
|
|
89
|
+
Error.captureStackTrace(err, createError)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (!HttpError || !(err instanceof HttpError) || err.status !== status) {
|
|
93
|
+
// add properties to generic error
|
|
94
|
+
err.expose = status < 500
|
|
95
|
+
err.status = err.statusCode = status
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
for (var key in props) {
|
|
99
|
+
if (key !== 'status' && key !== 'statusCode') {
|
|
100
|
+
err[key] = props[key]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return err
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Create HTTP error abstract base class.
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
function createHttpErrorConstructor () {
|
|
113
|
+
function HttpError () {
|
|
114
|
+
throw new TypeError('cannot construct abstract class')
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
inherits(HttpError, Error)
|
|
118
|
+
|
|
119
|
+
return HttpError
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Create a constructor for a client error.
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
function createClientErrorConstructor (HttpError, name, code) {
|
|
128
|
+
var className = toClassName(name)
|
|
129
|
+
|
|
130
|
+
function ClientError (message) {
|
|
131
|
+
// create the error object
|
|
132
|
+
var msg = message != null ? message : statuses.message[code]
|
|
133
|
+
var err = new Error(msg)
|
|
134
|
+
|
|
135
|
+
// capture a stack trace to the construction point
|
|
136
|
+
Error.captureStackTrace(err, ClientError)
|
|
137
|
+
|
|
138
|
+
// adjust the [[Prototype]]
|
|
139
|
+
setPrototypeOf(err, ClientError.prototype)
|
|
140
|
+
|
|
141
|
+
// redefine the error message
|
|
142
|
+
Object.defineProperty(err, 'message', {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
configurable: true,
|
|
145
|
+
value: msg,
|
|
146
|
+
writable: true
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
// redefine the error name
|
|
150
|
+
Object.defineProperty(err, 'name', {
|
|
151
|
+
enumerable: false,
|
|
152
|
+
configurable: true,
|
|
153
|
+
value: className,
|
|
154
|
+
writable: true
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
return err
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
inherits(ClientError, HttpError)
|
|
161
|
+
nameFunc(ClientError, className)
|
|
162
|
+
|
|
163
|
+
ClientError.prototype.status = code
|
|
164
|
+
ClientError.prototype.statusCode = code
|
|
165
|
+
ClientError.prototype.expose = true
|
|
166
|
+
|
|
167
|
+
return ClientError
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Create function to test is a value is a HttpError.
|
|
172
|
+
* @private
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
function createIsHttpErrorFunction (HttpError) {
|
|
176
|
+
return function isHttpError (val) {
|
|
177
|
+
if (!val || typeof val !== 'object') {
|
|
178
|
+
return false
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (val instanceof HttpError) {
|
|
182
|
+
return true
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return val instanceof Error &&
|
|
186
|
+
typeof val.expose === 'boolean' &&
|
|
187
|
+
typeof val.statusCode === 'number' && val.status === val.statusCode
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Create a constructor for a server error.
|
|
193
|
+
* @private
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
function createServerErrorConstructor (HttpError, name, code) {
|
|
197
|
+
var className = toClassName(name)
|
|
198
|
+
|
|
199
|
+
function ServerError (message) {
|
|
200
|
+
// create the error object
|
|
201
|
+
var msg = message != null ? message : statuses.message[code]
|
|
202
|
+
var err = new Error(msg)
|
|
203
|
+
|
|
204
|
+
// capture a stack trace to the construction point
|
|
205
|
+
Error.captureStackTrace(err, ServerError)
|
|
206
|
+
|
|
207
|
+
// adjust the [[Prototype]]
|
|
208
|
+
setPrototypeOf(err, ServerError.prototype)
|
|
209
|
+
|
|
210
|
+
// redefine the error message
|
|
211
|
+
Object.defineProperty(err, 'message', {
|
|
212
|
+
enumerable: true,
|
|
213
|
+
configurable: true,
|
|
214
|
+
value: msg,
|
|
215
|
+
writable: true
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
// redefine the error name
|
|
219
|
+
Object.defineProperty(err, 'name', {
|
|
220
|
+
enumerable: false,
|
|
221
|
+
configurable: true,
|
|
222
|
+
value: className,
|
|
223
|
+
writable: true
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
return err
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
inherits(ServerError, HttpError)
|
|
230
|
+
nameFunc(ServerError, className)
|
|
231
|
+
|
|
232
|
+
ServerError.prototype.status = code
|
|
233
|
+
ServerError.prototype.statusCode = code
|
|
234
|
+
ServerError.prototype.expose = false
|
|
235
|
+
|
|
236
|
+
return ServerError
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Set the name of a function, if possible.
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
function nameFunc (func, name) {
|
|
245
|
+
var desc = Object.getOwnPropertyDescriptor(func, 'name')
|
|
246
|
+
|
|
247
|
+
if (desc && desc.configurable) {
|
|
248
|
+
desc.value = name
|
|
249
|
+
Object.defineProperty(func, 'name', desc)
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Populate the exports object with constructors for every error class.
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
function populateConstructorExports (exports, codes, HttpError) {
|
|
259
|
+
codes.forEach(function forEachCode (code) {
|
|
260
|
+
var CodeError
|
|
261
|
+
var name = toIdentifier(statuses.message[code])
|
|
262
|
+
|
|
263
|
+
switch (codeClass(code)) {
|
|
264
|
+
case 400:
|
|
265
|
+
CodeError = createClientErrorConstructor(HttpError, name, code)
|
|
266
|
+
break
|
|
267
|
+
case 500:
|
|
268
|
+
CodeError = createServerErrorConstructor(HttpError, name, code)
|
|
269
|
+
break
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (CodeError) {
|
|
273
|
+
// export the constructor
|
|
274
|
+
exports[code] = CodeError
|
|
275
|
+
exports[name] = CodeError
|
|
276
|
+
}
|
|
277
|
+
})
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Get a class name from a name identifier.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} name
|
|
284
|
+
* @returns {string}
|
|
285
|
+
* @private
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
function toClassName (name) {
|
|
289
|
+
return name.slice(-5) === 'Error' ? name : name + 'Error'
|
|
290
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "http-errors",
|
|
3
|
+
"description": "Create HTTP error objects",
|
|
4
|
+
"version": "2.0.1",
|
|
5
|
+
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Alan Plum <me@pluma.io>",
|
|
8
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": "jshttp/http-errors",
|
|
12
|
+
"funding": {
|
|
13
|
+
"type": "opencollective",
|
|
14
|
+
"url": "https://opencollective.com/express"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"depd": "~2.0.0",
|
|
18
|
+
"inherits": "~2.0.4",
|
|
19
|
+
"setprototypeof": "~1.2.0",
|
|
20
|
+
"statuses": "~2.0.2",
|
|
21
|
+
"toidentifier": "~1.0.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"eslint": "7.32.0",
|
|
25
|
+
"eslint-config-standard": "14.1.1",
|
|
26
|
+
"eslint-plugin-import": "2.32.0",
|
|
27
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
28
|
+
"eslint-plugin-node": "11.1.0",
|
|
29
|
+
"eslint-plugin-promise": "5.2.0",
|
|
30
|
+
"eslint-plugin-standard": "4.1.0",
|
|
31
|
+
"mocha": "9.1.3",
|
|
32
|
+
"nyc": "15.1.0"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">= 0.8"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"lint": "eslint . && node ./scripts/lint-readme-list.js",
|
|
39
|
+
"test": "mocha --reporter spec",
|
|
40
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
41
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
42
|
+
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"http",
|
|
46
|
+
"error"
|
|
47
|
+
],
|
|
48
|
+
"files": [
|
|
49
|
+
"index.js",
|
|
50
|
+
"HISTORY.md",
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"README.md"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "body-parser",
|
|
3
3
|
"description": "Node.js body parsing middleware",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -12,28 +12,41 @@
|
|
|
12
12
|
"type": "opencollective",
|
|
13
13
|
"url": "https://opencollective.com/express"
|
|
14
14
|
},
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": "./index.js",
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./json": "./lib/types/json.js",
|
|
20
|
+
"./raw": "./lib/types/raw.js",
|
|
21
|
+
"./text": "./lib/types/text.js",
|
|
22
|
+
"./urlencoded": "./lib/types/urlencoded.js",
|
|
23
|
+
"./lib/*": "./lib/*.js",
|
|
24
|
+
"./lib/*.js": "./lib/*.js",
|
|
25
|
+
"./lib/types/*": "./lib/types/*.js",
|
|
26
|
+
"./lib/types/*.js": "./lib/types/*.js"
|
|
27
|
+
},
|
|
15
28
|
"dependencies": {
|
|
16
29
|
"bytes": "^3.1.2",
|
|
17
|
-
"content-type": "^
|
|
30
|
+
"content-type": "^2.0.0",
|
|
18
31
|
"debug": "^4.4.3",
|
|
19
|
-
"http-errors": "^2.0.
|
|
20
|
-
"iconv-lite": "^0.7.
|
|
32
|
+
"http-errors": "^2.0.1",
|
|
33
|
+
"iconv-lite": "^0.7.2",
|
|
21
34
|
"on-finished": "^2.4.1",
|
|
22
|
-
"qs": "^6.
|
|
23
|
-
"raw-body": "^3.0.
|
|
24
|
-
"type-is": "^2.0
|
|
35
|
+
"qs": "^6.15.2",
|
|
36
|
+
"raw-body": "^3.0.2",
|
|
37
|
+
"type-is": "^2.1.0"
|
|
25
38
|
},
|
|
26
39
|
"devDependencies": {
|
|
27
40
|
"eslint": "^8.57.1",
|
|
28
41
|
"eslint-config-standard": "^14.1.1",
|
|
29
|
-
"eslint-plugin-import": "^2.
|
|
42
|
+
"eslint-plugin-import": "^2.32.0",
|
|
30
43
|
"eslint-plugin-markdown": "^3.0.1",
|
|
31
44
|
"eslint-plugin-node": "^11.1.0",
|
|
32
45
|
"eslint-plugin-promise": "^6.6.0",
|
|
33
46
|
"eslint-plugin-standard": "^4.1.0",
|
|
34
|
-
"mocha": "^11.
|
|
47
|
+
"mocha": "^11.7.6",
|
|
35
48
|
"nyc": "^17.1.0",
|
|
36
|
-
"supertest": "^7.
|
|
49
|
+
"supertest": "^7.2.2"
|
|
37
50
|
},
|
|
38
51
|
"files": [
|
|
39
52
|
"lib/",
|
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v4.0.6](https://github.com/form-data/form-data/compare/v4.0.5...v4.0.6) - 2026-06-12
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] escape CR, LF, and `"` in field names and filenames [`8dff42c`](https://github.com/form-data/form-data/commit/8dff42c6da654ed4e7ad4acb7f8ccd3831217c99)
|
|
13
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`f31d21e`](https://github.com/form-data/form-data/commit/f31d21ef10bf46e46344c3ee4f99acbef6be43e1)
|
|
14
|
+
- [Deps] update `hasown`, `mime-types` [`92ae0eb`](https://github.com/form-data/form-data/commit/92ae0eb5da94d6f01925d5f4fcffb2a1e50ed7cd)
|
|
15
|
+
- [Dev Deps] update `js-randomness-predictor` [`67b0f65`](https://github.com/form-data/form-data/commit/67b0f65c2e0b065a511d42227d35e4d367644e97)
|
|
16
|
+
|
|
8
17
|
## [v4.0.5](https://github.com/form-data/form-data/compare/v4.0.4...v4.0.5) - 2025-11-17
|
|
9
18
|
|
|
10
19
|
### Commits
|
|
@@ -94,7 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
94
103
|
- fix (npmignore): ignore temporary build files [`335ad19`](https://github.com/form-data/form-data/commit/335ad19c6e17dc2d7298ffe0e9b37ba63600e94b)
|
|
95
104
|
- fix: move util.isArray to Array.isArray [`440d3be`](https://github.com/form-data/form-data/commit/440d3bed752ac2f9213b4c2229dbccefe140e5fa)
|
|
96
105
|
|
|
97
|
-
## [v4.0.0](https://github.com/form-data/form-data/compare/v3.0.
|
|
106
|
+
## [v4.0.0](https://github.com/form-data/form-data/compare/v3.0.5...v4.0.0) - 2021-02-15
|
|
98
107
|
|
|
99
108
|
### Merged
|
|
100
109
|
|
|
@@ -105,6 +114,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
105
114
|
- Fix typo [`e705c0a`](https://github.com/form-data/form-data/commit/e705c0a1fdaf90d21501f56460b93e43a18bd435)
|
|
106
115
|
- Update README for custom stream behavior [`6dd8624`](https://github.com/form-data/form-data/commit/6dd8624b2999e32768d62752c9aae5845a803b0d)
|
|
107
116
|
|
|
117
|
+
## [v3.0.5](https://github.com/form-data/form-data/compare/v3.0.4...v3.0.5) - 2026-06-12
|
|
118
|
+
|
|
119
|
+
### Commits
|
|
120
|
+
|
|
121
|
+
- [Fix] escape CR, LF, and `"` in field names and filenames [`8777e67`](https://github.com/form-data/form-data/commit/8777e67fbd0282d3dcba81f974fbdd91062c5b23)
|
|
122
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint`, `tape` [`27c61a5`](https://github.com/form-data/form-data/commit/27c61a5deed84798be105c96605cb8bd00502dcd)
|
|
123
|
+
- [Deps] update `hasown` [`6a8a1c6`](https://github.com/form-data/form-data/commit/6a8a1c6d04da36e15c80b16ecc4c0265082b3213)
|
|
124
|
+
|
|
108
125
|
## [v3.0.4](https://github.com/form-data/form-data/compare/v3.0.3...v3.0.4) - 2025-07-16
|
|
109
126
|
|
|
110
127
|
### Fixed
|
|
@@ -166,7 +183,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
166
183
|
|
|
167
184
|
- feat: add setBoundary method [`55d90ce`](https://github.com/form-data/form-data/commit/55d90ce4a4c22b0ea0647991d85cb946dfb7395b)
|
|
168
185
|
|
|
169
|
-
## [v3.0.0](https://github.com/form-data/form-data/compare/v2.5.
|
|
186
|
+
## [v3.0.0](https://github.com/form-data/form-data/compare/v2.5.6...v3.0.0) - 2019-11-05
|
|
170
187
|
|
|
171
188
|
### Merged
|
|
172
189
|
|
|
@@ -190,6 +207,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
190
207
|
- Pass options to constructor if not used with new [`4bde68e`](https://github.com/form-data/form-data/commit/4bde68e12de1ba90fefad2e7e643f6375b902763)
|
|
191
208
|
- Make userHeaders optional [`2b4e478`](https://github.com/form-data/form-data/commit/2b4e4787031490942f2d1ee55c56b85a250875a7)
|
|
192
209
|
|
|
210
|
+
## [v2.5.6](https://github.com/form-data/form-data/compare/v2.5.5...v2.5.6) - 2026-06-12
|
|
211
|
+
|
|
212
|
+
### Commits
|
|
213
|
+
|
|
214
|
+
- [Fix] escape CR, LF, and `"` in field names and filenames [`b620316`](https://github.com/form-data/form-data/commit/b62031603c2d7c329b2a369b49466790f0ba6314)
|
|
215
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint`, `tape` [`12be578`](https://github.com/form-data/form-data/commit/12be578e936fd77eee75e2e656955f5343c4b80f)
|
|
216
|
+
- [Dev Deps] update `js-randomness-predictor` [`46cfd23`](https://github.com/form-data/form-data/commit/46cfd23bd40be14cfa0391e1c5357c4d74098f23)
|
|
217
|
+
- [Tests] use `safe-buffer` so the header-injection test runs on node < 4 [`633044a`](https://github.com/form-data/form-data/commit/633044a57a7b19f41cec2271ffd24afa2f6280af)
|
|
218
|
+
- [Deps] update `hasown` [`e3b96ee`](https://github.com/form-data/form-data/commit/e3b96eef1661bca8ea4297de057b78bf2734e900)
|
|
219
|
+
|
|
193
220
|
## [v2.5.5](https://github.com/form-data/form-data/compare/v2.5.4...v2.5.5) - 2025-07-18
|
|
194
221
|
|
|
195
222
|
### Commits
|
|
@@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface]
|
|
|
6
6
|
|
|
7
7
|
[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface
|
|
8
8
|
|
|
9
|
-
[](https://travis-ci.org/form-data/form-data)
|
|
10
|
+
[](https://travis-ci.org/form-data/form-data)
|
|
11
|
+
[](https://travis-ci.org/form-data/form-data)
|
|
12
12
|
|
|
13
|
-
[](https://coveralls.io/github/form-data/form-data?branch=master)
|
|
14
14
|
[](https://david-dm.org/form-data/form-data)
|
|
15
15
|
|
|
16
16
|
## Install
|
|
@@ -15,6 +15,18 @@ var setToStringTag = require('es-set-tostringtag');
|
|
|
15
15
|
var hasOwn = require('hasown');
|
|
16
16
|
var populate = require('./populate.js');
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Escape CR, LF, and `"` in a multipart `name`/`filename` parameter, so a field
|
|
20
|
+
* name or filename can not break out of its header line to inject headers or
|
|
21
|
+
* smuggle additional parts. Matches the WHATWG HTML multipart/form-data encoding.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} str - the parameter value to escape
|
|
24
|
+
* @returns {string} the escaped value
|
|
25
|
+
*/
|
|
26
|
+
function escapeHeaderParam(str) {
|
|
27
|
+
return String(str).replace(/\r/g, '%0D').replace(/\n/g, '%0A').replace(/"/g, '%22');
|
|
28
|
+
}
|
|
29
|
+
|
|
18
30
|
/**
|
|
19
31
|
* Create readable "multipart/form-data" streams.
|
|
20
32
|
* Can be used to submit forms
|
|
@@ -180,7 +192,7 @@ FormData.prototype._multiPartHeader = function (field, value, options) {
|
|
|
180
192
|
var contents = '';
|
|
181
193
|
var headers = {
|
|
182
194
|
// add custom disposition as third element or keep it two elements if not
|
|
183
|
-
'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
|
|
195
|
+
'Content-Disposition': ['form-data', 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
|
|
184
196
|
// if no content type. allow it to be empty array
|
|
185
197
|
'Content-Type': [].concat(contentType || [])
|
|
186
198
|
};
|
|
@@ -234,7 +246,7 @@ FormData.prototype._getContentDisposition = function (value, options) { // eslin
|
|
|
234
246
|
}
|
|
235
247
|
|
|
236
248
|
if (filename) {
|
|
237
|
-
return 'filename="' + filename + '"';
|
|
249
|
+
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
238
250
|
}
|
|
239
251
|
};
|
|
240
252
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
|
|
3
3
|
"name": "form-data",
|
|
4
4
|
"description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
|
|
5
|
-
"version": "4.0.
|
|
5
|
+
"version": "4.0.6",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git://github.com/form-data/form-data.git"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"asynckit": "^0.4.0",
|
|
44
44
|
"combined-stream": "^1.0.8",
|
|
45
45
|
"es-set-tostringtag": "^2.1.0",
|
|
46
|
-
"hasown": "^2.0.
|
|
47
|
-
"mime-types": "^2.1.
|
|
46
|
+
"hasown": "^2.0.4",
|
|
47
|
+
"mime-types": "^2.1.35"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@ljharb/eslint-config": "^
|
|
51
|
-
"auto-changelog": "^2.
|
|
50
|
+
"@ljharb/eslint-config": "^22.2.3",
|
|
51
|
+
"auto-changelog": "^2.6.0",
|
|
52
52
|
"browserify": "^13.3.0",
|
|
53
53
|
"browserify-istanbul": "^2.0.0",
|
|
54
54
|
"coveralls": "^3.1.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"in-publish": "^2.0.1",
|
|
61
61
|
"is-node-modern": "^1.0.0",
|
|
62
62
|
"istanbul": "^0.4.5",
|
|
63
|
-
"js-randomness-predictor": "^
|
|
63
|
+
"js-randomness-predictor": "^3.6.0",
|
|
64
64
|
"obake": "^0.1.2",
|
|
65
65
|
"pkgfiles": "^2.3.2",
|
|
66
66
|
"pre-commit": "^1.2.2",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"request": "~2.87.0",
|
|
69
69
|
"rimraf": "^2.7.1",
|
|
70
70
|
"semver": "^6.3.1",
|
|
71
|
-
"tape": "^5.
|
|
71
|
+
"tape": "^5.10.1"
|
|
72
72
|
},
|
|
73
73
|
"license": "MIT",
|
|
74
74
|
"auto-changelog": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.71.1",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@opentelemetry/api": "1.9.0",
|
|
30
30
|
"@sentry/node": "9.22.0",
|
|
31
31
|
"@swc/core": "1.10.18",
|
|
32
|
-
"@zuplo/core": "6.
|
|
32
|
+
"@zuplo/core": "6.71.1",
|
|
33
33
|
"@zuplo/editor": "1.0.20821740935",
|
|
34
|
-
"@zuplo/openapi-tools": "6.
|
|
35
|
-
"@zuplo/runtime": "6.
|
|
34
|
+
"@zuplo/openapi-tools": "6.71.1",
|
|
35
|
+
"@zuplo/runtime": "6.71.1",
|
|
36
36
|
"chalk": "5.4.1",
|
|
37
37
|
"chokidar": "3.5.3",
|
|
38
38
|
"cookie": "1.0.2",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"workerd": "1.20241230.0",
|
|
67
67
|
"yargs": "17.7.2",
|
|
68
68
|
"zod": "3.25.76",
|
|
69
|
-
"@zuplo/graphql": "6.
|
|
70
|
-
"@zuplo/otel": "6.
|
|
69
|
+
"@zuplo/graphql": "6.71.1",
|
|
70
|
+
"@zuplo/otel": "6.71.1"
|
|
71
71
|
},
|
|
72
72
|
"bundleDependencies": [
|
|
73
73
|
"@fastify/cors",
|