diff --git a/dist/amd/store.d.ts b/dist/amd/store.d.ts index 3b8d28b..01189ea 100644 --- a/dist/amd/store.d.ts +++ b/dist/amd/store.d.ts @@ -34,6 +34,7 @@ export declare class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/amd/store.js b/dist/amd/store.js index e624bfc..1eb4c12 100644 --- a/dist/amd/store.js +++ b/dist/amd/store.js @@ -1,9 +1,3 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -39,7 +33,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; -define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middleware", "./logging"], function (require, exports, rxjs_1, aurelia_framework_1, history_1, middleware_1, logging_1) { +define(["require", "exports", "rxjs", "aurelia-dependency-injection", "aurelia-logging", "aurelia-pal", "./history", "./middleware", "./logging"], function (require, exports, rxjs_1, aurelia_dependency_injection_1, aurelia_logging_1, aurelia_pal_1, history_1, middleware_1, logging_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var PerformanceMeasurement; @@ -50,7 +44,7 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl var Store = /** @class */ (function () { function Store(initialState, options) { this.initialState = initialState; - this.logger = aurelia_framework_1.LogManager.getLogger("aurelia-store"); + this.logger = aurelia_logging_1.getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -92,6 +86,9 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl } return this.actions.has(reducer); }; + Store.prototype.resetToState = function (state) { + this._state.next(state); + }; Store.prototype.dispatch = function (reducer) { var _this = this; var params = []; @@ -158,7 +155,7 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl if (!this.actions.has(reducer)) { throw new Error("Tried to dispatch an unregistered action" + (reducer ? " " + reducer.name : "")); } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-start"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-start"); action = this.actions.get(reducer); if (this.options.logDispatchedActions) { this.logger[logging_1.getLogType(this.options, "dispatchedActions", logging_1.LogLevel.info)]("Dispatching: " + action.type); @@ -170,19 +167,19 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl case 1: beforeMiddleswaresResult = _a.sent(); if (beforeMiddleswaresResult === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } return [4 /*yield*/, reducer.apply(void 0, [beforeMiddleswaresResult].concat(params))]; case 2: result = _a.sent(); if (result === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); if (!result && typeof result !== "object") { throw new Error("The reducer has to return a new state"); } @@ -193,8 +190,8 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl case 3: resultingState = _a.sent(); if (resultingState === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } if (history_1.isStateHistory(resultingState) && @@ -203,19 +200,19 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl resultingState = history_1.applyLimits(resultingState, this.options.history.limit); } this._state.next(resultingState); - aurelia_framework_1.PLATFORM.performance.mark("dispatch-end"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-end"); if (this.options.measurePerformance === PerformanceMeasurement.StartEnd) { - aurelia_framework_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); - measures = aurelia_framework_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); + aurelia_pal_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); + measures = aurelia_pal_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + measures[0].duration + " of dispatched action " + action.type + ":", measures); } else if (this.options.measurePerformance === PerformanceMeasurement.All) { - marks = aurelia_framework_1.PLATFORM.performance.getEntriesByType("mark"); + marks = aurelia_pal_1.PLATFORM.performance.getEntriesByType("mark"); totalDuration = marks[marks.length - 1].startTime - marks[0].startTime; this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + totalDuration + " of dispatched action " + action.type + ":", marks); } - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); this.updateDevToolsState(action, resultingState); return [2 /*return*/]; } @@ -257,7 +254,7 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl return [4 /*yield*/, prev]; case 6: return [2 /*return*/, _d.sent()]; case 7: - aurelia_framework_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); return [7 /*endfinally*/]; case 8: return [2 /*return*/]; } @@ -266,10 +263,10 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl }; Store.prototype.setupDevTools = function () { var _this = this; - if (aurelia_framework_1.PLATFORM.global.devToolsExtension) { + if (aurelia_pal_1.PLATFORM.global.devToolsExtension) { this.logger[logging_1.getLogType(this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; - this.devTools = aurelia_framework_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); + this.devTools = aurelia_pal_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); this.devTools.init(this.initialState); this.devTools.subscribe(function (message) { _this.logger[logging_1.getLogType(_this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools sent change " + message.type); @@ -287,14 +284,11 @@ define(["require", "exports", "rxjs", "aurelia-framework", "./history", "./middl Store.prototype.registerHistoryMethods = function () { this.registerAction("jump", history_1.jump); }; - Store = __decorate([ - aurelia_framework_1.autoinject() - ], Store); return Store; }()); exports.Store = Store; function dispatchify(action) { - var store = aurelia_framework_1.Container.instance.get(Store); + var store = aurelia_dependency_injection_1.Container.instance.get(Store); return function () { var params = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/dist/amd/store.js.map b/dist/amd/store.js.map index c315388..f0c9ee9 100644 --- a/dist/amd/store.js.map +++ b/dist/amd/store.js.map @@ -1 +1 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;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CAAC,IAAM,CAAC,CAAC;oBAEhH,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;wBAC/B,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;qBAC7C;gBACH,CAAC,CAAC,CAAC;aACJ;QACH,CAAC;QAEO,mCAAmB,GAA3B,UAA4B,MAAsB,EAAE,KAAQ;YAC1D,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;aACnC;QACH,CAAC;QAEO,sCAAsB,GAA9B;YACE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,cAAyB,CAAC,CAAC;QACzD,CAAC;QACH,YAAC;IAAD,CAAC,AA1PD,IA0PC;IA1PY,sBAAK;IA4PlB,SAAgB,WAAW,CAAqB,MAA8B;QAC5E,IAAM,KAAK,GAAG,wCAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAE5C,OAAO;YAAU,gBAAY;iBAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;gBAAZ,2BAAY;;YAC3B,OAAO,KAAK,CAAC,QAAQ,OAAd,KAAK,GAAU,MAAM,SAAK,MAAM,EAAkB,CAAC;QAC5D,CAAC,CAAA;IACH,CAAC;IAND,kCAMC"} \ No newline at end of file diff --git a/dist/commonjs/store.d.ts b/dist/commonjs/store.d.ts index 3b8d28b..01189ea 100644 --- a/dist/commonjs/store.d.ts +++ b/dist/commonjs/store.d.ts @@ -34,6 +34,7 @@ export declare class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/commonjs/store.js b/dist/commonjs/store.js index 1a24b6e..7e1f8fe 100644 --- a/dist/commonjs/store.js +++ b/dist/commonjs/store.js @@ -1,10 +1,4 @@ "use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -42,7 +36,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { }; Object.defineProperty(exports, "__esModule", { value: true }); var rxjs_1 = require("rxjs"); -var aurelia_framework_1 = require("aurelia-framework"); +var aurelia_dependency_injection_1 = require("aurelia-dependency-injection"); +var aurelia_logging_1 = require("aurelia-logging"); +var aurelia_pal_1 = require("aurelia-pal"); var history_1 = require("./history"); var middleware_1 = require("./middleware"); var logging_1 = require("./logging"); @@ -54,7 +50,7 @@ var PerformanceMeasurement; var Store = /** @class */ (function () { function Store(initialState, options) { this.initialState = initialState; - this.logger = aurelia_framework_1.LogManager.getLogger("aurelia-store"); + this.logger = aurelia_logging_1.getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -96,6 +92,9 @@ var Store = /** @class */ (function () { } return this.actions.has(reducer); }; + Store.prototype.resetToState = function (state) { + this._state.next(state); + }; Store.prototype.dispatch = function (reducer) { var _this = this; var params = []; @@ -162,7 +161,7 @@ var Store = /** @class */ (function () { if (!this.actions.has(reducer)) { throw new Error("Tried to dispatch an unregistered action" + (reducer ? " " + reducer.name : "")); } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-start"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-start"); action = this.actions.get(reducer); if (this.options.logDispatchedActions) { this.logger[logging_1.getLogType(this.options, "dispatchedActions", logging_1.LogLevel.info)]("Dispatching: " + action.type); @@ -174,19 +173,19 @@ var Store = /** @class */ (function () { case 1: beforeMiddleswaresResult = _a.sent(); if (beforeMiddleswaresResult === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } return [4 /*yield*/, reducer.apply(void 0, [beforeMiddleswaresResult].concat(params))]; case 2: result = _a.sent(); if (result === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); if (!result && typeof result !== "object") { throw new Error("The reducer has to return a new state"); } @@ -197,8 +196,8 @@ var Store = /** @class */ (function () { case 3: resultingState = _a.sent(); if (resultingState === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } if (history_1.isStateHistory(resultingState) && @@ -207,19 +206,19 @@ var Store = /** @class */ (function () { resultingState = history_1.applyLimits(resultingState, this.options.history.limit); } this._state.next(resultingState); - aurelia_framework_1.PLATFORM.performance.mark("dispatch-end"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-end"); if (this.options.measurePerformance === PerformanceMeasurement.StartEnd) { - aurelia_framework_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); - measures = aurelia_framework_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); + aurelia_pal_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); + measures = aurelia_pal_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + measures[0].duration + " of dispatched action " + action.type + ":", measures); } else if (this.options.measurePerformance === PerformanceMeasurement.All) { - marks = aurelia_framework_1.PLATFORM.performance.getEntriesByType("mark"); + marks = aurelia_pal_1.PLATFORM.performance.getEntriesByType("mark"); totalDuration = marks[marks.length - 1].startTime - marks[0].startTime; this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + totalDuration + " of dispatched action " + action.type + ":", marks); } - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); this.updateDevToolsState(action, resultingState); return [2 /*return*/]; } @@ -261,7 +260,7 @@ var Store = /** @class */ (function () { return [4 /*yield*/, prev]; case 6: return [2 /*return*/, _d.sent()]; case 7: - aurelia_framework_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); return [7 /*endfinally*/]; case 8: return [2 /*return*/]; } @@ -270,10 +269,10 @@ var Store = /** @class */ (function () { }; Store.prototype.setupDevTools = function () { var _this = this; - if (aurelia_framework_1.PLATFORM.global.devToolsExtension) { + if (aurelia_pal_1.PLATFORM.global.devToolsExtension) { this.logger[logging_1.getLogType(this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; - this.devTools = aurelia_framework_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); + this.devTools = aurelia_pal_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); this.devTools.init(this.initialState); this.devTools.subscribe(function (message) { _this.logger[logging_1.getLogType(_this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools sent change " + message.type); @@ -291,14 +290,11 @@ var Store = /** @class */ (function () { Store.prototype.registerHistoryMethods = function () { this.registerAction("jump", history_1.jump); }; - Store = __decorate([ - aurelia_framework_1.autoinject() - ], Store); return Store; }()); exports.Store = Store; function dispatchify(action) { - var store = aurelia_framework_1.Container.instance.get(Store); + var store = aurelia_dependency_injection_1.Container.instance.get(Store); return function () { var params = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/dist/commonjs/store.js.map b/dist/commonjs/store.js.map index d4dbdea..b6d476e 100644 --- a/dist/commonjs/store.js.map +++ b/dist/commonjs/store.js.map @@ -1 +1 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAAmD;AAEnD,uDAK2B;AAE3B,qCAA8E;AAC9E,2CAA8E;AAC9E,qCAAgF;AAKhF,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,+CAAqB,CAAA;IACrB,qCAAW,CAAA;AACb,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAmBD;IAaE,eAAoB,YAAe,EAAE,OAA+B;QAAhD,iBAAY,GAAZ,YAAY,CAAG;QAV3B,WAAM,GAAG,8BAAU,CAAC,SAAS,CAAC,eAAe,CAAkB,CAAC;QAChE,sBAAiB,GAAY,KAAK,CAAC;QAEnC,YAAO,GAAoC,IAAI,GAAG,EAAE,CAAC;QACrD,gBAAW,GAA2E,IAAI,GAAG,EAAE,CAAC;QAIhG,kBAAa,GAA2B,EAAE,CAAC;QAGjD,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QAC7B,IAAM,UAAU,GAAG,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IACH,YAAC;AAAD,CAAC,AA1PD,IA0PC;AA1PY,sBAAK;AA4PlB,SAAgB,WAAW,CAAqB,MAA8B;IAC5E,IAAM,KAAK,GAAG,wCAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO;QAAU,gBAAY;aAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;YAAZ,2BAAY;;QAC3B,OAAO,KAAK,CAAC,QAAQ,OAAd,KAAK,GAAU,MAAM,SAAK,MAAM,EAAkB,CAAC;IAC5D,CAAC,CAAA;AACH,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/dist/es2015/store.d.ts b/dist/es2015/store.d.ts index 3b8d28b..01189ea 100644 --- a/dist/es2015/store.d.ts +++ b/dist/es2015/store.d.ts @@ -34,6 +34,7 @@ export declare class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/es2015/store.js b/dist/es2015/store.js index e120c0f..55da686 100644 --- a/dist/es2015/store.js +++ b/dist/es2015/store.js @@ -1,9 +1,3 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -40,7 +34,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; import { BehaviorSubject } from "rxjs"; -import { autoinject, Container, LogManager, PLATFORM } from "aurelia-framework"; +import { Container } from "aurelia-dependency-injection"; +import { getLogger } from "aurelia-logging"; +import { PLATFORM } from "aurelia-pal"; import { jump, applyLimits, isStateHistory } from "./history"; import { MiddlewarePlacement } from "./middleware"; import { LogLevel, getLogType } from "./logging"; @@ -52,7 +48,7 @@ export var PerformanceMeasurement; var Store = /** @class */ (function () { function Store(initialState, options) { this.initialState = initialState; - this.logger = LogManager.getLogger("aurelia-store"); + this.logger = getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -94,6 +90,9 @@ var Store = /** @class */ (function () { } return this.actions.has(reducer); }; + Store.prototype.resetToState = function (state) { + this._state.next(state); + }; Store.prototype.dispatch = function (reducer) { var _this = this; var params = []; @@ -289,9 +288,6 @@ var Store = /** @class */ (function () { Store.prototype.registerHistoryMethods = function () { this.registerAction("jump", jump); }; - Store = __decorate([ - autoinject() - ], Store); return Store; }()); export { Store }; diff --git a/dist/es2015/store.js.map b/dist/es2015/store.js.map index f736326..d2c7d2a 100644 --- a/dist/es2015/store.js.map +++ b/dist/es2015/store.js.map @@ -1 +1 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AAEnD,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAkB,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAc,mBAAmB,EAAiB,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAkB,QAAQ,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAKhF,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,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C,UAAC,OAAY;gBACnC,KAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,0BAAwB,OAAO,CAAC,IAAM,CAAC,CAAC;gBAEhH,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE;oBAC/B,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;iBAC7C;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAEO,mCAAmB,GAA3B,UAA4B,MAAsB,EAAE,KAAQ;QAC1D,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;SACnC;IACH,CAAC;IAEO,sCAAsB,GAA9B;QACE,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,IAAyB,CAAC,CAAC;IACzD,CAAC;IACH,YAAC;AAAD,CAAC,AA1PD,IA0PC;;AAED,MAAM,UAAU,WAAW,CAAqB,MAA8B;IAC5E,IAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO;QAAU,gBAAY;aAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;YAAZ,2BAAY;;QAC3B,OAAO,KAAK,CAAC,QAAQ,OAAd,KAAK,GAAU,MAAM,SAAK,MAAM,EAAkB,CAAC;IAC5D,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/dist/es2017/store.d.ts b/dist/es2017/store.d.ts index 3b8d28b..01189ea 100644 --- a/dist/es2017/store.d.ts +++ b/dist/es2017/store.d.ts @@ -34,6 +34,7 @@ export declare class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/es2017/store.js b/dist/es2017/store.js index a22abc6..3804e47 100644 --- a/dist/es2017/store.js +++ b/dist/es2017/store.js @@ -1,11 +1,7 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; import { BehaviorSubject } from "rxjs"; -import { autoinject, Container, LogManager, PLATFORM } from "aurelia-framework"; +import { Container } from "aurelia-dependency-injection"; +import { getLogger } from "aurelia-logging"; +import { PLATFORM } from "aurelia-pal"; import { jump, applyLimits, isStateHistory } from "./history"; import { MiddlewarePlacement } from "./middleware"; import { LogLevel, getLogType } from "./logging"; @@ -14,10 +10,10 @@ export var PerformanceMeasurement; PerformanceMeasurement["StartEnd"] = "startEnd"; PerformanceMeasurement["All"] = "all"; })(PerformanceMeasurement || (PerformanceMeasurement = {})); -let Store = class Store { +export class Store { constructor(initialState, options) { this.initialState = initialState; - this.logger = LogManager.getLogger("aurelia-store"); + this.logger = getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -59,6 +55,9 @@ let Store = class Store { } return this.actions.has(reducer); } + resetToState(state) { + this._state.next(state); + } dispatch(reducer, ...params) { let action; if (typeof reducer === "string") { @@ -196,11 +195,7 @@ let Store = class Store { registerHistoryMethods() { this.registerAction("jump", jump); } -}; -Store = __decorate([ - autoinject() -], Store); -export { Store }; +} export function dispatchify(action) { const store = Container.instance.get(Store); return function (...params) { diff --git a/dist/es2017/store.js.map b/dist/es2017/store.js.map index 85220a8..35ce4b8 100644 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AAI,CAAC,iBAAiB,EAAE;YAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;SACnC;IACH,CAAC;IAEO,sBAAsB;QAC5B,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,IAAyB,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CAAqB,MAA8B;IAC5E,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,UAAU,GAAG,MAAS;QAC3B,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,MAAM,CAAkB,CAAC;IAC5D,CAAC,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/dist/native-modules/store.d.ts b/dist/native-modules/store.d.ts index 3b8d28b..01189ea 100644 --- a/dist/native-modules/store.d.ts +++ b/dist/native-modules/store.d.ts @@ -34,6 +34,7 @@ export declare class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/native-modules/store.js b/dist/native-modules/store.js index e120c0f..55da686 100644 --- a/dist/native-modules/store.js +++ b/dist/native-modules/store.js @@ -1,9 +1,3 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -40,7 +34,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; import { BehaviorSubject } from "rxjs"; -import { autoinject, Container, LogManager, PLATFORM } from "aurelia-framework"; +import { Container } from "aurelia-dependency-injection"; +import { getLogger } from "aurelia-logging"; +import { PLATFORM } from "aurelia-pal"; import { jump, applyLimits, isStateHistory } from "./history"; import { MiddlewarePlacement } from "./middleware"; import { LogLevel, getLogType } from "./logging"; @@ -52,7 +48,7 @@ export var PerformanceMeasurement; var Store = /** @class */ (function () { function Store(initialState, options) { this.initialState = initialState; - this.logger = LogManager.getLogger("aurelia-store"); + this.logger = getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -94,6 +90,9 @@ var Store = /** @class */ (function () { } return this.actions.has(reducer); }; + Store.prototype.resetToState = function (state) { + this._state.next(state); + }; Store.prototype.dispatch = function (reducer) { var _this = this; var params = []; @@ -289,9 +288,6 @@ var Store = /** @class */ (function () { Store.prototype.registerHistoryMethods = function () { this.registerAction("jump", jump); }; - Store = __decorate([ - autoinject() - ], Store); return Store; }()); export { Store }; diff --git a/dist/native-modules/store.js.map b/dist/native-modules/store.js.map index f736326..d2c7d2a 100644 --- a/dist/native-modules/store.js.map +++ b/dist/native-modules/store.js.map @@ -1 +1 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AAEnD,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAkB,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAc,mBAAmB,EAAiB,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAkB,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are class Store { registerAction(name: string, reducer: Reducer): void; unregisterAction(reducer: Reducer): void; isActionRegistered(reducer: Reducer | string): boolean; + resetToState(state: T): void; dispatch

(reducer: Reducer | string, ...params: P): Promise; private handleQueue; private internalDispatch; diff --git a/dist/system/store.js b/dist/system/store.js index 1e47466..6edd970 100644 --- a/dist/system/store.js +++ b/dist/system/store.js @@ -1,11 +1,5 @@ -System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./logging"], function (exports_1, context_1) { +System.register(["rxjs", "aurelia-dependency-injection", "aurelia-logging", "aurelia-pal", "./history", "./middleware", "./logging"], function (exports_1, context_1) { "use strict"; - var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } @@ -41,10 +35,10 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; - var rxjs_1, aurelia_framework_1, history_1, middleware_1, logging_1, PerformanceMeasurement, Store; + var rxjs_1, aurelia_dependency_injection_1, aurelia_logging_1, aurelia_pal_1, history_1, middleware_1, logging_1, PerformanceMeasurement, Store; var __moduleName = context_1 && context_1.id; function dispatchify(action) { - var store = aurelia_framework_1.Container.instance.get(Store); + var store = aurelia_dependency_injection_1.Container.instance.get(Store); return function () { var params = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -59,8 +53,14 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo function (rxjs_1_1) { rxjs_1 = rxjs_1_1; }, - function (aurelia_framework_1_1) { - aurelia_framework_1 = aurelia_framework_1_1; + function (aurelia_dependency_injection_1_1) { + aurelia_dependency_injection_1 = aurelia_dependency_injection_1_1; + }, + function (aurelia_logging_1_1) { + aurelia_logging_1 = aurelia_logging_1_1; + }, + function (aurelia_pal_1_1) { + aurelia_pal_1 = aurelia_pal_1_1; }, function (history_1_1) { history_1 = history_1_1; @@ -81,7 +81,7 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo Store = /** @class */ (function () { function Store(initialState, options) { this.initialState = initialState; - this.logger = aurelia_framework_1.LogManager.getLogger("aurelia-store"); + this.logger = aurelia_logging_1.getLogger("aurelia-store"); this.devToolsAvailable = false; this.actions = new Map(); this.middlewares = new Map(); @@ -123,6 +123,9 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo } return this.actions.has(reducer); }; + Store.prototype.resetToState = function (state) { + this._state.next(state); + }; Store.prototype.dispatch = function (reducer) { var _this = this; var params = []; @@ -189,7 +192,7 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo if (!this.actions.has(reducer)) { throw new Error("Tried to dispatch an unregistered action" + (reducer ? " " + reducer.name : "")); } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-start"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-start"); action = this.actions.get(reducer); if (this.options.logDispatchedActions) { this.logger[logging_1.getLogType(this.options, "dispatchedActions", logging_1.LogLevel.info)]("Dispatching: " + action.type); @@ -201,19 +204,19 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo case 1: beforeMiddleswaresResult = _a.sent(); if (beforeMiddleswaresResult === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } return [4 /*yield*/, reducer.apply(void 0, [beforeMiddleswaresResult].concat(params))]; case 2: result = _a.sent(); if (result === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } - aurelia_framework_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-after-reducer-" + action.type); if (!result && typeof result !== "object") { throw new Error("The reducer has to return a new state"); } @@ -224,8 +227,8 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo case 3: resultingState = _a.sent(); if (resultingState === false) { - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); return [2 /*return*/]; } if (history_1.isStateHistory(resultingState) && @@ -234,19 +237,19 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo resultingState = history_1.applyLimits(resultingState, this.options.history.limit); } this._state.next(resultingState); - aurelia_framework_1.PLATFORM.performance.mark("dispatch-end"); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-end"); if (this.options.measurePerformance === PerformanceMeasurement.StartEnd) { - aurelia_framework_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); - measures = aurelia_framework_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); + aurelia_pal_1.PLATFORM.performance.measure("startEndDispatchDuration", "dispatch-start", "dispatch-end"); + measures = aurelia_pal_1.PLATFORM.performance.getEntriesByName("startEndDispatchDuration"); this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + measures[0].duration + " of dispatched action " + action.type + ":", measures); } else if (this.options.measurePerformance === PerformanceMeasurement.All) { - marks = aurelia_framework_1.PLATFORM.performance.getEntriesByType("mark"); + marks = aurelia_pal_1.PLATFORM.performance.getEntriesByType("mark"); totalDuration = marks[marks.length - 1].startTime - marks[0].startTime; this.logger[logging_1.getLogType(this.options, "performanceLog", logging_1.LogLevel.info)]("Total duration " + totalDuration + " of dispatched action " + action.type + ":", marks); } - aurelia_framework_1.PLATFORM.performance.clearMarks(); - aurelia_framework_1.PLATFORM.performance.clearMeasures(); + aurelia_pal_1.PLATFORM.performance.clearMarks(); + aurelia_pal_1.PLATFORM.performance.clearMeasures(); this.updateDevToolsState(action, resultingState); return [2 /*return*/]; } @@ -288,7 +291,7 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo return [4 /*yield*/, prev]; case 6: return [2 /*return*/, _d.sent()]; case 7: - aurelia_framework_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); + aurelia_pal_1.PLATFORM.performance.mark("dispatch-" + placement + "-" + curr[0].name); return [7 /*endfinally*/]; case 8: return [2 /*return*/]; } @@ -297,10 +300,10 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo }; Store.prototype.setupDevTools = function () { var _this = this; - if (aurelia_framework_1.PLATFORM.global.devToolsExtension) { + if (aurelia_pal_1.PLATFORM.global.devToolsExtension) { this.logger[logging_1.getLogType(this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools are available"); this.devToolsAvailable = true; - this.devTools = aurelia_framework_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); + this.devTools = aurelia_pal_1.PLATFORM.global.__REDUX_DEVTOOLS_EXTENSION__.connect(this.options.devToolsOptions); this.devTools.init(this.initialState); this.devTools.subscribe(function (message) { _this.logger[logging_1.getLogType(_this.options, "devToolsStatus", logging_1.LogLevel.debug)]("DevTools sent change " + message.type); @@ -318,9 +321,6 @@ System.register(["rxjs", "aurelia-framework", "./history", "./middleware", "./lo Store.prototype.registerHistoryMethods = function () { this.registerAction("jump", history_1.jump); }; - Store = __decorate([ - aurelia_framework_1.autoinject() - ], Store); return Store; }()); exports_1("Store", Store); diff --git a/dist/system/store.js.map b/dist/system/store.js.map index 3fca648..92ab5fe 100644 --- a/dist/system/store.js.map +++ b/dist/system/store.js.map @@ -1 +1 @@ -{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8RA,SAAgB,WAAW,CAAqB,MAA8B;QAC5E,IAAM,KAAK,GAAG,6BAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAE5C,OAAO;YAAU,gBAAY;iBAAZ,UAAY,EAAZ,qBAAY,EAAZ,IAAY;gBAAZ,2BAAY;;YAC3B,OAAO,KAAK,CAAC,QAAQ,OAAd,KAAK,GAAU,MAAM,SAAK,MAAM,EAAkB,CAAC;QAC5D,CAAC,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;YApRD,WAAY,sBAAsB;gBAChC,+CAAqB,CAAA;gBACrB,qCAAW,CAAA;YACb,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC;;;gBAgCC,eAAoB,YAAe,EAAE,OAA+B;oBAAhD,iBAAY,GAAZ,YAAY,CAAG;oBAV3B,WAAM,GAAG,8BAAU,CAAC,SAAS,CAAC,eAAe,CAAkB,CAAC;oBAChE,sBAAiB,GAAY,KAAK,CAAC;oBAEnC,YAAO,GAAoC,IAAI,GAAG,EAAE,CAAC;oBACrD,gBAAW,GAA2E,IAAI,GAAG,EAAE,CAAC;oBAIhG,kBAAa,GAA2B,EAAE,CAAC;oBAGjD,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;oBAC7B,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI,CAAC;oBAClF,IAAI,CAAC,MAAM,GAAG,IAAI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\ No newline at end of file diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 8173f35..f92ae29 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,18 @@ + +# [1.2.0](https://github.com/aurelia/store/compare/1.1.0...1.2.0) (2018-10-08) + + +### Bug Fixes + +* **store:** Narrow dependency importing to improve commonjs bundling ([23c16f9](https://github.com/aurelia/store/commit/23c16f9)) + + +### Features + +* **store:** resetToState public api ([e2214c6](https://github.com/aurelia/store/commit/e2214c6)) + + + # [1.1.0](https://github.com/aurelia/store/compare/1.0.0...1.1.0) (2018-08-25) diff --git a/package-lock.json b/package-lock.json index 9b46ca9..5f996d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "aurelia-store", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2625,14 +2625,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2652,8 +2650,7 @@ "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", @@ -2801,7 +2798,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } diff --git a/package.json b/package.json index 99734ab..269289e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-store", - "version": "1.1.0", + "version": "1.2.0", "description": "Aurelia single state store based on RxJS", "keywords": [ "aurelia",