@nestjs/platform-socket.io 8.3.1 → 8.4.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/Readme.md CHANGED
@@ -54,7 +54,7 @@ With official support, you can get expert help straight from Nest core team. We
54
54
 
55
55
  ## Support
56
56
 
57
- Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
57
+ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
58
58
 
59
59
  #### Principal Sponsors
60
60
  <table style="text-align:center;"><tr>
@@ -14,7 +14,7 @@ class IoAdapter extends websockets_1.AbstractWsAdapter {
14
14
  return this.createIOServer(port);
15
15
  }
16
16
  const { namespace, server } = options, opt = tslib_1.__rest(options, ["namespace", "server"]);
17
- return server && shared_utils_1.isFunction(server.of)
17
+ return server && (0, shared_utils_1.isFunction)(server.of)
18
18
  ? server.of(namespace)
19
19
  : namespace
20
20
  ? this.createIOServer(port, opt).of(namespace)
@@ -27,29 +27,29 @@ class IoAdapter extends websockets_1.AbstractWsAdapter {
27
27
  return new socket_io_1.Server(port, options);
28
28
  }
29
29
  bindMessageHandlers(socket, handlers, transform) {
30
- const disconnect$ = rxjs_1.fromEvent(socket, constants_1.DISCONNECT_EVENT).pipe(operators_1.share(), operators_1.first());
30
+ const disconnect$ = (0, rxjs_1.fromEvent)(socket, constants_1.DISCONNECT_EVENT).pipe((0, operators_1.share)(), (0, operators_1.first)());
31
31
  handlers.forEach(({ message, callback }) => {
32
- const source$ = rxjs_1.fromEvent(socket, message).pipe(operators_1.mergeMap((payload) => {
32
+ const source$ = (0, rxjs_1.fromEvent)(socket, message).pipe((0, operators_1.mergeMap)((payload) => {
33
33
  const { data, ack } = this.mapPayload(payload);
34
- return transform(callback(data, ack)).pipe(operators_1.filter((response) => !shared_utils_1.isNil(response)), operators_1.map((response) => [response, ack]));
35
- }), operators_1.takeUntil(disconnect$));
34
+ return transform(callback(data, ack)).pipe((0, operators_1.filter)((response) => !(0, shared_utils_1.isNil)(response)), (0, operators_1.map)((response) => [response, ack]));
35
+ }), (0, operators_1.takeUntil)(disconnect$));
36
36
  source$.subscribe(([response, ack]) => {
37
37
  if (response.event) {
38
38
  return socket.emit(response.event, response.data);
39
39
  }
40
- shared_utils_1.isFunction(ack) && ack(response);
40
+ (0, shared_utils_1.isFunction)(ack) && ack(response);
41
41
  });
42
42
  });
43
43
  }
44
44
  mapPayload(payload) {
45
45
  if (!Array.isArray(payload)) {
46
- if (shared_utils_1.isFunction(payload)) {
46
+ if ((0, shared_utils_1.isFunction)(payload)) {
47
47
  return { data: undefined, ack: payload };
48
48
  }
49
49
  return { data: payload };
50
50
  }
51
51
  const lastElement = payload[payload.length - 1];
52
- const isAck = shared_utils_1.isFunction(lastElement);
52
+ const isAck = (0, shared_utils_1.isFunction)(lastElement);
53
53
  if (isAck) {
54
54
  const size = payload.length - 1;
55
55
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-socket.io",
3
- "version": "8.3.1",
3
+ "version": "8.4.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
package/CHANGELOG.md DELETED
@@ -1,12 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- <a name="8.2.0"></a>
7
- # [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
8
-
9
-
10
-
11
-
12
- **Note:** Version bump only for package @nestjs/platform-socket.io