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

@waves.exchange/config-ws

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves.exchange/config-ws - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

dist/types.d.ts

7

dist/configUpdates.d.ts
import { BehaviorSubject } from '@waves.exchange/reactive';
declare type ConfigState = {
configs: Record<string, Record<any, any>>;
};
import { ConfigState } from './types';
export declare class WsConfigService {
configSubject: BehaviorSubject<ConfigState>;
private _url;
private readonly _url;
private _configWebSocket;

@@ -16,3 +14,2 @@ private _connectConfigTimeout;

}
export {};
//# sourceMappingURL=configUpdates.d.ts.map

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

const RECONNECT_TIMEOUT = 5000;
const isEmpty = (object) => Object.keys(object).length === 0 && object.constructor === Object;
class WsConfigService {

@@ -27,3 +28,3 @@ constructor(url) {

onOpen: () => {
if (this.configSubject.observers.length) {
if (!isEmpty(this.configSubject.getValue().configs)) {
const oldConfigs = this.configSubject.getValue().configs;

@@ -63,3 +64,3 @@ if (oldConfigs) {

const errString = err instanceof CloseEvent ? (err.reason || err.code) : String(err);
console.error('Config WS Error: %s', errString);
console.error('Config WS Ping Error: %s', errString);
});

@@ -74,3 +75,3 @@ }

this.configSubject.next({
configs: Object.assign(Object.assign({}, oldConfigs), { [filePath]: data.value ? JSON.parse(data.value) : undefined })
configs: Object.assign(Object.assign({}, oldConfigs), { [filePath]: data === null || data === void 0 ? void 0 : data.value })
});

@@ -77,0 +78,0 @@ });

{
"name": "@waves.exchange/config-ws",
"version": "0.0.4",
"version": "0.0.5",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

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