cqrs-eventdenormalizer
Advanced tools
Comparing version 1.16.57 to 1.17.0
@@ -112,3 +112,2 @@ var Definition = require('../definitionBase'), | ||
var self = this; | ||
var payload = evt; | ||
@@ -115,0 +114,0 @@ |
@@ -201,2 +201,6 @@ var debug = require('debug')('denormalizer'), | ||
if (this.options.skipOnEvent) { | ||
fn = function(evt, callback) { callback (null); }; | ||
} | ||
this.onEventHandle = fn; | ||
@@ -220,4 +224,4 @@ | ||
if (fn.length === 1) { | ||
fn = _.wrap(fn, function(func, evt, callback) { | ||
func(evt); | ||
fn = _.wrap(fn, function(func, notification, callback) { | ||
func(notification); | ||
callback(null); | ||
@@ -227,2 +231,6 @@ }); | ||
if (this.options.skipOnNotification) { | ||
fn = function(notification, callback) { callback(null); }; | ||
} | ||
this.onNotificationHandle = fn; | ||
@@ -245,2 +253,6 @@ | ||
if (this.options.skipOnEventMissing) { | ||
fn = function(info, evt) {}; | ||
} | ||
this.onEventMissingHandle = fn; | ||
@@ -269,2 +281,7 @@ | ||
// In case we skip the event extenders, we also have to skip the default extender. | ||
if (this.options.skipExtendEvent) { | ||
fn = function (evt, callback) { callback(null, evt); }; | ||
} | ||
this.extendEventHandle = fn; | ||
@@ -401,3 +418,3 @@ | ||
if (!eventExtender) { | ||
if (!eventExtender || self.options.skipExtendEvent) { | ||
return callback(err, extendedEvent); | ||
@@ -547,3 +564,2 @@ } | ||
async.parallel([ | ||
function (callback) { | ||
@@ -550,0 +566,0 @@ async.each(notifications, function (n, callback) { |
{ | ||
"author": "adrai", | ||
"name": "cqrs-eventdenormalizer", | ||
"version": "1.16.57", | ||
"version": "1.17.0", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -103,3 +103,7 @@ # Introduction | ||
// password: 'secret' // optional | ||
} | ||
}, | ||
skipExtendEvent: false, // optional | ||
skipOnEventMissing: false, // optional | ||
skipOnEvent: false, // optional | ||
skipOnNotification: false, // optional | ||
}); | ||
@@ -249,2 +253,3 @@ | ||
### or you can define an asynchronous function | ||
@@ -259,3 +264,6 @@ | ||
### skip onEvent if provided | ||
You can skip onEvent from being called, by adding the `skipOnEvent` option to the denormalizer. Checkout the usage section for more information. | ||
## Wire up notifications [optional] | ||
@@ -278,3 +286,8 @@ ### you can define a synchronous function | ||
### skip onNotification if provided | ||
You can skip onNotification from being called, by addding the `skipOnNotification` option to the denormalizer. Checkout the usage section for more information. | ||
## Wire up event missing [optional] | ||
@@ -288,3 +301,6 @@ ### you can define a synchronous function | ||
### skip onEventMissing if provided | ||
You can skip onEventMissing from being called, by adding the `skipOnEventMissing` option to the denormalizer. Checkout the usage section more information. | ||
## Define default event extension [optional] | ||
@@ -305,4 +321,8 @@ ### you can define a synchronous function | ||
### skip default event extensions | ||
You can skip all event extenders and the default extensions from being executed by adding the option `skipExtendEvent` to the denormalizer. Checkout the usage section for more information. | ||
## Using custom structure loader function | ||
@@ -867,2 +887,4 @@ The built-in structure loader can be replaced with one adapted to your needs. | ||
you can skip onEventMissing from being called, if provided, by adding the option `skipOnEventMissing` to the denormalizer. Checkout the usage section for more information. | ||
or depending on the last guarded event: | ||
@@ -869,0 +891,0 @@ |
@@ -0,1 +1,4 @@ | ||
## [v1.17.0](https://github.com/adrai/node-cqrs-eventdenormalizer/compare/v1.16.57...v1.17.0) | ||
- introduce skip steps [#89](https://github.com/adrai/node-cqrs-eventdenormalizer/pull/89) thanks to [Robin Fehr](https://github.com/robinfehr) | ||
## [v1.16.57](https://github.com/adrai/node-cqrs-eventdenormalizer/compare/v1.16.56...v1.16.57) | ||
@@ -2,0 +5,0 @@ - skipAfterCommit [#88](https://github.com/adrai/node-cqrs-eventdenormalizer/pull/88) thanks to [Robin Fehr](https://github.com/robinfehr) |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
211678
4752
958
11