New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kea

Package Overview
Dependencies
Maintainers
1
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kea - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

5

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
## 2.2.0 - Unreleased
## 2.2.1 - 2020-10-27
- Improve a few types for plugins
## 2.2.0 - 2020-09-08
- [TypeScript support](https://kea.js.org/docs/guide/typescript)!

@@ -6,0 +9,0 @@ - Fix bug with the store being created twice. [#111](https://github.com/keajs/kea/issues/111)

27

lib/index.d.ts

@@ -43,2 +43,3 @@ import { AnyAction, Reducer, Middleware, compose, StoreEnhancer, Store, Action } from 'redux';

mount(callback?: any): () => void;
extend: (extendedInput: LogicInput) => LogicWrapper;
}

@@ -178,17 +179,17 @@ interface LogicWrapperAdditions<LogicType extends Logic> {

beforeKea?: (input: LogicInput) => void;
beforeBuild?: (logic: Logic, inputs: LogicInput[]) => void;
beforeLogic?: (logic: Logic, input: LogicInput) => void;
afterLogic?: (logic: Logic, input: LogicInput) => void;
afterBuild?: (logic: Logic, inputs: LogicInput[]) => void;
beforeMount?: (logic: Logic) => void;
afterMount?: (logic: Logic) => void;
beforeAttach?: (logic: Logic) => void;
afterAttach?: (logic: Logic) => void;
beforeUnmount?: (logic: Logic) => void;
afterUnmount?: (logic: Logic) => void;
beforeDetach?: (logic: Logic) => void;
afterDetach?: (logic: Logic) => void;
beforeBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void;
beforeLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void;
afterLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void;
afterBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void;
beforeMount?: (logic: Logic & BuiltLogicAdditions) => void;
afterMount?: (logic: Logic & BuiltLogicAdditions) => void;
beforeAttach?: (logic: Logic & BuiltLogicAdditions) => void;
afterAttach?: (logic: Logic & BuiltLogicAdditions) => void;
beforeUnmount?: (logic: Logic & BuiltLogicAdditions) => void;
afterUnmount?: (logic: Logic & BuiltLogicAdditions) => void;
beforeDetach?: (logic: Logic & BuiltLogicAdditions) => void;
afterDetach?: (logic: Logic & BuiltLogicAdditions) => void;
beforeWrapper?: (input: LogicInput, Klass: AnyComponent) => void;
afterWrapper?: (input: LogicInput, Klass: AnyComponent, Kea: KeaComponent) => void;
beforeRender?: (logic: Logic, props: Props) => void;
beforeRender?: (logic: Logic & BuiltLogicAdditions, props: Props) => void;
beforeCloseContext?: (context: Context) => void;

@@ -195,0 +196,0 @@ }

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

import { Logic, ReducerFunction } from '../types';
import { BuiltLogicAdditions, Logic, ReducerFunction } from '../types';
import { Reducer } from 'redux';

@@ -7,4 +7,4 @@ export declare const ATTACH_REDUCER = "@KEA/ATTACH_REDUCER";

export declare function keaReducer(pathStart?: string): ReducerFunction;
export declare function attachReducer(logic: Logic): void;
export declare function detachReducer(logic: Logic): void;
export declare function attachReducer(logic: Logic & BuiltLogicAdditions): void;
export declare function detachReducer(logic: Logic & BuiltLogicAdditions): void;
export declare function regenerateRootReducer(pathStart: string): void;

@@ -11,0 +11,0 @@ export declare function recursiveCreateReducer(treeNode: ReducerFunction | Record<string, any>): ReducerFunction;

@@ -42,2 +42,3 @@ import { Reducer, Store, Action as ReduxAction, Middleware, StoreEnhancer, compose, AnyAction } from 'redux';

mount(callback?: any): () => void;
extend: (extendedInput: LogicInput) => LogicWrapper;
}

