fastify-hl7 3.1.0 → 3.3.0
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/lib/cjs/class/hL7Client.js +25 -15
- package/lib/cjs/class/hL7Server.js +4 -1
- package/lib/cjs/index.js +3 -0
- package/lib/esm/class/hL7Client.d.ts +8 -8
- package/lib/esm/class/hL7Client.js +8 -8
- package/lib/esm/class/hL7Server.d.ts +2 -1
- package/lib/esm/class/hL7Server.js +4 -1
- package/lib/esm/index.js +3 -0
- package/lib/esm/types.d.ts +7 -4
- package/lib/types/class/hL7Client.d.ts +8 -8
- package/lib/types/class/hL7Server.d.ts +2 -1
- package/lib/types/types.d.ts +7 -4
- package/package.json +23 -20
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.HL7Client = void 0;
|
|
27
37
|
const node_hl7_client_1 = __importStar(require("node-hl7-client"));
|
|
@@ -44,7 +54,7 @@ class HL7Client {
|
|
|
44
54
|
}
|
|
45
55
|
/**
|
|
46
56
|
* Build a HL7 Batch
|
|
47
|
-
|
|
57
|
+
* @remarks Create a properly formatted HL7 Batch.
|
|
48
58
|
* @since 1.0.0
|
|
49
59
|
* @param props
|
|
50
60
|
*/
|
|
@@ -56,7 +66,7 @@ class HL7Client {
|
|
|
56
66
|
}
|
|
57
67
|
/**
|
|
58
68
|
* Build Date
|
|
59
|
-
|
|
69
|
+
* @remarks Build a date string based off HL7 Standards
|
|
60
70
|
* @since 2.1.0
|
|
61
71
|
* @param date
|
|
62
72
|
* @param length Options are 8, 12, or 14 (default)
|
|
@@ -66,7 +76,7 @@ class HL7Client {
|
|
|
66
76
|
}
|
|
67
77
|
/**
|
|
68
78
|
* Build a HL7 File Batch
|
|
69
|
-
|
|
79
|
+
* @remarks Create a properly formatted HL7 File Batch.
|
|
70
80
|
* @since 1.0.0
|
|
71
81
|
* @param props
|
|
72
82
|
*/
|
|
@@ -80,7 +90,7 @@ class HL7Client {
|
|
|
80
90
|
}
|
|
81
91
|
/**
|
|
82
92
|
* Build a HL7 Message
|
|
83
|
-
|
|
93
|
+
* @remarks Create a properly formatted HL7 message.
|
|
84
94
|
* @since 1.0.0
|
|
85
95
|
* @param props
|
|
86
96
|
*/
|
|
@@ -122,7 +132,7 @@ class HL7Client {
|
|
|
122
132
|
}
|
|
123
133
|
/**
|
|
124
134
|
* Create an HL7 Outbound Connection
|
|
125
|
-
|
|
135
|
+
* @remarks Connect to an HL7 Server/Broker
|
|
126
136
|
* @since 1.0.0
|
|
127
137
|
* @param name The name stored within created client connections.
|
|
128
138
|
* @param props
|
|
@@ -183,7 +193,7 @@ class HL7Client {
|
|
|
183
193
|
}
|
|
184
194
|
/**
|
|
185
195
|
* Process a HL7
|
|
186
|
-
|
|
196
|
+
* @remarks A HL7 message that could either be a Message (MSH) or Batch (BHS)
|
|
187
197
|
* @since 1.0.0
|
|
188
198
|
* @param text Raw HL& String
|
|
189
199
|
*/
|
|
@@ -197,7 +207,7 @@ class HL7Client {
|
|
|
197
207
|
}
|
|
198
208
|
/**
|
|
199
209
|
* Read File
|
|
200
|
-
|
|
210
|
+
* @remarks Pass the correct path of the file you want to read.
|
|
201
211
|
* @since 1.0.0
|
|
202
212
|
* @param fullFilePath
|
|
203
213
|
* @returns FileBatch
|
|
@@ -211,7 +221,7 @@ class HL7Client {
|
|
|
211
221
|
}
|
|
212
222
|
/**
|
|
213
223
|
* Read a File Buffer
|
|
214
|
-
|
|
224
|
+
* @remarks Translate an already Buffered HL7 FHS segment to decode it.
|
|
215
225
|
* @since 1.0.0
|
|
216
226
|
* @param fileBuffer
|
|
217
227
|
* @returns FileBatch
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HL7Server = void 0;
|
|
4
|
+
const node_events_1 = require("node:events");
|
|
4
5
|
const node_hl7_server_1 = require("node-hl7-server");
|
|
5
6
|
const errors_js_1 = require("../errors.js");
|
|
6
|
-
class HL7Server {
|
|
7
|
+
class HL7Server extends node_events_1.EventEmitter {
|
|
7
8
|
constructor(server) {
|
|
9
|
+
super();
|
|
8
10
|
this._server = server;
|
|
9
11
|
this._serverInboundConnections = [];
|
|
10
12
|
}
|
|
@@ -48,6 +50,7 @@ class HL7Server {
|
|
|
48
50
|
port: props.port.toString(),
|
|
49
51
|
server: inbound,
|
|
50
52
|
});
|
|
53
|
+
this.emit("inbound", props.port.toString());
|
|
51
54
|
return inbound;
|
|
52
55
|
}
|
|
53
56
|
/**
|
package/lib/cjs/index.js
CHANGED
|
@@ -56,6 +56,9 @@ const fastifyHL7 = (0, fastify_plugin_1.default)(async (fastify, opts) => {
|
|
|
56
56
|
if (typeof serverInstance !== "undefined") {
|
|
57
57
|
// Server Functions
|
|
58
58
|
server = new hL7Server_js_1.HL7Server(serverInstance);
|
|
59
|
+
server.on("inbound", (port) => {
|
|
60
|
+
fastify.log.info("HL7 Inbound Server Listening on Port %s", port);
|
|
61
|
+
});
|
|
59
62
|
// before we close fastify, make sure all server instances are closed
|
|
60
63
|
fastify.addHook("preClose", async () => {
|
|
61
64
|
if (typeof server !== "undefined") {
|
|
@@ -10,14 +10,14 @@ export declare class HL7Client {
|
|
|
10
10
|
closeAll(): Promise<boolean>;
|
|
11
11
|
/**
|
|
12
12
|
* Build a HL7 Batch
|
|
13
|
-
|
|
13
|
+
* @remarks Create a properly formatted HL7 Batch.
|
|
14
14
|
* @since 1.0.0
|
|
15
15
|
* @param props
|
|
16
16
|
*/
|
|
17
17
|
buildBatch(props?: ClientBuilderOptions): Batch;
|
|
18
18
|
/**
|
|
19
19
|
* Build Date
|
|
20
|
-
|
|
20
|
+
* @remarks Build a date string based off HL7 Standards
|
|
21
21
|
* @since 2.1.0
|
|
22
22
|
* @param date
|
|
23
23
|
* @param length Options are 8, 12, or 14 (default)
|
|
@@ -25,14 +25,14 @@ export declare class HL7Client {
|
|
|
25
25
|
buildDate(date: Date, length?: string): string;
|
|
26
26
|
/**
|
|
27
27
|
* Build a HL7 File Batch
|
|
28
|
-
|
|
28
|
+
* @remarks Create a properly formatted HL7 File Batch.
|
|
29
29
|
* @since 1.0.0
|
|
30
30
|
* @param props
|
|
31
31
|
*/
|
|
32
32
|
buildFileBatch(props?: ClientBuilderFileOptions): FileBatch;
|
|
33
33
|
/**
|
|
34
34
|
* Build a HL7 Message
|
|
35
|
-
|
|
35
|
+
* @remarks Create a properly formatted HL7 message.
|
|
36
36
|
* @since 1.0.0
|
|
37
37
|
* @param props
|
|
38
38
|
*/
|
|
@@ -45,7 +45,7 @@ export declare class HL7Client {
|
|
|
45
45
|
createClient(name: string, props: ClientOptions): Client;
|
|
46
46
|
/**
|
|
47
47
|
* Create an HL7 Outbound Connection
|
|
48
|
-
|
|
48
|
+
* @remarks Connect to an HL7 Server/Broker
|
|
49
49
|
* @since 1.0.0
|
|
50
50
|
* @param name The name stored within created client connections.
|
|
51
51
|
* @param props
|
|
@@ -66,14 +66,14 @@ export declare class HL7Client {
|
|
|
66
66
|
getClientConnectionByPort(port: string): Connection | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Process a HL7
|
|
69
|
-
|
|
69
|
+
* @remarks A HL7 message that could either be a Message (MSH) or Batch (BHS)
|
|
70
70
|
* @since 1.0.0
|
|
71
71
|
* @param text Raw HL& String
|
|
72
72
|
*/
|
|
73
73
|
processHL7(text: string): Message | Batch;
|
|
74
74
|
/**
|
|
75
75
|
* Read File
|
|
76
|
-
|
|
76
|
+
* @remarks Pass the correct path of the file you want to read.
|
|
77
77
|
* @since 1.0.0
|
|
78
78
|
* @param fullFilePath
|
|
79
79
|
* @returns FileBatch
|
|
@@ -85,7 +85,7 @@ export declare class HL7Client {
|
|
|
85
85
|
readFile(fullFilePath: string): FileBatch;
|
|
86
86
|
/**
|
|
87
87
|
* Read a File Buffer
|
|
88
|
-
|
|
88
|
+
* @remarks Translate an already Buffered HL7 FHS segment to decode it.
|
|
89
89
|
* @since 1.0.0
|
|
90
90
|
* @param fileBuffer
|
|
91
91
|
* @returns FileBatch
|
|
@@ -18,7 +18,7 @@ export class HL7Client {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Build a HL7 Batch
|
|
21
|
-
|
|
21
|
+
* @remarks Create a properly formatted HL7 Batch.
|
|
22
22
|
* @since 1.0.0
|
|
23
23
|
* @param props
|
|
24
24
|
*/
|
|
@@ -30,7 +30,7 @@ export class HL7Client {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Build Date
|
|
33
|
-
|
|
33
|
+
* @remarks Build a date string based off HL7 Standards
|
|
34
34
|
* @since 2.1.0
|
|
35
35
|
* @param date
|
|
36
36
|
* @param length Options are 8, 12, or 14 (default)
|
|
@@ -40,7 +40,7 @@ export class HL7Client {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Build a HL7 File Batch
|
|
43
|
-
|
|
43
|
+
* @remarks Create a properly formatted HL7 File Batch.
|
|
44
44
|
* @since 1.0.0
|
|
45
45
|
* @param props
|
|
46
46
|
*/
|
|
@@ -54,7 +54,7 @@ export class HL7Client {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Build a HL7 Message
|
|
57
|
-
|
|
57
|
+
* @remarks Create a properly formatted HL7 message.
|
|
58
58
|
* @since 1.0.0
|
|
59
59
|
* @param props
|
|
60
60
|
*/
|
|
@@ -96,7 +96,7 @@ export class HL7Client {
|
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Create an HL7 Outbound Connection
|
|
99
|
-
|
|
99
|
+
* @remarks Connect to an HL7 Server/Broker
|
|
100
100
|
* @since 1.0.0
|
|
101
101
|
* @param name The name stored within created client connections.
|
|
102
102
|
* @param props
|
|
@@ -157,7 +157,7 @@ export class HL7Client {
|
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Process a HL7
|
|
160
|
-
|
|
160
|
+
* @remarks A HL7 message that could either be a Message (MSH) or Batch (BHS)
|
|
161
161
|
* @since 1.0.0
|
|
162
162
|
* @param text Raw HL& String
|
|
163
163
|
*/
|
|
@@ -171,7 +171,7 @@ export class HL7Client {
|
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
173
|
* Read File
|
|
174
|
-
|
|
174
|
+
* @remarks Pass the correct path of the file you want to read.
|
|
175
175
|
* @since 1.0.0
|
|
176
176
|
* @param fullFilePath
|
|
177
177
|
* @returns FileBatch
|
|
@@ -185,7 +185,7 @@ export class HL7Client {
|
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* Read a File Buffer
|
|
188
|
-
|
|
188
|
+
* @remarks Translate an already Buffered HL7 FHS segment to decode it.
|
|
189
189
|
* @since 1.0.0
|
|
190
190
|
* @param fileBuffer
|
|
191
191
|
* @returns FileBatch
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
1
2
|
import Server, { Inbound, InboundHandler, ListenerOptions } from "node-hl7-server";
|
|
2
|
-
export declare class HL7Server {
|
|
3
|
+
export declare class HL7Server extends EventEmitter {
|
|
3
4
|
private readonly _server;
|
|
4
5
|
private readonly _serverInboundConnections;
|
|
5
6
|
constructor(server: Server);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
1
2
|
import { Inbound, } from "node-hl7-server";
|
|
2
3
|
import { errors } from "../errors.js";
|
|
3
|
-
export class HL7Server {
|
|
4
|
+
export class HL7Server extends EventEmitter {
|
|
4
5
|
constructor(server) {
|
|
6
|
+
super();
|
|
5
7
|
this._server = server;
|
|
6
8
|
this._serverInboundConnections = [];
|
|
7
9
|
}
|
|
@@ -45,6 +47,7 @@ export class HL7Server {
|
|
|
45
47
|
port: props.port.toString(),
|
|
46
48
|
server: inbound,
|
|
47
49
|
});
|
|
50
|
+
this.emit("inbound", props.port.toString());
|
|
48
51
|
return inbound;
|
|
49
52
|
}
|
|
50
53
|
/**
|
package/lib/esm/index.js
CHANGED
|
@@ -37,6 +37,9 @@ const fastifyHL7 = fp(async (fastify, opts) => {
|
|
|
37
37
|
if (typeof serverInstance !== "undefined") {
|
|
38
38
|
// Server Functions
|
|
39
39
|
server = new HL7Server(serverInstance);
|
|
40
|
+
server.on("inbound", (port) => {
|
|
41
|
+
fastify.log.info("HL7 Inbound Server Listening on Port %s", port);
|
|
42
|
+
});
|
|
40
43
|
// before we close fastify, make sure all server instances are closed
|
|
41
44
|
fastify.addHook("preClose", async () => {
|
|
42
45
|
if (typeof server !== "undefined") {
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ declare module "fastify" {
|
|
|
8
8
|
/** Build HL7 Batch
|
|
9
9
|
* @since 1.0.0 */
|
|
10
10
|
buildBatch: (props?: ClientBuilderOptions) => Batch;
|
|
11
|
-
/**
|
|
11
|
+
/** Build Date
|
|
12
|
+
* @remarks Build a date string based off HL7 Standards
|
|
13
|
+
* @param date
|
|
14
|
+
* @param length Options are 8, 12, or 14 (default)
|
|
12
15
|
* @since 2.1.0
|
|
13
16
|
*/
|
|
14
17
|
buildDate: (date: Date, length?: string) => string;
|
|
@@ -25,14 +28,14 @@ declare module "fastify" {
|
|
|
25
28
|
* @since 1.0.0 */
|
|
26
29
|
closeServerAll: () => Promise<boolean>;
|
|
27
30
|
/** Create Client
|
|
28
|
-
|
|
31
|
+
* @remarks Connecting to a remote server/broker that accepts connections.
|
|
29
32
|
* @since 1.0.0 */
|
|
30
33
|
createClient: (name: string, props: ClientOptions) => Client;
|
|
31
34
|
/** Create an incoming port connection on the server.
|
|
32
35
|
* @since 1.0.0 */
|
|
33
36
|
createInbound: (name: string, props: ListenerOptions, handler: InboundHandler) => Inbound;
|
|
34
37
|
/** Create Outgoing Client Port
|
|
35
|
-
|
|
38
|
+
* @remarks This is on the established client that we are already a part off.
|
|
36
39
|
* @since 1.0.0 */
|
|
37
40
|
createConnection: (name: string, props: ClientListenerOptions, handler: OutboundHandler) => Connection;
|
|
38
41
|
/** Get Client (Outbound) connection by name.
|
|
@@ -59,7 +62,7 @@ declare module "fastify" {
|
|
|
59
62
|
}
|
|
60
63
|
interface FastifyInstance {
|
|
61
64
|
/** Main Decorator for Fastify
|
|
62
|
-
|
|
65
|
+
* @remarks hl7 is the decorator that everything hangs off.
|
|
63
66
|
* @since 1.0.0 **/
|
|
64
67
|
hl7: HL7;
|
|
65
68
|
}
|
|
@@ -10,14 +10,14 @@ export declare class HL7Client {
|
|
|
10
10
|
closeAll(): Promise<boolean>;
|
|
11
11
|
/**
|
|
12
12
|
* Build a HL7 Batch
|
|
13
|
-
|
|
13
|
+
* @remarks Create a properly formatted HL7 Batch.
|
|
14
14
|
* @since 1.0.0
|
|
15
15
|
* @param props
|
|
16
16
|
*/
|
|
17
17
|
buildBatch(props?: ClientBuilderOptions): Batch;
|
|
18
18
|
/**
|
|
19
19
|
* Build Date
|
|
20
|
-
|
|
20
|
+
* @remarks Build a date string based off HL7 Standards
|
|
21
21
|
* @since 2.1.0
|
|
22
22
|
* @param date
|
|
23
23
|
* @param length Options are 8, 12, or 14 (default)
|
|
@@ -25,14 +25,14 @@ export declare class HL7Client {
|
|
|
25
25
|
buildDate(date: Date, length?: string): string;
|
|
26
26
|
/**
|
|
27
27
|
* Build a HL7 File Batch
|
|
28
|
-
|
|
28
|
+
* @remarks Create a properly formatted HL7 File Batch.
|
|
29
29
|
* @since 1.0.0
|
|
30
30
|
* @param props
|
|
31
31
|
*/
|
|
32
32
|
buildFileBatch(props?: ClientBuilderFileOptions): FileBatch;
|
|
33
33
|
/**
|
|
34
34
|
* Build a HL7 Message
|
|
35
|
-
|
|
35
|
+
* @remarks Create a properly formatted HL7 message.
|
|
36
36
|
* @since 1.0.0
|
|
37
37
|
* @param props
|
|
38
38
|
*/
|
|
@@ -45,7 +45,7 @@ export declare class HL7Client {
|
|
|
45
45
|
createClient(name: string, props: ClientOptions): Client;
|
|
46
46
|
/**
|
|
47
47
|
* Create an HL7 Outbound Connection
|
|
48
|
-
|
|
48
|
+
* @remarks Connect to an HL7 Server/Broker
|
|
49
49
|
* @since 1.0.0
|
|
50
50
|
* @param name The name stored within created client connections.
|
|
51
51
|
* @param props
|
|
@@ -66,14 +66,14 @@ export declare class HL7Client {
|
|
|
66
66
|
getClientConnectionByPort(port: string): Connection | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Process a HL7
|
|
69
|
-
|
|
69
|
+
* @remarks A HL7 message that could either be a Message (MSH) or Batch (BHS)
|
|
70
70
|
* @since 1.0.0
|
|
71
71
|
* @param text Raw HL& String
|
|
72
72
|
*/
|
|
73
73
|
processHL7(text: string): Message | Batch;
|
|
74
74
|
/**
|
|
75
75
|
* Read File
|
|
76
|
-
|
|
76
|
+
* @remarks Pass the correct path of the file you want to read.
|
|
77
77
|
* @since 1.0.0
|
|
78
78
|
* @param fullFilePath
|
|
79
79
|
* @returns FileBatch
|
|
@@ -85,7 +85,7 @@ export declare class HL7Client {
|
|
|
85
85
|
readFile(fullFilePath: string): FileBatch;
|
|
86
86
|
/**
|
|
87
87
|
* Read a File Buffer
|
|
88
|
-
|
|
88
|
+
* @remarks Translate an already Buffered HL7 FHS segment to decode it.
|
|
89
89
|
* @since 1.0.0
|
|
90
90
|
* @param fileBuffer
|
|
91
91
|
* @returns FileBatch
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
1
2
|
import Server, { Inbound, InboundHandler, ListenerOptions } from "node-hl7-server";
|
|
2
|
-
export declare class HL7Server {
|
|
3
|
+
export declare class HL7Server extends EventEmitter {
|
|
3
4
|
private readonly _server;
|
|
4
5
|
private readonly _serverInboundConnections;
|
|
5
6
|
constructor(server: Server);
|
package/lib/types/types.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ declare module "fastify" {
|
|
|
8
8
|
/** Build HL7 Batch
|
|
9
9
|
* @since 1.0.0 */
|
|
10
10
|
buildBatch: (props?: ClientBuilderOptions) => Batch;
|
|
11
|
-
/**
|
|
11
|
+
/** Build Date
|
|
12
|
+
* @remarks Build a date string based off HL7 Standards
|
|
13
|
+
* @param date
|
|
14
|
+
* @param length Options are 8, 12, or 14 (default)
|
|
12
15
|
* @since 2.1.0
|
|
13
16
|
*/
|
|
14
17
|
buildDate: (date: Date, length?: string) => string;
|
|
@@ -25,14 +28,14 @@ declare module "fastify" {
|
|
|
25
28
|
* @since 1.0.0 */
|
|
26
29
|
closeServerAll: () => Promise<boolean>;
|
|
27
30
|
/** Create Client
|
|
28
|
-
|
|
31
|
+
* @remarks Connecting to a remote server/broker that accepts connections.
|
|
29
32
|
* @since 1.0.0 */
|
|
30
33
|
createClient: (name: string, props: ClientOptions) => Client;
|
|
31
34
|
/** Create an incoming port connection on the server.
|
|
32
35
|
* @since 1.0.0 */
|
|
33
36
|
createInbound: (name: string, props: ListenerOptions, handler: InboundHandler) => Inbound;
|
|
34
37
|
/** Create Outgoing Client Port
|
|
35
|
-
|
|
38
|
+
* @remarks This is on the established client that we are already a part off.
|
|
36
39
|
* @since 1.0.0 */
|
|
37
40
|
createConnection: (name: string, props: ClientListenerOptions, handler: OutboundHandler) => Connection;
|
|
38
41
|
/** Get Client (Outbound) connection by name.
|
|
@@ -59,7 +62,7 @@ declare module "fastify" {
|
|
|
59
62
|
}
|
|
60
63
|
interface FastifyInstance {
|
|
61
64
|
/** Main Decorator for Fastify
|
|
62
|
-
|
|
65
|
+
* @remarks hl7 is the decorator that everything hangs off.
|
|
63
66
|
* @since 1.0.0 **/
|
|
64
67
|
hl7: HL7;
|
|
65
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastify-hl7",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "A Fastify HL7 Plugin Developed in Pure TypeScript.",
|
|
5
5
|
"module": "./lib/esm/index.js",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build:watch": "tsc -p src/tsconfig.esm.json -w",
|
|
28
28
|
"build:watch:cjs": "tsc -p src/tsconfig.cjs.json -w",
|
|
29
29
|
"npm:lint": "npmPkgJsonLint .",
|
|
30
|
-
"format": "prettier --write 'README.md' 'src/**/*.ts' '__tests__/**/*.ts'",
|
|
30
|
+
"format": "prettier --write 'README.md' 'src/**/*.ts' '__tests__/**/*.ts' '*.{mts,mjs}'",
|
|
31
31
|
"lint": "npm run npm:lint && eslint | snazzy",
|
|
32
32
|
"lint:fix": "npm run npm:lint && eslint --fix | snazzy",
|
|
33
33
|
"pack": "npm pack",
|
|
@@ -59,38 +59,41 @@
|
|
|
59
59
|
},
|
|
60
60
|
"homepage": "https://github.com/Bugs5382/fastify-hl7#readme",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@fastify/error": "^4.
|
|
62
|
+
"@fastify/error": "^4.1.0",
|
|
63
63
|
"fastify-plugin": "^5.0.1",
|
|
64
64
|
"node-hl7-client": "^3.0.0",
|
|
65
|
-
"node-hl7-server": "^3.
|
|
65
|
+
"node-hl7-server": "^3.2.3"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@eslint/js": "^9.
|
|
68
|
+
"@eslint/js": "^9.19.0",
|
|
69
69
|
"@types/eslint__js": "^8.42.3",
|
|
70
|
-
"@
|
|
70
|
+
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
|
|
71
|
+
"@types/node": "^22.13.11",
|
|
71
72
|
"@types/tcp-port-used": "^1.0.4",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
73
|
-
"@typescript-eslint/parser": "^8.
|
|
74
|
-
"@vitest/coverage-v8": "^
|
|
75
|
-
"@vitest/ui": "^
|
|
76
|
-
"eslint": "^9.
|
|
77
|
-
"eslint-config-prettier": "^
|
|
78
|
-
"eslint-plugin-prettier": "^5.2.
|
|
79
|
-
"fastify": "^5.1
|
|
80
|
-
"npm-check-updates": "^17.1.
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
74
|
+
"@typescript-eslint/parser": "^8.27.0",
|
|
75
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
76
|
+
"@vitest/ui": "^3.0.9",
|
|
77
|
+
"eslint": "^9.23.0",
|
|
78
|
+
"eslint-config-prettier": "^10.1.1",
|
|
79
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
80
|
+
"fastify": "^5.2.1",
|
|
81
|
+
"npm-check-updates": "^17.1.14",
|
|
81
82
|
"npm-package-json-lint": "^8.0.0",
|
|
82
|
-
"
|
|
83
|
+
"npm-package-json-lint-config-default": "^7.0.1",
|
|
84
|
+
"portfinder": "^1.0.35",
|
|
83
85
|
"pre-commit": "^1.2.2",
|
|
84
86
|
"snazzy": "^9.0.0",
|
|
85
87
|
"tcp-port-used": "^1.0.2",
|
|
86
88
|
"ts-node": "^10.9.2",
|
|
87
89
|
"tsd": "^0.31.2",
|
|
88
|
-
"typedoc": "^0.
|
|
89
|
-
"typescript": "^5.
|
|
90
|
-
"typescript-eslint": "^8.
|
|
91
|
-
"vitest": "^
|
|
90
|
+
"typedoc": "^0.28.1",
|
|
91
|
+
"typescript": "^5.8.2",
|
|
92
|
+
"typescript-eslint": "^8.27.0",
|
|
93
|
+
"vitest": "^3.0.9"
|
|
92
94
|
},
|
|
93
95
|
"precommit": [
|
|
96
|
+
"format",
|
|
94
97
|
"lint:fix",
|
|
95
98
|
"build"
|
|
96
99
|
]
|