@superhero/eventflow-spoke 4.8.2 → 4.8.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.
- package/CHANGELOG.md +6 -0
- package/index.js +18 -8
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -119,12 +119,10 @@ export default class Spoke
|
|
|
119
119
|
this.log.info`connecting to hub ${hubID} › ${hubIP}:${hubPort}`
|
|
120
120
|
|
|
121
121
|
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
certChain = spokeLeaf.cert + spokeICA.cert,
|
|
127
|
-
dynamicConfig = { servername:hubID, host:hubIP, port:hubPort, ca, cert:certChain, key:spokeLeaf.key, passphrase:spokeLeaf.pass },
|
|
122
|
+
chain = await this.certificates.getChain(),
|
|
123
|
+
ca = chain.root.cert,
|
|
124
|
+
cert = chain.leaf.cert + chain.intermediate.cert,
|
|
125
|
+
dynamicConfig = { servername:hubID, host:hubIP, port:hubPort, ca, cert, key:chain.leaf.key, passphrase:chain.leaf.pass },
|
|
128
126
|
peerHubConfig = deepmerge(dynamicConfig, this.config.TCP_SOCKET_CLIENT_OPTIONS),
|
|
129
127
|
hub = await this.channel.createTlsClient(peerHubConfig)
|
|
130
128
|
|
|
@@ -157,8 +155,20 @@ export default class Spoke
|
|
|
157
155
|
}
|
|
158
156
|
default:
|
|
159
157
|
{
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
let chain = ''
|
|
159
|
+
for(let cause = error; cause; cause = cause.cause)
|
|
160
|
+
{
|
|
161
|
+
if(cause instanceof Error)
|
|
162
|
+
{
|
|
163
|
+
chain += ` › [${cause.code}] ${cause.message}`
|
|
164
|
+
}
|
|
165
|
+
else if('string' === typeof cause)
|
|
166
|
+
{
|
|
167
|
+
chain += ` › ${cause}`
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this.log.fail`failed to connect to hub ${hubID} › ${hubIP}:${hubPort}${chain}`
|
|
171
|
+
const message = `failed to connect to hub ${hubID} › ${hubIP}:${hubPort}`
|
|
162
172
|
await this.db.persistLog({ agent:this.#spokeID, message, error })
|
|
163
173
|
}
|
|
164
174
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/eventflow-spoke",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.3",
|
|
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.
|
|
26
|
-
"@superhero/eventflow-certificates": "4.8.
|
|
27
|
-
"@superhero/eventflow-db": "4.8.
|
|
28
|
-
"@superhero/id-name-generator": "4.8.
|
|
29
|
-
"@superhero/log": "4.8.
|
|
30
|
-
"@superhero/tcp-record-channel": "4.8.
|
|
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"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@superhero/audit": "4.8.
|
|
33
|
+
"@superhero/audit": "4.8.3",
|
|
34
34
|
"@superhero/syntax-check": "0.0.2",
|
|
35
|
-
"@superhero/core": "4.8.
|
|
36
|
-
"@superhero/eventflow-hub": "4.8.
|
|
35
|
+
"@superhero/core": "4.8.3",
|
|
36
|
+
"@superhero/eventflow-hub": "4.8.3"
|
|
37
37
|
},
|
|
38
38
|
"author": {
|
|
39
39
|
"name": "Erik Landvall",
|