@eleven-am/pondsocket 0.1.96 → 0.1.98
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/package.json +6 -6
- package/types.d.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eleven-am/pondsocket",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98",
|
|
4
4
|
"description": "PondSocket is a fast simple socket server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"socket",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"url": "git+https://github.com/Eleven-am/pondSocket.git"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nestjs/common": "^10.3.0",
|
|
33
|
-
"@nestjs/core": "^10.3.0",
|
|
34
|
-
"reflect-metadata": "^0.1.14",
|
|
35
32
|
"websocket": "^1.0.34",
|
|
36
|
-
"ws": "^8.
|
|
33
|
+
"ws": "^8.16.0"
|
|
37
34
|
},
|
|
38
35
|
"devDependencies": {
|
|
36
|
+
"@nestjs/common": "^10.3.0",
|
|
37
|
+
"@nestjs/core": "^10.3.0",
|
|
39
38
|
"@types/express": "^4.17.21",
|
|
40
39
|
"@types/jest": "^29.5.11",
|
|
41
40
|
"@types/node": "^20.10.5",
|
|
42
41
|
"@types/websocket": "^1.0.10",
|
|
43
42
|
"@types/ws": "^8.5.10",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
45
44
|
"eslint": "^8.56.0",
|
|
46
45
|
"eslint-plugin-file-progress": "^1.3.0",
|
|
47
46
|
"eslint-plugin-import": "^2.29.1",
|
|
48
47
|
"jest": "^29.7.0",
|
|
48
|
+
"reflect-metadata": "^0.1.14",
|
|
49
49
|
"superwstest": "^2.0.3",
|
|
50
50
|
"ts-jest": "^29.1.1",
|
|
51
51
|
"ts-node": "^10.9.2",
|
package/types.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ type Params<Path> = {
|
|
|
36
36
|
interface EndpointMetadata {
|
|
37
37
|
path?: string;
|
|
38
38
|
channels: Constructor<NonNullable<unknown>>[];
|
|
39
|
+
guards?: Constructor<CanActivate>[];
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
type PondPath<Path extends string> = Path | RegExp;
|
|
@@ -112,21 +113,21 @@ export enum ChannelState {
|
|
|
112
113
|
CLOSED = 'CLOSED',
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
declare class Context {
|
|
116
|
+
declare class Context<Path extends string = string> {
|
|
116
117
|
/**
|
|
117
118
|
* @desc The request object, available in onJoin handlers
|
|
118
119
|
*/
|
|
119
|
-
joinRequest: JoinRequest<
|
|
120
|
+
joinRequest: JoinRequest<Path> | null;
|
|
120
121
|
|
|
121
122
|
/**
|
|
122
123
|
* @desc The request object, available in onEvent handlers
|
|
123
124
|
*/
|
|
124
|
-
eventRequest: EventRequest<
|
|
125
|
+
eventRequest: EventRequest<Path> | null;
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
128
|
* @desc The request object, available in onConnection handlers
|
|
128
129
|
*/
|
|
129
|
-
connection: IncomingConnection<
|
|
130
|
+
connection: IncomingConnection<Path> | null;
|
|
130
131
|
|
|
131
132
|
/**
|
|
132
133
|
* @desc The leave event, available in onLeave handlers
|
|
@@ -166,7 +167,7 @@ declare class Context {
|
|
|
166
167
|
/**
|
|
167
168
|
* @desc The assigns, available in onJoin, onEvent handlers
|
|
168
169
|
*/
|
|
169
|
-
event: EventParams<
|
|
170
|
+
event: EventParams<Path> | null;
|
|
170
171
|
|
|
171
172
|
/**
|
|
172
173
|
* @desc Retrieves metadata associated with the class
|