@nsshunt/stsfhirclient 1.0.53 → 1.0.54
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/dist/stsfhirclient.mjs
CHANGED
|
@@ -4882,14 +4882,14 @@ class SocketIoClientHelper {
|
|
|
4882
4882
|
get sockets() {
|
|
4883
4883
|
return __privateGet2(this, _sockets);
|
|
4884
4884
|
}
|
|
4885
|
-
SetupClientSideSocket(name, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
|
|
4885
|
+
SetupClientSideSocket(name, address, socketIoCustomPath, onConnectCallBack, socketEventsCallBack, errorCallBack) {
|
|
4886
4886
|
this.sockets[name] = {
|
|
4887
4887
|
name,
|
|
4888
4888
|
address,
|
|
4889
4889
|
socket: null,
|
|
4890
4890
|
errorCallBack
|
|
4891
4891
|
};
|
|
4892
|
-
__privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack);
|
|
4892
|
+
__privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack);
|
|
4893
4893
|
return this.sockets[name].socket;
|
|
4894
4894
|
}
|
|
4895
4895
|
GetSocket(name) {
|
|
@@ -4908,7 +4908,7 @@ LogDebugMessage_fn = function(message) {
|
|
|
4908
4908
|
LogErrorMessage_fn = function(message) {
|
|
4909
4909
|
if (__privateGet2(this, _options).logger) __privateGet2(this, _options).logger.error(message);
|
|
4910
4910
|
};
|
|
4911
|
-
EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBack) {
|
|
4911
|
+
EstablishSocketConnect_fn = function(name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack) {
|
|
4912
4912
|
const socketDetail = this.sockets[name];
|
|
4913
4913
|
if (socketDetail.socket !== null) {
|
|
4914
4914
|
if (socketDetail.socket.connected === true) {
|
|
@@ -4916,9 +4916,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
4916
4916
|
}
|
|
4917
4917
|
socketDetail.socket = null;
|
|
4918
4918
|
if (isNode) {
|
|
4919
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
4919
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
4920
4920
|
} else {
|
|
4921
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
4921
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
|
|
4922
4922
|
}
|
|
4923
4923
|
return;
|
|
4924
4924
|
}
|
|
@@ -4935,6 +4935,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
4935
4935
|
transports: ["websocket"]
|
|
4936
4936
|
};
|
|
4937
4937
|
}
|
|
4938
|
+
if (socketIoCustomPath && socketIoCustomPath.localeCompare("") !== 0) {
|
|
4939
|
+
socketOptions.path = socketIoCustomPath;
|
|
4940
|
+
}
|
|
4938
4941
|
socketDetail.socket = lookup(socketDetail.address, socketOptions);
|
|
4939
4942
|
socketDetail.socket.io.on("error", (err) => {
|
|
4940
4943
|
__privateMethod(this, _SocketIoClientHelper_instances, LogErrorMessage_fn).call(this, `SocketIoClientHelper(): socketDetail.socket.io.on('error'): [${err}]`);
|
|
@@ -4982,9 +4985,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
4982
4985
|
if (__privateGet2(this, _options).agentManager) {
|
|
4983
4986
|
__privateGet2(this, _options).agentManager.ResetAgent();
|
|
4984
4987
|
}
|
|
4985
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
4988
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
4986
4989
|
} else {
|
|
4987
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
4990
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
|
|
4988
4991
|
}
|
|
4989
4992
|
}
|
|
4990
4993
|
break;
|
|
@@ -5007,9 +5010,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
5007
5010
|
if (__privateGet2(this, _options).agentManager) {
|
|
5008
5011
|
(_a = __privateGet2(this, _options).agentManager) == null ? void 0 : _a.ResetAgent();
|
|
5009
5012
|
}
|
|
5010
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
5013
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
|
|
5011
5014
|
} else {
|
|
5012
|
-
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
|
|
5015
|
+
setTimeout(() => __privateMethod(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
|
|
5013
5016
|
}
|
|
5014
5017
|
}
|
|
5015
5018
|
break;
|
|
@@ -5032,6 +5035,8 @@ class FhirSocketClient {
|
|
|
5032
5035
|
// 'ststestrunner',
|
|
5033
5036
|
cstr,
|
|
5034
5037
|
// `https://stscore.stsmda.org:3005/nsstsfhir/` this.#options.ststccendpoint, stsfhir as the namespace
|
|
5038
|
+
"",
|
|
5039
|
+
// '/mynsstsfhir/socket.io/',
|
|
5035
5040
|
// Connected Callback
|
|
5036
5041
|
(socket2) => __privateGet(this, _OnSocketConnected).call(this, socket2, clientName, joinRooms),
|
|
5037
5042
|
// Events Registration
|