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

wappsto-redux

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wappsto-redux - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

43

actions/stream.js

@@ -40,11 +40,23 @@ import querystring from 'querystring';

export function updateStream(name, status, step, ws, json, increment){
return {
type: UPDATE_STREAM,
name,
status,
step,
ws,
json,
increment
const obj = { type: UPDATE_STREAM };
if(ws !== undefined){
websockets[name] = ws;
obj.ws = ws;
}
if(name !== undefined){
obj.name = name;
}
if(status !== undefined){
obj.status = status;
}
if(step !== undefined){
obj.step = step;
}
if(json !== undefined){
obj.json = json;
}
if(increment !== undefined){
obj.increment = increment;
}
return obj;
}

@@ -65,6 +77,7 @@

export function closeStream(name){
export function closeStream(name, silent = false){
return (dispatch, getState) => {
_clearStreamTimeouts({ name });
if (websockets[name]) {
websockets[name].silent = silent;
websockets[name].stop = true;

@@ -233,3 +246,5 @@ websockets[name].close();

_clearStreamTimeouts(stream);
dispatch(updateStream(stream.name, status.LOST, null, null, stream));
if(!ws.silent){
dispatch(updateStream(stream.name, status.LOST, null, null, stream));
}
if (websockets[stream.name]) {

@@ -242,5 +257,9 @@ websockets[stream.name].stop = true;

}
dispatch(updateStream(stream.name, status.RECONNECTING, steps.CONNECTING.WAITING, ws, stream, true));
if(!ws.silent){
dispatch(updateStream(stream.name, status.RECONNECTING, steps.CONNECTING.WAITING, ws, stream, true));
}
} else {
dispatch(updateStream(stream.name, status.CLOSED, e.code, ws, stream));
if(!ws.silent){
dispatch(updateStream(stream.name, status.CLOSED, e.code, ws, stream));
}
}

@@ -247,0 +266,0 @@ };

{
"name": "wappsto-redux",
"version": "3.0.1",
"version": "3.0.2",
"description": "",

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

@@ -17,17 +17,7 @@ import { UPDATE_STREAM, REMOVE_STREAM, status } from "../actions/stream";

state[action.name] = {
name: action.name,
status: action.status,
step: action.step,
ws: action.ws,
...state[action.name] || {},
...action,
count
}
break;
case status.LOST:
state = Object.assign({}, state);
state[action.name] = {
...(state[action.name] || {}),
name: action.name,
status: action.status,
json: action.json,
};
delete state[action.name].type;
break;

@@ -37,8 +27,6 @@ default:

state[action.name] = {
name: action.name,
status: action.status,
step: action.step,
ws: action.ws,
json: action.json
}
...state[action.name] || {},
...action
};
delete state[action.name].type;
break;

@@ -45,0 +33,0 @@ }

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