@superhero/eventflow-hub 4.4.0 → 4.4.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/index.js +8 -5
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -49,11 +49,11 @@ export default class Hub
|
|
|
49
49
|
throw error
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
this.#hubID = (
|
|
52
|
+
this.#hubID = (config.NAME + '.' + new IdNameGenerator().generateId()).toUpperCase()
|
|
53
53
|
this.config = config
|
|
54
54
|
this.db = db
|
|
55
|
-
this.log = new Log({ label: `[EVENTFLOW:HUB:${
|
|
56
|
-
this.certificates = new CertificatesManager(config.NAME, this.#hubID, config.certificates, db
|
|
55
|
+
this.log = new Log({ label: `[EVENTFLOW:HUB:${this.#hubID}]` })
|
|
56
|
+
this.certificates = new CertificatesManager(config.NAME, this.#hubID, config.certificates, db)
|
|
57
57
|
|
|
58
58
|
for(const level of [ 'info', 'warn', 'fail' ])
|
|
59
59
|
{
|
|
@@ -128,11 +128,14 @@ export default class Hub
|
|
|
128
128
|
|
|
129
129
|
async #serverSNICallback(hostname, cb)
|
|
130
130
|
{
|
|
131
|
-
|
|
131
|
+
hostname = hostname.toLowerCase()
|
|
132
|
+
const hubID = this.#hubID.toLowerCase()
|
|
133
|
+
|
|
134
|
+
if(hostname !== hubID)
|
|
132
135
|
{
|
|
133
136
|
const error = new Error('invalid hostname')
|
|
134
137
|
error.code = 'E_EVENTFLOW_INVALID_HOSTNAME'
|
|
135
|
-
error.cause = `hostname ${hostname} mismatch with hub
|
|
138
|
+
error.cause = `hostname ${hostname} mismatch with hub ${hubID}`
|
|
136
139
|
return cb(error)
|
|
137
140
|
}
|
|
138
141
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/eventflow-hub",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3",
|
|
4
4
|
"description": "Eventflow hub is the central server component in the eventflow ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eventflow",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@superhero/id-name-generator": "^4.0.0",
|
|
18
18
|
"@superhero/log": "^4.0.1",
|
|
19
|
-
"@superhero/eventflow-certificates": "^4.4.
|
|
19
|
+
"@superhero/eventflow-certificates": "^4.4.3",
|
|
20
20
|
"@superhero/eventflow-db": "^4.4.0",
|
|
21
21
|
"@superhero/tcp-record-channel": "^4.2.2",
|
|
22
22
|
"@superhero/deep": "^4.2.0"
|