@sprucelabs/mercury-client 45.0.16 → 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:
|
|
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:
|
|
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.
|
|
6
|
+
"version": "45.0.18",
|
|
7
7
|
"files": [
|
|
8
8
|
"build"
|
|
9
9
|
],
|
|
@@ -60,24 +60,24 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@sprucelabs/error": "^8.0.4",
|
|
63
|
-
"@sprucelabs/schema": "^33.0.
|
|
64
|
-
"@sprucelabs/spruce-core-schemas": "^42.0.
|
|
65
|
-
"@sprucelabs/spruce-event-utils": "^42.0.
|
|
66
|
-
"@sprucelabs/spruce-skill-utils": "^33.0.
|
|
63
|
+
"@sprucelabs/schema": "^33.0.10",
|
|
64
|
+
"@sprucelabs/spruce-core-schemas": "^42.0.13",
|
|
65
|
+
"@sprucelabs/spruce-event-utils": "^42.0.13",
|
|
66
|
+
"@sprucelabs/spruce-skill-utils": "^33.0.13",
|
|
67
67
|
"dotenv": "^17.2.3",
|
|
68
68
|
"just-clone": "^6.2.0",
|
|
69
69
|
"socket.io-client": "^4.8.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@sprucelabs/esm-postbuild": "^9.0.
|
|
73
|
-
"@sprucelabs/jest-json-reporter": "^10.0.
|
|
74
|
-
"@sprucelabs/mercury-core-events": "^28.0.
|
|
75
|
-
"@sprucelabs/mercury-event-emitter": "^45.0.
|
|
76
|
-
"@sprucelabs/mercury-types": "^49.0.
|
|
77
|
-
"@sprucelabs/resolve-path-aliases": "^4.0.
|
|
72
|
+
"@sprucelabs/esm-postbuild": "^9.0.5",
|
|
73
|
+
"@sprucelabs/jest-json-reporter": "^10.0.7",
|
|
74
|
+
"@sprucelabs/mercury-core-events": "^28.0.16",
|
|
75
|
+
"@sprucelabs/mercury-event-emitter": "^45.0.18",
|
|
76
|
+
"@sprucelabs/mercury-types": "^49.0.14",
|
|
77
|
+
"@sprucelabs/resolve-path-aliases": "^4.0.6",
|
|
78
78
|
"@sprucelabs/semantic-release": "^6.0.0",
|
|
79
|
-
"@sprucelabs/test": "^11.0.
|
|
80
|
-
"@sprucelabs/test-utils": "^7.0.
|
|
79
|
+
"@sprucelabs/test": "^11.0.1",
|
|
80
|
+
"@sprucelabs/test-utils": "^7.0.10",
|
|
81
81
|
"@types/node": "^24.10.1",
|
|
82
82
|
"chokidar-cli": "^3.0.0",
|
|
83
83
|
"eslint": "^9.39.1",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "f4c560c25711fbd6394d8502d92c357805226d8e"
|
|
112
112
|
}
|