Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@furystack/websocket-api

Package Overview
Dependencies
Maintainers
1
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@furystack/websocket-api - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

dist/Decorators/Authenticate.d.ts

3

dist/ActionResolver.d.ts

@@ -1,2 +0,1 @@

import { Injector } from "@furystack/inject";
import { Data } from "ws";

@@ -7,4 +6,4 @@ import { IWebSocketAction } from "./models/IWebSocketAction";

readonly actions: IWebSocketAction[];
execute(data: Data, context: WebSocketContext, injector: Injector): void;
execute(data: Data, context: WebSocketContext): void;
constructor(actions: IWebSocketAction[]);
}

@@ -7,5 +7,5 @@ "use strict";

}
execute(data, context, injector) {
execute(data, context) {
const action = this.actions.find((a) => a.canExecute(data));
action && action.execute(data, context, injector);
action && action.execute(data, context);
}

@@ -12,0 +12,0 @@ }

export * from "./ActionResolver";
export * from "./Decorators";
export * from "./WebSocketApi";

@@ -3,0 +4,0 @@ export * from "./models";

@@ -7,2 +7,3 @@ "use strict";

__export(require("./ActionResolver"));
__export(require("./Decorators"));
__export(require("./WebSocketApi"));

@@ -9,0 +10,0 @@ __export(require("./WebSocketAction"));

@@ -1,2 +0,1 @@

import { Injector } from "@furystack/inject";
import { Data } from "ws";

@@ -7,4 +6,4 @@ import { IWebSocketContext } from "./IWebSocketContext";

authorize: string[];
canExecute: (data: Data) => boolean;
execute: (data: Data, context: IWebSocketContext, injector: Injector) => void;
canExecute(data: Data): boolean;
execute(data: Data, context: IWebSocketContext): void;
}

@@ -1,2 +0,1 @@

import { Injector } from "@furystack/inject";
import { Data } from "ws";

@@ -8,3 +7,3 @@ import { IWebSocketAction, IWebSocketContext } from "./models";

abstract canExecute(data: Data): boolean;
abstract execute(data: Data, context: IWebSocketContext, injector: Injector): any;
abstract execute(data: Data, context: IWebSocketContext): any;
}

@@ -52,3 +52,3 @@ "use strict";

});
this.resolver.execute(message, context, this.injector);
this.resolver.execute(message, context);
});

@@ -55,0 +55,0 @@ ws.on("close", () => {

{
"name": "@furystack/websocket-api",
"version": "0.3.0",
"version": "0.3.1",
"description": "HTTP Api FuryStack package",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -7,5 +7,5 @@ import { Injector } from "@furystack/inject";

export class ActionResolver {
public execute(data: Data, context: WebSocketContext, injector: Injector) {
public execute(data: Data, context: WebSocketContext) {
const action = this.actions.find((a) => a.canExecute(data));
action && action.execute(data, context, injector);
action && action.execute(data, context);
}

@@ -12,0 +12,0 @@

export * from "./ActionResolver";
export * from "./Decorators";
export * from "./WebSocketApi";

@@ -3,0 +4,0 @@ export * from "./models";

@@ -8,4 +8,4 @@ import { Injector } from "@furystack/inject";

authorize: string[];
canExecute: (data: Data) => boolean;
execute: (data: Data, context: IWebSocketContext, injector: Injector) => void;
canExecute(data: Data): boolean;
execute(data: Data, context: IWebSocketContext): void;
}

@@ -8,3 +8,3 @@ import { Injector } from "@furystack/inject";

public abstract canExecute(data: Data): boolean;
public abstract execute(data: Data, context: IWebSocketContext, injector: Injector): any;
public abstract execute(data: Data, context: IWebSocketContext): any;
}

@@ -51,3 +51,3 @@ import { IApi, LoggerCollection } from "@furystack/core";

});
this.resolver.execute(message, context, this.injector);
this.resolver.execute(message, context);
});

@@ -54,0 +54,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc