@tsed/socketio-testing 8.3.0 → 8.3.1
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 +8 -8
- package/readme.md +11 -13
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/socketio-testing",
|
|
3
3
|
"description": "Socket.io testing package for Ts.ED framework",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.3.
|
|
5
|
+
"version": "8.3.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"tslib": "2.7.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tsed/barrels": "8.3.
|
|
28
|
-
"@tsed/di": "8.3.
|
|
29
|
-
"@tsed/platform-http": "8.3.
|
|
30
|
-
"@tsed/typescript": "8.3.
|
|
27
|
+
"@tsed/barrels": "8.3.1",
|
|
28
|
+
"@tsed/di": "8.3.1",
|
|
29
|
+
"@tsed/platform-http": "8.3.1",
|
|
30
|
+
"@tsed/typescript": "8.3.1",
|
|
31
31
|
"eslint": "9.12.0",
|
|
32
32
|
"socket.io-client": "^4.8.0",
|
|
33
33
|
"typescript": "5.4.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@tsed/core": "8.3.
|
|
37
|
-
"@tsed/di": "8.3.
|
|
38
|
-
"@tsed/platform-http": "8.3.
|
|
36
|
+
"@tsed/core": "8.3.1",
|
|
37
|
+
"@tsed/di": "8.3.1",
|
|
38
|
+
"@tsed/platform-http": "8.3.1",
|
|
39
39
|
"socket.io-client": "^4.0.1"
|
|
40
40
|
},
|
|
41
41
|
"repository": "https://github.com/tsedio/tsed",
|
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">
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
<div align="center">
|
|
19
|
-
<a href="https://tsed.
|
|
19
|
+
<a href="https://tsed.dev/">Website</a>
|
|
20
20
|
<span> • </span>
|
|
21
|
-
<a href="https://tsed.
|
|
21
|
+
<a href="https://tsed.dev/getting-started/">Getting started</a>
|
|
22
22
|
<span> • </span>
|
|
23
23
|
<a href="https://slack.tsed.io">Slack</a>
|
|
24
24
|
<span> • </span>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<hr />
|
|
29
|
-
A package of Ts.ED framework. See website: https://tsed.
|
|
29
|
+
A package of Ts.ED framework. See website: https://tsed.dev/tutorials/socket-io
|
|
30
30
|
|
|
31
31
|
Socket.io enable real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.
|
|
32
32
|
|
|
@@ -129,7 +129,7 @@ export class MyCtrl {
|
|
|
129
129
|
|
|
130
130
|
### Declaring an Input Event
|
|
131
131
|
|
|
132
|
-
[@Input](https://tsed.
|
|
132
|
+
[@Input](https://tsed.dev/api/socketio/decorators/Input.html) decorator declare a method as a new handler for a specific `event`.
|
|
133
133
|
|
|
134
134
|
```typescript
|
|
135
135
|
import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
@@ -143,15 +143,15 @@ export class MySocketService {
|
|
|
143
143
|
}
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
- [@Args](https://tsed.
|
|
147
|
-
- [@Socket](https://tsed.
|
|
148
|
-
- [@Nsp](https://tsed.
|
|
146
|
+
- [@Args](https://tsed.dev/api/socketio/args.html) <any|any[]>: List of the parameters sent by the input event.
|
|
147
|
+
- [@Socket](https://tsed.dev/api/socketio/socket.html) <SocketIO.Socket>: Socket instance.
|
|
148
|
+
- [@Nsp](https://tsed.dev/api/socketio/nsp.html) <[SocketIO.Namespace](https://socket.io/docs/rooms-and-namespaces/#)>: Namespace instance.
|
|
149
149
|
|
|
150
150
|
### Send a response
|
|
151
151
|
|
|
152
152
|
You have a many choice to send a response to your client. Ts.ED offer some decorators to send a response:
|
|
153
153
|
|
|
154
|
-

|
|
155
155
|
|
|
156
156
|
Example:
|
|
157
157
|
|
|
@@ -171,7 +171,7 @@ export class MySocketService {
|
|
|
171
171
|
> The method accept a promise as returned value.
|
|
172
172
|
|
|
173
173
|
::: warning
|
|
174
|
-
Return value is only possible when the method is decorated by [@Emit](https://tsed.
|
|
174
|
+
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).
|
|
175
175
|
:::
|
|
176
176
|
|
|
177
177
|
### Socket Session
|
|
@@ -279,12 +279,10 @@ export class MySocketService {
|
|
|
279
279
|
|
|
280
280
|
## Documentation
|
|
281
281
|
|
|
282
|
-
See our documentation https://tsed.
|
|
282
|
+
See our documentation https://tsed.dev/api.html
|
|
283
283
|
|
|
284
284
|
## Contributors
|
|
285
285
|
|
|
286
|
-
Please read [contributing guidelines here](https://tsed.io/contributing.html)
|
|
287
|
-
|
|
288
286
|
<a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
289
287
|
|
|
290
288
|
## Backers
|