@nsshunt/ststestrunner 1.0.29 → 1.0.30

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.
@@ -11796,14 +11796,14 @@ let SocketIoClientHelper$1 = class SocketIoClientHelper {
11796
11796
  get sockets() {
11797
11797
  return __privateGet2(this, _sockets$1);
11798
11798
  }
11799
- SetupClientSideSocket(name, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
11799
+ SetupClientSideSocket(name, address, socketIoCustomPath, onConnectCallBack, socketEventsCallBack, errorCallBack) {
11800
11800
  this.sockets[name] = {
11801
11801
  name,
11802
11802
  address,
11803
11803
  socket: null,
11804
11804
  errorCallBack
11805
11805
  };
11806
- __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack);
11806
+ __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack);
11807
11807
  return this.sockets[name].socket;
11808
11808
  }
11809
11809
  GetSocket(name) {
@@ -11822,7 +11822,7 @@ LogDebugMessage_fn$1 = function(message) {
11822
11822
  LogErrorMessage_fn$1 = function(message) {
11823
11823
  if (__privateGet2(this, _options$1).logger) __privateGet2(this, _options$1).logger.error(message);
11824
11824
  };
11825
- EstablishSocketConnect_fn$1 = function(name, onConnectCallBack, socketEventsCallBack) {
11825
+ EstablishSocketConnect_fn$1 = function(name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack) {
11826
11826
  const socketDetail = this.sockets[name];
11827
11827
  if (socketDetail.socket !== null) {
11828
11828
  if (socketDetail.socket.connected === true) {
@@ -11830,9 +11830,9 @@ EstablishSocketConnect_fn$1 = function(name, onConnectCallBack, socketEventsCall
11830
11830
  }
11831
11831
  socketDetail.socket = null;
11832
11832
  if (isNode$2) {
11833
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
11833
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
11834
11834
  } else {
11835
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
11835
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
11836
11836
  }
11837
11837
  return;
11838
11838
  }
@@ -11849,6 +11849,9 @@ EstablishSocketConnect_fn$1 = function(name, onConnectCallBack, socketEventsCall
11849
11849
  transports: ["websocket"]
11850
11850
  };
11851
11851
  }
11852
+ if (socketIoCustomPath && socketIoCustomPath.localeCompare("") !== 0) {
11853
+ socketOptions.path = socketIoCustomPath;
11854
+ }
11852
11855
  socketDetail.socket = lookup$2(socketDetail.address, socketOptions);
11853
11856
  socketDetail.socket.io.on("error", (err) => {
11854
11857
  __privateMethod$1(this, _SocketIoClientHelper_instances$1, LogErrorMessage_fn$1).call(this, `SocketIoClientHelper(): socketDetail.socket.io.on('error'): [${err}]`);
@@ -11896,9 +11899,9 @@ EstablishSocketConnect_fn$1 = function(name, onConnectCallBack, socketEventsCall
11896
11899
  if (__privateGet2(this, _options$1).agentManager) {
11897
11900
  __privateGet2(this, _options$1).agentManager.ResetAgent();
11898
11901
  }
11899
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
11902
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
11900
11903
  } else {
11901
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
11904
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
11902
11905
  }
11903
11906
  }
11904
11907
  break;
@@ -11921,9 +11924,9 @@ EstablishSocketConnect_fn$1 = function(name, onConnectCallBack, socketEventsCall
11921
11924
  if (__privateGet2(this, _options$1).agentManager) {
11922
11925
  (_a2 = __privateGet2(this, _options$1).agentManager) == null ? void 0 : _a2.ResetAgent();
11923
11926
  }
11924
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
11927
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
11925
11928
  } else {
11926
- setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
11929
+ setTimeout(() => __privateMethod$1(this, _SocketIoClientHelper_instances$1, EstablishSocketConnect_fn$1).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
11927
11930
  }
11928
11931
  }
11929
11932
  break;
@@ -11946,6 +11949,8 @@ class FhirSocketClient {
11946
11949
  // 'ststestrunner',
11947
11950
  cstr,
11948
11951
  // `https://stscore.stsmda.org:3005/nsstsfhir/` this.#options.ststccendpoint, stsfhir as the namespace
11952
+ __privateGet$1(this, _options2).socketIoCustomPath,
11953
+ // '/stsfhirsocket/socket.io/',
11949
11954
  // Connected Callback
11950
11955
  (socket2) => __privateGet$1(this, _OnSocketConnected).call(this, socket2, clientName2, joinRooms),
11951
11956
  // Events Registration
@@ -12890,8 +12895,9 @@ class TestCaseFhirBase {
12890
12895
  },
12891
12896
  useSocketClient: true,
12892
12897
  socketClientOptions: {
12893
- fhirServerEndpoint: `https://stscore.stsmda.org:3005`,
12898
+ fhirServerEndpoint: `https://stscore.stsmda.org`,
12894
12899
  // `https://stscore.stsmda.org:3005/nsstsfhir/`,
12900
+ socketIoCustomPath: "/stsfhirsocket/socket.io/",
12895
12901
  socketClientName: "ststestrunner",
12896
12902
  timeout: 5e3,
12897
12903
  socketIoClientHelperOptions: {
@@ -19360,14 +19366,14 @@ class SocketIoClientHelper2 {
19360
19366
  get sockets() {
19361
19367
  return __privateGet3(this, _sockets);
19362
19368
  }
19363
- SetupClientSideSocket(name, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
19369
+ SetupClientSideSocket(name, address, socketIoCustomPath, onConnectCallBack, socketEventsCallBack, errorCallBack) {
19364
19370
  this.sockets[name] = {
19365
19371
  name,
19366
19372
  address,
19367
19373
  socket: null,
19368
19374
  errorCallBack
19369
19375
  };
19370
- __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack);
19376
+ __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack);
19371
19377
  return this.sockets[name].socket;
19372
19378
  }
19373
19379
  GetSocket(name) {
@@ -19386,7 +19392,7 @@ LogDebugMessage_fn = function(message) {
19386
19392
  LogErrorMessage_fn = function(message) {
19387
19393
  if (__privateGet3(this, _options).logger) __privateGet3(this, _options).logger.error(message);
19388
19394
  };
19389
- EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBack) {
19395
+ EstablishSocketConnect_fn = function(name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack) {
19390
19396
  const socketDetail = this.sockets[name];
19391
19397
  if (socketDetail.socket !== null) {
19392
19398
  if (socketDetail.socket.connected === true) {
@@ -19394,9 +19400,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
19394
19400
  }
19395
19401
  socketDetail.socket = null;
19396
19402
  if (isNode) {
19397
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
19403
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
19398
19404
  } else {
19399
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
19405
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
19400
19406
  }
19401
19407
  return;
19402
19408
  }
@@ -19413,6 +19419,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
19413
19419
  transports: ["websocket"]
19414
19420
  };
19415
19421
  }
19422
+ if (socketIoCustomPath && socketIoCustomPath.localeCompare("") !== 0) {
19423
+ socketOptions.path = socketIoCustomPath;
19424
+ }
19416
19425
  socketDetail.socket = lookup(socketDetail.address, socketOptions);
19417
19426
  socketDetail.socket.io.on("error", (err) => {
19418
19427
  __privateMethod2(this, _SocketIoClientHelper_instances, LogErrorMessage_fn).call(this, `SocketIoClientHelper(): socketDetail.socket.io.on('error'): [${err}]`);
@@ -19460,9 +19469,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
19460
19469
  if (__privateGet3(this, _options).agentManager) {
19461
19470
  __privateGet3(this, _options).agentManager.ResetAgent();
19462
19471
  }
19463
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
19472
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
19464
19473
  } else {
19465
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
19474
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
19466
19475
  }
19467
19476
  }
19468
19477
  break;
@@ -19485,9 +19494,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
19485
19494
  if (__privateGet3(this, _options).agentManager) {
19486
19495
  (_a2 = __privateGet3(this, _options).agentManager) == null ? void 0 : _a2.ResetAgent();
19487
19496
  }
19488
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100).unref();
19497
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100).unref();
19489
19498
  } else {
19490
- setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack), 100);
19499
+ setTimeout(() => __privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack), 100);
19491
19500
  }
19492
19501
  }
19493
19502
  break;
@@ -20171,6 +20180,7 @@ class ServiceInstance {
20171
20180
  const socket = __privateGet(this, _socketUtils2).SetupClientSideSocket(
20172
20181
  "ststccagent",
20173
20182
  __privateGet(this, _options5).ststccendpoint,
20183
+ "",
20174
20184
  // Connected Callback
20175
20185
  (socket2) => __privateGet(this, _OnSocketConnected2).call(this, socket2, clientName, joinRooms),
20176
20186
  // Events Registration