Skip to content

Commit 81ba011

Browse files
authored
Merge pull request #76 from hapinessjs/next
release(version): v1.3.1
2 parents 061144e + 0828cc8 commit 81ba011

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ $ yarn add @hapiness/core rxjs
8787

8888
```javascript
8989
"dependencies": {
90-
"@hapiness/core": "^1.3.0",
90+
"@hapiness/core": "^1.3.1",
9191
//...
9292
}
9393
//...
9494
```
9595

9696
### Use Hapiness API
9797

98-
Actually, we're in : **v1.3.0**
98+
Actually, we're in : **v1.3.1**
9999

100100
See [API](https://github.com/hapinessjs/hapiness/blob/master/API.md) Reference to know what's already implemented.
101101

@@ -115,6 +115,9 @@ To set up your development environment:
115115
[Back to top](#table-of-contents)
116116

117117
## Change History
118+
* v1.3.1 (2018-02-27)
119+
* Keep request in the Socket instance
120+
* Update dependencies
118121
* v1.3.0 (2017-11-30)
119122
* Option that allow WS Server Ext to share Http Server Ext port
120123
* Handle HapiJS connections system to listen multiple ports

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hapiness/core",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Project to have a HapiJS (https://hapijs.com/) based framework to create easier NodeJS back-end with some awesome features",
55
"main": "commonjs/index.js",
66
"types": "index.d.ts",
@@ -73,19 +73,19 @@
7373
},
7474
"homepage": "https://github.com/hapinessjs/hapiness#readme",
7575
"dependencies": {
76-
"@types/hapi": "^16.1.11",
76+
"@types/hapi": "^16.1.14",
7777
"@types/hoek": "^4.1.3",
78-
"@types/joi": "^13.0.1",
79-
"@types/node": "^8.0.53",
80-
"@types/websocket": "^0.0.35",
78+
"@types/joi": "^13.0.5",
79+
"@types/node": "^9.4.6",
80+
"@types/websocket": "^0.0.37",
8181
"debug": "^3.1.0",
8282
"hapi": "^16.6.2",
8383
"injection-js": "^2.2.1",
84-
"reflect-metadata": "^0.1.10",
84+
"reflect-metadata": "^0.1.12",
8585
"websocket": "^1.0.25"
8686
},
8787
"devDependencies": {
88-
"@types/fs-extra": "^4.0.5",
88+
"@types/fs-extra": "^5.0.1",
8989
"coveralls": "^3.0.0",
9090
"fs-extra": "^4.0.2",
9191
"istanbul": "^1.1.0-alpha.1",
@@ -94,14 +94,14 @@
9494
"rimraf": "^2.6.2",
9595
"rxjs": "^5.5.2",
9696
"ts-node": "^3.3.0",
97-
"tslint": "^5.8.0",
98-
"typescript": "^2.6.2",
97+
"tslint": "^5.9.1",
98+
"typescript": "^2.7.2",
9999
"unit.js": "^2.0.0"
100100
},
101101
"engines": {
102102
"node": ">=7.0.0"
103103
},
104104
"peerDependencies": {
105-
"rxjs": "^5.5.2"
105+
"rxjs": "^5.5.6"
106106
}
107107
}

src/extensions/socket-server/socket.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { connection, request } from 'websocket';
22
import { WebSocketRooms } from './rooms';
33
import { Subject, Observable } from 'rxjs/Rx';
4+
import { InternalLogger } from '../../core/logger';
45

56
interface Message {
67
event: string;
@@ -9,16 +10,19 @@ interface Message {
910

1011
export class Socket {
1112

13+
private static logger = new InternalLogger('module');
14+
1215
private data$ = new Subject<Message>();
1316

1417
constructor(
15-
_request: request,
18+
private _request: request,
1619
private _connection: connection,
1720
private _rooms: WebSocketRooms
1821
) {
1922
this.on('close', data => this.data$.complete());
2023
this.on('error', err => this.data$.error(err));
21-
this.on('*', data => this.data$.next(this.getJSON(data.utf8Data)))
24+
this.on('*', data => this.data$.next(this.getJSON(data.utf8Data)));
25+
Socket.logger.debug(`New socket... ${this._request.host}`);
2226
}
2327

2428
/**

0 commit comments

Comments
 (0)