fastify-hl7 2.0.0 → 2.2.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/api.js CHANGED
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HL7Server = exports.HL7Client = exports.fastifyHL7 = void 0;
7
- var _1 = __importDefault(require("."));
7
+ const _1 = __importDefault(require("."));
8
8
  exports.fastifyHL7 = _1.default;
9
- var hL7Client_js_1 = require("./class/hL7Client.js");
9
+ const hL7Client_js_1 = require("./class/hL7Client.js");
10
10
  Object.defineProperty(exports, "HL7Client", { enumerable: true, get: function () { return hL7Client_js_1.HL7Client; } });
11
- var hL7Server_js_1 = require("./class/hL7Server.js");
11
+ const hL7Server_js_1 = require("./class/hL7Server.js");
12
12
  Object.defineProperty(exports, "HL7Server", { enumerable: true, get: function () { return hL7Server_js_1.HL7Server; } });
13
13
  exports.default = _1.default;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -33,122 +22,84 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
22
  __setModuleDefault(result, mod);
34
23
  return result;
35
24
  };
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
- function verb(n) { return function (v) { return step([n, v]); }; }
49
- function step(op) {
50
- if (f) throw new TypeError("Generator is already executing.");
51
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
52
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
- if (y = 0, t) op = [op[0] & 2, t.value];
54
- switch (op[0]) {
55
- case 0: case 1: t = op; break;
56
- case 4: _.label++; return { value: op[1], done: false };
57
- case 5: _.label++; y = op[1]; op = [0]; continue;
58
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
- default:
60
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
- if (t[2]) _.ops.pop();
65
- _.trys.pop(); continue;
66
- }
67
- op = body.call(thisArg, _);
68
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
- }
71
- };
72
25
  Object.defineProperty(exports, "__esModule", { value: true });
73
26
  exports.HL7Client = void 0;
