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

@alipay/faas-biz-server-sdk

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alipay/faas-biz-server-sdk - npm Package Compare versions

Comparing version 1.1.1-alpha.2 to 1.1.1-alpha.3

4

dist/models/websocket/FaasWebsocketIO.d.ts

@@ -1,4 +0,5 @@

import { StorageOptions } from "../../types/Websocket";
import { StorageOptions, WebSocketEvent } from "../../types/Websocket";
import Chain from "./Chain";
import { Room } from "./Room";
import FaasWebSocket from "./Websocket";
export default class FaasWebSocketIO extends Chain {

@@ -14,4 +15,5 @@ private ws;

expect(roomId: string): this;
on(event: WebSocketEvent, handler: (socket: FaasWebSocket) => void): void;
emit(event: string, data: any): this;
broadcast(roomId: string, event: string, data: any): this;
}

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

const RedisStorage_1 = __importDefault(require("./Storage/RedisStorage"));
const Websocket_2 = __importDefault(require("./Websocket"));
class FaasWebSocketIO extends Chain_1.default {

@@ -57,4 +58,18 @@ ws;

}
on(event, handler) {
addEventListener(`websocket:${event}`, (event) => {
event.handle((async () => {
const socket = new Websocket_2.default({
connectionId: event.connectionId,
});
socket.storage = this._storage;
handler(socket);
})());
});
}
emit(event, data) {
this.later(async () => {
if (!this._rooms) {
throw new Error('No room specified');
}
for (const room of this._rooms) {

@@ -61,0 +76,0 @@ for (const socket of room.sockets) {

{
"name": "@alipay/faas-biz-server-sdk",
"version": "1.1.1-alpha.2",
"version": "1.1.1-alpha.3",
"description": "支付宝云开发业务 SDK(函数端)",

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

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