@superhero/eventflow-spoke 4.0.1 → 4.0.3

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 (3) hide show
  1. package/config.js +6 -6
  2. package/index.js +31 -0
  3. package/package.json +6 -5
package/config.js CHANGED
@@ -3,19 +3,19 @@
3
3
  */
4
4
  export default
5
5
  {
6
- dependency:
7
- {
8
- '@superhero/eventflow-db' : '@superhero/eventflow-db'
9
- },
10
6
  bootstrap:
11
7
  {
12
8
  '@superhero/eventflow-spoke' : true,
13
9
  '@superhero/eventflow-spoke/consume' : true
14
10
  },
11
+ dependency:
12
+ {
13
+ '@superhero/eventflow-db' : true
14
+ },
15
15
  locator:
16
16
  {
17
- '@superhero/eventflow-spoke' : './index.js',
18
- '@superhero/eventflow-spoke/consume' : './consume.js'
17
+ '@superhero/eventflow-spoke' : true,
18
+ '@superhero/eventflow-spoke/consume' : true
19
19
  },
20
20
  eventflow:
21
21
  {
package/index.js CHANGED
@@ -319,6 +319,7 @@ export default class Spoke
319
319
  await this.db.persistEventPublished({ event_id:eventID, publisher:this.#spokeID })
320
320
  this.#broadcast('publish', event.domain, eventID, event.name, event.pid)
321
321
  this.log.info`published event ${eventID} › ${event.domain} › ${event.name} › ${event.pid}`
322
+ return eventID
322
323
  }
323
324
 
324
325
  async schedule(scheduled, event)
@@ -346,6 +347,16 @@ export default class Spoke
346
347
  return await this.db.persistEvent(event)
347
348
  }
348
349
 
350
+ async persistEntityAssociation(event_id, eid)
351
+ {
352
+ return await this.db.persistEventEid(event_id, eid)
353
+ }
354
+
355
+ async persistChildProcessAssociation(event_id, domain, cpid)
356
+ {
357
+ return await this.db.persistEventCpid(event_id, domain, cpid)
358
+ }
359
+
349
360
  async delete(eventID)
350
361
  {
351
362
  return await this.db.deleteEvent(eventID)
@@ -366,6 +377,26 @@ export default class Spoke
366
377
  return await this.db.readEventsByDomainAndPid(domain, pid)
367
378
  }
368
379
 
380
+ async readEventlogFilteredByNames(domain, pid, names)
381
+ {
382
+ return await this.db.readEventsByDomainAndPidAndNames(domain, pid, names)
383
+ }
384
+
385
+ async readEventlogByChildProcess(domain, cpid)
386
+ {
387
+ return await this.db.readEventsByDomainAndCpid(domain, cpid)
388
+ }
389
+
390
+ async readEventlogByEid(eid)
391
+ {
392
+ return await this.db.readEventsByEid(eid)
393
+ }
394
+
395
+ async readEventlogByDomainAndEid(domain, eid)
396
+ {
397
+ return await this.db.readEventsByDomainAndEid(domain, eid)
398
+ }
399
+
369
400
  async readEventlogState(domain, pid)
370
401
  {
371
402
  const
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-spoke",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Eventflow spoke is the client component in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow",
@@ -16,14 +16,15 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@superhero/deep": "^4.2.0",
19
- "@superhero/eventflow-certificates": "^4.0.4",
19
+ "@superhero/eventflow-certificates": "^4.0.5",
20
+ "@superhero/eventflow-db": "^4.2.2",
20
21
  "@superhero/id-name-generator": "^4.0.0",
21
- "@superhero/log": "^4.0.0",
22
+ "@superhero/log": "^4.0.1",
22
23
  "@superhero/tcp-record-channel": "^4.2.1"
23
24
  },
24
25
  "devDependencies": {
25
- "@superhero/locator": "^4.2.2",
26
- "@superhero/eventflow-hub": "^4.0.5"
26
+ "@superhero/locator": "^4.2.4",
27
+ "@superhero/eventflow-hub": "^4.0.7"
27
28
  },
28
29
  "scripts": {
29
30
  "test-build": "npm explore @superhero/eventflow-db -- npm run test-build",