@nestjs/platform-ws 8.2.3 → 8.3.0
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/LICENSE +1 -1
- package/Readme.md +8 -2
- package/adapters/index.js +1 -1
- package/adapters/ws-adapter.js +4 -4
- package/index.js +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(The MIT License)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/Readme.md
CHANGED
|
@@ -59,6 +59,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
59
59
|
#### Principal Sponsors
|
|
60
60
|
<table style="text-align:center;"><tr>
|
|
61
61
|
<td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
|
|
62
|
+
<td><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/red-hat-logo.svg" width="200" valign="middle" /></a></td>
|
|
62
63
|
<td>
|
|
63
64
|
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
|
|
64
65
|
<td>
|
|
@@ -80,10 +81,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
80
81
|
<table style="text-align:center;"><tr><td>
|
|
81
82
|
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
|
|
82
83
|
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
|
|
83
|
-
<a href="
|
|
84
|
+
<a href="https://www.myleodsc.com/" target="_blank"><img src="https://nestjs.com/img/myleo-logo.png" width="180" valign="middle" /></td><td>
|
|
84
85
|
<a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
|
|
85
86
|
<a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
|
|
86
|
-
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td
|
|
87
|
+
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
|
|
88
|
+
<td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr></table>
|
|
87
89
|
|
|
88
90
|
#### Sponsors
|
|
89
91
|
|
|
@@ -117,6 +119,10 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
|
|
117
119
|
<td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
|
|
118
120
|
<td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
|
|
119
121
|
<td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
|
|
122
|
+
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
|
|
123
|
+
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
|
|
124
|
+
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
|
|
125
|
+
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
|
|
120
126
|
</tr></table>
|
|
121
127
|
|
|
122
128
|
## Backers
|
package/adapters/index.js
CHANGED
package/adapters/ws-adapter.js
CHANGED
|
@@ -24,10 +24,10 @@ class WsAdapter extends websockets_1.AbstractWsAdapter {
|
|
|
24
24
|
this.logger = new common_1.Logger(WsAdapter.name);
|
|
25
25
|
this.httpServersRegistry = new Map();
|
|
26
26
|
this.wsServersRegistry = new Map();
|
|
27
|
-
wsPackage = load_package_util_1.loadPackage('ws', 'WsAdapter', () => require('ws'));
|
|
27
|
+
wsPackage = (0, load_package_util_1.loadPackage)('ws', 'WsAdapter', () => require('ws'));
|
|
28
28
|
}
|
|
29
29
|
create(port, options) {
|
|
30
|
-
const { server } = options, wsOptions = tslib_1.__rest(options, ["server"]);
|
|
30
|
+
const { server } = options, wsOptions = (0, tslib_1.__rest)(options, ["server"]);
|
|
31
31
|
if (wsOptions === null || wsOptions === void 0 ? void 0 : wsOptions.namespace) {
|
|
32
32
|
const error = new Error('"WsAdapter" does not support namespaces. If you need namespaces in your project, consider using the "@nestjs/platform-socket.io" package instead.');
|
|
33
33
|
this.logger.error(error);
|
|
@@ -56,8 +56,8 @@ class WsAdapter extends websockets_1.AbstractWsAdapter {
|
|
|
56
56
|
return wsServer;
|
|
57
57
|
}
|
|
58
58
|
bindMessageHandlers(client, handlers, transform) {
|
|
59
|
-
const close$ = rxjs_1.fromEvent(client, constants_1.CLOSE_EVENT).pipe(operators_1.share(), operators_1.first());
|
|
60
|
-
const source$ = rxjs_1.fromEvent(client, 'message').pipe(operators_1.mergeMap(data => this.bindMessageHandler(data, handlers, transform).pipe(operators_1.filter(result => result))), operators_1.takeUntil(close$));
|
|
59
|
+
const close$ = (0, rxjs_1.fromEvent)(client, constants_1.CLOSE_EVENT).pipe((0, operators_1.share)(), (0, operators_1.first)());
|
|
60
|
+
const source$ = (0, rxjs_1.fromEvent)(client, 'message').pipe((0, operators_1.mergeMap)(data => this.bindMessageHandler(data, handlers, transform).pipe((0, operators_1.filter)(result => result))), (0, operators_1.takeUntil)(close$));
|
|
61
61
|
const onMessage = (response) => {
|
|
62
62
|
if (client.readyState !== READY_STATE.OPEN_STATE) {
|
|
63
63
|
return;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/platform-ws",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"tslib": "2.3.1",
|
|
21
|
-
"ws": "7.5.
|
|
21
|
+
"ws": "7.5.6"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@nestjs/common": "^8.0.0",
|