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.37 to 0.4.38

9

denormalizer/loader.js

@@ -6,2 +6,4 @@ 'use strict';

const { firstFilenamePart } = require('../utils');
// const denormalizerBuilder = require('./denormalizerBuilder');

@@ -19,5 +21,10 @@

const basename = firstFilenamePart(collectionFile);
if (collections[basename])
throw new Error(`Duplicate readmodel: [${basename}] in: ${collectionFile} and ${collections[basename].path}.`);
const { schema } = require(collectionFile); // eslint-disable-line
collections[path.basename(collectionName, '.js')] = {
collections[basename] = {
path: collectionFile,

@@ -24,0 +31,0 @@ schema,

12

domain/loader.js

@@ -6,3 +6,3 @@ 'use strict';

const { toFlatArray } = require('../utils');
const { toFlatArray, firstFilenamePart } = require('../utils');

@@ -38,9 +38,11 @@ const schemaExtractor = (handler = []) => ({ schema: (toFlatArray(handler).find(item => 'schema' in item) || {}).schema });

if (!fs.statSync(aggregateFile).isFile())
if (!fs.statSync(aggregateFile).isFile() || path.extname(aggregateFile) !== '.js')
return;
if (path.extname(aggregateFile) !== '.js') return;
const basename = firstFilenamePart(aggregateFile);
context[path.basename(aggregateName, '.js')] = loadAggregate(aggregateFile, require(aggregateFile)); // eslint-disable-line
if (context[basename])
throw new Error(`Duplicate aggregator: [${basename}] in: ${aggregateFile} and ${context[basename].path}.`);
context[basename] = loadAggregate(aggregateFile, require(aggregateFile)); // eslint-disable-line
});

@@ -47,0 +49,0 @@

{
"name": "cqrs-swissknife",
"version": "0.4.37",
"version": "0.4.38",
"description": "",

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

@@ -6,2 +6,4 @@ 'use strict';

const { firstFilenamePart } = require('../utils');
const loadCollections = (sagasDirectory) => {

@@ -17,3 +19,8 @@ const sagas = {};

sagas[path.basename(sagaName, '.js')] = {
const basename = firstFilenamePart(sagaFile);
if (sagas[basename])
throw new Error(`Duplicate saga: [${basename}] in: ${sagaFile} and ${sagas[basename].path}.`);
sagas[basename] = {
path: sagaFile,

@@ -20,0 +27,0 @@ };

@@ -112,2 +112,4 @@ 'use strict';

const firstFilenamePart = filename => filename.split('.', 1)[0];
module.exports = {

@@ -125,2 +127,3 @@ toFlatArray,

nameRetriever,
firstFilenamePart,
};
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