@furystack/websocket-api
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -13,3 +13,2 @@ /// <reference types="node" /> | ||
export declare class WebSocketApi { | ||
private readonly logger; | ||
private settings; | ||
@@ -19,3 +18,3 @@ serverManager: ServerManager; | ||
private readonly injector; | ||
private readonly logScope; | ||
private readonly logger; | ||
constructor(logger: LoggerCollection, settings: WebSocketApiSettings, serverManager: ServerManager, parentInjector: Injector); | ||
@@ -22,0 +21,0 @@ execute(data: Data, msg: IncomingMessage, websocket: ws): void; |
@@ -18,8 +18,6 @@ "use strict"; | ||
constructor(logger, settings, serverManager, parentInjector) { | ||
this.logger = logger; | ||
this.settings = settings; | ||
this.serverManager = serverManager; | ||
this.logScope = '@furystack/websocket-api/' + this.constructor.name; | ||
this.logger = logger.withScope('@furystack/websocket-api/' + this.constructor.name); | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Initializating WebSocket API', | ||
@@ -32,3 +30,2 @@ data: this.settings, | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client connected to WebSocket', | ||
@@ -42,3 +39,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client Message received', | ||
@@ -53,3 +49,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client disconnected', | ||
@@ -68,3 +63,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: `Client connected to socket at '${this.settings.path}'.`, | ||
@@ -71,0 +65,0 @@ }); |
{ | ||
"name": "@furystack/websocket-api", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "HTTP Api FuryStack package", | ||
@@ -58,6 +58,6 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@furystack/core": "^4.0.0", | ||
"@furystack/http-api": "^3.0.0", | ||
"@furystack/core": "^4.0.1", | ||
"@furystack/http-api": "^3.0.1", | ||
"@furystack/inject": "^3.0.1", | ||
"@furystack/logging": "^1.0.0", | ||
"@furystack/logging": "^1.1.0", | ||
"@sensenet/client-utils": "^1.5.1", | ||
@@ -81,3 +81,3 @@ "ws": "6.1.4" | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "2fa8429190fca702d037ea9da26cdc9ded16a8de" | ||
"gitHead": "f1b889fbd2faf4fe923af433e4a3bb9d0d3f71bb" | ||
} |
import { ServerManager } from '@furystack/core' | ||
import { Injectable, Injector } from '@furystack/inject' | ||
import { LoggerCollection } from '@furystack/logging' | ||
import { LoggerCollection, ScopedLogger } from '@furystack/logging' | ||
import { usingAsync } from '@sensenet/client-utils' | ||
@@ -19,5 +19,5 @@ import { IncomingMessage } from 'http' | ||
private readonly injector: Injector | ||
private readonly logScope: string = '@furystack/websocket-api/' + this.constructor.name | ||
private readonly logger: ScopedLogger | ||
constructor( | ||
private readonly logger: LoggerCollection, | ||
logger: LoggerCollection, | ||
private settings: WebSocketApiSettings, | ||
@@ -27,4 +27,4 @@ public serverManager: ServerManager, | ||
) { | ||
this.logger = logger.withScope('@furystack/websocket-api/' + this.constructor.name) | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Initializating WebSocket API', | ||
@@ -37,3 +37,2 @@ data: this.settings, | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client connected to WebSocket', | ||
@@ -47,3 +46,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client Message received', | ||
@@ -59,3 +57,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: 'Client disconnected', | ||
@@ -75,3 +72,2 @@ data: { | ||
this.logger.verbose({ | ||
scope: this.logScope, | ||
message: `Client connected to socket at '${this.settings.path}'.`, | ||
@@ -78,0 +74,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1
42570
377
Updated@furystack/core@^4.0.1
Updated@furystack/http-api@^3.0.1
Updated@furystack/logging@^1.1.0