@@ -177,17 +178,17 @@ export interface LogicWrapperAdditions<LogicType extends Logic> {

beforeKea?: (input: LogicInput) => void;
beforeBuild?: (logic: Logic, inputs: LogicInput[]) => void;
beforeLogic?: (logic: Logic, input: LogicInput) => void;
afterLogic?: (logic: Logic, input: LogicInput) => void;
afterBuild?: (logic: Logic, inputs: LogicInput[]) => void;
beforeMount?: (logic: Logic) => void;
afterMount?: (logic: Logic) => void;
beforeAttach?: (logic: Logic) => void;
afterAttach?: (logic: Logic) => void;
beforeUnmount?: (logic: Logic) => void;
afterUnmount?: (logic: Logic) => void;
beforeDetach?: (logic: Logic) => void;
afterDetach?: (logic: Logic) => void;
beforeBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void;
beforeLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void;
afterLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void;
afterBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void;
beforeMount?: (logic: Logic & BuiltLogicAdditions) => void;
afterMount?: (logic: Logic & BuiltLogicAdditions) => void;
beforeAttach?: (logic: Logic & BuiltLogicAdditions) => void;
afterAttach?: (logic: Logic & BuiltLogicAdditions) => void;
beforeUnmount?: (logic: Logic & BuiltLogicAdditions) => void;
afterUnmount?: (logic: Logic & BuiltLogicAdditions) => void;
beforeDetach?: (logic: Logic & BuiltLogicAdditions) => void;
afterDetach?: (logic: Logic & BuiltLogicAdditions) => void;
beforeWrapper?: (input: LogicInput, Klass: AnyComponent) => void;
afterWrapper?: (input: LogicInput, Klass: AnyComponent, Kea: KeaComponent) => void;
beforeRender?: (logic: Logic, props: Props) => void;
beforeRender?: (logic: Logic & BuiltLogicAdditions, props: Props) => void;
beforeCloseContext?: (context: Context) => void;

@@ -194,0 +195,0 @@ }

{
"name": "kea",
"version": "2.2.0",
"version": "2.2.1",
"description": "Smart front-end architecture",

@@ -5,0 +5,0 @@ "author": "Marius Andra",

@@ -11,3 +11,3 @@ import { runPlugins } from '../plugins'

// Converts `input` into `logic` by running all build steps in succession
function applyInputToLogic(logic: Logic, input: LogicInput) {
function applyInputToLogic(logic: Logic & BuiltLogicAdditions, input: LogicInput) {
runPlugins('beforeLogic', logic, input)

@@ -14,0 +14,0 @@

import { getContext } from '../context'
import { runPlugins } from '../plugins'
import { Logic, ReducerFunction } from '../types'
import {BuiltLogicAdditions, Logic, ReducerFunction} from '../types'
import { Reducer } from 'redux'

@@ -35,3 +35,3 @@

export function attachReducer(logic: Logic): void {
export function attachReducer(logic: Logic & BuiltLogicAdditions): void {
const { path, reducer } = logic

@@ -95,3 +95,3 @@ const {

export function detachReducer(logic: Logic): void {
export function detachReducer(logic: Logic & BuiltLogicAdditions): void {
const { path } = logic

@@ -98,0 +98,0 @@

@@ -46,2 +46,3 @@ import { Reducer, Store, Action as ReduxAction, Middleware, StoreEnhancer, compose, AnyAction } from 'redux'

mount(callback?: any): () => void
extend: (extendedInput: LogicInput) => LogicWrapper
}

@@ -287,17 +288,17 @@

beforeKea?: (input: LogicInput) => void
beforeBuild?: (logic: Logic, inputs: LogicInput[]) => void
beforeLogic?: (logic: Logic, input: LogicInput) => void
afterLogic?: (logic: Logic, input: LogicInput) => void
afterBuild?: (logic: Logic, inputs: LogicInput[]) => void
beforeMount?: (logic: Logic) => void
afterMount?: (logic: Logic) => void
beforeAttach?: (logic: Logic) => void
afterAttach?: (logic: Logic) => void
beforeUnmount?: (logic: Logic) => void
afterUnmount?: (logic: Logic) => void
beforeDetach?: (logic: Logic) => void
afterDetach?: (logic: Logic) => void
beforeBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void
beforeLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void
afterLogic?: (logic: Logic & BuiltLogicAdditions, input: LogicInput) => void
afterBuild?: (logic: Logic & BuiltLogicAdditions, inputs: LogicInput[]) => void
beforeMount?: (logic: Logic & BuiltLogicAdditions) => void
afterMount?: (logic: Logic & BuiltLogicAdditions) => void
beforeAttach?: (logic: Logic & BuiltLogicAdditions) => void
afterAttach?: (logic: Logic & BuiltLogicAdditions) => void
beforeUnmount?: (logic: Logic & BuiltLogicAdditions) => void
afterUnmount?: (logic: Logic & BuiltLogicAdditions) => void
beforeDetach?: (logic: Logic & BuiltLogicAdditions) => void
afterDetach?: (logic: Logic & BuiltLogicAdditions) => void
beforeWrapper?: (input: LogicInput, Klass: AnyComponent) => void
afterWrapper?: (input: LogicInput, Klass: AnyComponent, Kea: KeaComponent) => void
beforeRender?: (logic: Logic, props: Props) => void
beforeRender?: (logic: Logic & BuiltLogicAdditions, props: Props) => void
beforeCloseContext?: (context: Context) => void

@@ -304,0 +305,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