@tsed/socketio 7.0.0-beta.1 → 7.0.0-beta.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/.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 +37 -19
- package/readme.md +82 -97
- 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.12",
|
|
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,58 @@
|
|
|
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.12",
|
|
36
|
+
"@tsed/core": "7.0.0-beta.12",
|
|
37
|
+
"@tsed/di": "7.0.0-beta.12",
|
|
38
|
+
"@tsed/json-mapper": "7.0.0-beta.12",
|
|
39
|
+
"@tsed/openspec": "7.0.0-beta.12",
|
|
40
|
+
"@tsed/platform-middlewares": "7.0.0-beta.12",
|
|
41
|
+
"@tsed/schema": "7.0.0-beta.12",
|
|
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.12",
|
|
48
|
+
"@tsed/json-mapper": "^7.0.0-beta.12",
|
|
49
|
+
"@tsed/logger": ">=6.1.1",
|
|
50
|
+
"@tsed/platform-middlewares": "^7.0.0-beta.12",
|
|
51
|
+
"@tsed/schema": "^7.0.0-beta.12",
|
|
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/beta/packages/third-parties/socketio",
|
|
58
73
|
"author": "Romain Lenzotti",
|
|
59
|
-
"license": "MIT"
|
|
74
|
+
"license": "MIT",
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"tag": "beta"
|
|
77
|
+
}
|
|
60
78
|
}
|
package/readme.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
12
12
|
[](https://github.com/semantic-release/semantic-release)
|
|
13
13
|
[](https://github.com/prettier/prettier)
|
|
14
|
-
[](https://github.com/sponsors/romakita)
|
|
15
|
+
[](https://opencollective.com/tsed)
|
|
15
16
|
|
|
16
17
|
</div>
|
|
17
18
|
|
|
@@ -45,24 +46,20 @@ Then add the following configuration in your Server:
|
|
|
45
46
|
import {Configuration} from "@tsed/common";
|
|
46
47
|
import "@tsed/socketio"; // import socketio Ts.ED module
|
|
47
48
|
import {resolve} from "path";
|
|
48
|
-
const rootDir = resolve(__dirname)
|
|
49
49
|
|
|
50
50
|
@Configuration({
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
51
|
+
socketIO: {
|
|
52
|
+
// ... see configuration
|
|
53
|
+
}
|
|
55
54
|
})
|
|
56
|
-
export class Server {
|
|
57
|
-
|
|
58
|
-
}
|
|
55
|
+
export class Server {}
|
|
59
56
|
```
|
|
60
57
|
|
|
61
58
|
## Socket Service
|
|
62
59
|
|
|
63
60
|
> 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/#).
|
|
61
|
+
> This is a useful feature to minimize the number of resources (TCP connections) and at the same time separate concerns within your application
|
|
62
|
+
> by introducing separation between communication channels. See [namespace documentation](https://socket.io/docs/rooms-and-namespaces/#).
|
|
66
63
|
|
|
67
64
|
All Socket service work under a namespace and you can create one Socket service per namespace.
|
|
68
65
|
|
|
@@ -74,31 +71,24 @@ import {SocketService, IO, Nsp, Socket, SocketSession} from "@tsed/socketio";
|
|
|
74
71
|
|
|
75
72
|
@SocketService("/my-namespace")
|
|
76
73
|
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
|
-
}
|
|
74
|
+
@Nsp nsp: SocketIO.Namespace;
|
|
75
|
+
|
|
76
|
+
@Nsp("/my-other-namespace")
|
|
77
|
+
nspOther: SocketIO.Namespace; // communication between two namespace
|
|
78
|
+
|
|
79
|
+
constructor(@IO private io: SocketIO.Server) {}
|
|
80
|
+
/**
|
|
81
|
+
* Triggered the namespace is created
|
|
82
|
+
*/
|
|
83
|
+
$onNamespaceInit(nsp: SocketIO.Namespace) {}
|
|
84
|
+
/**
|
|
85
|
+
* Triggered when a new client connects to the Namespace.
|
|
86
|
+
*/
|
|
87
|
+
$onConnection(@Socket socket: SocketIO.Socket, @SocketSession session: SocketSession) {}
|
|
88
|
+
/**
|
|
89
|
+
* Triggered when a client disconnects from the Namespace.
|
|
90
|
+
*/
|
|
91
|
+
$onDisconnect(@Socket socket: SocketIO.Socket) {}
|
|
102
92
|
}
|
|
103
93
|
```
|
|
104
94
|
|
|
@@ -112,13 +102,14 @@ import {SocketService, Nsp} from "@tsed/socketio";
|
|
|
112
102
|
|
|
113
103
|
@SocketService()
|
|
114
104
|
export class MySocketService {
|
|
115
|
-
|
|
105
|
+
@Nsp nsp: SocketIO.Namespace;
|
|
116
106
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
107
|
+
helloAll() {
|
|
108
|
+
this.nsp.emit("hi", "everyone!");
|
|
109
|
+
}
|
|
120
110
|
}
|
|
121
111
|
```
|
|
112
|
+
|
|
122
113
|
Then, you can inject your socket service into another Service, Controller, etc... as following:
|
|
123
114
|
|
|
124
115
|
```typescript
|
|
@@ -127,16 +118,13 @@ import {MySocketService} from "../services/MySocketService";
|
|
|
127
118
|
|
|
128
119
|
@Controller("/")
|
|
129
120
|
export class MyCtrl {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
this.mySocketService.helloAll();
|
|
138
|
-
return "is sent";
|
|
139
|
-
}
|
|
121
|
+
constructor(private mySocketService: MySocketService) {}
|
|
122
|
+
|
|
123
|
+
@Get("/allo")
|
|
124
|
+
allo() {
|
|
125
|
+
this.mySocketService.helloAll();
|
|
126
|
+
return "is sent";
|
|
127
|
+
}
|
|
140
128
|
}
|
|
141
129
|
```
|
|
142
130
|
|
|
@@ -149,10 +137,10 @@ import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
|
149
137
|
|
|
150
138
|
@SocketService("/my-namespace")
|
|
151
139
|
export class MySocketService {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
@Input("eventName")
|
|
141
|
+
myMethod(@Args(0) userName: string, @Socket socket: SocketIO.Socket, @Nsp nsp: SocketIO.Namespace) {
|
|
142
|
+
console.log(userName);
|
|
143
|
+
}
|
|
156
144
|
}
|
|
157
145
|
```
|
|
158
146
|
|
|
@@ -173,13 +161,14 @@ import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
|
173
161
|
|
|
174
162
|
@SocketService("/my-namespace")
|
|
175
163
|
export class MySocketService {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
164
|
+
@Input("eventName")
|
|
165
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
166
|
+
async myMethod(@Args(0) userName: string, @Socket socket: SocketIO.Socket) {
|
|
167
|
+
return "Message " + userName;
|
|
168
|
+
}
|
|
181
169
|
}
|
|
182
170
|
```
|
|
171
|
+
|
|
183
172
|
> The method accept a promise as returned value.
|
|
184
173
|
|
|
185
174
|
::: warning
|
|
@@ -195,17 +184,16 @@ import {SocketService, Input, Emit, Args, SocketSession} from "@tsed/socketio";
|
|
|
195
184
|
|
|
196
185
|
@SocketService("/my-namespace")
|
|
197
186
|
export class MySocketService {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
187
|
+
@Input("eventName")
|
|
188
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
189
|
+
async myMethod(@Args(0) userName: string, @SocketSession session: SocketSession) {
|
|
190
|
+
const user = session.get("user") || {};
|
|
191
|
+
user.name = userName;
|
|
201
192
|
|
|
202
|
-
|
|
203
|
-
user.name = userName;
|
|
193
|
+
session.set("user", user);
|
|
204
194
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return user;
|
|
208
|
-
}
|
|
195
|
+
return user;
|
|
196
|
+
}
|
|
209
197
|
}
|
|
210
198
|
```
|
|
211
199
|
|
|
@@ -222,16 +210,16 @@ import {User} from "../models/User";
|
|
|
222
210
|
|
|
223
211
|
@SocketMiddleware()
|
|
224
212
|
export class UserConverterSocketMiddleware {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
213
|
+
async use(@Args() args: any[]) {
|
|
214
|
+
let [user] = args;
|
|
215
|
+
// update Arguments
|
|
216
|
+
user = deserialize(user, {type: User});
|
|
217
|
+
|
|
218
|
+
return [user];
|
|
219
|
+
}
|
|
233
220
|
}
|
|
234
221
|
```
|
|
222
|
+
|
|
235
223
|
> The user instance will be forwarded to the next middleware and to your decorated method.
|
|
236
224
|
|
|
237
225
|
You can also declare a middleware to handle an error with `@SocketMiddlewareError`.
|
|
@@ -242,10 +230,10 @@ import {SocketMiddlewareError, SocketErr, Socket} from "@tsed/socketio";
|
|
|
242
230
|
|
|
243
231
|
@SocketMiddlewareError()
|
|
244
232
|
export class ErrorHandlerSocketMiddleware {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
233
|
+
async use(@SocketErr err: any, @Socket socket: SocketIO.Socket) {
|
|
234
|
+
console.error(err);
|
|
235
|
+
socket.emit("error", {message: "An error has occured"});
|
|
236
|
+
}
|
|
249
237
|
}
|
|
250
238
|
```
|
|
251
239
|
|
|
@@ -261,7 +249,7 @@ The call sequences is the following for each event request:
|
|
|
261
249
|
- Middlewares attached with `@SocketUseBefore` on method,
|
|
262
250
|
- The method,
|
|
263
251
|
- Send response if the method is decorated with `@Emit`, `@Broadcast` or `@BroadcastOther`,
|
|
264
|
-
- Middlewares attached with `@SocketUseAfter` on method,
|
|
252
|
+
- Middlewares attached with `@SocketUseAfter` on method,
|
|
265
253
|
- Middlewares attached with `@SocketUseAfter` on class.
|
|
266
254
|
|
|
267
255
|
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 +263,18 @@ import {User} from "../models/User";
|
|
|
275
263
|
@SocketUseBefore(UserConverterSocketMiddleware) // global version
|
|
276
264
|
@SocketUseAfter(ErrorHandlerSocketMiddleware)
|
|
277
265
|
export class MySocketService {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return user;
|
|
291
|
-
}
|
|
266
|
+
@Input("eventName")
|
|
267
|
+
@Emit("responseEventName") // or Broadcast or BroadcastOthers
|
|
268
|
+
@SocketUseBefore(UserConverterSocketMiddleware)
|
|
269
|
+
@SocketUseAfter(ErrorHandlerSocketMiddleware)
|
|
270
|
+
async myMethod(@Args(0) userName: User) {
|
|
271
|
+
const user = session.get("user") || {};
|
|
272
|
+
user.name = userName;
|
|
273
|
+
|
|
274
|
+
session.set("user", user);
|
|
275
|
+
|
|
276
|
+
return user;
|
|
277
|
+
}
|
|
292
278
|
}
|
|
293
279
|
```
|
|
294
280
|
|
|
@@ -297,18 +283,17 @@ export class MySocketService {
|
|
|
297
283
|
See our documentation https://tsed.io/#/api/index
|
|
298
284
|
|
|
299
285
|
## Contributors
|
|
286
|
+
|
|
300
287
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html)
|
|
301
288
|
|
|
302
289
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
303
290
|
|
|
304
|
-
|
|
305
291
|
## Backers
|
|
306
292
|
|
|
307
293
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
|
|
308
294
|
|
|
309
295
|
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
|
|
310
296
|
|
|
311
|
-
|
|
312
297
|
## Sponsors
|
|
313
298
|
|
|
314
299
|
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";
|