@hastehaul/common 2.0.12 → 2.0.14

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.
@@ -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): void;
23
+ connect(httpServer: http.Server, path?: string): void;
24
24
  }
25
25
  /**
26
26
  * Singleton instance of the SocketWrapper class to provide a centralized Socket.IO server connection.
@@ -24,9 +24,9 @@ class SocketWrapper {
24
24
  *
25
25
  * @param {http.Server} httpServer - The HTTP server instance to attach Socket.IO to.
26
26
  */
27
- connect(httpServer) {
27
+ connect(httpServer, path) {
28
28
  this._io = new socket_io_1.Server(httpServer, {
29
- path: "/socket/",
29
+ path: path || `/${path}/socket/`,
30
30
  pingTimeout: 30000,
31
31
  pingInterval: 25000,
32
32
  cors: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",