Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cqrs-swissknife

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cqrs-swissknife - npm Package Compare versions

Comparing version 0.4.56 to 0.4.57

8

denormalizer/builders/viewModelBuilder.js

@@ -13,7 +13,7 @@ 'use strict';

await handler(event, vm, api);
}
};
const buildViewModelFunction = (viewModelFunctions) => {
if (!viewModelFunctions.length)
throw new Error(`No view model function specified for event ${eventFullName}`);
throw new Error(`No view model function specified for event!`);

@@ -24,3 +24,3 @@ if (viewModelFunctions.length === 1)

return compositeHandler(viewModelFunctions);
}
};

@@ -30,3 +30,3 @@ module.exports = ({ eventFullName, reaction, identifier }, { ViewBuilder, PreEventExtender, EventExtender }, customApiBuilder = noop) => {

let viewModelFunctions = [];
const viewModelFunctions = [];
let eventExtenderFunction;

@@ -33,0 +33,0 @@ let preEventExtenderFunction;

@@ -5,2 +5,9 @@ 'use strict';

const shouldHandle = (fn) => {
if (!fn || typeof fn !== 'function')
throw new Error('Condition is missing or not a function.');
return fn.length === 1 ? { shouldHandleEvent: fn } : { shouldHandle: fn };
};
const only = {

@@ -13,2 +20,5 @@ ifNotExists() {

},
if(condition) {
return shouldHandle(condition);
},
};

@@ -45,3 +55,2 @@

module.exports = {

@@ -48,0 +57,0 @@ settings,

@@ -22,5 +22,3 @@ 'use strict';

const rulesNormalizer = (context, aggregateName, commandBussinessRules, rules) => {
return [...toFlatArray(rules), ...commandBussinessRules].map((rule, index) => ruleNormalizer(context, aggregateName, index, rule));
};
const rulesNormalizer = (context, aggregateName, commandBussinessRules, rules) => [...toFlatArray(rules), ...commandBussinessRules].map((rule, index) => ruleNormalizer(context, aggregateName, index, rule));

@@ -27,0 +25,0 @@ module.exports = (

{
"name": "cqrs-swissknife",
"version": "0.4.56",
"version": "0.4.57",
"description": "",

@@ -15,5 +15,5 @@ "main": "index.js",

"devDependencies": {
"eslint": "^5.4.0",
"eslint": "^5.13.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0"
"eslint-plugin-import": "^2.16.0"
},

@@ -20,0 +20,0 @@ "author": "eCollect AG.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc