@tsed/socketio 7.0.0-beta.1 → 7.0.0-beta.4
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/.mocharc.js +2 -2
- package/lib/cjs/SocketIOModule.js +20 -19
- package/lib/cjs/SocketIOModule.js.map +1 -1
- package/lib/cjs/class/SocketHandlersBuilder.js +3 -3
- package/lib/cjs/class/SocketHandlersBuilder.js.map +1 -1
- package/lib/cjs/class/SocketProviderMetadata.js.map +1 -1
- package/lib/cjs/constants/{index.js → constants.js} +1 -1
- package/lib/cjs/constants/constants.js.map +1 -0
- package/lib/cjs/decorators/io.js +3 -3
- package/lib/cjs/decorators/io.js.map +1 -1
- package/lib/cjs/decorators/socketMiddleware.js +4 -4
- package/lib/cjs/decorators/socketMiddleware.js.map +1 -1
- package/lib/cjs/decorators/socketMiddlewareError.js +2 -2
- package/lib/cjs/decorators/socketMiddlewareError.js.map +1 -1
- package/lib/cjs/decorators/socketService.js +1 -1
- package/lib/cjs/decorators/socketService.js.map +1 -1
- package/lib/cjs/index.js +39 -28
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/interfaces.js +3 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/services/SocketIOServer.js +2 -2
- package/lib/cjs/services/SocketIOServer.js.map +1 -1
- package/lib/cjs/services/SocketIOService.js +4 -4
- package/lib/cjs/services/SocketIOService.js.map +1 -1
- package/lib/esm/SocketIOModule.js +7 -6
- package/lib/esm/SocketIOModule.js.map +1 -1
- package/lib/esm/class/SocketHandlersBuilder.js +8 -8
- package/lib/esm/class/SocketHandlersBuilder.js.map +1 -1
- package/lib/esm/class/SocketProviderMetadata.js.map +1 -1
- package/lib/esm/constants/{index.js → constants.js} +1 -1
- package/lib/esm/constants/constants.js.map +1 -0
- package/lib/esm/decorators/args.js +1 -1
- package/lib/esm/decorators/broadcast.js +2 -2
- package/lib/esm/decorators/broadcastOthers.js +2 -2
- package/lib/esm/decorators/emit.js +2 -2
- package/lib/esm/decorators/inputAndBroadcast.js +2 -2
- package/lib/esm/decorators/inputAndBroadcastOthers.js +2 -2
- package/lib/esm/decorators/inputAndEmit.js +2 -2
- package/lib/esm/decorators/io.js +2 -2
- package/lib/esm/decorators/io.js.map +1 -1
- package/lib/esm/decorators/nsp.js +2 -2
- package/lib/esm/decorators/socket.js +2 -2
- package/lib/esm/decorators/socketErr.js +2 -2
- package/lib/esm/decorators/socketEventName.js +2 -2
- package/lib/esm/decorators/socketMiddleware.js +2 -2
- package/lib/esm/decorators/socketMiddleware.js.map +1 -1
- package/lib/esm/decorators/socketMiddlewareError.js +2 -2
- package/lib/esm/decorators/socketMiddlewareError.js.map +1 -1
- package/lib/esm/decorators/socketService.js +2 -2
- package/lib/esm/decorators/socketService.js.map +1 -1
- package/lib/esm/decorators/socketSession.js +2 -2
- package/lib/esm/index.js +39 -28
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/interfaces.js +2 -0
- package/lib/esm/interfaces/interfaces.js.map +1 -0
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/SocketIOServer.js +1 -1
- package/lib/esm/services/SocketIOServer.js.map +1 -1
- package/lib/esm/services/SocketIOService.js +3 -3
- package/lib/types/SocketIOModule.d.ts +1 -1
- package/lib/types/class/SocketHandlersBuilder.d.ts +2 -2
- package/lib/types/class/SocketProviderMetadata.d.ts +2 -1
- package/lib/types/constants/{index.d.ts → constants.d.ts} +0 -0
- package/lib/types/index.d.ts +21 -7
- package/lib/types/interfaces/interfaces.d.ts +8 -0
- package/package.json +33 -18
- package/readme.md +80 -96
- package/tsconfig.compile.esm.json +1 -12
- package/lib/cjs/constants/index.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -11
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/esm/constants/index.js.map +0 -1
- package/lib/esm/interfaces/index.js +0 -8
- package/lib/esm/interfaces/index.js.map +0 -1
- package/lib/types/interfaces/index.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/socketio",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.4",
|
|
4
4
|
"description": "Socket.io package for Ts.ED framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"source": "./src/index.ts",
|
|
14
14
|
"main": "./lib/cjs/index.js",
|
|
15
|
+
"module": "./lib/esm/index.js",
|
|
15
16
|
"typings": "./lib/types/index.d.ts",
|
|
16
17
|
"exports": {
|
|
17
18
|
"types": "./lib/types/index.d.ts",
|
|
@@ -20,41 +21,55 @@
|
|
|
20
21
|
"default": "./lib/esm/index.js"
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
23
|
-
"build": "yarn run build:esm && yarn run build:cjs",
|
|
24
|
+
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
24
25
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
25
26
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
27
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
|
|
26
28
|
"start": "ts-node -r tsconfig-paths/register test/app/index.ts",
|
|
27
29
|
"test": "cross-env NODE_ENV=test nyc mocha"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
|
-
"tslib": "2.
|
|
32
|
+
"tslib": "2.3.1"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
|
-
"@tsed/common": "7.0.0-beta.
|
|
34
|
-
"@tsed/core": "7.0.0-beta.
|
|
35
|
-
"@tsed/di": "7.0.0-beta.
|
|
36
|
-
"@tsed/json-mapper": "7.0.0-beta.
|
|
37
|
-
"@tsed/openspec": "7.0.0-beta.
|
|
38
|
-
"@tsed/
|
|
35
|
+
"@tsed/common": "7.0.0-beta.4",
|
|
36
|
+
"@tsed/core": "7.0.0-beta.4",
|
|
37
|
+
"@tsed/di": "7.0.0-beta.4",
|
|
38
|
+
"@tsed/json-mapper": "7.0.0-beta.4",
|
|
39
|
+
"@tsed/openspec": "7.0.0-beta.4",
|
|
40
|
+
"@tsed/platform-middlewares": "7.0.0-beta.4",
|
|
41
|
+
"@tsed/schema": "7.0.0-beta.4",
|
|
39
42
|
"express": "^4.17.1",
|
|
40
|
-
"socket.io": "4.1
|
|
43
|
+
"socket.io": "4.4.1",
|
|
41
44
|
"socket.io-client": "^4.1.2"
|
|
42
45
|
},
|
|
43
46
|
"peerDependencies": {
|
|
44
|
-
"@tsed/
|
|
45
|
-
"@tsed/
|
|
46
|
-
"@tsed/
|
|
47
|
-
"@tsed/
|
|
48
|
-
"@tsed/
|
|
49
|
-
"@tsed/openspec": "^7.0.0-beta.1",
|
|
50
|
-
"@tsed/schema": "^7.0.0-beta.1",
|
|
47
|
+
"@tsed/di": "^7.0.0-beta.4",
|
|
48
|
+
"@tsed/json-mapper": "^7.0.0-beta.4",
|
|
49
|
+
"@tsed/logger": ">=6.1.1",
|
|
50
|
+
"@tsed/platform-middlewares": "^7.0.0-beta.4",
|
|
51
|
+
"@tsed/schema": "^7.0.0-beta.4",
|
|
51
52
|
"socket.io": ">=4.0.0"
|
|
52
53
|
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"@tsed/di": {
|
|
56
|
+
"optional": false
|
|
57
|
+
},
|
|
58
|
+
"@tsed/json-mapper": {
|
|
59
|
+
"optional": false
|
|
60
|
+
},
|
|
61
|
+
"@tsed/platform-middlewares": {
|
|
62
|
+
"optional": false
|
|
63
|
+
},
|
|
64
|
+
"@tsed/schema": {
|
|
65
|
+
"optional": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
53
68
|
"repository": "https://github.com/tsedio/tsed",
|
|
54
69
|
"bugs": {
|
|
55
70
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
56
71
|
},
|
|
57
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
72
|
+
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/third-parties/socketio",
|
|
58
73
|
"author": "Romain Lenzotti",
|
|
59
74
|
"license": "MIT"
|
|
60
75
|
}
|
package/readme.md
CHANGED
|
@@ -45,24 +45,20 @@ Then add the following configuration in your Server:
|
|
|
45
45
|
import {Configuration} from "@tsed/common";
|
|
46
46
|
import "@tsed/socketio"; // import socketio Ts.ED module
|
|
47
47
|
import {resolve} from "path";
|
|
48
|
-
const rootDir = resolve(__dirname)
|
|
49
48
|
|
|
50
49
|
@Configuration({
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
50
|
+
socketIO: {
|
|
51
|
+
// ... see configuration
|
|
52
|
+
}
|
|
55
53
|
})
|
|
56
|
-
export class Server {
|
|
57
|
-
|
|
58
|
-
}
|
|
54
|
+
export class Server {}
|
|
59
55
|
```
|
|
60
56
|
|
|
61
57
|
## Socket Service
|
|
62
58
|
|
|
63
59
|
> Socket.IO allows you to “namespace” your sockets, which essentially means assigning different endpoints or paths.
|
|
64
|
-
This is a useful feature to minimize the number of resources (TCP connections) and at the same time separate concerns within your application
|
|
65
|
-
by introducing separation between communication channels. See [namespace documentation](https://socket.io/docs/rooms-and-namespaces/#).
|
|
60
|
+
> This is a useful feature to minimize the number of resources (TCP connections) and at the same time separate concerns within your application
|
|
61
|
+
> by introducing separation between communication channels. See [namespace documentation](https://socket.io/docs/rooms-and-namespaces/#).
|
|
66
62
|
|
|
67
63
|
All Socket service work under a namespace and you can create one Socket service per namespace.
|
|
68
64
|
|
|
@@ -74,31 +70,24 @@ import {SocketService, IO, Nsp, Socket, SocketSession} from "@tsed/socketio";
|
|
|
74
70
|
|
|
75
71
|
@SocketService("/my-namespace")
|
|
76
72
|
export class MySocketService {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Triggered when a client disconnects from the Namespace.
|
|
98
|
-
*/
|
|
99
|
-
$onDisconnect(@Socket socket: SocketIO.Socket) {
|
|
100
|
-
|
|
101
|
-
}
|
|
73
|
+
@Nsp nsp: SocketIO.Namespace;
|
|
74
|
+
|
|
75
|
+
@Nsp("/my-other-namespace")
|
|
76
|
+
nspOther: SocketIO.Namespace; // communication between two namespace
|
|
77
|
+
|
|
78
|
+
constructor(@IO private io: SocketIO.Server) {}
|
|
79
|
+
/**
|
|
80
|
+
* Triggered the namespace is created
|
|
81
|
+
*/
|
|
82
|
+
$onNamespaceInit(nsp: SocketIO.Namespace) {}
|
|
83
|
+
/**
|
|
84
|
+
* Triggered when a new client connects to the Namespace.
|
|
85
|
+
*/
|
|
86
|
+
$onConnection(@Socket socket: SocketIO.Socket, @SocketSession session: SocketSession) {}
|
|
87
|
+
/**
|
|
88
|
+
* Triggered when a client disconnects from the Namespace.
|
|
89
|
+
*/
|
|
90
|
+
$onDisconnect(@Socket socket: SocketIO.Socket) {}
|
|
102
91
|
}
|
|
103
92
|
```
|
|
104
93
|
|
|
@@ -112,13 +101,14 @@ import {SocketService, Nsp} from "@tsed/socketio";
|
|
|
112
101
|
|
|
113
102
|
@SocketService()
|
|
114
103
|
export class MySocketService {
|
|
115
|
-
|
|
104
|
+
@Nsp nsp: SocketIO.Namespace;
|
|
116
105
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
106
|
+
helloAll() {
|
|
107
|
+
this.nsp.emit("hi", "everyone!");
|
|
108
|
+
}
|
|
120
109
|
}
|
|
121
110
|
```
|
|
111
|
+
|
|
122
112
|
Then, you can inject your socket service into another Service, Controller, etc... as following:
|
|
123
113
|
|
|
124
114
|
```typescript
|
|
@@ -127,16 +117,13 @@ import {MySocketService} from "../services/MySocketService";
|
|
|
127
117
|
|
|
128
118
|
@Controller("/")
|
|
129
119
|
export class MyCtrl {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
this.mySocketService.helloAll();
|
|
138
|
-
return "is sent";
|
|
139
|
-
}
|
|
120
|
+
constructor(private mySocketService: MySocketService) {}
|
|
121
|
+
|
|
122
|
+
@Get("/allo")
|
|
123
|
+
allo() {
|
|
124
|
+
this.mySocketService.helloAll();
|
|
125
|
+
return "is sent";
|
|
126
|
+
}
|
|
140
127
|
}
|
|
141
128
|
```
|
|
142
129
|
|
|
@@ -149,10 +136,10 @@ import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
|
149
136
|
|
|
150
137
|
@SocketService("/my-namespace")
|
|
151
138
|
export class MySocketService {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
139
|
+
@Input("eventName")
|
|
140
|
+
myMethod(@Args(0) userName: string, @Socket socket: SocketIO.Socket, @Nsp nsp: SocketIO.Namespace) {
|
|
141
|
+
console.log(userName);
|
|
142
|
+
}
|
|
156
143
|
}
|
|
157
144
|
```
|
|
158
145
|
|
|
@@ -173,13 +160,14 @@ import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
|
173
160
|
|
|
174
161
|
@SocketService("/my-namespace")
|
|
175
162
|
export class MySocketService {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
163
|
+
@Input("eventName")
|
|
164
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
165
|
+
async myMethod(@Args(0) userName: string, @Socket socket: SocketIO.Socket) {
|
|
166
|
+
return "Message " + userName;
|
|
167
|
+
}
|
|
181
168
|
}
|
|
182
169
|
```
|
|
170
|
+
|
|
183
171
|
> The method accept a promise as returned value.
|
|
184
172
|
|
|
185
173
|
::: warning
|
|
@@ -195,17 +183,16 @@ import {SocketService, Input, Emit, Args, SocketSession} from "@tsed/socketio";
|
|
|
195
183
|
|
|
196
184
|
@SocketService("/my-namespace")
|
|
197
185
|
export class MySocketService {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
186
|
+
@Input("eventName")
|
|
187
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
188
|
+
async myMethod(@Args(0) userName: string, @SocketSession session: SocketSession) {
|
|
189
|
+
const user = session.get("user") || {};
|
|
190
|
+
user.name = userName;
|
|
201
191
|
|
|
202
|
-
|
|
203
|
-
user.name = userName;
|
|
192
|
+
session.set("user", user);
|
|
204
193
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return user;
|
|
208
|
-
}
|
|
194
|
+
return user;
|
|
195
|
+
}
|
|
209
196
|
}
|
|
210
197
|
```
|
|
211
198
|
|
|
@@ -222,16 +209,16 @@ import {User} from "../models/User";
|
|
|
222
209
|
|
|
223
210
|
@SocketMiddleware()
|
|
224
211
|
export class UserConverterSocketMiddleware {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
212
|
+
async use(@Args() args: any[]) {
|
|
213
|
+
let [user] = args;
|
|
214
|
+
// update Arguments
|
|
215
|
+
user = deserialize(user, {type: User});
|
|
216
|
+
|
|
217
|
+
return [user];
|
|
218
|
+
}
|
|
233
219
|
}
|
|
234
220
|
```
|
|
221
|
+
|
|
235
222
|
> The user instance will be forwarded to the next middleware and to your decorated method.
|
|
236
223
|
|
|
237
224
|
You can also declare a middleware to handle an error with `@SocketMiddlewareError`.
|
|
@@ -242,10 +229,10 @@ import {SocketMiddlewareError, SocketErr, Socket} from "@tsed/socketio";
|
|
|
242
229
|
|
|
243
230
|
@SocketMiddlewareError()
|
|
244
231
|
export class ErrorHandlerSocketMiddleware {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
232
|
+
async use(@SocketErr err: any, @Socket socket: SocketIO.Socket) {
|
|
233
|
+
console.error(err);
|
|
234
|
+
socket.emit("error", {message: "An error has occured"});
|
|
235
|
+
}
|
|
249
236
|
}
|
|
250
237
|
```
|
|
251
238
|
|
|
@@ -261,7 +248,7 @@ The call sequences is the following for each event request:
|
|
|
261
248
|
- Middlewares attached with `@SocketUseBefore` on method,
|
|
262
249
|
- The method,
|
|
263
250
|
- Send response if the method is decorated with `@Emit`, `@Broadcast` or `@BroadcastOther`,
|
|
264
|
-
- Middlewares attached with `@SocketUseAfter` on method,
|
|
251
|
+
- Middlewares attached with `@SocketUseAfter` on method,
|
|
265
252
|
- Middlewares attached with `@SocketUseAfter` on class.
|
|
266
253
|
|
|
267
254
|
Middlewares chain use the `Promise` to run it. If one of this middlewares/method emit an error, the first middleware error will be called.
|
|
@@ -275,20 +262,18 @@ import {User} from "../models/User";
|
|
|
275
262
|
@SocketUseBefore(UserConverterSocketMiddleware) // global version
|
|
276
263
|
@SocketUseAfter(ErrorHandlerSocketMiddleware)
|
|
277
264
|
export class MySocketService {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return user;
|
|
291
|
-
}
|
|
265
|
+
@Input("eventName")
|
|
266
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
267
|
+
@SocketUseBefore(UserConverterSocketMiddleware)
|
|
268
|
+
@SocketUseAfter(ErrorHandlerSocketMiddleware)
|
|
269
|
+
async myMethod(@Args(0) userName: User) {
|
|
270
|
+
const user = session.get("user") || {};
|
|
271
|
+
user.name = userName;
|
|
272
|
+
|
|
273
|
+
session.set("user", user);
|
|
274
|
+
|
|
275
|
+
return user;
|
|
276
|
+
}
|
|
292
277
|
}
|
|
293
278
|
```
|
|
294
279
|
|
|
@@ -297,18 +282,17 @@ export class MySocketService {
|
|
|
297
282
|
See our documentation https://tsed.io/#/api/index
|
|
298
283
|
|
|
299
284
|
## Contributors
|
|
285
|
+
|
|
300
286
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html)
|
|
301
287
|
|
|
302
288
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
303
289
|
|
|
304
|
-
|
|
305
290
|
## Backers
|
|
306
291
|
|
|
307
292
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
|
|
308
293
|
|
|
309
294
|
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
|
|
310
295
|
|
|
311
|
-
|
|
312
296
|
## Sponsors
|
|
313
297
|
|
|
314
298
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
|
|
@@ -8,16 +8,5 @@
|
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"declarationDir": "./lib/types"
|
|
10
10
|
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"node_modules",
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
11
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,eAAe,CAAC","sourcesContent":["export const PROVIDER_TYPE_SOCKET_SERVICE = \"socketService\";\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./SocketHandlerMetadata"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./SocketParamMetadata"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./SocketProviderTypes"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./OnNamespaceInit"), exports);
|
|
8
|
-
(0, tslib_1.__exportStar)(require("./SocketFilters"), exports);
|
|
9
|
-
(0, tslib_1.__exportStar)(require("./SocketReturnsTypes"), exports);
|
|
10
|
-
(0, tslib_1.__exportStar)(require("./SocketInjectableNsp"), exports);
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAUA,uEAAwC;AACxC,qEAAsC;AACtC,qEAAsC;AACtC,iEAAkC;AAClC,+DAAgC;AAChC,oEAAqC;AACrC,qEAAsC","sourcesContent":["import SocketIO from \"socket.io\";\n\ndeclare global {\n namespace TsED {\n interface Configuration {\n socketIO: Partial<SocketIO.ServerOptions>;\n }\n }\n}\n\nexport * from \"./SocketHandlerMetadata\";\nexport * from \"./SocketParamMetadata\";\nexport * from \"./SocketProviderTypes\";\nexport * from \"./OnNamespaceInit\";\nexport * from \"./SocketFilters\";\nexport * from \"./SocketReturnsTypes\";\nexport * from \"./SocketInjectableNsp\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG,eAAe,CAAC","sourcesContent":["export const PROVIDER_TYPE_SOCKET_SERVICE = \"socketService\";\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./SocketHandlerMetadata";
|
|
2
|
-
export * from "./SocketParamMetadata";
|
|
3
|
-
export * from "./SocketProviderTypes";
|
|
4
|
-
export * from "./OnNamespaceInit";
|
|
5
|
-
export * from "./SocketFilters";
|
|
6
|
-
export * from "./SocketReturnsTypes";
|
|
7
|
-
export * from "./SocketInjectableNsp";
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAUA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC","sourcesContent":["import SocketIO from \"socket.io\";\n\ndeclare global {\n namespace TsED {\n interface Configuration {\n socketIO: Partial<SocketIO.ServerOptions>;\n }\n }\n}\n\nexport * from \"./SocketHandlerMetadata\";\nexport * from \"./SocketParamMetadata\";\nexport * from \"./SocketProviderTypes\";\nexport * from \"./OnNamespaceInit\";\nexport * from \"./SocketFilters\";\nexport * from \"./SocketReturnsTypes\";\nexport * from \"./SocketInjectableNsp\";\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import SocketIO from "socket.io";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace TsED {
|
|
4
|
-
interface Configuration {
|
|
5
|
-
socketIO: Partial<SocketIO.ServerOptions>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export * from "./SocketHandlerMetadata";
|
|
10
|
-
export * from "./SocketParamMetadata";
|
|
11
|
-
export * from "./SocketProviderTypes";
|
|
12
|
-
export * from "./OnNamespaceInit";
|
|
13
|
-
export * from "./SocketFilters";
|
|
14
|
-
export * from "./SocketReturnsTypes";
|
|
15
|
-
export * from "./SocketInjectableNsp";
|