@arque/core
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -9,3 +9,3 @@ "use strict"; | ||
constructor(store, stream, commandHandlers, eventHandlers, opts) { | ||
var _a, _b; | ||
var _a, _b, _c, _d; | ||
this.store = store; | ||
@@ -16,5 +16,7 @@ this.stream = stream; | ||
this.opts = { | ||
defaultState: null, | ||
cacheMax: (_a = opts === null || opts === void 0 ? void 0 : opts.cacheMax) !== null && _a !== void 0 ? _a : 256, | ||
cacheTTL: (_b = opts === null || opts === void 0 ? void 0 : opts.cacheTTL) !== null && _b !== void 0 ? _b : 86400000, // 24 hours | ||
defaultState: (_a = opts === null || opts === void 0 ? void 0 : opts.defaultState) !== null && _a !== void 0 ? _a : null, | ||
cacheMax: (_b = opts === null || opts === void 0 ? void 0 : opts.cacheMax) !== null && _b !== void 0 ? _b : 256, | ||
cacheTTL: (_c = opts === null || opts === void 0 ? void 0 : opts.cacheTTL) !== null && _c !== void 0 ? _c : 86400000, | ||
shouldTakeSnapshot: opts === null || opts === void 0 ? void 0 : opts.shouldTakeSnapshot, | ||
snapshotInterval: (_d = opts === null || opts === void 0 ? void 0 : opts.snapshotInterval) !== null && _d !== void 0 ? _d : 100, | ||
}; | ||
@@ -21,0 +23,0 @@ this.cache = new lru_cache_1.LRUCache({ |
@@ -13,2 +13,3 @@ "use strict"; | ||
constructor(store, stream, commandHandlers, eventHandlers, _id, _version, _state, opts) { | ||
var _a; | ||
this.store = store; | ||
@@ -23,3 +24,3 @@ this.stream = stream; | ||
this.eventHandlers = new Map(eventHandlers.map((item) => [item.type, item])); | ||
this.opts = Object.assign({ snapshotInterval: 100 }, opts); | ||
this.opts = Object.assign(Object.assign({}, opts), { snapshotInterval: (_a = opts === null || opts === void 0 ? void 0 : opts.snapshotInterval) !== null && _a !== void 0 ? _a : 100 }); | ||
} | ||
@@ -26,0 +27,0 @@ get id() { |
{ | ||
"name": "@arque/core", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "`arque` core library", | ||
@@ -34,3 +34,3 @@ "author": "ScaleForge", | ||
}, | ||
"gitHead": "ffa11b6fea234826a682ba9e78b514b8210bdfc1" | ||
"gitHead": "3fc76123adffd4fd31fbd3d33ab96123bc35b05a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42520
719