@tsed/socketio 6.133.1 → 6.133.2
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 +14 -14
- package/readme.md +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/socketio",
|
|
3
|
-
"version": "6.133.
|
|
3
|
+
"version": "6.133.2",
|
|
4
4
|
"description": "Socket.io package for Ts.ED framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
"tslib": "2.4.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tsed/common": "6.133.
|
|
36
|
-
"@tsed/core": "6.133.
|
|
37
|
-
"@tsed/di": "6.133.
|
|
38
|
-
"@tsed/json-mapper": "6.133.
|
|
39
|
-
"@tsed/openspec": "6.133.
|
|
40
|
-
"@tsed/platform-middlewares": "6.133.
|
|
41
|
-
"@tsed/schema": "6.133.
|
|
35
|
+
"@tsed/common": "6.133.2",
|
|
36
|
+
"@tsed/core": "6.133.2",
|
|
37
|
+
"@tsed/di": "6.133.2",
|
|
38
|
+
"@tsed/json-mapper": "6.133.2",
|
|
39
|
+
"@tsed/openspec": "6.133.2",
|
|
40
|
+
"@tsed/platform-middlewares": "6.133.2",
|
|
41
|
+
"@tsed/schema": "6.133.2",
|
|
42
42
|
"express": "^4.17.1",
|
|
43
43
|
"socket.io": "4.4.1",
|
|
44
44
|
"socket.io-client": "^4.1.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@tsed/di": "^6.133.
|
|
48
|
-
"@tsed/json-mapper": "^6.133.
|
|
49
|
-
"@tsed/logger": "
|
|
50
|
-
"@tsed/platform-middlewares": "^6.133.
|
|
51
|
-
"@tsed/schema": "^6.133.
|
|
47
|
+
"@tsed/di": "^6.133.2",
|
|
48
|
+
"@tsed/json-mapper": "^6.133.2",
|
|
49
|
+
"@tsed/logger": "^6.7.8",
|
|
50
|
+
"@tsed/platform-middlewares": "^6.133.2",
|
|
51
|
+
"@tsed/schema": "^6.133.2",
|
|
52
52
|
"socket.io": ">=4.0.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"bugs": {
|
|
70
70
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
71
71
|
},
|
|
72
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
72
|
+
"homepage": "https://github.com/tsedio/tsed/tree/6.x/packages/third-parties/socketio",
|
|
73
73
|
"author": "Romain Lenzotti",
|
|
74
74
|
"license": "MIT"
|
|
75
75
|
}
|
package/readme.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p style="text-align: center" align="center">
|
|
2
|
-
<a href="https://tsed.
|
|
2
|
+
<a href="https://tsed.dev" target="_blank"><img src="https://tsed.dev/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<div align="center">
|
|
20
|
-
<a href="https://tsed.
|
|
20
|
+
<a href="https://tsed.dev/">Website</a>
|
|
21
21
|
<span> • </span>
|
|
22
|
-
<a href="https://tsed.
|
|
22
|
+
<a href="https://tsed.dev/getting-started/">Getting started</a>
|
|
23
23
|
<span> • </span>
|
|
24
24
|
<a href="https://api.tsed.io/rest/slack/tsedio/tsed">Slack</a>
|
|
25
25
|
<span> • </span>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
<hr />
|
|
30
30
|
|
|
31
|
-
A package of Ts.ED framework. See website: https://tsed.
|
|
31
|
+
A package of Ts.ED framework. See website: https://tsed.dev/#/tutorials/socket-io
|
|
32
32
|
|
|
33
33
|
Socket.io enable real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.
|
|
34
34
|
|
|
@@ -130,7 +130,7 @@ export class MyCtrl {
|
|
|
130
130
|
|
|
131
131
|
### Declaring an Input Event
|
|
132
132
|
|
|
133
|
-
[@Input](https://tsed.
|
|
133
|
+
[@Input](https://tsed.dev/api/socketio/decorators/Input.html) decorator declare a method as a new handler for a specific `event`.
|
|
134
134
|
|
|
135
135
|
```typescript
|
|
136
136
|
import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
@@ -144,15 +144,15 @@ export class MySocketService {
|
|
|
144
144
|
}
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
- [@Args](https://tsed.
|
|
148
|
-
- [@Socket](https://tsed.
|
|
149
|
-
- [@Nsp](https://tsed.
|
|
147
|
+
- [@Args](https://tsed.dev/api/socketio/args.html) <any|any[]>: List of the parameters sent by the input event.
|
|
148
|
+
- [@Socket](https://tsed.dev/api/socketio/socket.html) <SocketIO.Socket>: Socket instance.
|
|
149
|
+
- [@Nsp](https://tsed.dev/api/socketio/nsp.html) <[SocketIO.Namespace](https://socket.io/docs/rooms-and-namespaces/#)>: Namespace instance.
|
|
150
150
|
|
|
151
151
|
### Send a response
|
|
152
152
|
|
|
153
153
|
You have a many choice to send a response to your client. Ts.ED offer some decorators to send a response:
|
|
154
154
|
|
|
155
|
-

|
|
156
156
|
|
|
157
157
|
Example:
|
|
158
158
|
|
|
@@ -172,7 +172,7 @@ export class MySocketService {
|
|
|
172
172
|
> The method accept a promise as returned value.
|
|
173
173
|
|
|
174
174
|
::: warning
|
|
175
|
-
Return value is only possible when the method is decorated by [@Emit](https://tsed.
|
|
175
|
+
Return value is only possible when the method is decorated by [@Emit](https://tsed.dev/api/socketio/emit.html), [@Broadcast](https://tsed.dev/api/socketio/broadcast.html) and [@BroadcastOthers](https://tsed.dev/api/socketio/broadcastothers.html).
|
|
176
176
|
:::
|
|
177
177
|
|
|
178
178
|
### Socket Session
|
|
@@ -280,11 +280,11 @@ export class MySocketService {
|
|
|
280
280
|
|
|
281
281
|
## Documentation
|
|
282
282
|
|
|
283
|
-
See our documentation https://tsed.
|
|
283
|
+
See our documentation https://tsed.dev/#/api/index
|
|
284
284
|
|
|
285
285
|
## Contributors
|
|
286
286
|
|
|
287
|
-
Please read [contributing guidelines here](https://tsed.
|
|
287
|
+
Please read [contributing guidelines here](https://tsed.dev/CONTRIBUTING.html)
|
|
288
288
|
|
|
289
289
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
290
290
|
|