@nxtedition/lib 23.10.0 → 23.10.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.
Files changed (2) hide show
  1. package/couch.js +6 -1
  2. package/package.json +1 -1
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.1",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",