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

overmind

Package Overview
Dependencies
Maintainers
4
Versions
886
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overmind - npm Package Compare versions

Comparing version 1.0.0-1535141908317 to 1.0.0-1535290136520

5

es/Action.d.ts

@@ -1,2 +0,3 @@

import { ActionBase } from 'action-chain';
import ProxyStateTree from 'proxy-state-tree';
import { ActionBase, ActionChain } from 'action-chain';
declare type OperatorCallback<Effects, Value, NewValue = Value> = (effects: Effects, value: Value) => NewValue | Promise<NewValue>;

@@ -11,3 +12,3 @@ export interface IValueAction<State, Effects, InitialValue, Value = InitialValue> extends Action<State, Effects, InitialValue, Value> {

private proxyStateTree;
constructor(proxyStateTree: any, actionChain: any, initialActionId?: any, runOperators?: any);
constructor(proxyStateTree: ProxyStateTree, actionChain: ActionChain<Effects>, initialActionId?: number, runOperators?: any);
fork: <Paths>(cb: (effects: Effects, value: Value) => keyof Paths, paths: Paths) => [InitialValue] extends [void] ? INoValueAction<State, Effects, InitialValue, Value> : IValueAction<State, Effects, InitialValue, Value>;

@@ -14,0 +15,0 @@ mutation: (cb: (state: State, value: Value) => any) => [InitialValue] extends [void] ? INoValueAction<State, Effects, InitialValue, Value> : IValueAction<State, Effects, InitialValue, Value>;

4

es/Action.js

@@ -1,5 +0,6 @@

import { ActionBase, StopExecution } from 'action-chain';
import { ActionBase, StopExecution, } from 'action-chain';
export default class Action extends ActionBase {
constructor(proxyStateTree, actionChain, initialActionId, runOperators) {
super(actionChain, initialActionId, runOperators);
this.proxyStateTree = proxyStateTree;
this.fork = (cb, paths) => {

@@ -89,5 +90,4 @@ const operator = (effects, value) => {

};
this.proxyStateTree = proxyStateTree;
}
}
//# sourceMappingURL=Action.js.map

@@ -7,15 +7,8 @@ import { EventEmitter } from 'betsy';

};
declare type Cache = {
isDirty: boolean;
proxyStateTreeListener: any;
value: any;
paths: Set<string>;
updateCount: number;
};
export declare class Computed {
cb: (config: any) => (state: object) => void;
cacheLimit: number;
cacheKeys: Cache[];
cache: Map<any, Cache>;
constructor(cb: any, options?: ComputedOptions);
private cb;
private cacheLimit;
private cacheKeys;
private cache;
constructor(cb: (config: any) => (state: object) => void, options?: ComputedOptions);
evaluate(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: any): (config: any) => any;

@@ -22,0 +15,0 @@ }

import { EventType } from './';
export class Computed {
constructor(cb, options = {}) {
this.cb = cb;
this.cacheLimit = 10;
this.cacheKeys = [];
this.cache = new Map();
this.cb = cb;
this.cacheLimit = options.cacheLimit || this.cacheLimit;

@@ -9,0 +9,0 @@ return this.evaluate.bind(this);

import { EventType } from './';
class Derived {
constructor(cb) {
this.cb = cb;
this.isDirty = true;
this.proxyStateTreeListener = null;
this.value = null;
this.cb = cb;
this.updateCount = 0;

@@ -9,0 +9,0 @@ return this.evaluate.bind(this);

@@ -8,9 +8,8 @@ export declare type Message = {

export default class Devtools {
buffer: string[];
ws: WebSocket;
isConnected: boolean;
doReconnect: boolean;
hasWarnedReconnect: boolean;
reconnectInterval: number;
constructor();
private buffer;
private ws;
private isConnected;
private doReconnect;
private hasWarnedReconnect;
private reconnectInterval;
connect: (host: string, onMessage: (message: Message) => void) => void;

@@ -17,0 +16,0 @@ private reconnect;

@@ -30,2 +30,8 @@ // Needed due to Parcel + Webpack support

constructor() {
this.buffer = [];
this.ws = null;
this.isConnected = false;
this.doReconnect = false;
this.hasWarnedReconnect = false;
this.reconnectInterval = 10000;
this.connect = (host, onMessage) => {

@@ -56,8 +62,2 @@ this.ws = new WebSocket(`ws://${host}`);

}, 50);
this.ws = null;
this.isConnected = false;
this.doReconnect = false;
this.reconnectInterval = 10000;
this.hasWarnedReconnect = false;
this.buffer = [];
}

@@ -64,0 +64,0 @@ reconnect(host, onMessage) {

@@ -5,9 +5,9 @@ import { EventEmitter } from 'betsy';

declare class Reaction {
eventHub: EventEmitter<Events>;
proxyStateTree: ProxyStateTree;
path: string;
proxyStateTreeListener: any;
statePath: string;
updateCount: number;
constructor(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: any);
private eventHub;
private proxyStateTree;
private path;
private proxyStateTreeListener;
private updateCount;
private statePath;
constructor(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: string);
create(stateCb: (state: object) => any, cb: any): void;

@@ -14,0 +14,0 @@ destroy(): void;

@@ -1,2 +0,3 @@

import { ActionBase } from 'action-chain';
import ProxyStateTree from 'proxy-state-tree';
import { ActionBase, ActionChain } from 'action-chain';
declare type OperatorCallback<Effects, Value, NewValue = Value> = (effects: Effects, value: Value) => NewValue | Promise<NewValue>;

@@ -11,3 +12,3 @@ export interface IValueAction<State, Effects, InitialValue, Value = InitialValue> extends Action<State, Effects, InitialValue, Value> {

private proxyStateTree;
constructor(proxyStateTree: any, actionChain: any, initialActionId?: any, runOperators?: any);
constructor(proxyStateTree: ProxyStateTree, actionChain: ActionChain<Effects>, initialActionId?: number, runOperators?: any);
fork: <Paths>(cb: (effects: Effects, value: Value) => keyof Paths, paths: Paths) => [InitialValue] extends [void] ? INoValueAction<State, Effects, InitialValue, Value> : IValueAction<State, Effects, InitialValue, Value>;

@@ -14,0 +15,0 @@ mutation: (cb: (state: State, value: Value) => any) => [InitialValue] extends [void] ? INoValueAction<State, Effects, InitialValue, Value> : IValueAction<State, Effects, InitialValue, Value>;

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

super(actionChain, initialActionId, runOperators);
this.proxyStateTree = proxyStateTree;
this.fork = (cb, paths) => {

@@ -92,3 +93,2 @@ const operator = (effects, value) => {

};
this.proxyStateTree = proxyStateTree;
}

@@ -95,0 +95,0 @@ }

@@ -7,15 +7,8 @@ import { EventEmitter } from 'betsy';

};
declare type Cache = {
isDirty: boolean;
proxyStateTreeListener: any;
value: any;
paths: Set<string>;
updateCount: number;
};
export declare class Computed {
cb: (config: any) => (state: object) => void;
cacheLimit: number;
cacheKeys: Cache[];
cache: Map<any, Cache>;
constructor(cb: any, options?: ComputedOptions);
private cb;
private cacheLimit;
private cacheKeys;
private cache;
constructor(cb: (config: any) => (state: object) => void, options?: ComputedOptions);
evaluate(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: any): (config: any) => any;

@@ -22,0 +15,0 @@ }

@@ -6,6 +6,6 @@ "use strict";

constructor(cb, options = {}) {
this.cb = cb;
this.cacheLimit = 10;
this.cacheKeys = [];
this.cache = new Map();
this.cb = cb;
this.cacheLimit = options.cacheLimit || this.cacheLimit;

@@ -12,0 +12,0 @@ return this.evaluate.bind(this);

@@ -6,6 +6,6 @@ "use strict";

constructor(cb) {
this.cb = cb;
this.isDirty = true;
this.proxyStateTreeListener = null;
this.value = null;
this.cb = cb;
this.updateCount = 0;

@@ -12,0 +12,0 @@ return this.evaluate.bind(this);

@@ -8,9 +8,8 @@ export declare type Message = {

export default class Devtools {
buffer: string[];
ws: WebSocket;
isConnected: boolean;
doReconnect: boolean;
hasWarnedReconnect: boolean;
reconnectInterval: number;
constructor();
private buffer;
private ws;
private isConnected;
private doReconnect;
private hasWarnedReconnect;
private reconnectInterval;
connect: (host: string, onMessage: (message: Message) => void) => void;

@@ -17,0 +16,0 @@ private reconnect;

@@ -34,2 +34,8 @@ "use strict";

constructor() {
this.buffer = [];
this.ws = null;
this.isConnected = false;
this.doReconnect = false;
this.hasWarnedReconnect = false;
this.reconnectInterval = 10000;
this.connect = (host, onMessage) => {

@@ -60,8 +66,2 @@ this.ws = new WebSocket(`ws://${host}`);

}, 50);
this.ws = null;
this.isConnected = false;
this.doReconnect = false;
this.reconnectInterval = 10000;
this.hasWarnedReconnect = false;
this.buffer = [];
}

@@ -68,0 +68,0 @@ reconnect(host, onMessage) {

@@ -5,9 +5,9 @@ import { EventEmitter } from 'betsy';

declare class Reaction {
eventHub: EventEmitter<Events>;
proxyStateTree: ProxyStateTree;
path: string;
proxyStateTreeListener: any;
statePath: string;
updateCount: number;
constructor(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: any);
private eventHub;
private proxyStateTree;
private path;
private proxyStateTreeListener;
private updateCount;
private statePath;
constructor(eventHub: EventEmitter<Events>, proxyStateTree: ProxyStateTree, path: string);
create(stateCb: (state: object) => any, cb: any): void;

@@ -14,0 +14,0 @@ destroy(): void;

{
"name": "overmind",
"version": "1.0.0-1535141908317",
"version": "1.0.0-1535290136520",
"description": "Functional actions",

@@ -41,6 +41,6 @@ "author": "Christian Alfoni <christianalfoni@gmail.com>",

"@types/node": "^10.5.1",
"action-chain": "1.0.0-1535141908317",
"action-chain": "1.0.0-1535290136519",
"is-plain-object": "^2.0.4",
"betsy": "1.0.0-1535141908317",
"proxy-state-tree": "1.0.0-1535141908317",
"betsy": "1.0.0-1535290136520",
"proxy-state-tree": "1.0.0-1535290136520",
"tslib": "^1.9.3"

@@ -47,0 +47,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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