@superhero/eventflow-spoke 4.4.8 → 4.4.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.
Files changed (3) hide show
  1. package/consume.js +5 -2
  2. package/index.js +4 -0
  3. package/package.json +1 -1
package/consume.js CHANGED
@@ -45,9 +45,12 @@ export default class ConsumeService
45
45
  {
46
46
  const
47
47
  service = this.#locator.locate(domain),
48
- consumer = this.#consumer.bind(this, service)
48
+ consumer = this.#consumer.bind(this, service),
49
+ names = Array.isArray(consumerMap[domain])
50
+ ? consumerMap[domain]
51
+ :[consumerMap[domain]]
49
52
 
50
- for(const name of consumerMap[domain])
53
+ for(const name of names)
51
54
  {
52
55
  await this.#spoke.consume(domain, name, consumer)
53
56
  }
package/index.js CHANGED
@@ -147,11 +147,15 @@ export default class Spoke
147
147
 
148
148
  // subscribe to all events that are already expected to be subscribed to
149
149
  const subscriptions = deepmerge(this.consumers.listeners, this.subscriptions.listeners)
150
+
151
+ this.log.info`subscriptions ${subscriptions}`
152
+
150
153
  for(const domain in subscriptions)
151
154
  {
152
155
  for(const name of subscriptions[domain])
153
156
  {
154
157
  this.channel.transmit(hub, [ 'subscribe', domain, name ])
158
+ this.log.info`${hubID} subscribes to: ${domain} › ${name}`
155
159
  }
156
160
  }
157
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-spoke",
3
- "version": "4.4.8",
3
+ "version": "4.4.9",
4
4
  "description": "Eventflow spoke is the client component in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow",