@nxtedition/lib 15.0.24 → 15.0.25
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/app.js +2 -0
- package/http.js +2 -2
- package/package.json +1 -1
- package/stream.js +3 -1
package/app.js
CHANGED
|
@@ -495,6 +495,7 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
495
495
|
id: 'app:ds_connection_state',
|
|
496
496
|
level: 30,
|
|
497
497
|
msg: 'ds: connected',
|
|
498
|
+
data: { connectionState },
|
|
498
499
|
},
|
|
499
500
|
]
|
|
500
501
|
: [
|
|
@@ -502,6 +503,7 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
502
503
|
id: 'app:ds_connection_state',
|
|
503
504
|
level: 40,
|
|
504
505
|
msg: 'ds: connecting',
|
|
506
|
+
data: { connectionState },
|
|
505
507
|
},
|
|
506
508
|
],
|
|
507
509
|
),
|
package/http.js
CHANGED
|
@@ -331,11 +331,11 @@ module.exports.delay = defaultDelay
|
|
|
331
331
|
module.exports.isConnectionError = isConnectionError
|
|
332
332
|
|
|
333
333
|
module.exports.retry = async function _retry(fn, options) {
|
|
334
|
-
const { maxRetries = 8, count = maxRetries, delay = defaultDelay } = options ?? {}
|
|
334
|
+
const { maxRetries = 8, count = maxRetries, delay = defaultDelay, signal } = options ?? {}
|
|
335
335
|
|
|
336
336
|
for (let retryCount = 0; true; ++retryCount) {
|
|
337
337
|
try {
|
|
338
|
-
return await fn()
|
|
338
|
+
return await fn({ retryCount, signal })
|
|
339
339
|
} catch (err) {
|
|
340
340
|
if (retryCount >= count) {
|
|
341
341
|
throw err
|
package/package.json
CHANGED
package/stream.js
CHANGED
|
@@ -22,7 +22,9 @@ function readableStreamLength(stream) {
|
|
|
22
22
|
return null
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
stream.read
|
|
25
|
+
if (stream.read) {
|
|
26
|
+
stream.read(0)
|
|
27
|
+
}
|
|
26
28
|
|
|
27
29
|
const state = stream._readableState
|
|
28
30
|
return state && state.ended === true && Number.isFinite(state.length) ? state.length : null
|