@nxtedition/lib 21.3.11 → 21.4.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/app.js +3 -3
- package/couch.js +2 -2
- package/package.json +1 -1
- package/serializers.js +4 -0
package/app.js
CHANGED
|
@@ -253,9 +253,9 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
253
253
|
let toobusy
|
|
254
254
|
|
|
255
255
|
if (appConfig.toobusy) {
|
|
256
|
-
const resolution = 10
|
|
257
|
-
const interval = 500
|
|
258
|
-
const maxLag = 100
|
|
256
|
+
const resolution = appConfig.toobusy.resolution ?? 10
|
|
257
|
+
const interval = appConfig.toobusy.interval ?? 500
|
|
258
|
+
const maxLag = appConfig.toobusy.maxLag ?? 100
|
|
259
259
|
const id = xuid()
|
|
260
260
|
|
|
261
261
|
const currentLag$ = new rxjs.BehaviorSubject(0)
|
package/couch.js
CHANGED
|
@@ -117,7 +117,7 @@ export function makeCouch(opts) {
|
|
|
117
117
|
* @param {number} [options.heartbeat=60000] - The interval at which to send a heartbeat.
|
|
118
118
|
* @param {function} [options.retry=null] - The function to retry the request on error.
|
|
119
119
|
* @param {string} [options.since=null] - The sequence number to start from.
|
|
120
|
-
* @param {
|
|
120
|
+
* @param {number} [options.highWaterMark=128 * 1024] - Buffering.
|
|
121
121
|
* @yields {Array<{ id: string, seq?: string, doc?: Object, deleted?: boolean, changes: Array<{ rev: string }> }>}
|
|
122
122
|
*/
|
|
123
123
|
async function* changes({ client = defaultClient, signal = null, logger, ...options } = {}) {
|
|
@@ -208,7 +208,7 @@ export function makeCouch(opts) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
const highWaterMark = options.highWaterMark
|
|
211
|
+
const highWaterMark = options.highWaterMark || 128 * 1024
|
|
212
212
|
const live = options.live == null || !!options.live
|
|
213
213
|
const retry =
|
|
214
214
|
options.retry ??
|
package/package.json
CHANGED
package/serializers.js
CHANGED
|
@@ -48,6 +48,7 @@ export default {
|
|
|
48
48
|
res: (res) =>
|
|
49
49
|
res && {
|
|
50
50
|
id: res.id || res.req?.id || getHeader(res, 'request-id') || getHeader(res.req, 'request-id'),
|
|
51
|
+
userAgent: res.userAgent ?? getHeader(res, 'user-agent'),
|
|
51
52
|
timing: getTiming(res),
|
|
52
53
|
statusCode: res.statusCode || res.status,
|
|
53
54
|
bytesWritten: res.bytesWritten,
|
|
@@ -62,6 +63,7 @@ export default {
|
|
|
62
63
|
req: (req) =>
|
|
63
64
|
req && {
|
|
64
65
|
id: req.id || getHeader(req, 'request-id'),
|
|
66
|
+
userAgent: req.userAgent ?? getHeader(req, 'user-agent'),
|
|
65
67
|
timing: getTiming(req),
|
|
66
68
|
method: req.method,
|
|
67
69
|
url: req.url,
|
|
@@ -83,6 +85,7 @@ export default {
|
|
|
83
85
|
ures: (ures) =>
|
|
84
86
|
ures && {
|
|
85
87
|
id: ures.id || getHeader(ures, 'request-id') || getHeader(ures.req, 'request-id'),
|
|
88
|
+
userAgent: ures.userAgent ?? getHeader(ures, 'user-agent'),
|
|
86
89
|
timing: getTiming(ures),
|
|
87
90
|
statusCode: ures.statusCode ?? ures.status,
|
|
88
91
|
bytesRead: ures.bytesRead,
|
|
@@ -113,6 +116,7 @@ export default {
|
|
|
113
116
|
|
|
114
117
|
return {
|
|
115
118
|
id: ureq.id || getHeader(ureq, 'request-id'),
|
|
119
|
+
userAgent: ureq.userAgent ?? getHeader(ureq, 'user-agent'),
|
|
116
120
|
timing: getTiming(ureq),
|
|
117
121
|
method: ureq.method,
|
|
118
122
|
url,
|