@live-change/db-server 0.9.44 → 0.9.46

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/bin/server.js CHANGED
@@ -17,8 +17,9 @@ import {
17
17
  } from "@live-change/server"
18
18
 
19
19
  process.on('unhandledRejection', (reason, promise) => {
20
- console.error('Unhandled Promise Rejection', (reason && reason.stack) || reason, "Promise:", promise)
21
- //process.exit(1) // TODO: database should not fail because of it, but it should be logged somewhere
20
+ console.error('Unhandled Promise Rejection',
21
+ "reason", reason, "stack", reason.stack, "promise", promise)
22
+ //process.exit(1) // TODO: database should not fail because of it, but it should be logged somewhere
22
23
  })
23
24
 
24
25
  process.on('uncaughtException', function (err) {
package/lib/Server.js CHANGED
@@ -407,7 +407,8 @@ class Server {
407
407
  }
408
408
 
409
409
  handleUnhandledRejectionInQuery(reason, promise) {
410
- console.error("ERROR IN USER CODE:", reason.stack)
410
+ console.error("ERROR IN USER CODE:", reason.stack, "REASON:", reason, "PROMISE:", promise)
411
+
411
412
  let rest = reason.stack
412
413
  while(true) {
413
414
  const match = rest.match(/\s(userCode:([a-z0-9_.\/-]+):([0-9]+):([0-9]+))\n/i)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/db-server",
3
- "version": "0.9.44",
3
+ "version": "0.9.46",
4
4
  "description": "Database with observable data for live queries",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,18 +29,18 @@
29
29
  "tape": "^5.7.4"
30
30
  },
31
31
  "dependencies": {
32
- "@live-change/dao": "^0.9.44",
33
- "@live-change/dao-message": "^0.9.44",
34
- "@live-change/dao-sockjs": "^0.9.44",
35
- "@live-change/dao-websocket": "^0.9.44",
36
- "@live-change/db": "^0.9.44",
37
- "@live-change/db-admin": "^0.9.44",
38
- "@live-change/db-client": "^0.9.44",
39
- "@live-change/db-store-level": "^0.9.44",
40
- "@live-change/db-store-lmdb": "^0.9.44",
41
- "@live-change/db-store-observable-db": "^0.9.44",
42
- "@live-change/db-store-rbtree": "^0.9.44",
43
- "@live-change/server": "^0.9.44",
32
+ "@live-change/dao": "^0.9.46",
33
+ "@live-change/dao-message": "^0.9.46",
34
+ "@live-change/dao-sockjs": "^0.9.46",
35
+ "@live-change/dao-websocket": "^0.9.46",
36
+ "@live-change/db": "^0.9.46",
37
+ "@live-change/db-admin": "^0.9.46",
38
+ "@live-change/db-client": "^0.9.46",
39
+ "@live-change/db-store-level": "^0.9.46",
40
+ "@live-change/db-store-lmdb": "^0.9.46",
41
+ "@live-change/db-store-observable-db": "^0.9.46",
42
+ "@live-change/db-store-rbtree": "^0.9.46",
43
+ "@live-change/server": "^0.9.46",
44
44
  "@live-change/sockjs": "0.4.1",
45
45
  "express": "^4.18.2",
46
46
  "line-reader": "^0.4.0",
@@ -50,5 +50,5 @@
50
50
  "websocket": "^1.0.34",
51
51
  "yargs": "^17.7.2"
52
52
  },
53
- "gitHead": "6e9cf980b2ac6e4e7d78955cbf97ae1c2963bcab"
53
+ "gitHead": "9d2fe9cbfb28f6cd389c8cbc5cf051f583f58e9e"
54
54
  }
@@ -5,8 +5,9 @@ import ReactiveDao from '@live-change/dao'
5
5
 
6
6
  let serverPromise = null
7
7
 
8
- process.on('unhandledRejection', (reason, p) => {
9
- console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
8
+ process.on('unhandledRejection', (reason, promise) => {
9
+ console.log('Unhandled Rejection at: Promise',
10
+ "reason", reason, "stack", reason.stack, "promise", promise)
10
11
  // application specific logging, throwing an error, or other logic here
11
12
  })
12
13