@sprucelabs/mercury-client 45.0.17 → 45.0.18

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.
@@ -7,7 +7,7 @@ export default class MercuryClientFactory {
7
7
  private static timeoutMs;
8
8
  private static totalClients;
9
9
  private static clients;
10
- static ClientClass: new (...args: any[]) => MutableContractClient<EventContract>;
10
+ static ClientClass: ClientConstructor<EventContract> | null;
11
11
  static Client<Contract extends SkillEventContract = SkillEventContract>(connectionOptions?: ConnectionOptions): Promise<Client<Contract>>;
12
12
  static isInTestMode(): boolean;
13
13
  static setIsTestMode(isTestMode: boolean): void;
@@ -24,3 +24,5 @@ export type Client<Contract extends EventContract> = MercuryClient<Contract> & {
24
24
  doesHandleEvent(eventName: string): boolean;
25
25
  mixinContract(eventContract: EventContract): void;
26
26
  };
27
+ type ClientConstructor<Contract extends EventContract> = new (...args: any[]) => MutableContractClient<Contract>;
28
+ export {};
@@ -31,7 +31,6 @@ class MercuryClientFactory {
31
31
  Client = require('../clients/MercuryTestClient').default;
32
32
  }
33
33
  const client = new (MercuryClientFactory.ClientClass ??
34
- //@ts-ignore
35
34
  Client)({
36
35
  host,
37
36
  reconnection: false,
@@ -86,4 +85,5 @@ MercuryClientFactory.isTestMode = false;
86
85
  MercuryClientFactory.timeoutMs = 30000;
87
86
  MercuryClientFactory.totalClients = 0;
88
87
  MercuryClientFactory.clients = [];
88
+ MercuryClientFactory.ClientClass = null;
89
89
  exports.default = MercuryClientFactory;
@@ -7,7 +7,7 @@ export default class MercuryClientFactory {
7
7
  private static timeoutMs;
8
8
  private static totalClients;
9
9
  private static clients;
10
- static ClientClass: new (...args: any[]) => MutableContractClient<EventContract>;
10
+ static ClientClass: ClientConstructor<EventContract> | null;
11
11
  static Client<Contract extends SkillEventContract = SkillEventContract>(connectionOptions?: ConnectionOptions): Promise<Client<Contract>>;
12
12
  static isInTestMode(): boolean;
13
13
  static setIsTestMode(isTestMode: boolean): void;
@@ -24,3 +24,5 @@ export type Client<Contract extends EventContract> = MercuryClient<Contract> & {
24
24
  doesHandleEvent(eventName: string): boolean;
25
25
  mixinContract(eventContract: EventContract): void;
26
26
  };
27
+ type ClientConstructor<Contract extends EventContract> = new (...args: any[]) => MutableContractClient<Contract>;
28
+ export {};
@@ -36,9 +36,7 @@ class MercuryClientFactory {
36
36
  //TODO, make this something fitxures sets to make the test client available
37
37
  Client = require('../clients/MercuryTestClient.js').default;
38
38
  }
39
- const client = new ((_a = MercuryClientFactory.ClientClass) !== null && _a !== void 0 ? _a :
40
- //@ts-ignore
41
- Client)({
39
+ const client = new ((_a = MercuryClientFactory.ClientClass) !== null && _a !== void 0 ? _a : Client)({
42
40
  host,
43
41
  reconnection: false,
44
42
  reconnectDelayMs,
@@ -93,4 +91,5 @@ MercuryClientFactory.isTestMode = false;
93
91
  MercuryClientFactory.timeoutMs = 30000;
94
92
  MercuryClientFactory.totalClients = 0;
95
93
  MercuryClientFactory.clients = [];
94
+ MercuryClientFactory.ClientClass = null;
96
95
  export default MercuryClientFactory;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "45.0.17",
6
+ "version": "45.0.18",
7
7
  "files": [
8
8
  "build"
9
9
  ],
@@ -72,7 +72,7 @@
72
72
  "@sprucelabs/esm-postbuild": "^9.0.5",
73
73
  "@sprucelabs/jest-json-reporter": "^10.0.7",
74
74
  "@sprucelabs/mercury-core-events": "^28.0.16",
75
- "@sprucelabs/mercury-event-emitter": "^45.0.17",
75
+ "@sprucelabs/mercury-event-emitter": "^45.0.18",
76
76
  "@sprucelabs/mercury-types": "^49.0.14",
77
77
  "@sprucelabs/resolve-path-aliases": "^4.0.6",
78
78
  "@sprucelabs/semantic-release": "^6.0.0",
@@ -108,5 +108,5 @@
108
108
  "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
109
109
  }
110
110
  },
111
- "gitHead": "0d6ddf8c46a15e84d330e58472b5e3f0dcb35ef1"
111
+ "gitHead": "f4c560c25711fbd6394d8502d92c357805226d8e"
112
112
  }