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

newsware

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newsware - npm Package Compare versions

Comparing version 10.0.0-beta.11 to 10.0.0-beta.12

1

lib/src/wsApi.d.ts

@@ -10,2 +10,3 @@ /// <reference types="ws" />

private options;
private closed;
constructor(apikey: string, options: ConnectOptions);

@@ -12,0 +13,0 @@ changeApikey(apikey: string): void;

5

lib/src/wsApi.js

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

this.reconnectMessages = [];
this.closed = true;
this.options = Object.assign(Object.assign({}, defaultOptions), options);

@@ -35,2 +36,3 @@ this.websocketEndpoint = this.options.endpoint.websocketProtocol + "://" + this.options.endpoint.host + "/ws/v3";

connect() {
this.closed = false;
const urlParams = new URLSearchParams({

@@ -77,3 +79,3 @@ apikey: this.apikey,

this.options.closeCallback(event);
if (this.options.reconnect)
if (this.options.reconnect && !this.closed)
setTimeout(() => {

@@ -115,2 +117,3 @@ this.connect();

(_a = this.socket) === null || _a === void 0 ? void 0 : _a.close();
this.closed = true;
}

@@ -117,0 +120,0 @@ }

{
"name": "newsware",
"version": "10.0.0-beta.11",
"version": "10.0.0-beta.12",
"description": "Typescript client for interacting with the Newsware API",

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

@@ -20,2 +20,3 @@ import { ConnectOptions, SubscribeOptions, WebsocketRequest, WebsocketResponse, } from "./types";

private options: Required<ConnectOptions>
private closed: boolean = true

@@ -39,2 +40,4 @@ constructor(

connect() {
this.closed = false
const urlParams = new URLSearchParams({

@@ -84,3 +87,3 @@ apikey: this.apikey,

this.options.closeCallback(event)
if (this.options.reconnect)
if (this.options.reconnect && !this.closed)
setTimeout(() => {

@@ -124,3 +127,4 @@ this.connect()

this.socket?.close()
this.closed = true
}
}

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