@nxtedition/lib 17.1.1 → 17.2.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.
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.1.1",
3
+ "version": "17.2.1",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
@@ -60,7 +60,7 @@ class FetchEntry {
60
60
  this.headers = res.headers
61
61
  this.body = await res.text()
62
62
  } catch (err) {
63
- this.error = err
63
+ this.error = Object.assign(err, { data: resource })
64
64
  }
65
65
 
66
66
  if (this.refresh) {
@@ -68,14 +68,14 @@ class FetchEntry {
68
68
  }
69
69
  })
70
70
  .catch((err) => {
71
- this.error = err
71
+ this.error = Object.assign(err, { data: resource })
72
72
 
73
73
  if (this.refresh) {
74
74
  this.refresh()
75
75
  }
76
76
  })
77
77
  } catch (err) {
78
- this.error = err
78
+ this.error = Object.assign(err, { data: resource })
79
79
  this.refresh()
80
80
  }
81
81
  }
@@ -416,6 +416,10 @@ export default function ({ ds, proxify, compiler }) {
416
416
  const key = JSON.stringify({ resource, options })
417
417
  const entry = this._getEntry(key, FetchEntry, { resource, options })
418
418
 
419
+ if (entry.refresh === null) {
420
+ return null
421
+ }
422
+
419
423
  if (entry.error) {
420
424
  throw entry.error
421
425
  }
@@ -438,6 +442,10 @@ export default function ({ ds, proxify, compiler }) {
438
442
 
439
443
  const entry = this._getEntry(observable, ObservableEntry, observable)
440
444
 
445
+ if (entry.refresh === null) {
446
+ return null
447
+ }
448
+
441
449
  if (entry.error) {
442
450
  throw entry.error
443
451
  }
@@ -460,6 +468,10 @@ export default function ({ ds, proxify, compiler }) {
460
468
 
461
469
  const entry = this._getEntry(promise, PromiseEntry, promise)
462
470
 
471
+ if (entry.refresh === null) {
472
+ return null
473
+ }
474
+
463
475
  if (entry.error) {
464
476
  throw entry.error
465
477
  }