Skip to content

Commit

Permalink
chore(all): prepare release 1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed May 29, 2019
1 parent 1f80774 commit 8dc678e
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 295 deletions.
8 changes: 4 additions & 4 deletions dist/amd/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ define('aurelia-store', ['exports', 'rxjs', 'aurelia-dependency-injection', 'aur
Array.isArray(history.past);
}

var DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
MiddlewarePlacement["After"] = "after";
Expand All @@ -143,17 +144,15 @@ define('aurelia-store', ['exports', 'rxjs', 'aurelia-dependency-injection', 'aur
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
var key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
var key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
aureliaPal.PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!aureliaPal.PLATFORM.global.localStorage) {
return state;
}
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -624,6 +623,7 @@ define('aurelia-store', ['exports', 'rxjs', 'aurelia-dependency-injection', 'aur
exports.nextStateHistory = nextStateHistory;
exports.applyLimits = applyLimits;
exports.isStateHistory = isStateHistory;
exports.DEFAULT_LOCAL_STORAGE_KEY = DEFAULT_LOCAL_STORAGE_KEY;
exports.logMiddleware = logMiddleware;
exports.localStorageMiddleware = localStorageMiddleware;
exports.rehydrateFromLocalStorage = rehydrateFromLocalStorage;
Expand Down
5 changes: 4 additions & 1 deletion dist/aurelia-store.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export declare function jump<T>(state: T, n: number): T | StateHistory<any>;
export declare function nextStateHistory<T>(presentStateHistory: StateHistory<T>, nextPresent: T): StateHistory<T>;
export declare function applyLimits<T>(state: T, limit: number): T;
export declare function isStateHistory(history: any): history is StateHistory<any>;
export declare const DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
export interface CallingAction {
name: string;
params?: any[];
Expand All @@ -27,7 +28,9 @@ export declare enum MiddlewarePlacement {
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 localStorageMiddleware(state: unknown, _: unknown, settings?: {
key: string;
}): void;
export declare function rehydrateFromLocalStorage<T>(state: T, key?: string): any;
export declare enum LogLevel {
trace = "trace",
Expand Down
8 changes: 4 additions & 4 deletions dist/commonjs/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function isStateHistory(history) {
Array.isArray(history.past);
}

var DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
MiddlewarePlacement["After"] = "after";
Expand All @@ -151,17 +152,15 @@ function logMiddleware(state, _, settings) {
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
var key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
var key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
aureliaPal.PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!aureliaPal.PLATFORM.global.localStorage) {
return state;
}
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -632,6 +631,7 @@ exports.jump = jump;
exports.nextStateHistory = nextStateHistory;
exports.applyLimits = applyLimits;
exports.isStateHistory = isStateHistory;
exports.DEFAULT_LOCAL_STORAGE_KEY = DEFAULT_LOCAL_STORAGE_KEY;
exports.logMiddleware = logMiddleware;
exports.localStorageMiddleware = localStorageMiddleware;
exports.rehydrateFromLocalStorage = rehydrateFromLocalStorage;
Expand Down
9 changes: 4 additions & 5 deletions dist/es2015/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function isStateHistory(history) {
Array.isArray(history.past);
}

const DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
var MiddlewarePlacement;
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
Expand All @@ -95,17 +96,15 @@ function logMiddleware(state, _, settings) {
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
const key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
const key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!PLATFORM.global.localStorage) {
return state;
}
const storedState = PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
const storedState = PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -486,4 +485,4 @@ function configure(aurelia, options) {
.registerInstance(Store, new Store(initState, options));
}

export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, DEFAULT_LOCAL_STORAGE_KEY, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
9 changes: 4 additions & 5 deletions dist/es2017/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function isStateHistory(history) {
Array.isArray(history.past);
}

const DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
var MiddlewarePlacement;
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
Expand All @@ -71,17 +72,15 @@ function logMiddleware(state, _, settings) {
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
const key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
const key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!PLATFORM.global.localStorage) {
return state;
}
const storedState = PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
const storedState = PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -456,4 +455,4 @@ function configure(aurelia, options) {
.registerInstance(Store, new Store(initState, options));
}

export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, DEFAULT_LOCAL_STORAGE_KEY, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
9 changes: 4 additions & 5 deletions dist/native-modules/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function isStateHistory(history) {
Array.isArray(history.past);
}

var DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
var MiddlewarePlacement;
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
Expand All @@ -148,17 +149,15 @@ function logMiddleware(state, _, settings) {
}
function localStorageMiddleware(state, _, settings) {
if (PLATFORM.global.localStorage) {
var key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
var key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!PLATFORM.global.localStorage) {
return state;
}
var storedState = PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
var storedState = PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -623,4 +622,4 @@ function configure(aurelia, options) {
.registerInstance(Store, new Store(initState, options));
}

export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
export { configure, PerformanceMeasurement, Store, dispatchify, executeSteps, jump, nextStateHistory, applyLimits, isStateHistory, DEFAULT_LOCAL_STORAGE_KEY, MiddlewarePlacement, logMiddleware, localStorageMiddleware, rehydrateFromLocalStorage, LogLevel, LoggerIndexed, getLogType, connectTo };
8 changes: 4 additions & 4 deletions dist/umd-es2015/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
Array.isArray(history.past);
}

const DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
MiddlewarePlacement["After"] = "after";
Expand All @@ -94,17 +95,15 @@
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
const key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
const key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
aureliaPal.PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!aureliaPal.PLATFORM.global.localStorage) {
return state;
}
const storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
const storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -491,6 +490,7 @@
exports.nextStateHistory = nextStateHistory;
exports.applyLimits = applyLimits;
exports.isStateHistory = isStateHistory;
exports.DEFAULT_LOCAL_STORAGE_KEY = DEFAULT_LOCAL_STORAGE_KEY;
exports.logMiddleware = logMiddleware;
exports.localStorageMiddleware = localStorageMiddleware;
exports.rehydrateFromLocalStorage = rehydrateFromLocalStorage;
Expand Down
8 changes: 4 additions & 4 deletions dist/umd/aurelia-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
Array.isArray(history.past);
}

var DEFAULT_LOCAL_STORAGE_KEY = "aurelia-store-state";
(function (MiddlewarePlacement) {
MiddlewarePlacement["Before"] = "before";
MiddlewarePlacement["After"] = "after";
Expand All @@ -147,17 +148,15 @@
}
function localStorageMiddleware(state, _, settings) {
if (aureliaPal.PLATFORM.global.localStorage) {
var key = settings && settings.key && typeof settings.key === "string"
? settings.key
: "aurelia-store-state";
var key = settings && settings.key || DEFAULT_LOCAL_STORAGE_KEY;
aureliaPal.PLATFORM.global.localStorage.setItem(key, JSON.stringify(state));
}
}
function rehydrateFromLocalStorage(state, key) {
if (!aureliaPal.PLATFORM.global.localStorage) {
return state;
}
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || "aurelia-store-state");
var storedState = aureliaPal.PLATFORM.global.localStorage.getItem(key || DEFAULT_LOCAL_STORAGE_KEY);
if (!storedState) {
return state;
}
Expand Down Expand Up @@ -628,6 +627,7 @@
exports.nextStateHistory = nextStateHistory;
exports.applyLimits = applyLimits;
exports.isStateHistory = isStateHistory;
exports.DEFAULT_LOCAL_STORAGE_KEY = DEFAULT_LOCAL_STORAGE_KEY;
exports.logMiddleware = logMiddleware;
exports.localStorageMiddleware = localStorageMiddleware;
exports.rehydrateFromLocalStorage = rehydrateFromLocalStorage;
Expand Down
Loading

0 comments on commit 8dc678e

Please sign in to comment.