@wxn0brp/gloves-link-server 0.0.11 → 0.0.12

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.
package/dist/index.js CHANGED
@@ -56,6 +56,8 @@ export class GlovesLinkServer {
56
56
  this.wss.handleUpgrade(request, socket, head, (ws) => {
57
57
  const glSocket = new GLSocket(ws, this);
58
58
  glSocket.logs = this.logs;
59
+ glSocket.authData = authData;
60
+ glSocket.authResult = authResult;
59
61
  if (typeof authResult.user === "object" && authResult.user !== null)
60
62
  glSocket.user = authResult.user;
61
63
  glSocket.namespace = pathname;
package/dist/socket.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { WebSocket } from "ws";
2
2
  import { GlovesLinkServer } from "./index.js";
3
3
  import { Room, Rooms } from "./room.js";
4
+ import { AuthFnResult, Server_Auth_Opts } from "./types.js";
4
5
  /**
5
6
  * GLSocket class represents a WebSocket connection with additional functionality
6
7
  * @template T - The type of user data associated with the socket
@@ -20,6 +21,8 @@ export declare class GLSocket<T = {
20
21
  [key: string]: Function;
21
22
  };
22
23
  rooms: Set<string>;
24
+ authData: Server_Auth_Opts;
25
+ authResult: AuthFnResult;
23
26
  /**
24
27
  * Creates a new GLSocket instance
25
28
  * @param ws - The underlying WebSocket connection
package/dist/socket.js CHANGED
@@ -14,6 +14,8 @@ export class GLSocket {
14
14
  logs = false;
15
15
  handlers;
16
16
  rooms = new Set();
17
+ authData;
18
+ authResult;
17
19
  /**
18
20
  * Creates a new GLSocket instance
19
21
  * @param ws - The underlying WebSocket connection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wxn0brp/gloves-link-server",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "wxn0brP",