@tsed/socketio-testing 7.85.0 → 7.85.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 +12 -12
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": "commonjs",
|
|
5
|
-
"version": "7.85.
|
|
5
|
+
"version": "7.85.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"tslib": "2.6.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@tsed/barrels": "7.85.
|
|
28
|
-
"@tsed/common": "7.85.
|
|
29
|
-
"@tsed/di": "7.85.
|
|
30
|
-
"@tsed/typescript": "7.85.
|
|
27
|
+
"@tsed/barrels": "7.85.1",
|
|
28
|
+
"@tsed/common": "7.85.1",
|
|
29
|
+
"@tsed/di": "7.85.1",
|
|
30
|
+
"@tsed/typescript": "7.85.1",
|
|
31
31
|
"eslint": "^8.57.0",
|
|
32
32
|
"socket.io-client": "^4.7.5",
|
|
33
33
|
"typescript": "4.9.5"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@tsed/common": "7.85.
|
|
37
|
-
"@tsed/core": "7.85.
|
|
38
|
-
"@tsed/di": "7.85.
|
|
36
|
+
"@tsed/common": "7.85.1",
|
|
37
|
+
"@tsed/core": "7.85.1",
|
|
38
|
+
"@tsed/di": "7.85.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://api.tsed.io/rest/slack/tsedio/tsed">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
|
|
|
@@ -128,7 +128,7 @@ export class MyCtrl {
|
|
|
128
128
|
|
|
129
129
|
### Declaring an Input Event
|
|
130
130
|
|
|
131
|
-
[@Input](https://tsed.
|
|
131
|
+
[@Input](https://tsed.dev/api/socketio/decorators/Input.html) decorator declare a method as a new handler for a specific `event`.
|
|
132
132
|
|
|
133
133
|
```typescript
|
|
134
134
|
import {SocketService, Input, Emit, Args, Socket, Nsp} from "@tsed/socketio";
|
|
@@ -142,15 +142,15 @@ export class MySocketService {
|
|
|
142
142
|
}
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
- [@Args](https://tsed.
|
|
146
|
-
- [@Socket](https://tsed.
|
|
147
|
-
- [@Nsp](https://tsed.
|
|
145
|
+
- [@Args](https://tsed.dev/api/socketio/args.html) <any|any[]>: List of the parameters sent by the input event.
|
|
146
|
+
- [@Socket](https://tsed.dev/api/socketio/socket.html) <SocketIO.Socket>: Socket instance.
|
|
147
|
+
- [@Nsp](https://tsed.dev/api/socketio/nsp.html) <[SocketIO.Namespace](https://socket.io/docs/rooms-and-namespaces/#)>: Namespace instance.
|
|
148
148
|
|
|
149
149
|
### Send a response
|
|
150
150
|
|
|
151
151
|
You have a many choice to send a response to your client. Ts.ED offer some decorators to send a response:
|
|
152
152
|
|
|
153
|
-

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