@superhero/eventflow-db 4.4.12 → 4.5.0

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/index.js +6 -6
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -193,8 +193,8 @@ export default class DB
193
193
  {
194
194
  const error = new Error('could not persist event')
195
195
  error.code = 'E_EVENTFLOW_DB_EVENT_PERSIST'
196
- error.cause = reason
197
196
  error.event = event
197
+ error.cause = reason
198
198
  throw error
199
199
  }
200
200
  }
@@ -474,8 +474,8 @@ export default class DB
474
474
  {
475
475
  const error = new Error('could not persist event published')
476
476
  error.code = 'E_EVENTFLOW_DB_EVENT_PUBLISHED_PERSIST'
477
- error.cause = reason
478
477
  error.publishedEvent = publishedEvent
478
+ error.cause = reason
479
479
  throw error
480
480
  }
481
481
  }
@@ -571,8 +571,8 @@ export default class DB
571
571
  {
572
572
  const error = new Error(`could not persist the scheduled event`)
573
573
  error.code = 'E_EVENTFLOW_DB_SCHEDULED_EVENT_PERSIST'
574
- error.cause = reason
575
574
  error.scheduledEvent = scheduledEvent
575
+ error.cause = reason
576
576
  throw error
577
577
  }
578
578
  }
@@ -651,8 +651,8 @@ export default class DB
651
651
  {
652
652
  const error = new Error('could not persist hub')
653
653
  error.code = 'E_EVENTFLOW_DB_HUB_PERSIST'
654
- error.cause = reason
655
654
  error.hub = hub
655
+ error.cause = reason
656
656
  throw error
657
657
  }
658
658
  }
@@ -715,8 +715,8 @@ export default class DB
715
715
  {
716
716
  const error = new Error('could not persist log')
717
717
  error.code = 'E_EVENTFLOW_DB_LOG_PERSIST'
718
- error.cause = reason
719
718
  error.log = log
719
+ error.cause = reason
720
720
  throw error
721
721
  }
722
722
  }
@@ -780,8 +780,8 @@ export default class DB
780
780
 
781
781
  const error = new Error(`could not persist certificate`)
782
782
  error.code = 'E_EVENTFLOW_DB_CERTIFICATE_PERSIST'
783
- error.cause = reason
784
783
  error.certificate = certificate
784
+ error.cause = reason
785
785
  throw error
786
786
  }
787
787
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-db",
3
- "version": "4.4.12",
3
+ "version": "4.5.0",
4
4
  "description": "Eventflow db is a set of common database logic in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow"
@@ -15,7 +15,7 @@
15
15
  "@superhero/db": "^0.5.2"
16
16
  },
17
17
  "devDependencies": {
18
- "@superhero/locator": "^4.4.4"
18
+ "@superhero/locator": "^4.4.5"
19
19
  },
20
20
  "scripts": {
21
21
  "test-build": "docker ps -q -f name=eventflow-mysql | grep -q . && docker stop eventflow-mysql; docker run --rm --name eventflow-mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=eventflow -p 3306:3306 --health-cmd=\"mysqladmin ping -h 127.0.0.1 -uroot -proot --silent || exit 1\" --health-interval=10s --health-timeout=5s --health-retries=5 -d mysql:latest; until [ \"$(docker inspect --format='{{.State.Health.Status}}' eventflow-mysql)\" == \"healthy\" ]; do sleep 1; done",