@nxtedition/lib 18.0.5 → 18.0.6
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 +0 -13
- package/couch.js +5 -2
- package/package.json +1 -2
package/app.js
CHANGED
|
@@ -20,8 +20,6 @@ import hashString from './hash.js'
|
|
|
20
20
|
import { makeTrace } from './trace.js'
|
|
21
21
|
import compose from 'koa-compose'
|
|
22
22
|
import { createServer } from './http.js'
|
|
23
|
-
import CacheableLookup from 'cacheable-lookup'
|
|
24
|
-
import undici from 'undici'
|
|
25
23
|
|
|
26
24
|
export function makeApp(appConfig, onTerminate) {
|
|
27
25
|
let ds
|
|
@@ -50,17 +48,6 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
50
48
|
const isProduction = process.env.NODE_ENV === 'production'
|
|
51
49
|
const ac = new AbortController()
|
|
52
50
|
|
|
53
|
-
const dnsCache = new CacheableLookup({
|
|
54
|
-
maxTtl: 10e3,
|
|
55
|
-
})
|
|
56
|
-
undici.setGlobalDispatcher(
|
|
57
|
-
new undici.Agent({
|
|
58
|
-
connect: {
|
|
59
|
-
lookup: dnsCache.lookup,
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
)
|
|
63
|
-
|
|
64
51
|
// Crash on unhandledRejection
|
|
65
52
|
process.on('unhandledRejection', (err) => {
|
|
66
53
|
throw err
|
package/couch.js
CHANGED
|
@@ -379,8 +379,11 @@ export function makeCouch(opts) {
|
|
|
379
379
|
throw err
|
|
380
380
|
} else if (typeof retry === 'function') {
|
|
381
381
|
const retryState = { since: params.since }
|
|
382
|
-
Object.assign(
|
|
383
|
-
|
|
382
|
+
Object.assign(
|
|
383
|
+
retryState,
|
|
384
|
+
await retry(err, retryCount++, retryState, { signal }, () =>
|
|
385
|
+
delay(err, retryCount, { signal }),
|
|
386
|
+
),
|
|
384
387
|
)
|
|
385
388
|
params.since = retryState.since ?? 0
|
|
386
389
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/lib",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Robert Nagy <robert.nagy@boffins.se>",
|
|
6
6
|
"type": "module",
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"@elastic/elasticsearch": "^8.12.1",
|
|
78
78
|
"@elastic/transport": "^8.4.0",
|
|
79
79
|
"@nxtedition/nxt-undici": "^2.0.35",
|
|
80
|
-
"cacheable-lookup": "^7.0.0",
|
|
81
80
|
"date-fns": "^3.1.0",
|
|
82
81
|
"fast-querystring": "^1.1.1",
|
|
83
82
|
"hasha": "^6.0.0",
|