@nsshunt/ststestrunner 1.0.22 → 1.0.24

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.
@@ -11961,7 +11961,23 @@ class FhirSocketClient {
11961
11961
  socket.emit("__STSjoinRoom", joinRooms);
11962
11962
  }
11963
11963
  });
11964
+ __publicField2(this, "WaitForSocketConnected", async () => {
11965
+ if (this.socket.connected === true) {
11966
+ return;
11967
+ }
11968
+ let connected = false;
11969
+ while (!connected) {
11970
+ console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection ...`));
11971
+ const socketRetVal = this.socket;
11972
+ if (socketRetVal.connected === true) {
11973
+ connected = true;
11974
+ break;
11975
+ }
11976
+ await Sleep(100);
11977
+ }
11978
+ });
11964
11979
  __publicField2(this, "CreateResource", async (resource, domainResource) => {
11980
+ await this.WaitForSocketConnected();
11965
11981
  const promCreate = () => {
11966
11982
  const request = {
11967
11983
  headers: {
@@ -11984,6 +12000,7 @@ class FhirSocketClient {
11984
12000
  return promCreate();
11985
12001
  });
11986
12002
  __publicField2(this, "CreateResources", async (resource, domainResources) => {
12003
+ await this.WaitForSocketConnected();
11987
12004
  const promCreate = () => {
11988
12005
  const request = {
11989
12006
  headers: {
@@ -12006,6 +12023,7 @@ class FhirSocketClient {
12006
12023
  return (await promCreate()).value;
12007
12024
  });
12008
12025
  __publicField2(this, "GetResource", async (resource, resourceId) => {
12026
+ await this.WaitForSocketConnected();
12009
12027
  const promGet = () => {
12010
12028
  const request = {
12011
12029
  headers: {
@@ -12030,6 +12048,7 @@ class FhirSocketClient {
12030
12048
  return promGet();
12031
12049
  });
12032
12050
  __publicField2(this, "GetResources", async (resource, searchParams) => {
12051
+ await this.WaitForSocketConnected();
12033
12052
  const promGet = () => {
12034
12053
  const request = {
12035
12054
  headers: {
@@ -12052,6 +12071,7 @@ class FhirSocketClient {
12052
12071
  return (await promGet()).value;
12053
12072
  });
12054
12073
  __publicField2(this, "UpdateResource", async (resource, domainResource) => {
12074
+ await this.WaitForSocketConnected();
12055
12075
  const promCreate = () => {
12056
12076
  const request = {
12057
12077
  headers: {
@@ -12076,6 +12096,7 @@ class FhirSocketClient {
12076
12096
  return (await promCreate()).value;
12077
12097
  });
12078
12098
  __publicField2(this, "UpdateResources", async (resource, domainResources) => {
12099
+ await this.WaitForSocketConnected();
12079
12100
  const promCreate = () => {
12080
12101
  const request = {
12081
12102
  headers: {
@@ -12098,6 +12119,7 @@ class FhirSocketClient {
12098
12119
  return (await promCreate()).value;
12099
12120
  });
12100
12121
  __publicField2(this, "PatchResource", async (resource, domainResource) => {
12122
+ await this.WaitForSocketConnected();
12101
12123
  const promCreate = () => {
12102
12124
  const request = {
12103
12125
  headers: {
@@ -12122,6 +12144,7 @@ class FhirSocketClient {
12122
12144
  return (await promCreate()).value;
12123
12145
  });
12124
12146
  __publicField2(this, "PatchResources", async (resource, domainResources) => {
12147
+ await this.WaitForSocketConnected();
12125
12148
  const promCreate = () => {
12126
12149
  const request = {
12127
12150
  headers: {
@@ -12144,6 +12167,7 @@ class FhirSocketClient {
12144
12167
  return (await promCreate()).value;
12145
12168
  });
12146
12169
  __publicField2(this, "DeleteResource", async (resource, resourceId) => {
12170
+ await this.WaitForSocketConnected();
12147
12171
  const promCreate = () => {
12148
12172
  const request = {
12149
12173
  headers: {
@@ -12168,6 +12192,7 @@ class FhirSocketClient {
12168
12192
  return (await promCreate()).value;
12169
12193
  });
12170
12194
  __publicField2(this, "DeleteResources", async (resource, domainResource) => {
12195
+ await this.WaitForSocketConnected();
12171
12196
  const prom = () => {
12172
12197
  const delRequest = {
12173
12198
  headers: {
@@ -12864,7 +12889,7 @@ class TestCaseFhirBase {
12864
12889
  },
12865
12890
  useSocketClient: true,
12866
12891
  socketClientOptions: {
12867
- fhirServerEndpoint: `https://stscore.stsmda.org`,
12892
+ fhirServerEndpoint: `https://stscore.stsmda.org:3005`,
12868
12893
  // `https://stscore.stsmda.org:3005/nsstsfhir/`,
12869
12894
  socketClientName: "ststestrunner",
12870
12895
  timeout: 5e3,