@syncbridge/hl7 0.4.20 → 0.4.22
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/components/hl7-server.component.js +18 -18
- package/constants.js +1 -1
- package/package.json +4 -4
|
@@ -66,16 +66,16 @@ let HL7ServerComponent = class HL7ServerComponent extends ComponentBase {
|
|
|
66
66
|
}
|
|
67
67
|
this.server.on('listening', () => this.emit('listening'));
|
|
68
68
|
this.server.on('close', () => this.emit('close'));
|
|
69
|
-
this.server.on('connection', socket => {
|
|
70
|
-
this.logger?.trace(`Connection from: ${socket.remoteAddress
|
|
69
|
+
this.server.on('connection', (socket) => {
|
|
70
|
+
this.logger?.trace(`Connection from: ${socket.remoteAddress}`);
|
|
71
71
|
const info = {
|
|
72
|
-
address: socket.remoteAddress
|
|
73
|
-
toString: () => socket.remoteAddress
|
|
72
|
+
address: socket.remoteAddress,
|
|
73
|
+
toString: () => socket.remoteAddress,
|
|
74
74
|
};
|
|
75
75
|
this.emit('connection', info, socket);
|
|
76
76
|
});
|
|
77
77
|
this.server.on('disconnect', socket => {
|
|
78
|
-
this.logger?.trace(`Disconnected: ${socket.remoteAddress
|
|
78
|
+
this.logger?.trace(`Disconnected: ${socket.remoteAddress}`);
|
|
79
79
|
const info = {
|
|
80
80
|
address: socket.remoteAddress(),
|
|
81
81
|
toString: () => socket.remoteAddress(),
|
|
@@ -84,15 +84,15 @@ let HL7ServerComponent = class HL7ServerComponent extends ComponentBase {
|
|
|
84
84
|
});
|
|
85
85
|
this.server.on('error', (error, socket) => {
|
|
86
86
|
if (socket) {
|
|
87
|
-
error.message = error.message + ` [${socket?.remoteAddress
|
|
87
|
+
error.message = error.message + ` [${socket?.remoteAddress}]`;
|
|
88
88
|
}
|
|
89
89
|
if (error.code === 'ECONNRESET')
|
|
90
90
|
return;
|
|
91
91
|
this.logger?.error(error);
|
|
92
92
|
if (socket) {
|
|
93
93
|
const info = {
|
|
94
|
-
address: socket.remoteAddress
|
|
95
|
-
toString: () => socket.remoteAddress
|
|
94
|
+
address: socket.remoteAddress,
|
|
95
|
+
toString: () => socket.remoteAddress,
|
|
96
96
|
};
|
|
97
97
|
this.emit('error', error, info, socket);
|
|
98
98
|
}
|
|
@@ -100,32 +100,32 @@ let HL7ServerComponent = class HL7ServerComponent extends ComponentBase {
|
|
|
100
100
|
this.emit('error', error);
|
|
101
101
|
});
|
|
102
102
|
this.server.on('message', (message, socket) => {
|
|
103
|
-
this.logger?.trace(`HL7 message (${message.messageType}) received from ${socket.remoteAddress
|
|
103
|
+
this.logger?.trace(`HL7 message (${message.messageType}) received from ${socket.remoteAddress}`);
|
|
104
104
|
const info = {
|
|
105
|
-
address: socket.remoteAddress
|
|
106
|
-
toString: () => socket.remoteAddress
|
|
105
|
+
address: socket.remoteAddress,
|
|
106
|
+
toString: () => socket.remoteAddress,
|
|
107
107
|
};
|
|
108
108
|
this.emit('message', message, info, socket);
|
|
109
109
|
});
|
|
110
110
|
this.server.on('send', (message, socket) => {
|
|
111
|
-
this.logger?.trace(`HL7 message (${message.messageType}) sent to ${socket.remoteAddress
|
|
111
|
+
this.logger?.trace(`HL7 message (${message.messageType}) sent to ${socket.remoteAddress}`);
|
|
112
112
|
const info = {
|
|
113
|
-
address: socket.remoteAddress
|
|
114
|
-
toString: () => socket.remoteAddress
|
|
113
|
+
address: socket.remoteAddress,
|
|
114
|
+
toString: () => socket.remoteAddress,
|
|
115
115
|
};
|
|
116
116
|
this.emit('send', message, info, socket);
|
|
117
117
|
});
|
|
118
118
|
this.server.on('data', (data, socket) => {
|
|
119
119
|
const info = {
|
|
120
|
-
address: socket.remoteAddress
|
|
121
|
-
toString: () => socket.remoteAddress
|
|
120
|
+
address: socket.remoteAddress,
|
|
121
|
+
toString: () => socket.remoteAddress,
|
|
122
122
|
};
|
|
123
123
|
this.emit('data', data, info, socket);
|
|
124
124
|
});
|
|
125
125
|
this.server.on('write', (data, socket) => {
|
|
126
126
|
const info = {
|
|
127
|
-
address: socket.remoteAddress
|
|
128
|
-
toString: () => socket.remoteAddress
|
|
127
|
+
address: socket.remoteAddress,
|
|
128
|
+
toString: () => socket.remoteAddress,
|
|
129
129
|
};
|
|
130
130
|
this.emit('transmit', data, info, socket);
|
|
131
131
|
});
|
package/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncbridge/hl7",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"description": "SyncBridge HL7 connection components",
|
|
5
5
|
"author": "Panates Inc",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"node-events-async": "^1.5.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@syncbridge/common": "^0.6.
|
|
16
|
-
"@syncbridge/builtins": "^0.4.
|
|
17
|
-
"@syncbridge/net": "^0.4.
|
|
15
|
+
"@syncbridge/common": "^0.6.2",
|
|
16
|
+
"@syncbridge/builtins": "^0.4.22",
|
|
17
|
+
"@syncbridge/net": "^0.4.22"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|