@superhero/eventflow-spoke 4.8.3 → 4.8.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ---
2
+ #### v4.8.5
3
+ ---
4
+
5
+ ...
6
+
7
+ ---
8
+ #### v4.8.4
9
+ ---\n\nVersion alignment...
10
+
1
11
  ---
2
12
  #### v4.8.3
3
13
  ---
package/config.js CHANGED
@@ -34,9 +34,10 @@ export default
34
34
  {
35
35
  spoke:
36
36
  {
37
- NAME : process.env.EVENTFLOW_SPOKE_NAME ?? 'EVENTFLOW-SPOKE',
38
- TCP_SOCKET_CLIENT_OPTIONS : process.env.EVENTFLOW_SPOKE_TCP_SOCKET_CLIENT_OPTIONS,
39
- SERDE : process.env.EVENTFLOW_SPOKE_SERDE,
37
+ NAME : process.env.EVENTFLOW_SPOKE_NAME ?? 'EVENTFLOW-SPOKE',
38
+ TCP_SOCKET_CLIENT_OPTIONS : process.env.EVENTFLOW_SPOKE_TCP_SOCKET_CLIENT_OPTIONS,
39
+ TCP_RECORD_CHANNEL_TIMEOUT : process.env.EVENTFLOW_SPOKE_TCP_RECORD_CHANNEL_TIMEOUT ?? '10000',
40
+ SERDE : process.env.EVENTFLOW_SPOKE_SERDE,
40
41
  consume:
41
42
  {
42
43
  // '<event_domain>' : '*',
package/index.js CHANGED
@@ -112,7 +112,7 @@ export default class Spoke
112
112
  {
113
113
  const error = new Error('already connected to hub')
114
114
  error.code = 'E_EVENTFLOW_SPOKE_ALREADY_CONNECTED_TO_HUB'
115
- reject(error)
115
+ throw error
116
116
  }
117
117
  else
118
118
  {
@@ -124,7 +124,8 @@ export default class Spoke
124
124
  cert = chain.leaf.cert + chain.intermediate.cert,
125
125
  dynamicConfig = { servername:hubID, host:hubIP, port:hubPort, ca, cert, key:chain.leaf.key, passphrase:chain.leaf.pass },
126
126
  peerHubConfig = deepmerge(dynamicConfig, this.config.TCP_SOCKET_CLIENT_OPTIONS),
127
- hub = await this.channel.createTlsClient(peerHubConfig)
127
+ timeout = Number(this.config.TCP_RECORD_CHANNEL_TIMEOUT || 10e3),
128
+ hub = await this.channel.createTlsClient(peerHubConfig, socket => socket.setTimeout(timeout))
128
129
 
129
130
  hub.id = hubID
130
131
  this.hubs.add(hubIP, hubPort, hub)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-spoke",
3
- "version": "4.8.3",
3
+ "version": "4.8.5",
4
4
  "description": "Eventflow spoke is the client component in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow",
@@ -22,18 +22,18 @@
22
22
  "test": "syntax-check; node --test --test-reporter=@superhero/audit/reporter --experimental-test-coverage"
23
23
  },
24
24
  "dependencies": {
25
- "@superhero/deep": "4.8.3",
26
- "@superhero/eventflow-certificates": "4.8.3",
27
- "@superhero/eventflow-db": "4.8.3",
28
- "@superhero/id-name-generator": "4.8.3",
29
- "@superhero/log": "4.8.3",
30
- "@superhero/tcp-record-channel": "4.8.3"
25
+ "@superhero/deep": "4.8.5",
26
+ "@superhero/eventflow-certificates": "4.8.5",
27
+ "@superhero/eventflow-db": "4.8.5",
28
+ "@superhero/id-name-generator": "4.8.5",
29
+ "@superhero/log": "4.8.5",
30
+ "@superhero/tcp-record-channel": "4.8.5"
31
31
  },
32
32
  "devDependencies": {
33
- "@superhero/audit": "4.8.3",
33
+ "@superhero/audit": "4.8.5",
34
34
  "@superhero/syntax-check": "0.0.2",
35
- "@superhero/core": "4.8.3",
36
- "@superhero/eventflow-hub": "4.8.3"
35
+ "@superhero/core": "4.8.5",
36
+ "@superhero/eventflow-hub": "4.8.5"
37
37
  },
38
38
  "author": {
39
39
  "name": "Erik Landvall",