@nxtedition/lib 23.10.0 → 23.10.2

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 CHANGED
@@ -632,7 +632,7 @@ export function makeApp(appConfig, onTerminate) {
632
632
  ),
633
633
  rx.map(([serviceStats, appStats, undiciStats]) => ({
634
634
  ...appStats,
635
- undici: undici$,
635
+ undici: undiciStats,
636
636
  [serviceName]: serviceStats,
637
637
  })),
638
638
  rx.retryWhen((err$) =>
package/couch.d.ts CHANGED
@@ -16,6 +16,7 @@ export interface CouchRequestOptions<Stream extends boolean = false> {
16
16
  body?: unknown
17
17
  headersTimeout?: number
18
18
  bodyTimeout?: number
19
+ dispatcher: undici.Dispatcher
19
20
  query?: {
20
21
  startkey?: string
21
22
  endkey?: string
package/couch.js CHANGED
@@ -1052,6 +1052,11 @@ const defaultDispatcher = new Agent({
1052
1052
  connections: 8,
1053
1053
  connectTimeout: 2e3,
1054
1054
  })
1055
+ const blockingDispatcher = new Agent({
1056
+ pipelining: 1,
1057
+ connections: 1024,
1058
+ connectTimeout: 2e3,
1059
+ })
1055
1060
 
1056
1061
  export function request(url, opts) {
1057
1062
  if (typeof url === 'string') {
@@ -1101,7 +1106,7 @@ export function request(url, opts) {
1101
1106
  opts.body != null && typeof opts.body === 'object' ? JSON.stringify(opts.body) : opts.body,
1102
1107
  }
1103
1108
 
1104
- const dispatcher = opts.dispatcher ?? defaultDispatcher
1109
+ const dispatcher = opts.dispatcher ?? (ureq.blocking ? blockingDispatcher : defaultDispatcher)
1105
1110
  const signal = opts.signal
1106
1111
 
1107
1112
  if (opts.stream) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.10.0",
3
+ "version": "23.10.2",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",