@hastehaul/common 2.0.51 → 2.0.53

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ export declare class SocketWrapper {
20
20
  *
21
21
  * @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
22
22
  */
23
- connect(httpServer: http.Server, path?: string): Promise<void>;
23
+ connect(httpServer: http.Server, path?: string, adapter?: any): Promise<void>;
24
24
  }
25
25
  /**
26
26
  * Singleton instance of the SocketWrapper class to provide a centralized Socket.IO server connection.
@@ -33,10 +33,11 @@ class SocketWrapper {
33
33
  *
34
34
  * @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
35
35
  */
36
- connect(httpServer, path) {
36
+ connect(httpServer, path, adapter) {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  return new Promise((resolve, reject) => {
39
39
  this._io = new socket_io_1.Server(httpServer, {
40
+ adapter: adapter,
40
41
  path: `/${path ? path + '/' : ''}socket/`,
41
42
  pingTimeout: 30000,
42
43
  pingInterval: 25000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.51",
3
+ "version": "2.0.53",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "ioredis": "^5.3.2",
32
32
  "jsonwebtoken": "^9.0.1",
33
33
  "moment": "^2.29.4",
34
- "nats": "^2.15.1",
34
+ "nats": "^2.17.0",
35
35
  "socket.io": "^4.7.1"
36
36
  }
37
37
  }