@nxtedition/lib 17.2.12 → 17.2.13

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/app.js +11 -0
  2. package/package.json +11 -10
package/app.js CHANGED
@@ -20,6 +20,8 @@ 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'
23
25
 
24
26
  export function makeApp(appConfig, onTerminate) {
25
27
  let ds
@@ -46,6 +48,15 @@ export function makeApp(appConfig, onTerminate) {
46
48
  const isProduction = process.env.NODE_ENV === 'production'
47
49
  const ac = new AbortController()
48
50
 
51
+ const dnsCache = new CacheableLookup()
52
+ undici.setGlobalDispatcher(
53
+ new undici.Agent({
54
+ connect: {
55
+ lookup: dnsCache.lookup,
56
+ },
57
+ }),
58
+ )
59
+
49
60
  // Crash on unhandledRejection
50
61
  process.on('unhandledRejection', (err) => {
51
62
  throw err
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "17.2.12",
3
+ "version": "17.2.13",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -74,9 +74,10 @@
74
74
  "/__tests__"
75
75
  ],
76
76
  "dependencies": {
77
- "@elastic/elasticsearch": "^8.11.0",
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",
80
81
  "date-fns": "^3.1.0",
81
82
  "fast-querystring": "^1.1.1",
82
83
  "hasha": "^6.0.0",
@@ -85,11 +86,11 @@
85
86
  "koa-compose": "^4.1.0",
86
87
  "lodash": "^4.17.21",
87
88
  "mime": "^4.0.1",
88
- "moment-timezone": "^0.5.44",
89
+ "moment-timezone": "^0.5.45",
89
90
  "nconf": "^0.12.1",
90
91
  "nested-error-stacks": "^2.1.1",
91
92
  "object-hash": "^3.0.0",
92
- "pino": "^8.17.2",
93
+ "pino": "^8.18.0",
93
94
  "pino-std-serializers": "^6.2.2",
94
95
  "qs": "^6.11.1",
95
96
  "request-target": "^1.0.2",
@@ -97,13 +98,13 @@
97
98
  "split-string": "^6.0.0",
98
99
  "split2": "^4.2.0",
99
100
  "toobusy-js": "^0.5.1",
100
- "undici": "^6.3.0",
101
+ "undici": "^6.6.2",
101
102
  "url-join": "^5.0.0"
102
103
  },
103
104
  "devDependencies": {
104
- "@nxtedition/deepstream.io-client-js": ">=24.1.0",
105
+ "@nxtedition/deepstream.io-client-js": ">=24.1.2",
105
106
  "@types/lodash": "^4.14.202",
106
- "@types/node": "^20.10.7",
107
+ "@types/node": "^20.11.17",
107
108
  "eslint": "^8.56.0",
108
109
  "eslint-config-prettier": "^9.1.0",
109
110
  "eslint-config-standard": "^17.0.0",
@@ -111,10 +112,10 @@
111
112
  "eslint-plugin-n": "^16.6.1",
112
113
  "eslint-plugin-node": "^11.1.0",
113
114
  "eslint-plugin-promise": "^6.0.0",
114
- "husky": "^8.0.3",
115
- "lint-staged": "^15.2.0",
115
+ "husky": "^9.0.10",
116
+ "lint-staged": "^15.2.2",
116
117
  "pinst": "^3.0.0",
117
- "prettier": "^3.1.1",
118
+ "prettier": "^3.2.5",
118
119
  "rxjs": "^7.5.6",
119
120
  "send": "^0.18.0",
120
121
  "tap": "^18.5.8"