@live-change/dao 0.5.8 → 0.5.9
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/lib/Observable.js
CHANGED
|
@@ -29,7 +29,10 @@ class Observable {
|
|
|
29
29
|
if(signal == 'error') {
|
|
30
30
|
let error = args[0]
|
|
31
31
|
handled = this.handleError(error) || handled
|
|
32
|
-
if(!handled)
|
|
32
|
+
if(!handled) {
|
|
33
|
+
debug("Unhandled observable error: "+ (error.message || error.stack || error))
|
|
34
|
+
debug("Error: ", error)
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
|
|
@@ -448,7 +448,7 @@ class Connection extends EventEmitter {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
dispose() {
|
|
451
|
-
|
|
451
|
+
debug("DISPOSE REACTIVE CONNECTION")
|
|
452
452
|
this.finished = true
|
|
453
453
|
for(const timeout of this.activeTimeouts) clearTimeout(timeout)
|
|
454
454
|
}
|
|
@@ -430,6 +430,9 @@ class ReactiveServerConnection extends EventEmitter {
|
|
|
430
430
|
try {
|
|
431
431
|
const serialized = JSON.stringify(message)
|
|
432
432
|
this.connection.write(serialized)
|
|
433
|
+
if(message.signal == 'error') {
|
|
434
|
+
debug("sending error", JSON.stringify(message, null, 2))
|
|
435
|
+
}
|
|
433
436
|
} catch (error) {
|
|
434
437
|
console.error("MESSAGE SERIALIZATION ERROR", error, "\nMessage: ", message)
|
|
435
438
|
}
|
|
@@ -583,7 +586,7 @@ class ReactiveServerConnection extends EventEmitter {
|
|
|
583
586
|
}
|
|
584
587
|
|
|
585
588
|
handleGetMore(requestId, paths) {
|
|
586
|
-
//console.log("REQ", requestId)
|
|
589
|
+
//console.log("REQ", requestId, paths)
|
|
587
590
|
let fetchMap = new Map()
|
|
588
591
|
let resultsMap = new Map()
|
|
589
592
|
let results = []
|
package/lib/SimpleDao.js
CHANGED
|
@@ -3,7 +3,7 @@ const ObservablePromiseProxy = require("./ObservablePromiseProxy.js")
|
|
|
3
3
|
const ObservableError = require("./ObservableError.js")
|
|
4
4
|
const debug = require("debug")("reactive-dao")
|
|
5
5
|
|
|
6
|
-
const errorMapper = e => ''+(e.stack || e.message || e)
|
|
6
|
+
const errorMapper = e => ''+(e.stack || e.message || (typeof e == 'object' ? JSON.stringify(e) : e))
|
|
7
7
|
|
|
8
8
|
class SimpleDao {
|
|
9
9
|
|
package/package.json
CHANGED