@superhero/eventflow-db 4.2.0 → 4.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/index.js CHANGED
@@ -352,7 +352,7 @@ export default class DB
352
352
  error.code = 'E_EVENTFLOW_DB_EVENT_BY_DOMAIN_AND_CPID_READ'
353
353
  error.cause = reason
354
354
  throw error
355
- }
355
+ }
356
356
  }
357
357
 
358
358
  async persistEventEid(event_id, eid)
package/index.test.js CHANGED
@@ -9,7 +9,8 @@ suite('@superhero/eventflow-db', async () =>
9
9
  locator = new Locator(),
10
10
  config = locator.config
11
11
 
12
- await config.add('./config.js')
12
+ const { filepath, config: resolved } = await config.resolve('./config.js')
13
+ config.add(filepath, resolved)
13
14
  const db = locate(locator)
14
15
 
15
16
  test('Setup table schemas', async (sub) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-db",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
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.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@superhero/locator": "4.2.3"
18
+ "@superhero/locator": "4.2.4"
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",
@@ -1,6 +1,6 @@
1
1
  SELECT event.*
2
2
  FROM event_cpid
3
3
  JOIN event
4
- ON event_id = id
5
- WHERE cpid = ?
6
- AND domain = ?
4
+ ON event_id = id AND event.domain = event_cpid.domain
5
+ WHERE event_cpid.cpid = ?
6
+ AND event_cpid.domain = ?
@@ -1,3 +1,3 @@
1
- SELECT cpid
1
+ SELECT domain, cpid
2
2
  FROM event_cpid
3
3
  WHERE event_id = ?