@nsshunt/ststestrunner 1.0.49 → 1.0.51
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
|
@@ -17,9 +17,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
17
17
|
return __privateGet(obj, member, getter);
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
var _runner, _workerInstance, _logMessageDataSet, _publishTelemetryTimeout, _publishTelemetryCount, _maxBufferSize, _publishTelemetryTimeoutVal, _color, _randomPastelColour, _TestCase01_instances, GetRandomHexColor_fn, _GetRandomPastelColor, _debug2, _GenLogMessage, _SetupTimeout, _PublishTelemetryData, _ForcePublishTelemetryData, _PublishTelemetry, _OutputLogMessage, _options4, _agentManager, _randomDataRecordset, _runner2, _workerInstance2, _fhirClient, _accesssToken, _clientId, _clientSecret, _publishTelemetryCount2, _maxBufferSize2, _publishTelemetryTimeout2, _publishTelemetryTimeoutVal2, _originRegex,
|
|
21
|
-
import { defaultLogger, Sleep, STSAxiosConfig } from "@nsshunt/stsutils";
|
|
20
|
+
var _runner, _workerInstance, _logMessageDataSet, _publishTelemetryTimeout, _publishTelemetryCount, _maxBufferSize, _publishTelemetryTimeoutVal, _color, _randomPastelColour, _TestCase01_instances, GetRandomHexColor_fn, _GetRandomPastelColor, _debug2, _GenLogMessage, _SetupTimeout, _PublishTelemetryData, _ForcePublishTelemetryData, _PublishTelemetry, _OutputLogMessage, _options4, _agentManager, _randomDataRecordset, _runner2, _workerInstance2, _fhirClient, _accesssToken, _clientId, _clientSecret, _publishTelemetryCount2, _maxBufferSize2, _publishTelemetryTimeout2, _publishTelemetryTimeoutVal2, _originRegex, _LogMessage, _PublishTelemetryData2, _ForcePublishTelemetryData2, _SetupTimeout2, _OutputLogMessage2, _debug3, _debug4, _error2, _GetPersonRecord, _runner3, _workerInstance3, _logMessageDataSet2, _publishTelemetryTimeout3, _publishTelemetryCount3, _maxBufferSize3, _publishTelemetryTimeoutVal3, _color2, _randomPastelColour2, _TestStartUp_instances, GetRandomHexColor_fn2, _GetRandomPastelColor2, _debug5, _GenLogMessage2, _SetupTimeout3, _PublishTelemetryData3, _ForcePublishTelemetryData3, _PublishTelemetry2, _OutputLogMessage3, _runner4, _workerInstance4, _logMessageDataSet3, _publishTelemetryTimeout4, _publishTelemetryCount4, _maxBufferSize4, _publishTelemetryTimeoutVal4, _color3, _randomPastelColour3, _TestShutDown_instances, GetRandomHexColor_fn3, _GetRandomPastelColor3, _debug6, _GenLogMessage3, _SetupTimeout4, _PublishTelemetryData4, _ForcePublishTelemetryData4, _PublishTelemetry3, _OutputLogMessage4, _options5, _id2, _clientName2, _wm, _socketUtils2, _debug7, _error3, _info2, _GetKeyPayloadData, _LogPayloadEventRetVal, _EmitStateChange, _SetupRunnerEventHandlers, _HandleAddRunner, _SetupWSSClient2, _OnSocketConnected2, _RegisterSocketEvents, _EmitEvent, _GetSocketEventHandlers;
|
|
21
|
+
import { defaultLogger, Sleep, STSAxiosConfig, AgentManager } from "@nsshunt/stsutils";
|
|
22
22
|
import "@nsshunt/stsobservability";
|
|
23
|
+
import http from "node:http";
|
|
24
|
+
import https from "node:https";
|
|
23
25
|
var __defProp$1 = Object.defineProperty;
|
|
24
26
|
var __typeError$2 = (msg) => {
|
|
25
27
|
throw TypeError(msg);
|
|
@@ -12590,7 +12592,13 @@ _TestMode = /* @__PURE__ */ new WeakMap();
|
|
|
12590
12592
|
___InvokeResourceAPI = /* @__PURE__ */ new WeakMap();
|
|
12591
12593
|
_BuildQueryString = /* @__PURE__ */ new WeakMap();
|
|
12592
12594
|
class TestCaseFhirBase {
|
|
12593
|
-
|
|
12595
|
+
/*
|
|
12596
|
+
#FHIR_SOCKET_CLIENT_USE = true;
|
|
12597
|
+
#FHIR_SOCKET_CLIENT_TIMEOUT = 60000;
|
|
12598
|
+
#FHIR_SOCKET_CLIENT_NAME = 'ststestrunner';
|
|
12599
|
+
#FHIR_SOCKET_CLIENT_CUSTOM_PATH = '/stsfhirsocket/socket.io/';
|
|
12600
|
+
#FHIR_SOCKET_CLIENT_FHIR_SERVER_ENDPOINT = `https://stscore.stsmda.org`; // `https://stscore.stsmda.org:3005/nsstsfhir/`,
|
|
12601
|
+
*/
|
|
12594
12602
|
constructor(workerInstance, runner) {
|
|
12595
12603
|
__privateAdd(this, _options4);
|
|
12596
12604
|
//#authUtilsNode: AuthUtilsNode;
|
|
@@ -12611,11 +12619,6 @@ class TestCaseFhirBase {
|
|
|
12611
12619
|
__privateAdd(this, _publishTelemetryTimeoutVal2, 1e3);
|
|
12612
12620
|
// Maximum timne to wait between telemetry publish. The logic is what ever case comes first wins (see maxBufferSize).
|
|
12613
12621
|
__privateAdd(this, _originRegex, /^(api:\/\/\w+)/);
|
|
12614
|
-
__privateAdd(this, _FHIR_SOCKET_CLIENT_USE, true);
|
|
12615
|
-
__privateAdd(this, _FHIR_SOCKET_CLIENT_TIMEOUT, 6e4);
|
|
12616
|
-
__privateAdd(this, _FHIR_SOCKET_CLIENT_NAME, "ststestrunner");
|
|
12617
|
-
__privateAdd(this, _FHIR_SOCKET_CLIENT_CUSTOM_PATH, "/stsfhirsocket/socket.io/");
|
|
12618
|
-
__privateAdd(this, _FHIR_SOCKET_CLIENT_FHIR_SERVER_ENDPOINT, `https://stscore.stsmda.org`);
|
|
12619
12622
|
__privateAdd(this, _LogMessage, (message) => {
|
|
12620
12623
|
});
|
|
12621
12624
|
__publicField(this, "LogErrorMessage", (message) => {
|
|
@@ -12906,6 +12909,26 @@ class TestCaseFhirBase {
|
|
|
12906
12909
|
__privateSet(this, _workerInstance2, workerInstance);
|
|
12907
12910
|
__privateSet(this, _runner2, runner);
|
|
12908
12911
|
console.log(`TestCaseFhirBase(): fhirEndpoint: [${__privateGet(this, _options4).fhirEndpoint}]`);
|
|
12912
|
+
let agentManager = void 0;
|
|
12913
|
+
if (__privateGet(this, _options4).nodeAgentOptions) {
|
|
12914
|
+
agentManager = new AgentManager({
|
|
12915
|
+
agentOptions: {
|
|
12916
|
+
keepAlive: __privateGet(this, _options4).nodeAgentOptions.keepAlive,
|
|
12917
|
+
maxSockets: __privateGet(this, _options4).nodeAgentOptions.maxSockets,
|
|
12918
|
+
maxTotalSockets: __privateGet(this, _options4).nodeAgentOptions.maxTotalSockets,
|
|
12919
|
+
maxFreeSockets: __privateGet(this, _options4).nodeAgentOptions.maxFreeSockets,
|
|
12920
|
+
timeout: 6e4,
|
|
12921
|
+
//@@ config
|
|
12922
|
+
rejectUnauthorized: __privateGet(this, _options4).nodeAgentOptions.rejectUnauthorized
|
|
12923
|
+
},
|
|
12924
|
+
httpAgentFactory(options) {
|
|
12925
|
+
return new http.Agent(options);
|
|
12926
|
+
},
|
|
12927
|
+
httpsAgentFactory(options) {
|
|
12928
|
+
return new https.Agent(options);
|
|
12929
|
+
}
|
|
12930
|
+
});
|
|
12931
|
+
}
|
|
12909
12932
|
__privateSet(this, _fhirClient, new FhirClient({
|
|
12910
12933
|
fhirEndpoint: __privateGet(this, _options4).fhirEndpoint,
|
|
12911
12934
|
logger: defaultLogger,
|
|
@@ -12924,16 +12947,29 @@ class TestCaseFhirBase {
|
|
|
12924
12947
|
__privateGet(this, _runner2).instrumentData.retryCount++;
|
|
12925
12948
|
}
|
|
12926
12949
|
},
|
|
12927
|
-
|
|
12950
|
+
agentManager,
|
|
12951
|
+
useSocketClient: __privateGet(this, _options4).useSocketClient,
|
|
12928
12952
|
socketClientOptions: {
|
|
12929
|
-
fhirServerEndpoint: __privateGet(this,
|
|
12930
|
-
socketIoCustomPath: __privateGet(this,
|
|
12931
|
-
socketClientName: __privateGet(this,
|
|
12932
|
-
timeout: __privateGet(this,
|
|
12953
|
+
fhirServerEndpoint: __privateGet(this, _options4).socketClientOptions.socketClientFhirServerEndpoint,
|
|
12954
|
+
socketIoCustomPath: __privateGet(this, _options4).socketClientOptions.socketClientCustomPath,
|
|
12955
|
+
socketClientName: __privateGet(this, _options4).socketClientOptions.socketClientName,
|
|
12956
|
+
timeout: __privateGet(this, _options4).socketClientOptions.socketClientTimeout,
|
|
12933
12957
|
socketIoClientHelperOptions: {
|
|
12934
12958
|
logger: defaultLogger
|
|
12935
12959
|
}
|
|
12936
12960
|
}
|
|
12961
|
+
/*
|
|
12962
|
+
useSocketClient: this.#FHIR_SOCKET_CLIENT_USE,
|
|
12963
|
+
socketClientOptions: {
|
|
12964
|
+
fhirServerEndpoint: this.#FHIR_SOCKET_CLIENT_FHIR_SERVER_ENDPOINT,
|
|
12965
|
+
socketIoCustomPath: this.#FHIR_SOCKET_CLIENT_CUSTOM_PATH,
|
|
12966
|
+
socketClientName: this.#FHIR_SOCKET_CLIENT_NAME,
|
|
12967
|
+
timeout: this.#FHIR_SOCKET_CLIENT_TIMEOUT,
|
|
12968
|
+
socketIoClientHelperOptions: {
|
|
12969
|
+
logger: defaultLogger
|
|
12970
|
+
}
|
|
12971
|
+
}
|
|
12972
|
+
*/
|
|
12937
12973
|
}));
|
|
12938
12974
|
}
|
|
12939
12975
|
get accesssToken() {
|
|
@@ -13202,11 +13238,6 @@ _maxBufferSize2 = new WeakMap();
|
|
|
13202
13238
|
_publishTelemetryTimeout2 = new WeakMap();
|
|
13203
13239
|
_publishTelemetryTimeoutVal2 = new WeakMap();
|
|
13204
13240
|
_originRegex = new WeakMap();
|
|
13205
|
-
_FHIR_SOCKET_CLIENT_USE = new WeakMap();
|
|
13206
|
-
_FHIR_SOCKET_CLIENT_TIMEOUT = new WeakMap();
|
|
13207
|
-
_FHIR_SOCKET_CLIENT_NAME = new WeakMap();
|
|
13208
|
-
_FHIR_SOCKET_CLIENT_CUSTOM_PATH = new WeakMap();
|
|
13209
|
-
_FHIR_SOCKET_CLIENT_FHIR_SERVER_ENDPOINT = new WeakMap();
|
|
13210
13241
|
_LogMessage = new WeakMap();
|
|
13211
13242
|
_PublishTelemetryData2 = new WeakMap();
|
|
13212
13243
|
_ForcePublishTelemetryData2 = new WeakMap();
|