@nsshunt/ststestrunner 1.0.28 → 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.
package/dist/ststestrunner.mjs
CHANGED
|
@@ -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
|
|
@@ -12831,16 +12836,19 @@ class TestCaseFhirBase {
|
|
|
12831
12836
|
__publicField(this, "StopRunner", async () => {
|
|
12832
12837
|
await __privateGet(this, _OutputLogMessage2).call(this, `StopRunner [${__privateGet(this, _runner2).id}]`);
|
|
12833
12838
|
await __privateGet(this, _ForcePublishTelemetryData2).call(this);
|
|
12839
|
+
__privateGet(this, _fhirClient).Terminate();
|
|
12834
12840
|
return true;
|
|
12835
12841
|
});
|
|
12836
12842
|
__publicField(this, "TerminateRunner", async () => {
|
|
12837
12843
|
await __privateGet(this, _OutputLogMessage2).call(this, `TerminateRunner [${__privateGet(this, _runner2).id}]`);
|
|
12838
12844
|
await __privateGet(this, _ForcePublishTelemetryData2).call(this);
|
|
12845
|
+
__privateGet(this, _fhirClient).Terminate();
|
|
12839
12846
|
return true;
|
|
12840
12847
|
});
|
|
12841
12848
|
__publicField(this, "Completed", async () => {
|
|
12842
12849
|
await __privateGet(this, _OutputLogMessage2).call(this, `Completed [${__privateGet(this, _runner2).id}] [${JSON.stringify(__privateGet(this, _runner2).instrumentData)}]`);
|
|
12843
12850
|
await __privateGet(this, _ForcePublishTelemetryData2).call(this);
|
|
12851
|
+
__privateGet(this, _fhirClient).Terminate();
|
|
12844
12852
|
return true;
|
|
12845
12853
|
});
|
|
12846
12854
|
__publicField(this, "PauseRunner", async () => {
|
|
@@ -12887,8 +12895,9 @@ class TestCaseFhirBase {
|
|
|
12887
12895
|
},
|
|
12888
12896
|
useSocketClient: true,
|
|
12889
12897
|
socketClientOptions: {
|
|
12890
|
-
fhirServerEndpoint: `https://stscore.stsmda.org
|
|
12898
|
+
fhirServerEndpoint: `https://stscore.stsmda.org`,
|
|
12891
12899
|
// `https://stscore.stsmda.org:3005/nsstsfhir/`,
|
|
12900
|
+
socketIoCustomPath: "/stsfhirsocket/socket.io/",
|
|
12892
12901
|
socketClientName: "ststestrunner",
|
|
12893
12902
|
timeout: 5e3,
|
|
12894
12903
|
socketIoClientHelperOptions: {
|
|
@@ -19357,14 +19366,14 @@ class SocketIoClientHelper2 {
|
|
|
19357
19366
|
get sockets() {
|
|
19358
19367
|
return __privateGet3(this, _sockets);
|
|
19359
19368
|
}
|
|
19360
|
-
SetupClientSideSocket(name, address, onConnectCallBack, socketEventsCallBack, errorCallBack) {
|
|
19369
|
+
SetupClientSideSocket(name, address, socketIoCustomPath, onConnectCallBack, socketEventsCallBack, errorCallBack) {
|
|
19361
19370
|
this.sockets[name] = {
|
|
19362
19371
|
name,
|
|
19363
19372
|
address,
|
|
19364
19373
|
socket: null,
|
|
19365
19374
|
errorCallBack
|
|
19366
19375
|
};
|
|
19367
|
-
__privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, onConnectCallBack, socketEventsCallBack);
|
|
19376
|
+
__privateMethod2(this, _SocketIoClientHelper_instances, EstablishSocketConnect_fn).call(this, name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack);
|
|
19368
19377
|
return this.sockets[name].socket;
|
|
19369
19378
|
}
|
|
19370
19379
|
GetSocket(name) {
|
|
@@ -19383,7 +19392,7 @@ LogDebugMessage_fn = function(message) {
|
|
|
19383
19392
|
LogErrorMessage_fn = function(message) {
|
|
19384
19393
|
if (__privateGet3(this, _options).logger) __privateGet3(this, _options).logger.error(message);
|
|
19385
19394
|
};
|
|
19386
|
-
EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBack) {
|
|
19395
|
+
EstablishSocketConnect_fn = function(name, socketIoCustomPath, onConnectCallBack, socketEventsCallBack) {
|
|
19387
19396
|
const socketDetail = this.sockets[name];
|
|
19388
19397
|
if (socketDetail.socket !== null) {
|
|
19389
19398
|
if (socketDetail.socket.connected === true) {
|
|
@@ -19391,9 +19400,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
19391
19400
|
}
|
|
19392
19401
|
socketDetail.socket = null;
|
|
19393
19402
|
if (isNode) {
|
|
19394
|
-
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();
|
|
19395
19404
|
} else {
|
|
19396
|
-
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);
|
|
19397
19406
|
}
|
|
19398
19407
|
return;
|
|
19399
19408
|
}
|
|
@@ -19410,6 +19419,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
19410
19419
|
transports: ["websocket"]
|
|
19411
19420
|
};
|
|
19412
19421
|
}
|
|
19422
|
+
if (socketIoCustomPath && socketIoCustomPath.localeCompare("") !== 0) {
|
|
19423
|
+
socketOptions.path = socketIoCustomPath;
|
|
19424
|
+
}
|
|
19413
19425
|
socketDetail.socket = lookup(socketDetail.address, socketOptions);
|
|
19414
19426
|
socketDetail.socket.io.on("error", (err) => {
|
|
19415
19427
|
__privateMethod2(this, _SocketIoClientHelper_instances, LogErrorMessage_fn).call(this, `SocketIoClientHelper(): socketDetail.socket.io.on('error'): [${err}]`);
|
|
@@ -19457,9 +19469,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
19457
19469
|
if (__privateGet3(this, _options).agentManager) {
|
|
19458
19470
|
__privateGet3(this, _options).agentManager.ResetAgent();
|
|
19459
19471
|
}
|
|
19460
|
-
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();
|
|
19461
19473
|
} else {
|
|
19462
|
-
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);
|
|
19463
19475
|
}
|
|
19464
19476
|
}
|
|
19465
19477
|
break;
|
|
@@ -19482,9 +19494,9 @@ EstablishSocketConnect_fn = function(name, onConnectCallBack, socketEventsCallBa
|
|
|
19482
19494
|
if (__privateGet3(this, _options).agentManager) {
|
|
19483
19495
|
(_a2 = __privateGet3(this, _options).agentManager) == null ? void 0 : _a2.ResetAgent();
|
|
19484
19496
|
}
|
|
19485
|
-
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();
|
|
19486
19498
|
} else {
|
|
19487
|
-
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);
|
|
19488
19500
|
}
|
|
19489
19501
|
}
|
|
19490
19502
|
break;
|
|
@@ -20168,6 +20180,7 @@ class ServiceInstance {
|
|
|
20168
20180
|
const socket = __privateGet(this, _socketUtils2).SetupClientSideSocket(
|
|
20169
20181
|
"ststccagent",
|
|
20170
20182
|
__privateGet(this, _options5).ststccendpoint,
|
|
20183
|
+
"",
|
|
20171
20184
|
// Connected Callback
|
|
20172
20185
|
(socket2) => __privateGet(this, _OnSocketConnected2).call(this, socket2, clientName, joinRooms),
|
|
20173
20186
|
// Events Registration
|