74
- var node_hl7_client_1 = __importStar(require("node-hl7-client"));
75
- var errors_js_1 = require("../errors.js");
76
- var HL7Client = /** @class */ (function () {
77
- function HL7Client() {
27
+ const node_hl7_client_1 = __importStar(require("node-hl7-client"));
28
+ const errors_js_1 = require("../errors.js");
29
+ class HL7Client {
30
+ constructor() {
78
31
  this._clientConnections = [];
79
32
  }
80
33
  /**
81
34
  * Close All Connections for this Client
82
35
  * @since 1.0.0
83
36
  */
84
- HL7Client.prototype.closeAll = function () {
85
- return __awaiter(this, void 0, void 0, function () {
86
- var _this = this;
87
- return __generator(this, function (_a) {
88
- this._clientConnections.forEach(function (outbound) {
89
- outbound.ports.map(function (port) { return __awaiter(_this, void 0, void 0, function () {
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0: return [4 /*yield*/, port.connection.close()];
93
- case 1:
94
- _a.sent();
95
- return [2 /*return*/];
96
- }
97
- });
98
- }); });
99
- });
100
- return [2 /*return*/, true];
37
+ async closeAll() {
38
+ this._clientConnections.forEach(outbound => {
39
+ outbound.ports.map(async (port) => {
40
+ await port.connection.close();
101
41
  });
102
42
  });
103
- };
43
+ return true;
44
+ }
104
45
  /**
105
46
  * Build a HL7 Batch
106
47
  * @description Create a properly formatted HL7 Batch.
107
48
  * @since 1.0.0
108
49
  * @param props
109
50
  */
110
- HL7Client.prototype.buildBatch = function (props) {
51
+ buildBatch(props) {
111
52
  if (typeof props !== 'undefined' && typeof props.text !== 'undefined') {
112
53
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('Use processMessage method. This is for building.');
113
54
  }
114
- return new node_hl7_client_1.Batch(__assign({}, props));
115
- };
55
+ return new node_hl7_client_1.Batch({ ...props });
56
+ }
57
+ /**
58
+ * Build Date
59
+ * @description Build a date string based off HL7 Standards
60
+ * @since 2.1.0
61
+ * @param date
62
+ * @param length Options are 8, 12, or 14 (default)
63
+ */
64
+ buildDate(date, length) {
65
+ return (0, node_hl7_client_1.createHL7Date)(date, length);
66
+ }
116
67
  /**
117
68
  * Build a HL7 File Batch
118
69
  * @description Create a properly formatted HL7 File Batch.
119
70
  * @since 1.0.0
120
71
  * @param props
121
72
  */
122
- HL7Client.prototype.buildFileBatch = function (props) {
73
+ buildFileBatch(props) {
123
74
  if (typeof props !== 'undefined' && (typeof props.fullFilePath !== 'undefined' || typeof props.fileBuffer !== 'undefined')) {
124
75
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('Use readFile or readFileBuffer method. This is for building.');
125
76
  }
126
- return new node_hl7_client_1.FileBatch(__assign({}, props));
127
- };
77
+ return new node_hl7_client_1.FileBatch({ ...props });
78
+ }
128
79
  /**
129
80
  * Build a HL7 Message
130
81
  * @description Create a properly formatted HL7 message.
131
82
  * @since 1.0.0
132
83
  * @param props
133
84
  */
134
- HL7Client.prototype.buildMessage = function (props) {
85
+ buildMessage(props) {
135
86
  if (typeof props !== 'undefined' && typeof props.text !== 'undefined') {
136
87
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('Use processMessage method. This is for building.');
137
88
  }
138
- return new node_hl7_client_1.Message(__assign({}, props));
139
- };
89
+ return new node_hl7_client_1.Message({ ...props });
90
+ }
140
91
  /**
141
92
  *
142
93
  * @param name
143
94
  * @param props
144
95
  */
145
- HL7Client.prototype.createClient = function (name, props) {
146
- var nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
96
+ createClient(name, props) {
97
+ const nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
147
98
  if (nameFormat.test(name)) {
148
99
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('name must not contain certain characters: `!@#$%^&*()+\\-=\\[\\]{};\':"\\\\|,.<>\\/?~.');
149
100
  }
150
101
  // make sure that this does not exist already...
151
- this._clientConnections.forEach(function (connections) {
102
+ this._clientConnections.forEach((connections) => {
152
103
  if (connections.name === name) {
153
104
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('name must be unique.');
154
105
  }
@@ -158,15 +109,15 @@ var HL7Client = /** @class */ (function () {
158
109
  // }
159
110
  });
160
111
  // new client
161
- var client = new node_hl7_client_1.default(props);
112
+ const client = new node_hl7_client_1.default(props);
162
113
  // add it to the collection
163
114
  this._clientConnections.push({
164
- name: name,
165
- client: client,
115
+ name,
116
+ client,
166
117
  ports: []
167
118
  });
168
119
  return client;
169
- };
120
+ }
170
121
  /**
171
122
  * Create an HL7 Outbound Connection
172
123
  * @description Connect to an HL7 Server/Broker
@@ -175,70 +126,70 @@ var HL7Client = /** @class */ (function () {
175
126
  * @param props
176
127
  * @param handler
177
128
  */
178
- HL7Client.prototype.createConnection = function (name, props, handler) {
179
- var nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
129
+ createConnection(name, props, handler) {
130
+ const nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
180
131
  if (nameFormat.test(name)) {
181
132
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('name must not contain certain characters: `!@#$%^&*()+\\-=\\[\\]{};\':"\\\\|,.<>\\/?~.');
182
133
  }
183
- var getConnection = this._clientConnections.find(function (client) { return client.name === name; });
134
+ const getConnection = this._clientConnections.find(client => client.name === name);
184
135
  if (typeof getConnection !== 'undefined') {
185
136
  // make sure port is not used all ready
186
- getConnection.ports.forEach(function (outbound) {
137
+ getConnection.ports.forEach((outbound) => {
187
138
  if (outbound.port === props.port.toString()) {
188
- throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE("port ".concat(props.port, " is already used with this client. Choose a new outgoing port."));
139
+ throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE(`port ${props.port} is already used with this client. Choose a new outgoing port.`);
189
140
  }
190
141
  });
191
142
  // create outbound port to the server in getConnection.client
192
- var outbound = new node_hl7_client_1.Connection(getConnection.client, props, handler);
143
+ const outbound = new node_hl7_client_1.Connection(getConnection.client, props, handler);
193
144
  // add it to the array of known ports. need to know this, so we can get it later if needed.
194
145
  getConnection.ports.push({ port: props.port.toString(), connection: outbound });
195
146
  // return it right away. the user might do something with it.
196
147
  return outbound;
197
148
  }
198
149
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('No valid client. Improper setup of a outbound connection.');
199
- };
150
+ }
200
151
  /**
201
152
  * Get Client by the name
202
153
  * @since 1.0.0
203
154
  * @param name
204
155
  */
205
- HL7Client.prototype.getClientByName = function (name) {
206
- var connection = this._clientConnections.find(function (connection) { return connection.name === name; });
156
+ getClientByName(name) {
157
+ const connection = this._clientConnections.find(connection => connection.name === name);
207
158
  if (typeof connection !== 'undefined') {
208
159
  return connection.client;
209
160
  }
210
161
  return undefined;
211
- };
162
+ }
212
163
  /**
213
164
  * Get Connection by Port
214
165
  * @since 1.0.0
215
166
  * @param port
216
167
  */
217
- HL7Client.prototype.getClientConnectionByPort = function (port) {
218
- var connection;
219
- this._clientConnections.forEach(function (outbound) {
220
- outbound.ports.forEach(function (aPort) {
168
+ getClientConnectionByPort(port) {
169
+ let connection;
170
+ this._clientConnections.forEach(outbound => {
171
+ outbound.ports.forEach(aPort => {
221
172
  if (aPort.port === port) {
222
173
  connection = aPort.connection;
223
174
  }
224
175
  });
225
176
  });
226
177
  return connection;
227
- };
178
+ }
228
179
  /**
229
180
  * Process a HL7
230
181
  * @description A HL7 message that could either be a Message (MSH) or Batch (BHS)
231
182
  * @since 1.0.0
232
183
  * @param text Raw HL& String
233
184
  */
234
- HL7Client.prototype.processHL7 = function (text) {
185
+ processHL7(text) {
235
186
  if ((0, node_hl7_client_1.isBatch)(text)) {
236
- return new node_hl7_client_1.Batch({ text: text });
187
+ return new node_hl7_client_1.Batch({ text });
237
188
  }
238
189
  else {
239
- return new node_hl7_client_1.Message({ text: text });
190
+ return new node_hl7_client_1.Message({ text });
240
191
  }
241
- };
192
+ }
242
193
  /**
243
194
  * Read File
244
195
  * @description Pass the correct path of the file you want to read.
@@ -246,13 +197,13 @@ var HL7Client = /** @class */ (function () {
246
197
  * @param fullFilePath
247
198
  * @returns FileBatch
248
199
  * @example
249
- *
200
+ * ```ts
250
201
  * fastify.hl7.readFile( path.join('temp/', 'hl7.readTestBHS.20231208.hl7') )
251
- *
202
+ * ```
252
203
  */
253
- HL7Client.prototype.readFile = function (fullFilePath) {
254
- return new node_hl7_client_1.FileBatch({ fullFilePath: fullFilePath });
255
- };
204
+ readFile(fullFilePath) {
205
+ return new node_hl7_client_1.FileBatch({ fullFilePath });
206
+ }
256
207
  /**
257
208
  * Read a File Buffer
258
209
  * @description Translate an already Buffered HL7 FHS segment to decode it.
@@ -260,14 +211,13 @@ var HL7Client = /** @class */ (function () {
260
211
  * @param fileBuffer
261
212
  * @returns FileBatch
262
213
  * @example
263
- *
214
+ * ```ts
264
215
  * const fileBuffer = fs.readFileSync(path.join('temp/', 'hl7.readTestBHS.20231208.hl7'))
265
216
  * fastify.hl7.readFileBuffer(fileBuffer)
266
- *
217
+ * ```
267
218
  */
268
- HL7Client.prototype.readFileBuffer = function (fileBuffer) {
269
- return new node_hl7_client_1.FileBatch({ fileBuffer: fileBuffer });
270
- };
271
- return HL7Client;
272
- }());
219
+ readFileBuffer(fileBuffer) {
220
+ return new node_hl7_client_1.FileBatch({ fileBuffer });
221
+ }
222
+ }
273
223
  exports.HL7Client = HL7Client;
@@ -1,46 +1,10 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
3
  exports.HL7Server = void 0;
40
- var node_hl7_server_1 = require("node-hl7-server");
41
- var errors_js_1 = require("../errors.js");
42
- var HL7Server = /** @class */ (function () {
43
- function HL7Server(server) {
4
+ const node_hl7_server_1 = require("node-hl7-server");
5
+ const errors_js_1 = require("../errors.js");
6
+ class HL7Server {
7
+ constructor(server) {
44
8
  this._server = server;
45
9
  this._serverInboundConnections = [];
46
10
  }
@@ -49,43 +13,23 @@ var HL7Server = /** @class */ (function () {
49
13
  * @since 1.0.0
50
14
  * @param port
51
15
  */
52
- HL7Server.prototype.close = function (port) {
53
- return __awaiter(this, void 0, void 0, function () {
54
- var inbound;
55
- return __generator(this, function (_a) {
56
- switch (_a.label) {
57
- case 0:
58
- inbound = this._serverInboundConnections.find(function (server) { return server.port === port; });
59
- if (!(typeof inbound !== 'undefined')) return [3 /*break*/, 2];
60
- return [4 /*yield*/, inbound.server.close()]; // close the server for all inbound connections
61
- case 1: return [2 /*return*/, _a.sent()]; // close the server for all inbound connections
62
- case 2: throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE("No inbound server listening on port: ".concat(port));
63
- }
64
- });
65
- });
66
- };
16
+ async close(port) {
17
+ const inbound = this._serverInboundConnections.find(server => server.port === port);
18
+ if (typeof inbound !== 'undefined') {
19
+ return await inbound.server.close(); // close the server for all inbound connections
20
+ }
21
+ throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE(`No inbound server listening on port: ${port}`);
22
+ }
67
23
  /**
68
24
  * Close all Inbound connections.
69
25
  * @since 1.0.0
70
26
  */
71
- HL7Server.prototype.closeAll = function () {
72
- return __awaiter(this, void 0, void 0, function () {
73
- var _this = this;
74
- return __generator(this, function (_a) {
75
- this._serverInboundConnections.map(function (inbound) { return __awaiter(_this, void 0, void 0, function () {
76
- return __generator(this, function (_a) {
77
- switch (_a.label) {
78
- case 0: return [4 /*yield*/, inbound.server.close()];
79
- case 1:
80
- _a.sent();
81
- return [2 /*return*/];
82
- }
83
- });
84
- }); });
85
- return [2 /*return*/, true];
86
- });
27
+ async closeAll() {
28
+ this._serverInboundConnections.map(async (inbound) => {
29
+ await inbound.server.close();
87
30
  });
88
- };
31
+ return true;
32
+ }
89
33
  /**
90
34
  * Create Inbound connection.
91
35
  * @since 1.0.0
@@ -93,43 +37,42 @@ var HL7Server = /** @class */ (function () {
93
37
  * @param props
94
38
  * @param handler
95
39
  */
96
- HL7Server.prototype.createInbound = function (name, props, handler) {
97
- var nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
40
+ createInbound(name, props, handler) {
41
+ const nameFormat = /[ `!@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?~]/; //eslint-disable-line
98
42
  if (nameFormat.test(name)) {
99
43
  throw new errors_js_1.errors.FASTIFY_HL7_ERR_USAGE('name must not contain certain characters: `!@#$%^&*()+\\-=\\[\\]{};\':"\\\\|,.<>\\/?~.');
100
44
  }
101
- var inbound = new node_hl7_server_1.Inbound(this._server, props, handler);
45
+ const inbound = new node_hl7_server_1.Inbound(this._server, props, handler);
102
46
  this._serverInboundConnections.push({
103
- name: name,
47
+ name,
104
48
  port: props.port.toString(),
105
49
  server: inbound
106
50
  });
107
51
  return inbound;
108
- };
52
+ }
109
53
  /**
110
54
  * Get Server Inbound Connection by Name
111
55
  * @since 1.0.0
112
56
  * @param name
113
57
  */
114
- HL7Server.prototype.getServerByName = function (name) {
115
- var inbound = this._serverInboundConnections.find(function (inbound) { return inbound.name === name; });
58
+ getServerByName(name) {
59
+ const inbound = this._serverInboundConnections.find(inbound => inbound.name === name);
116
60
  if (typeof inbound !== 'undefined') {
117
61
  return inbound.server;
118
62
  }
119
63
  return undefined;
120
- };
64
+ }
121
65
  /**
122
66
  * Get Server Inbound Connection by Port
123
67
  * @since 1.0.0
124
68
  * @param port
125
69
  */
126
- HL7Server.prototype.getServerByPort = function (port) {
127
- var inbound = this._serverInboundConnections.find(function (inbound) { return inbound.port === port; });
70
+ getServerByPort(port) {
71
+ const inbound = this._serverInboundConnections.find(inbound => inbound.port === port);
128
72
  if (typeof inbound !== 'undefined') {
129
73
  return inbound.server;
130
74
  }
131
75
  return undefined;
132
- };
133
- return HL7Server;
134
- }());
76
+ }
77
+ }
135
78
  exports.HL7Server = HL7Server;
package/lib/cjs/errors.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.errors = void 0;
7
- var error_1 = __importDefault(require("@fastify/error"));
7
+ const error_1 = __importDefault(require("@fastify/error"));
8
8
  exports.errors = {
9
9
  /** Error if there is an setup error of the plugin itself. */
10
10
  FASTIFY_HL7_ERR_SETUP_ERRORS: (0, error_1.default)('FASTIFY_HL7_ERR_SETUP_ERRORS', 'Setup error: %s'),