@tickernelz/paperclip-pro-server 2026.1022.2 → 2026.1022.3
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/dist/build-info.json +1 -1
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/package.json +21 -21
- package/ui-dist/assets/{Agents.production-Dyj26N-k.js → Agents.production-qEkMZ9pA.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-D1ZhWtz4.js → CompanyActivity.production-nqp6BeGS.js} +1 -1
- package/ui-dist/assets/{CompanyExport-Dsk2q_N9.js → CompanyExport-KsUVavWH.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-C5OiqW2L.js → CompanySkills.production-Dl-Jhhc-.js} +1 -1
- package/ui-dist/assets/{OrgChart.production-BSiEitUK.js → OrgChart.production-BGuoDRFN.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-BK6oJiPk.js → RoutineDetail.production-x0Apn7E0.js} +1 -1
- package/ui-dist/assets/{Routines.production-BDhWu_ZP.js → Routines.production-Cg-1VVYF.js} +1 -1
- package/ui-dist/assets/{definition-BnWzE5bQ.js → definition-BfmcFeiq.js} +1 -1
- package/ui-dist/assets/{index-Vqf4tsRy.js → index-DJc6yrzt.js} +4 -4
- package/ui-dist/index.html +1 -1
- package/ui-dist/sw.js +1 -1
- package/node_modules/on-finished/HISTORY.md +0 -98
package/dist/build-info.json
CHANGED
|
@@ -37,6 +37,10 @@ This module provides the following parsers:
|
|
|
37
37
|
* [Text body parser](#bodyparsertextoptions)
|
|
38
38
|
* [URL-encoded form body parser](#bodyparserurlencodedoptions)
|
|
39
39
|
|
|
40
|
+
All parsers support automatic inflation of `gzip`, `br` (brotli), `deflate`
|
|
41
|
+
and `zstd` encodings. `zstd` is available in Node.js `^22.15.0` and
|
|
42
|
+
`>=23.8.0`.
|
|
43
|
+
|
|
40
44
|
Other body parsers you might be interested in:
|
|
41
45
|
|
|
42
46
|
- [body](https://www.npmjs.com/package/body#readme)
|
|
@@ -65,6 +69,12 @@ The `bodyParser` object exposes various factories to create middlewares. All
|
|
|
65
69
|
middlewares will populate the `req.body` property with the parsed body when
|
|
66
70
|
the `Content-Type` request header matches the `type` option.
|
|
67
71
|
|
|
72
|
+
**Note** As of v2, `req.body` is left `undefined` when no body is parsed (for
|
|
73
|
+
example when the request has neither `Content-Length` nor `Transfer-Encoding`,
|
|
74
|
+
or when `Content-Type` does not match). In v1, `req.body` was always initialized
|
|
75
|
+
to `{}`. Code that assumes `req.body` is always an object should use optional
|
|
76
|
+
chaining (for example `req.body?.username`) or set a default.
|
|
77
|
+
|
|
68
78
|
The various errors returned by this module are described in the
|
|
69
79
|
[errors section](#errors).
|
|
70
80
|
|
|
@@ -72,8 +82,7 @@ The various errors returned by this module are described in the
|
|
|
72
82
|
|
|
73
83
|
Returns middleware that only parses `json` and only looks at requests where
|
|
74
84
|
the `Content-Type` header matches the `type` option. This parser accepts any
|
|
75
|
-
Unicode encoding of the body
|
|
76
|
-
`br` (brotli) and `deflate` encodings.
|
|
85
|
+
Unicode encoding of the body.
|
|
77
86
|
|
|
78
87
|
A new `body` object containing the parsed data is populated on the `request`
|
|
79
88
|
object after the middleware (i.e. `req.body`).
|
|
@@ -110,7 +119,7 @@ argument. You can find more information on this argument
|
|
|
110
119
|
|
|
111
120
|
##### strict
|
|
112
121
|
|
|
113
|
-
When set to `true`, will only accept arrays and objects; when `false
|
|
122
|
+
When set to `true`, it will only accept arrays and objects; when `false`, it will
|
|
114
123
|
accept anything `JSON.parse` accepts. Defaults to `true`.
|
|
115
124
|
|
|
116
125
|
##### type
|
|
@@ -133,9 +142,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
|
|
|
133
142
|
### bodyParser.raw([options])
|
|
134
143
|
|
|
135
144
|
Returns middleware that parses all bodies as a `Buffer` and only looks at
|
|
136
|
-
requests where the `Content-Type` header matches the `type` option.
|
|
137
|
-
parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
|
|
138
|
-
encodings.
|
|
145
|
+
requests where the `Content-Type` header matches the `type` option.
|
|
139
146
|
|
|
140
147
|
A new `body` object containing the parsed data is populated on the `request`
|
|
141
148
|
object after the middleware (i.e. `req.body`). This will be a `Buffer` object
|
|
@@ -181,9 +188,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
|
|
|
181
188
|
### bodyParser.text([options])
|
|
182
189
|
|
|
183
190
|
Returns middleware that parses all bodies as a string and only looks at
|
|
184
|
-
requests where the `Content-Type` header matches the `type` option.
|
|
185
|
-
parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate`
|
|
186
|
-
encodings.
|
|
191
|
+
requests where the `Content-Type` header matches the `type` option.
|
|
187
192
|
|
|
188
193
|
A new `body` string containing the parsed data is populated on the `request`
|
|
189
194
|
object after the middleware (i.e. `req.body`). This will be a string of the
|
|
@@ -234,8 +239,7 @@ encoding of the request. The parsing can be aborted by throwing an error.
|
|
|
234
239
|
|
|
235
240
|
Returns middleware that only parses `urlencoded` bodies and only looks at
|
|
236
241
|
requests where the `Content-Type` header matches the `type` option. This
|
|
237
|
-
parser accepts only UTF-8 and ISO-8859-1 encodings of the body
|
|
238
|
-
automatic inflation of `gzip`, `br` (brotli) and `deflate` encodings.
|
|
242
|
+
parser accepts only UTF-8 and ISO-8859-1 encodings of the body.
|
|
239
243
|
|
|
240
244
|
A new `body` object containing the parsed data is populated on the `request`
|
|
241
245
|
object after the middleware (i.e. `req.body`). This object will contain
|
|
@@ -346,7 +350,7 @@ the entity value that failed parsing.
|
|
|
346
350
|
### entity verify failed
|
|
347
351
|
|
|
348
352
|
This error will occur when the request contained an entity that could not be
|
|
349
|
-
|
|
353
|
+
verified by the defined `verify` option. The `status` property is
|
|
350
354
|
set to `403`, the `type` property is set to `'entity.verify.failed'`, and the
|
|
351
355
|
`body` property is set to the entity value that failed verification.
|
|
352
356
|
|
|
@@ -413,7 +417,7 @@ property is set to the encoding that is unsupported.
|
|
|
413
417
|
|
|
414
418
|
### The input exceeded the depth
|
|
415
419
|
|
|
416
|
-
This error occurs when using `bodyParser.urlencoded` with the `extended` property set to `true` and the input exceeds the configured `depth` option. The `status` property is set to `400`. It is recommended to review the `depth` option and evaluate if it requires a higher value.
|
|
420
|
+
This error occurs when using `bodyParser.urlencoded` with the `extended` property set to `true` and the input exceeds the configured `depth` option. The `status` property is set to `400`. It is recommended to review the `depth` option and evaluate if it requires a higher value. With the default `depth` of `32`, an input with 33 or more levels of nesting gets this error.
|
|
417
421
|
|
|
418
422
|
## Examples
|
|
419
423
|
|
|
@@ -17,7 +17,7 @@ const iconv = require('iconv-lite')
|
|
|
17
17
|
const onFinished = require('on-finished')
|
|
18
18
|
const zlib = require('node:zlib')
|
|
19
19
|
const hasBody = require('type-is').hasBody
|
|
20
|
-
const
|
|
20
|
+
const contentType = require('content-type')
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Module exports.
|
|
@@ -25,6 +25,12 @@ const { getCharset } = require('./utils')
|
|
|
25
25
|
|
|
26
26
|
module.exports = read
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @const
|
|
30
|
+
* whether current node version has zstandard support
|
|
31
|
+
*/
|
|
32
|
+
const hasZstandardSupport = 'createZstdDecompress' in zlib
|
|
33
|
+
|
|
28
34
|
/**
|
|
29
35
|
* Read a request into a buffer and parse.
|
|
30
36
|
*
|
|
@@ -79,38 +85,53 @@ function read (req, res, next, parse, debug, options) {
|
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
let length
|
|
82
|
-
const opts = options
|
|
83
88
|
let stream
|
|
84
89
|
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
const verify = options.verify
|
|
91
|
+
|
|
92
|
+
// assert charset is supported before creating the decompression stream, so an
|
|
93
|
+
// unsupported charset cannot leave a decoder piped with no error listener
|
|
94
|
+
if (verify && encoding !== null && !iconv.encodingExists(encoding)) {
|
|
95
|
+
return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
|
96
|
+
charset: encoding.toLowerCase(),
|
|
97
|
+
type: 'charset.unsupported'
|
|
98
|
+
}))
|
|
99
|
+
}
|
|
87
100
|
|
|
88
101
|
try {
|
|
102
|
+
const contentEncoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
|
|
103
|
+
|
|
104
|
+
debug('content-encoding "%s"', contentEncoding)
|
|
105
|
+
|
|
106
|
+
if (options.inflate === false && contentEncoding !== 'identity') {
|
|
107
|
+
throw createError(415, 'content encoding unsupported', {
|
|
108
|
+
encoding: contentEncoding,
|
|
109
|
+
type: 'encoding.unsupported'
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
|
|
89
113
|
// get the content stream
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
114
|
+
if (contentEncoding === 'identity') {
|
|
115
|
+
length = req.headers['content-length']
|
|
116
|
+
stream = req
|
|
117
|
+
} else {
|
|
118
|
+
stream = createDecompressionStream(contentEncoding, debug)
|
|
119
|
+
req.pipe(stream)
|
|
120
|
+
}
|
|
93
121
|
} catch (err) {
|
|
94
122
|
return next(err)
|
|
95
123
|
}
|
|
96
124
|
|
|
97
125
|
// set raw-body options
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
? null
|
|
101
|
-
:
|
|
102
|
-
|
|
103
|
-
// assert charset is supported
|
|
104
|
-
if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) {
|
|
105
|
-
return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', {
|
|
106
|
-
charset: encoding.toLowerCase(),
|
|
107
|
-
type: 'charset.unsupported'
|
|
108
|
-
}))
|
|
126
|
+
const rawBodyOptions = {
|
|
127
|
+
length,
|
|
128
|
+
encoding: verify ? null : encoding,
|
|
129
|
+
limit: options.limit
|
|
109
130
|
}
|
|
110
131
|
|
|
111
132
|
// read body
|
|
112
133
|
debug('read body')
|
|
113
|
-
getBody(stream,
|
|
134
|
+
getBody(stream, rawBodyOptions, function (error, body) {
|
|
114
135
|
if (error) {
|
|
115
136
|
let _error
|
|
116
137
|
|
|
@@ -138,6 +159,17 @@ function read (req, res, next, parse, debug, options) {
|
|
|
138
159
|
return
|
|
139
160
|
}
|
|
140
161
|
|
|
162
|
+
// detach and destroy the decompression stream to
|
|
163
|
+
// avoid decompression errors on the finished stream
|
|
164
|
+
if (stream !== req) {
|
|
165
|
+
req.unpipe(stream)
|
|
166
|
+
stream.on('error', () => {})
|
|
167
|
+
stream.destroy()
|
|
168
|
+
|
|
169
|
+
// consume any remaining bytes so the HTTP request can finish
|
|
170
|
+
req.resume()
|
|
171
|
+
}
|
|
172
|
+
|
|
141
173
|
// verify
|
|
142
174
|
if (verify) {
|
|
143
175
|
try {
|
|
@@ -145,7 +177,7 @@ function read (req, res, next, parse, debug, options) {
|
|
|
145
177
|
verify(req, res, body, encoding)
|
|
146
178
|
} catch (err) {
|
|
147
179
|
next(createError(403, err, {
|
|
148
|
-
body
|
|
180
|
+
body,
|
|
149
181
|
type: err.type || 'entity.verify.failed'
|
|
150
182
|
}))
|
|
151
183
|
return
|
|
@@ -172,38 +204,6 @@ function read (req, res, next, parse, debug, options) {
|
|
|
172
204
|
})
|
|
173
205
|
}
|
|
174
206
|
|
|
175
|
-
/**
|
|
176
|
-
* Get the content stream of the request.
|
|
177
|
-
*
|
|
178
|
-
* @param {Object} req
|
|
179
|
-
* @param {Function} debug
|
|
180
|
-
* @param {boolean} inflate
|
|
181
|
-
* @returns {Object}
|
|
182
|
-
* @private
|
|
183
|
-
*/
|
|
184
|
-
function contentstream (req, debug, inflate) {
|
|
185
|
-
const encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
|
|
186
|
-
const length = req.headers['content-length']
|
|
187
|
-
|
|
188
|
-
debug('content-encoding "%s"', encoding)
|
|
189
|
-
|
|
190
|
-
if (inflate === false && encoding !== 'identity') {
|
|
191
|
-
throw createError(415, 'content encoding unsupported', {
|
|
192
|
-
encoding: encoding,
|
|
193
|
-
type: 'encoding.unsupported'
|
|
194
|
-
})
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (encoding === 'identity') {
|
|
198
|
-
req.length = length
|
|
199
|
-
return req
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const stream = createDecompressionStream(encoding, debug)
|
|
203
|
-
req.pipe(stream)
|
|
204
|
-
return stream
|
|
205
|
-
}
|
|
206
|
-
|
|
207
207
|
/**
|
|
208
208
|
* Create a decompression stream for the given encoding.
|
|
209
209
|
* @param {string} encoding
|
|
@@ -222,12 +222,16 @@ function createDecompressionStream (encoding, debug) {
|
|
|
222
222
|
case 'br':
|
|
223
223
|
debug('brotli decompress body')
|
|
224
224
|
return zlib.createBrotliDecompress()
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
225
|
+
case 'zstd':
|
|
226
|
+
if (hasZstandardSupport) {
|
|
227
|
+
debug('zstd decompress body')
|
|
228
|
+
return zlib.createZstdDecompress()
|
|
229
|
+
}
|
|
230
230
|
}
|
|
231
|
+
throw createError(415, 'unsupported content encoding "' + encoding + '"', {
|
|
232
|
+
encoding,
|
|
233
|
+
type: 'encoding.unsupported'
|
|
234
|
+
})
|
|
231
235
|
}
|
|
232
236
|
|
|
233
237
|
/**
|
|
@@ -245,3 +249,16 @@ function dump (req, callback) {
|
|
|
245
249
|
req.resume()
|
|
246
250
|
}
|
|
247
251
|
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Get the charset of a request.
|
|
255
|
+
*
|
|
256
|
+
* @param {Object} req
|
|
257
|
+
* @returns {string | undefined}
|
|
258
|
+
* @private
|
|
259
|
+
*/
|
|
260
|
+
function getCharset (req) {
|
|
261
|
+
const header = req.headers['content-type']
|
|
262
|
+
if (!header) return undefined
|
|
263
|
+
return contentType.parse(header).parameters.charset?.toLowerCase()
|
|
264
|
+
}
|
|
@@ -23,7 +23,7 @@ const { normalizeOptions } = require('../utils')
|
|
|
23
23
|
module.exports = json
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* RegExp to match the first non-
|
|
26
|
+
* RegExp to match the first non-whitespace character in a string.
|
|
27
27
|
*
|
|
28
28
|
* Allowed whitespace is defined in RFC 7159:
|
|
29
29
|
*
|
|
@@ -33,7 +33,7 @@ module.exports = json
|
|
|
33
33
|
* %x0A / ; Line feed or New line
|
|
34
34
|
* %x0D ) ; Carriage return
|
|
35
35
|
*/
|
|
36
|
-
const
|
|
36
|
+
const FIRST_NON_WHITESPACE_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d]|$)/ // eslint-disable-line no-control-regex
|
|
37
37
|
|
|
38
38
|
const JSON_SYNTAX_CHAR = '#'
|
|
39
39
|
const JSON_SYNTAX_REGEXP = /#+/g
|
|
@@ -80,10 +80,12 @@ function createJsonParser (options) {
|
|
|
80
80
|
return {}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if (body[0] !== '{' && body[0] !== '[') {
|
|
84
|
+
const first = firstNonWhitespaceChar(body)
|
|
85
|
+
if (first !== '{' && first !== '[') {
|
|
86
|
+
debug('strict violation')
|
|
87
|
+
throw createStrictSyntaxError(body, first)
|
|
88
|
+
}
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
try {
|
|
@@ -152,12 +154,10 @@ function createStrictSyntaxError (str, char) {
|
|
|
152
154
|
* @returns {string|undefined}
|
|
153
155
|
* @private
|
|
154
156
|
*/
|
|
155
|
-
function
|
|
156
|
-
const match =
|
|
157
|
+
function firstNonWhitespaceChar (str) {
|
|
158
|
+
const match = FIRST_NON_WHITESPACE_REGEXP.exec(str)
|
|
157
159
|
|
|
158
|
-
return match
|
|
159
|
-
? match[1]
|
|
160
|
-
: undefined
|
|
160
|
+
return match && match[1] ? match[1] : undefined
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/**
|
|
@@ -98,12 +98,12 @@ function createQueryParser (options) {
|
|
|
98
98
|
try {
|
|
99
99
|
return qs.parse(body, {
|
|
100
100
|
allowPrototypes: true,
|
|
101
|
-
arrayLimit
|
|
102
|
-
depth
|
|
103
|
-
charsetSentinel
|
|
104
|
-
interpretNumericEntities
|
|
101
|
+
arrayLimit,
|
|
102
|
+
depth,
|
|
103
|
+
charsetSentinel,
|
|
104
|
+
interpretNumericEntities,
|
|
105
105
|
charset: encoding,
|
|
106
|
-
parameterLimit
|
|
106
|
+
parameterLimit,
|
|
107
107
|
strictDepth: true
|
|
108
108
|
})
|
|
109
109
|
} catch (err) {
|
|
@@ -5,31 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const bytes = require('bytes')
|
|
8
|
-
const contentType = require('content-type')
|
|
9
8
|
const typeis = require('type-is')
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Module exports.
|
|
13
12
|
*/
|
|
14
13
|
module.exports = {
|
|
15
|
-
getCharset,
|
|
16
14
|
normalizeOptions,
|
|
17
15
|
passthrough
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
/**
|
|
21
|
-
* Get the charset of a request.
|
|
22
|
-
*
|
|
23
|
-
* @param {Object} req
|
|
24
|
-
* @returns {string | undefined}
|
|
25
|
-
* @private
|
|
26
|
-
*/
|
|
27
|
-
function getCharset (req) {
|
|
28
|
-
const header = req.headers['content-type']
|
|
29
|
-
if (!header) return undefined
|
|
30
|
-
return contentType.parse(header).parameters.charset?.toLowerCase()
|
|
31
|
-
}
|
|
32
|
-
|
|
33
18
|
/**
|
|
34
19
|
* Get the simple type checker.
|
|
35
20
|
*
|
|
@@ -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.4.0",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
@@ -27,26 +27,21 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"bytes": "^3.1.2",
|
|
30
|
-
"content-type": "^2.
|
|
30
|
+
"content-type": "^2.1.0",
|
|
31
31
|
"debug": "^4.4.3",
|
|
32
32
|
"http-errors": "^2.0.1",
|
|
33
|
-
"iconv-lite": "^0.7.
|
|
33
|
+
"iconv-lite": "^0.7.3",
|
|
34
34
|
"on-finished": "^2.4.1",
|
|
35
|
-
"qs": "^6.
|
|
35
|
+
"qs": "^6.16.1",
|
|
36
36
|
"raw-body": "^3.0.2",
|
|
37
37
|
"type-is": "^2.1.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"eslint": "^
|
|
41
|
-
"eslint-config-standard": "^14.1.1",
|
|
42
|
-
"eslint-plugin-import": "^2.32.0",
|
|
43
|
-
"eslint-plugin-markdown": "^3.0.1",
|
|
44
|
-
"eslint-plugin-node": "^11.1.0",
|
|
45
|
-
"eslint-plugin-promise": "^6.6.0",
|
|
46
|
-
"eslint-plugin-standard": "^4.1.0",
|
|
40
|
+
"eslint": "^9.39.5",
|
|
47
41
|
"mocha": "^11.7.6",
|
|
42
|
+
"neostandard": "^0.13.0",
|
|
48
43
|
"nyc": "^17.1.0",
|
|
49
|
-
"supertest": "
|
|
44
|
+
"supertest": "7.3.0"
|
|
50
45
|
},
|
|
51
46
|
"files": [
|
|
52
47
|
"lib/",
|
|
@@ -65,10 +65,11 @@ function onFinished (msg, listener) {
|
|
|
65
65
|
|
|
66
66
|
function isFinished (msg) {
|
|
67
67
|
var socket = msg.socket
|
|
68
|
+
var finished = writableEnded(msg)
|
|
68
69
|
|
|
69
|
-
if (typeof
|
|
70
|
+
if (typeof finished === 'boolean') {
|
|
70
71
|
// OutgoingMessage
|
|
71
|
-
return Boolean(
|
|
72
|
+
return Boolean(finished || (socket && !socket.writable))
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (typeof msg.complete === 'boolean') {
|
|
@@ -232,3 +233,14 @@ function wrap (fn) {
|
|
|
232
233
|
// return bound function
|
|
233
234
|
return res.runInAsyncScope.bind(res, fn, null)
|
|
234
235
|
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Determines if a writable stream has finished.
|
|
239
|
+
*
|
|
240
|
+
* @param {Object} res
|
|
241
|
+
* @returns {boolean}
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
function writableEnded (res) {
|
|
245
|
+
return typeof res.writableEnded === 'boolean' ? res.writableEnded : res.finished
|
|
246
|
+
}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "on-finished",
|
|
3
3
|
"description": "Execute a callback when a request closes, finishes, or errors",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.2",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
7
|
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
8
8
|
],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": "jshttp/on-finished",
|
|
11
|
+
"funding": {
|
|
12
|
+
"type": "opencollective",
|
|
13
|
+
"url": "https://opencollective.com/express"
|
|
14
|
+
},
|
|
15
|
+
"type": "commonjs",
|
|
11
16
|
"dependencies": {
|
|
12
17
|
"ee-first": "1.1.1"
|
|
13
18
|
},
|
|
14
19
|
"devDependencies": {
|
|
15
|
-
"eslint": "
|
|
20
|
+
"eslint": "8.17.0",
|
|
16
21
|
"eslint-config-standard": "14.1.1",
|
|
17
|
-
"eslint-plugin-import": "2.
|
|
22
|
+
"eslint-plugin-import": "2.26.0",
|
|
18
23
|
"eslint-plugin-markdown": "2.2.1",
|
|
19
24
|
"eslint-plugin-node": "11.1.0",
|
|
20
|
-
"eslint-plugin-promise": "
|
|
25
|
+
"eslint-plugin-promise": "6.0.0",
|
|
21
26
|
"eslint-plugin-standard": "4.1.0",
|
|
22
|
-
"mocha": "
|
|
27
|
+
"mocha": "12.0.3",
|
|
23
28
|
"nyc": "15.1.0"
|
|
24
29
|
},
|
|
25
30
|
"engines": {
|
|
26
31
|
"node": ">= 0.8"
|
|
27
32
|
},
|
|
28
33
|
"files": [
|
|
29
|
-
"HISTORY.md",
|
|
30
34
|
"LICENSE",
|
|
31
35
|
"index.js"
|
|
32
36
|
],
|
|
33
37
|
"scripts": {
|
|
34
38
|
"lint": "eslint .",
|
|
35
|
-
"test": "mocha --reporter spec --
|
|
39
|
+
"test": "mocha --reporter spec --check-leaks test/",
|
|
36
40
|
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
|
|
37
41
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
38
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tickernelz/paperclip-pro-server",
|
|
3
|
-
"version": "2026.1022.
|
|
3
|
+
"version": "2026.1022.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/tickernelz/paperclip-pro",
|
|
6
6
|
"bugs": {
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
"@openrouter/ai-sdk-provider": "3.1.0",
|
|
55
55
|
"@opentelemetry/api": "^1.9.0",
|
|
56
56
|
"@photon-ai/advanced-imessage": "2.1.0",
|
|
57
|
-
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.1022.
|
|
58
|
-
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.1022.
|
|
59
|
-
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.1022.
|
|
60
|
-
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.1022.
|
|
61
|
-
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.1022.
|
|
62
|
-
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.1022.
|
|
63
|
-
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.1022.
|
|
64
|
-
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.1022.
|
|
65
|
-
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.1022.
|
|
66
|
-
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.1022.
|
|
67
|
-
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.1022.
|
|
68
|
-
"@tickernelz/paperclip-pro-adapter-utils": "2026.1022.
|
|
69
|
-
"@tickernelz/paperclip-pro-db": "2026.1022.
|
|
70
|
-
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.1022.
|
|
71
|
-
"@tickernelz/paperclip-pro-mcp-server": "2026.1022.
|
|
72
|
-
"@tickernelz/paperclip-pro-plugin-sdk": "2026.1022.
|
|
73
|
-
"@tickernelz/paperclip-pro-shared": "2026.1022.
|
|
74
|
-
"@tickernelz/paperclip-pro-skills-catalog": "2026.1022.
|
|
75
|
-
"@tickernelz/paperclip-pro-teams-catalog": "2026.1022.
|
|
57
|
+
"@tickernelz/paperclip-pro-adapter-claude-local": "2026.1022.3",
|
|
58
|
+
"@tickernelz/paperclip-pro-adapter-codex-local": "2026.1022.3",
|
|
59
|
+
"@tickernelz/paperclip-pro-adapter-cursor-cloud": "2026.1022.3",
|
|
60
|
+
"@tickernelz/paperclip-pro-adapter-cursor-local": "2026.1022.3",
|
|
61
|
+
"@tickernelz/paperclip-pro-adapter-gemini-local": "2026.1022.3",
|
|
62
|
+
"@tickernelz/paperclip-pro-adapter-grok-local": "2026.1022.3",
|
|
63
|
+
"@tickernelz/paperclip-pro-adapter-kimi-local": "2026.1022.3",
|
|
64
|
+
"@tickernelz/paperclip-pro-adapter-omp-local": "2026.1022.3",
|
|
65
|
+
"@tickernelz/paperclip-pro-adapter-openclaw-gateway": "2026.1022.3",
|
|
66
|
+
"@tickernelz/paperclip-pro-adapter-opencode-local": "2026.1022.3",
|
|
67
|
+
"@tickernelz/paperclip-pro-adapter-pi-local": "2026.1022.3",
|
|
68
|
+
"@tickernelz/paperclip-pro-adapter-utils": "2026.1022.3",
|
|
69
|
+
"@tickernelz/paperclip-pro-db": "2026.1022.3",
|
|
70
|
+
"@tickernelz/paperclip-pro-hermes-paperclip-adapter": "2026.1022.3",
|
|
71
|
+
"@tickernelz/paperclip-pro-mcp-server": "2026.1022.3",
|
|
72
|
+
"@tickernelz/paperclip-pro-plugin-sdk": "2026.1022.3",
|
|
73
|
+
"@tickernelz/paperclip-pro-shared": "2026.1022.3",
|
|
74
|
+
"@tickernelz/paperclip-pro-skills-catalog": "2026.1022.3",
|
|
75
|
+
"@tickernelz/paperclip-pro-teams-catalog": "2026.1022.3",
|
|
76
76
|
"@vercel/connect": "2.3.3",
|
|
77
77
|
"acorn": "8.18.0",
|
|
78
78
|
"acpx": "0.13.1",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"acpx"
|
|
129
129
|
],
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@tickernelz/paperclip-pro-paperclip-runner": "2026.1022.
|
|
131
|
+
"@tickernelz/paperclip-pro-paperclip-runner": "2026.1022.3",
|
|
132
132
|
"@types/compression": "^1.8.1",
|
|
133
133
|
"@types/express": "^5.0.0",
|
|
134
134
|
"@types/express-serve-static-core": "^5.1.3",
|