@nxtedition/lib 21.8.1 → 21.8.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/couch.js +15 -19
- package/http.js +1 -1
- package/package.json +16 -16
package/couch.js
CHANGED
|
@@ -108,17 +108,18 @@ export function makeCouch(opts) {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
* @param {Object} [options={}]
|
|
112
|
-
* @param {AbortSignal} [options.signal=null]
|
|
113
|
-
* @param {boolean} [options.descending=false]
|
|
114
|
-
* @param {boolean} [options.include_docs=false]
|
|
115
|
-
* @param {number} [options.seq_interval=null]
|
|
116
|
-
* @param {boolean} [options.live=false]
|
|
117
|
-
* @param {number} [options.heartbeat=60000]
|
|
118
|
-
* @param {function} [options.retry=null]
|
|
119
|
-
* @param {string} [options.since=null]
|
|
120
|
-
* @param {number} [options.highWaterMark=128 * 1024]
|
|
121
|
-
* @param {object} [options.selector=null]
|
|
111
|
+
* @param {Object} [options={}]
|
|
112
|
+
* @param {AbortSignal} [options.signal=null]
|
|
113
|
+
* @param {boolean} [options.descending=false]
|
|
114
|
+
* @param {boolean} [options.include_docs=false]
|
|
115
|
+
* @param {number} [options.seq_interval=null]
|
|
116
|
+
* @param {boolean} [options.live=false]
|
|
117
|
+
* @param {number} [options.heartbeat=60000]
|
|
118
|
+
* @param {function} [options.retry=null]
|
|
119
|
+
* @param {string} [options.since=null]
|
|
120
|
+
* @param {number} [options.highWaterMark=128 * 1024]
|
|
121
|
+
* @param {object} [options.selector=null]
|
|
122
|
+
* @param {import('pino').Logger} [options.logger=null]
|
|
122
123
|
* @return {AsyncGenerator<Array<{ id: string, seq?: string, doc?: Object, deleted?: boolean, changes: Array<{ rev: string }>}> & { lastSeq: string | null | 0 }}
|
|
123
124
|
*/
|
|
124
125
|
async function* changes({ client = defaultClient, signal = null, logger, ...options } = {}) {
|
|
@@ -228,6 +229,7 @@ export function makeCouch(opts) {
|
|
|
228
229
|
body,
|
|
229
230
|
signal: ac.signal,
|
|
230
231
|
client,
|
|
232
|
+
logger,
|
|
231
233
|
})
|
|
232
234
|
} finally {
|
|
233
235
|
ac.abort()
|
|
@@ -249,6 +251,7 @@ export function makeCouch(opts) {
|
|
|
249
251
|
body,
|
|
250
252
|
signal,
|
|
251
253
|
client,
|
|
254
|
+
logger,
|
|
252
255
|
highWaterMark = 128 * 1024,
|
|
253
256
|
blocking = live || !params.limit || params.limit > 256,
|
|
254
257
|
}) {
|
|
@@ -277,18 +280,11 @@ export function makeCouch(opts) {
|
|
|
277
280
|
bodyTimeout: 2 * (params.heartbeat || 60e3),
|
|
278
281
|
highWaterMark,
|
|
279
282
|
dispatcher: client,
|
|
283
|
+
logger,
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
const ures = await undiciRequest(ureq)
|
|
283
287
|
|
|
284
|
-
if (ures.statusCode < 200 || ures.statusCode >= 300) {
|
|
285
|
-
throw makeError(ureq, {
|
|
286
|
-
status: ures.statusCode,
|
|
287
|
-
headers: ures.headers,
|
|
288
|
-
data: await ures.body.text(),
|
|
289
|
-
})
|
|
290
|
-
}
|
|
291
|
-
|
|
292
288
|
retryCount = 0
|
|
293
289
|
|
|
294
290
|
src = ures.body
|
package/http.js
CHANGED
|
@@ -91,7 +91,7 @@ export class Context {
|
|
|
91
91
|
|
|
92
92
|
get query() {
|
|
93
93
|
if (this.#query === undefined) {
|
|
94
|
-
this.#query = this.url.search.length > 1 ? querystring.parse(this.url.search.slice(1)) :
|
|
94
|
+
this.#query = this.url.search.length > 1 ? querystring.parse(this.url.search.slice(1)) : {}
|
|
95
95
|
}
|
|
96
96
|
return this.#query
|
|
97
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/lib",
|
|
3
|
-
"version": "21.8.
|
|
3
|
+
"version": "21.8.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Robert Nagy <robert.nagy@boffins.se>",
|
|
6
6
|
"type": "module",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"singleQuote": true
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@aws-sdk/client-s3": "^3.
|
|
58
|
-
"@elastic/elasticsearch": "^8.15.
|
|
59
|
-
"@elastic/transport": "^8.
|
|
60
|
-
"@nxtedition/nxt-undici": "^4.2.
|
|
57
|
+
"@aws-sdk/client-s3": "^3.679.0",
|
|
58
|
+
"@elastic/elasticsearch": "^8.15.1",
|
|
59
|
+
"@elastic/transport": "^8.9.1",
|
|
60
|
+
"@nxtedition/nxt-undici": "^4.2.20",
|
|
61
61
|
"content-type": "^1.0.5",
|
|
62
62
|
"date-fns": "^3.6.0",
|
|
63
63
|
"fast-querystring": "^1.1.1",
|
|
@@ -66,42 +66,42 @@
|
|
|
66
66
|
"json5": "^2.2.3",
|
|
67
67
|
"koa-compose": "^4.1.0",
|
|
68
68
|
"lodash": "^4.17.21",
|
|
69
|
-
"lru-cache": "^11.0.
|
|
69
|
+
"lru-cache": "^11.0.1",
|
|
70
70
|
"mime": "^4.0.4",
|
|
71
|
-
"moment-timezone": "^0.5.
|
|
71
|
+
"moment-timezone": "^0.5.46",
|
|
72
72
|
"nconf": "^0.12.1",
|
|
73
73
|
"nested-error-stacks": "^2.1.1",
|
|
74
74
|
"object-hash": "^3.0.0",
|
|
75
75
|
"p-queue": "^8.0.1",
|
|
76
|
-
"pino": "^9.
|
|
76
|
+
"pino": "^9.5.0",
|
|
77
77
|
"qs": "^6.13.0",
|
|
78
78
|
"request-target": "^1.0.2",
|
|
79
79
|
"smpte-timecode": "^1.3.6",
|
|
80
80
|
"split-string": "^6.0.0",
|
|
81
|
-
"undici": "^6.
|
|
81
|
+
"undici": "^6.20.1",
|
|
82
82
|
"url-join": "^5.0.0",
|
|
83
83
|
"xuid": "^4.1.3",
|
|
84
84
|
"yocto-queue": "^1.1.1"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@nxtedition/deepstream.io-client-js": ">=25.6.3",
|
|
88
|
-
"@types/lodash": "^4.17.
|
|
89
|
-
"@types/node": "^22.
|
|
90
|
-
"eslint": "^9.
|
|
88
|
+
"@types/lodash": "^4.17.12",
|
|
89
|
+
"@types/node": "^22.7.9",
|
|
90
|
+
"eslint": "^9.13.0",
|
|
91
91
|
"eslint-config-prettier": "^9.1.0",
|
|
92
92
|
"eslint-config-standard": "^17.0.0",
|
|
93
|
-
"eslint-plugin-import": "^2.
|
|
94
|
-
"eslint-plugin-n": "^17.
|
|
93
|
+
"eslint-plugin-import": "^2.31.0",
|
|
94
|
+
"eslint-plugin-n": "^17.11.1",
|
|
95
95
|
"eslint-plugin-node": "^11.1.0",
|
|
96
96
|
"eslint-plugin-promise": "^7.1.0",
|
|
97
|
-
"husky": "^9.1.
|
|
97
|
+
"husky": "^9.1.6",
|
|
98
98
|
"lint-staged": "^15.2.10",
|
|
99
99
|
"pinst": "^3.0.0",
|
|
100
100
|
"prettier": "^3.3.3",
|
|
101
101
|
"rxjs": "^7.5.6",
|
|
102
102
|
"send": "^0.18.0",
|
|
103
103
|
"tap": "^21.0.1",
|
|
104
|
-
"typescript-eslint": "^8.
|
|
104
|
+
"typescript-eslint": "^8.11.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@elastic/elasticsearch": "^8.6.0",
|