@tsed/socketio 6.102.4 → 6.102.8-rc.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/lib/cjs/package.json +3 -0
- package/lib/esm/SocketIOModule.js +4 -4
- package/lib/esm/class/SocketHandlersBuilder.js +5 -5
- 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 +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 +1 -1
- package/lib/esm/decorators/socketMiddlewareError.js +1 -1
- package/lib/esm/decorators/socketService.js +2 -2
- package/lib/esm/decorators/socketSession.js +2 -2
- package/lib/esm/index.js +25 -25
- package/lib/esm/interfaces/index.js +7 -7
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/SocketIOService.js +3 -3
- package/package.json +16 -8
|
@@ -2,10 +2,10 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { $log, Constant, InjectorService, Module } from "@tsed/common";
|
|
3
3
|
import { catchError, nameOf } from "@tsed/core";
|
|
4
4
|
import { Server } from "socket.io";
|
|
5
|
-
import { SocketProviderMetadata } from "./class/SocketProviderMetadata"; // tslint:disable-line: no-unused-variable
|
|
6
|
-
import { PROVIDER_TYPE_SOCKET_SERVICE } from "./constants";
|
|
7
|
-
import { IO } from "./decorators/io";
|
|
8
|
-
import { SocketIOService } from "./services/SocketIOService";
|
|
5
|
+
import { SocketProviderMetadata } from "./class/SocketProviderMetadata.js"; // tslint:disable-line: no-unused-variable
|
|
6
|
+
import { PROVIDER_TYPE_SOCKET_SERVICE } from "./constants.js";
|
|
7
|
+
import { IO } from "./decorators/io.js";
|
|
8
|
+
import { SocketIOService } from "./services/SocketIOService.js";
|
|
9
9
|
import Http from "http";
|
|
10
10
|
import Https from "https";
|
|
11
11
|
import { Inject } from "@tsed/di";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Store } from "@tsed/core";
|
|
2
2
|
import { $log } from "@tsed/logger";
|
|
3
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
4
|
-
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes";
|
|
5
|
-
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes";
|
|
6
|
-
import { getNspSession } from "../registries/NspSessionRegistry";
|
|
7
|
-
import { SocketProviderMetadata } from "./SocketProviderMetadata";
|
|
3
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
4
|
+
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes.js";
|
|
5
|
+
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes.js";
|
|
6
|
+
import { getNspSession } from "../registries/NspSessionRegistry.js";
|
|
7
|
+
import { SocketProviderMetadata } from "./SocketProviderMetadata.js";
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
10
10
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes";
|
|
2
|
-
import { SocketReturns } from "./socketReturns";
|
|
1
|
+
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes.js";
|
|
2
|
+
import { SocketReturns } from "./socketReturns.js";
|
|
3
3
|
/**
|
|
4
4
|
* Broadcast the response for all client registered in the same namespace.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes";
|
|
2
|
-
import { SocketReturns } from "./socketReturns";
|
|
1
|
+
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes.js";
|
|
2
|
+
import { SocketReturns } from "./socketReturns.js";
|
|
3
3
|
/**
|
|
4
4
|
* Broadcast the response for all client registered in the same namespace except to the current client.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes";
|
|
2
|
-
import { SocketReturns } from "./socketReturns";
|
|
1
|
+
import { SocketReturnsTypes } from "../interfaces/SocketReturnsTypes.js";
|
|
2
|
+
import { SocketReturns } from "./socketReturns.js";
|
|
3
3
|
/**
|
|
4
4
|
* Emit the response to the client.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BroadcastOthers } from "./broadcastOthers";
|
|
2
|
-
import { Input } from "./input";
|
|
1
|
+
import { BroadcastOthers } from "./broadcastOthers.js";
|
|
2
|
+
import { Input } from "./input.js";
|
|
3
3
|
/**
|
|
4
4
|
* Attach the decorated method to the socket event and broadcast the response to all clients with the exception of the connected customer.
|
|
5
5
|
*
|
package/lib/esm/decorators/io.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Inject } from "@tsed/common";
|
|
2
|
-
import { Server } from "../services/SocketIOServer";
|
|
2
|
+
import { Server } from "../services/SocketIOServer.js";
|
|
3
3
|
export function IO(target, targetKey, descriptor) {
|
|
4
4
|
if (target) {
|
|
5
5
|
return Inject(Server)(target, targetKey, descriptor);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decoratorTypeOf, DecoratorTypes, Store } from "@tsed/core";
|
|
2
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
3
|
-
import { SocketFilter } from "./socketFilter";
|
|
2
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
3
|
+
import { SocketFilter } from "./socketFilter.js";
|
|
4
4
|
/**
|
|
5
5
|
* Inject the [SocketIO.Namespace](https://socket.io/docs/rooms-and-namespaces/#namespaces) instance in the decorated parameter.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
2
|
-
import { SocketFilter } from "./socketFilter";
|
|
1
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
2
|
+
import { SocketFilter } from "./socketFilter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Inject the Socket instance in the decorated parameter.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
2
|
-
import { SocketFilter } from "./socketFilter";
|
|
1
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
2
|
+
import { SocketFilter } from "./socketFilter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Inject the error in the parameters
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
2
|
-
import { SocketFilter } from "./socketFilter";
|
|
1
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
2
|
+
import { SocketFilter } from "./socketFilter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Inject the Socket instance in the decorated parameter.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Middleware } from "@tsed/common";
|
|
2
2
|
import { Store } from "@tsed/core";
|
|
3
|
-
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes";
|
|
3
|
+
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes.js";
|
|
4
4
|
/**
|
|
5
5
|
* Declare a new SocketMiddlewareError.
|
|
6
6
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoreMerge, useDecorators } from "@tsed/core";
|
|
2
2
|
import { Injectable } from "@tsed/di";
|
|
3
|
-
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes";
|
|
4
|
-
import { PROVIDER_TYPE_SOCKET_SERVICE } from "../constants";
|
|
3
|
+
import { SocketProviderTypes } from "../interfaces/SocketProviderTypes.js";
|
|
4
|
+
import { PROVIDER_TYPE_SOCKET_SERVICE } from "../constants.js";
|
|
5
5
|
/**
|
|
6
6
|
* The decorators `@SocketService()` declare a new socket service (and service) can be injected in other service or controller on there `constructor`.
|
|
7
7
|
* All services annotated with `@SocketService()` are constructed one time.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocketFilters } from "../interfaces/SocketFilters";
|
|
2
|
-
import { SocketFilter } from "./socketFilter";
|
|
1
|
+
import { SocketFilters } from "../interfaces/SocketFilters.js";
|
|
2
|
+
import { SocketFilter } from "./socketFilter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Inject the Socket instance in the decorated parameter.
|
|
5
5
|
*
|
package/lib/esm/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export * from "./SocketIOModule";
|
|
1
|
+
export * from "./SocketIOModule.js";
|
|
2
2
|
// interfaces
|
|
3
|
-
export * from "./interfaces";
|
|
4
|
-
export * from "./class/SocketProviderMetadata";
|
|
3
|
+
export * from "./interfaces.js";
|
|
4
|
+
export * from "./class/SocketProviderMetadata.js";
|
|
5
5
|
// decorators
|
|
6
|
-
export * from "./decorators/input";
|
|
7
|
-
export * from "./decorators/args";
|
|
8
|
-
export * from "./decorators/io";
|
|
9
|
-
export * from "./decorators/nsp";
|
|
10
|
-
export * from "./decorators/emit";
|
|
11
|
-
export * from "./decorators/broadcast";
|
|
12
|
-
export * from "./decorators/broadcastOthers";
|
|
13
|
-
export * from "./decorators/inputAndEmit";
|
|
14
|
-
export * from "./decorators/inputAndBroadcast";
|
|
15
|
-
export * from "./decorators/inputAndBroadcastOthers";
|
|
16
|
-
export * from "./decorators/socket";
|
|
17
|
-
export * from "./decorators/socketErr";
|
|
18
|
-
export * from "./decorators/socketFilter";
|
|
19
|
-
export * from "./decorators/socketMiddleware";
|
|
20
|
-
export * from "./decorators/socketMiddlewareError";
|
|
21
|
-
export * from "./decorators/socketService";
|
|
22
|
-
export * from "./decorators/socketSession";
|
|
23
|
-
export * from "./decorators/socketUseAfter";
|
|
24
|
-
export * from "./decorators/socketUseBefore";
|
|
25
|
-
export * from "./decorators/socketEventName";
|
|
6
|
+
export * from "./decorators/input.js";
|
|
7
|
+
export * from "./decorators/args.js";
|
|
8
|
+
export * from "./decorators/io.js";
|
|
9
|
+
export * from "./decorators/nsp.js";
|
|
10
|
+
export * from "./decorators/emit.js";
|
|
11
|
+
export * from "./decorators/broadcast.js";
|
|
12
|
+
export * from "./decorators/broadcastOthers.js";
|
|
13
|
+
export * from "./decorators/inputAndEmit.js";
|
|
14
|
+
export * from "./decorators/inputAndBroadcast.js";
|
|
15
|
+
export * from "./decorators/inputAndBroadcastOthers.js";
|
|
16
|
+
export * from "./decorators/socket.js";
|
|
17
|
+
export * from "./decorators/socketErr.js";
|
|
18
|
+
export * from "./decorators/socketFilter.js";
|
|
19
|
+
export * from "./decorators/socketMiddleware.js";
|
|
20
|
+
export * from "./decorators/socketMiddlewareError.js";
|
|
21
|
+
export * from "./decorators/socketService.js";
|
|
22
|
+
export * from "./decorators/socketSession.js";
|
|
23
|
+
export * from "./decorators/socketUseAfter.js";
|
|
24
|
+
export * from "./decorators/socketUseBefore.js";
|
|
25
|
+
export * from "./decorators/socketEventName.js";
|
|
26
26
|
// service
|
|
27
|
-
export * from "./services/SocketIOServer";
|
|
28
|
-
export * from "./services/SocketIOService";
|
|
27
|
+
export * from "./services/SocketIOServer.js";
|
|
28
|
+
export * from "./services/SocketIOService.js";
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
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";
|
|
1
|
+
export * from "./SocketHandlerMetadata.js";
|
|
2
|
+
export * from "./SocketParamMetadata.js";
|
|
3
|
+
export * from "./SocketProviderTypes.js";
|
|
4
|
+
export * from "./OnNamespaceInit.js";
|
|
5
|
+
export * from "./SocketFilters.js";
|
|
6
|
+
export * from "./SocketReturnsTypes.js";
|
|
7
|
+
export * from "./SocketInjectableNsp.js";
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { ConverterService, InjectorService, Service } from "@tsed/common";
|
|
3
3
|
import SocketIO from "socket.io"; // tslint:disable-line: no-unused-variable
|
|
4
|
-
import { SocketHandlersBuilder } from "../class/SocketHandlersBuilder";
|
|
5
|
-
import { SocketProviderMetadata } from "../class/SocketProviderMetadata";
|
|
6
|
-
import { IO } from "../decorators/io";
|
|
4
|
+
import { SocketHandlersBuilder } from "../class/SocketHandlersBuilder.js";
|
|
5
|
+
import { SocketProviderMetadata } from "../class/SocketProviderMetadata.js";
|
|
6
|
+
import { IO } from "../decorators/io.js";
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/socketio",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.1",
|
|
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",
|
|
@@ -30,24 +31,31 @@
|
|
|
30
31
|
"tslib": "2.2.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@tsed/common": "6.102.
|
|
34
|
-
"@tsed/core": "6.102.
|
|
35
|
-
"@tsed/di": "6.102.
|
|
36
|
-
"@tsed/json-mapper": "6.102.
|
|
37
|
-
"@tsed/openspec": "6.102.
|
|
38
|
-
"@tsed/schema": "6.102.
|
|
34
|
+
"@tsed/common": "6.102.8-rc.1",
|
|
35
|
+
"@tsed/core": "6.102.8-rc.1",
|
|
36
|
+
"@tsed/di": "6.102.8-rc.1",
|
|
37
|
+
"@tsed/json-mapper": "6.102.8-rc.1",
|
|
38
|
+
"@tsed/openspec": "6.102.8-rc.1",
|
|
39
|
+
"@tsed/schema": "6.102.8-rc.1",
|
|
39
40
|
"express": "^4.17.1",
|
|
40
41
|
"socket.io": "4.1.2",
|
|
41
42
|
"socket.io-client": "^4.1.2"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
45
|
+
"@tsed/common": "^6.102.8-rc.1",
|
|
46
|
+
"@tsed/core": "^6.102.8-rc.1",
|
|
47
|
+
"@tsed/di": "^6.102.8-rc.1",
|
|
48
|
+
"@tsed/json-mapper": "^6.102.8-rc.1",
|
|
49
|
+
"@tsed/logger": ">=6.0.2",
|
|
50
|
+
"@tsed/openspec": "^6.102.8-rc.1",
|
|
51
|
+
"@tsed/schema": "^6.102.8-rc.1",
|
|
44
52
|
"socket.io": ">=4.0.0"
|
|
45
53
|
},
|
|
46
54
|
"repository": "https://github.com/tsedio/tsed",
|
|
47
55
|
"bugs": {
|
|
48
56
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
49
57
|
},
|
|
50
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
58
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/third-parties/socketio",
|
|
51
59
|
"author": "Romain Lenzotti",
|
|
52
60
|
"license": "MIT"
|
|
53
61
|
}
|