@command-socket/core
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"name": "@command-socket/core", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "A command-based WebSocket communication framework written in TypeScript/JavaScript.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -67,3 +67,4 @@ /* | ||
LCS extends CommandSetStructure = any, | ||
RCS extends CommandSetStructure = any> { // TODO [2/21/20 @ 2:56 PM] - Remove default generic types. | ||
RCS extends CommandSetStructure = any, | ||
M extends {} = {}> { // TODO [2/21/20 @ 2:56 PM] - Remove default generic types. | ||
@@ -107,4 +108,6 @@ /** | ||
public constructor(socket: ISocket, commandRegistry: CommandRegistry<LCS> = new CommandRegistry<LCS>()) { | ||
private metadata: Partial<M>; | ||
public constructor(socket: ISocket, commandRegistry: CommandRegistry<LCS> = new CommandRegistry<LCS>(), metadata: Partial<M> = {}) { | ||
this.id = IDUtilities.generateID(CommandSocket.ID_LENGTH); | ||
@@ -117,2 +120,3 @@ this.socket = socket; | ||
this.events = new CommandSocketEvents(); | ||
this.metadata = metadata; | ||
@@ -373,2 +377,8 @@ this.socket.getEvents().OPEN.subscribe((event: { source: ISocket }): void => { | ||
public getMetadata(): Partial<M> { | ||
return this.metadata; | ||
} | ||
public getCommandRegistry(): CommandRegistry<LCS & BuiltinCommandSet> { | ||
@@ -375,0 +385,0 @@ |
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
195869
1712