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

@signalwire/js

Package Overview
Dependencies
Maintainers
1
Versions
366
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@signalwire/js - npm Package Compare versions

Comparing version 1.2.4-beta.2 to 1.2.4

5

CHANGELOG.md

@@ -6,3 +6,6 @@ # Changelog

<!-- ## [Unreleased] -->
## [1.2.4] - 2019-12-04
### Fixed
- Keep trying to reconnect WS in case of network failure - even if it never has been connected.
## [1.2.4-beta.2] - 2019-12-02

@@ -9,0 +12,0 @@ ### Changed

6

dist/esm/common/src/BaseSession.d.ts

@@ -22,5 +22,6 @@ import * as log from 'loglevel';

protected _keepAliveTimeout: any;
protected _reconnectTimeout: any;
protected _reconnectDelay: number;
protected _autoReconnect: boolean;
private _idle;
protected _idle: boolean;
private _executeQueue;

@@ -45,4 +46,3 @@ private _pong;

protected _onSocketOpen(): Promise<void>;
protected _onSocketClose(): void;
protected _onSocketError(error: Error): void;
protected _onSocketCloseOrError(event: any): void;
protected _onSocketMessage(response: any): void;

@@ -49,0 +49,0 @@ protected _removeSubscription(protocol: string, channel?: string): void;

@@ -35,3 +35,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

this._reconnectDelay = 5000;
this._autoReconnect = false;
this._autoReconnect = true;
this._idle = false;

@@ -43,4 +43,3 @@ this._executeQueue = [];

this._onSocketOpen = this._onSocketOpen.bind(this);
this._onSocketClose = this._onSocketClose.bind(this);
this._onSocketError = this._onSocketError.bind(this);
this._onSocketCloseOrError = this._onSocketCloseOrError.bind(this);
this._onSocketMessage = this._onSocketMessage.bind(this);

@@ -105,2 +104,3 @@ this._handleLoginError = this._handleLoginError.bind(this);

return __awaiter(this, void 0, void 0, function* () {
clearTimeout(this._reconnectTimeout);
this.subscriptions = {};

@@ -183,3 +183,4 @@ this._autoReconnect = false;

}
_onSocketClose() {
_onSocketCloseOrError(event) {
logger.error(`Socket ${event.type} ${event.message}`);
if (this.relayProtocol) {

@@ -199,8 +200,5 @@ deRegisterAll(this.relayProtocol);

if (this._autoReconnect) {
setTimeout(() => this.connect(), this._reconnectDelay);
this._reconnectTimeout = setTimeout(() => this.connect(), this._reconnectDelay);
}
}
_onSocketError(error) {
logger.error(error.message);
}
_onSocketMessage(response) {

@@ -253,4 +251,4 @@ const { method, params } = response;

this.on(SwEvent.SocketOpen, this._onSocketOpen);
this.on(SwEvent.SocketClose, this._onSocketClose);
this.on(SwEvent.SocketError, this._onSocketError);
this.on(SwEvent.SocketClose, this._onSocketCloseOrError);
this.on(SwEvent.SocketError, this._onSocketCloseOrError);
this.on(SwEvent.SocketMessage, this._onSocketMessage);

@@ -260,4 +258,4 @@ }

this.off(SwEvent.SocketOpen, this._onSocketOpen);
this.off(SwEvent.SocketClose, this._onSocketClose);
this.off(SwEvent.SocketError, this._onSocketError);
this.off(SwEvent.SocketClose, this._onSocketCloseOrError);
this.off(SwEvent.SocketError, this._onSocketCloseOrError);
this.off(SwEvent.SocketMessage, this._onSocketMessage);

@@ -264,0 +262,0 @@ }

import Relay from './src/SignalWire';
import Verto from './src/Verto';
export declare const VERSION = "1.2.4-beta.2";
export declare const VERSION = "1.2.4";
export { Relay, Verto };
import Relay from './src/SignalWire';
import Verto from './src/Verto';
import { setAgentName } from '../common/src/messages/blade/Connect';
export const VERSION = '1.2.4-beta.2';
export const VERSION = '1.2.4';
setAgentName(`JavaScript SDK/${VERSION}`);
export { Relay, Verto };

@@ -47,2 +47,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

return __awaiter(this, void 0, void 0, function* () {
this._idle = false;
const { login, password, passwd, userVariables } = this.options;

@@ -49,0 +50,0 @@ const msg = new Login(login, (password || passwd), this.sessionid, userVariables);

{
"name": "@signalwire/js",
"version": "1.2.4-beta.2",
"version": "1.2.4",
"description": "Relay SDK for JavaScript to connect to SignalWire.",

@@ -9,2 +9,3 @@ "author": "SignalWire Team <open.source@signalwire.com>",

"module": "dist/esm/js/index.js",
"types": "dist/esm/js/index.d.ts",
"files": [

@@ -11,0 +12,0 @@ "dist"

Sorry, the diff of this file is too big to display

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