@nxtedition/lib 17.2.0 → 17.2.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
@@ -166,7 +166,12 @@ export function makeApp(appConfig, onTerminate) {
166
166
  }
167
167
 
168
168
  setTimeout(() => {
169
- process.abort()
169
+ logger.error('aborting')
170
+ if (isMainThread) {
171
+ process.abort()
172
+ } else {
173
+ // TODO (fix): What to do here?
174
+ }
170
175
  }, 10e3).unref()
171
176
  }
172
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "17.2.0",
3
+ "version": "17.2.2",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -33,7 +33,6 @@ class TimerEntry {
33
33
 
34
34
  const fetchClient = new undici.Agent({
35
35
  connections: 128,
36
- pipelining: 8,
37
36
  })
38
37
 
39
38
  class FetchEntry {
@@ -54,23 +53,23 @@ class FetchEntry {
54
53
  dispatcher: fetchClient,
55
54
  })
56
55
  .then(async (res) => {
57
- try {
58
- // TODO (fix): max size...
59
- this.status = res.statusCode
60
- this.headers = res.headers
61
- this.body = await res.text()
62
- } catch (err) {
63
- this.error = Object.assign(err, { data: resource })
64
- }
65
-
66
56
  if (this.refresh) {
57
+ try {
58
+ // TODO (fix): max size...
59
+ this.status = res.statusCode
60
+ this.headers = res.headers
61
+ this.body = await res.text()
62
+ } catch (err) {
63
+ this.error = Object.assign(err, { data: resource })
64
+ }
67
65
  this.refresh()
66
+ } else {
67
+ res.dump()
68
68
  }
69
69
  })
70
70
  .catch((err) => {
71
- this.error = Object.assign(err, { data: resource })
72
-
73
71
  if (this.refresh) {
72
+ this.error = Object.assign(err, { data: resource })
74
73
  this.refresh()
75
74
  }
76
75
  })