Skip to content

Commit

Permalink
chore(all): prepare release 1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Apr 15, 2019
1 parent 89954f3 commit ced022d
Show file tree
Hide file tree
Showing 10 changed files with 882 additions and 253 deletions.
8 changes: 2 additions & 6 deletions dist/amd/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,8 @@ define('aurelia-store', ['exports', 'rxjs', 'aurelia-dependency-injection', 'aur
MiddlewarePlacement["After"] = "after";
})(exports.MiddlewarePlacement || (exports.MiddlewarePlacement = {}));
function logMiddleware(state, _, settings) {
if (settings && settings.logType && console.hasOwnProperty(settings.logType)) {
console[settings.logType]("New state: ", state);
}
else {
console.log("New state: ", state);
}
var logType = settings && settings.logType && console.hasOwnProperty(settings.logType) ? settings.logType : "log";
console[logType]("New state: ", state);
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
Expand Down
13 changes: 8 additions & 5 deletions dist/aurelia-store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ export interface CallingAction {
name: string;
params?: any[];
}
export declare type Middleware<T> = (state: T, originalState?: T, settings?: any, action?: CallingAction) => T | Promise<T | undefined | false> | void | false;
export declare type Middleware<T, S = any> = (state: T, originalState: T | undefined, settings: S, action?: CallingAction) => T | Promise<T | undefined | false> | void | false;
export declare enum MiddlewarePlacement {
Before = "before",
After = "after"
}
export declare function logMiddleware<T>(state: T, _: T, settings?: any): void;
export declare function logMiddleware(state: unknown, _: unknown, settings?: {
logType: "debug" | "error" | "info" | "log" | "trace" | "warn";
}): void;
export declare function localStorageMiddleware<T>(state: T, _: T, settings?: any): void;
export declare function rehydrateFromLocalStorage<T>(state: T, key?: string): any;
export declare enum LogLevel {
Expand Down Expand Up @@ -238,9 +240,10 @@ export declare class Store<T> {
private options;
private dispatchQueue;
constructor(initialState: T, options?: Partial<StoreOptions>);
registerMiddleware(reducer: Middleware<T>, placement: MiddlewarePlacement, settings?: any): void;
unregisterMiddleware(reducer: Middleware<T>): void;
isMiddlewareRegistered(middleware: Middleware<T>): boolean;
registerMiddleware<S extends undefined>(reducer: Middleware<T, undefined>, placement: MiddlewarePlacement): void;
registerMiddleware<S extends NonNullable<any>>(reducer: Middleware<T, S>, placement: MiddlewarePlacement, settings: S): void;
unregisterMiddleware(reducer: Middleware<T, any>): void;
isMiddlewareRegistered(middleware: Middleware<T, any>): boolean;
registerAction(name: string, reducer: Reducer<T>): void;
unregisterAction(reducer: Reducer<T>): void;
isActionRegistered(reducer: Reducer<T> | string): boolean;
Expand Down
8 changes: 2 additions & 6 deletions dist/commonjs/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,8 @@ function isStateHistory(history) {
MiddlewarePlacement["After"] = "after";
})(exports.MiddlewarePlacement || (exports.MiddlewarePlacement = {}));
function logMiddleware(state, _, settings) {
if (settings && settings.logType && console.hasOwnProperty(settings.logType)) {
console[settings.logType]("New state: ", state);
}
else {
console.log("New state: ", state);
}
var logType = settings && settings.logType && console.hasOwnProperty(settings.logType) ? settings.logType : "log";
console[logType]("New state: ", state);
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
Expand Down
8 changes: 2 additions & 6 deletions dist/es2015/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,8 @@ var MiddlewarePlacement;
MiddlewarePlacement["After"] = "after";
})(MiddlewarePlacement || (MiddlewarePlacement = {}));
function logMiddleware(state, _, settings) {
if (settings && settings.logType && console.hasOwnProperty(settings.logType)) {
console[settings.logType]("New state: ", state);
}
else {
console.log("New state: ", state);
}
const logType = settings && settings.logType && console.hasOwnProperty(settings.logType) ? settings.logType : "log";
console[logType]("New state: ", state);
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
Expand Down
8 changes: 2 additions & 6 deletions dist/es2017/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ var MiddlewarePlacement;
MiddlewarePlacement["After"] = "after";
})(MiddlewarePlacement || (MiddlewarePlacement = {}));
function logMiddleware(state, _, settings) {
if (settings && settings.logType && console.hasOwnProperty(settings.logType)) {
console[settings.logType]("New state: ", state);
}
else {
console.log("New state: ", state);
}
const logType = settings && settings.logType && console.hasOwnProperty(settings.logType) ? settings.logType : "log";
console[logType]("New state: ", state);
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
Expand Down
8 changes: 2 additions & 6 deletions dist/native-modules/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,8 @@ var MiddlewarePlacement;
MiddlewarePlacement["After"] = "after";
})(MiddlewarePlacement || (MiddlewarePlacement = {}));
function logMiddleware(state, _, settings) {
if (settings && settings.logType && console.hasOwnProperty(settings.logType)) {
console[settings.logType]("New state: ", state);
}
else {
console.log("New state: ", state);
}
var logType = settings && settings.logType && console.hasOwnProperty(settings.logType) ? settings.logType : "log";
console[logType]("New state: ", state);
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
Expand Down
Loading

0 comments on commit ced022d

Please sign in to comment.