equipped 4.2.9 → 4.3.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [4.3.0](https://github.com/kevinand11/equipped/compare/v4.2.10...v4.3.0) (2024-02-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * query types and add query in sockets ([881c397](https://github.com/kevinand11/equipped/commit/881c3972a209fd3d5832255b3628da99e4c0726a))
11
+
12
+ ### [4.2.10](https://github.com/kevinand11/equipped/compare/v4.2.9...v4.2.10) (2024-02-09)
13
+
5
14
  ### [4.2.9](https://github.com/kevinand11/equipped/compare/v4.2.8...v4.2.9) (2024-02-09)
6
15
 
7
16
  ### [4.2.8](https://github.com/kevinand11/equipped/compare/v4.2.7...v4.2.8) (2023-12-19)
@@ -4,7 +4,7 @@ import { AuthUser } from '../utils/authUser';
4
4
  export type OnJoinFn = (data: {
5
5
  channel: string;
6
6
  user: AuthUser | null;
7
- }, params: Record<string, any>) => Promise<string | null>;
7
+ }, params: Record<string, any>, query: Record<string, any>) => Promise<string | null>;
8
8
  export type SocketCallers = {
9
9
  onConnect: (userId: string, socketId: string) => Promise<void>;
10
10
  onDisconnect: (userId: string, socketId: string) => Promise<void>;
@@ -71,7 +71,7 @@ class Listener {
71
71
  message: 'unknown channel',
72
72
  channel
73
73
  });
74
- const newChannel = await route.onJoin({ channel, user }, route.params);
74
+ const newChannel = await route.onJoin({ channel, user }, route.params, data.query ?? {});
75
75
  if (!newChannel)
76
76
  return typeof (callback) === 'function' && callback({
77
77
  code: server_1.StatusCodes.NotAuthorized,
@@ -12,7 +12,7 @@ export declare class Request {
12
12
  readonly cookies: Record<string, any>;
13
13
  readonly rawBody: Record<string, any>;
14
14
  readonly params: Record<string, string>;
15
- readonly query: Record<string, string>;
15
+ readonly query: Record<string, any>;
16
16
  readonly headers: Record<HeaderKeys | string, string | null>;
17
17
  readonly files: Record<string, StorageFile[]>;
18
18
  authUser: null | AuthUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "equipped",
3
- "version": "4.2.9",
3
+ "version": "4.3.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "main": "lib/index.js",