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

cqrs-saga

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cqrs-saga - npm Package Compare versions

Comparing version 1.1.3 to 1.2.0

.idea/eslintPlugin.xml

14

lib/pm.js

@@ -286,2 +286,16 @@ 'use strict';

/**
* Returns the saga information.
* @returns {Object}
*/
getInfo: function () {
if (!this.sagas) {
var err = new Error('Not initialized!');
debug(err);
throw err;
}
return this.sagas.getInfo();
},
/**
* Call this function to forward it to the dispatcher.

@@ -288,0 +302,0 @@ * @param {Object} evt The event object

34

lib/structure/structureSearcher.js

@@ -14,2 +14,24 @@ 'use strict';

getInfo: function () {
if (!sagas || _.isEmpty(sagas)) {
debug('no sagas injected');
return null;
}
var info = {
sagas: []
};
sagas.forEach(function (s) {
info.sagas.push({
name: s.name,
aggregate: s.aggregate,
context: s.context,
version: s.version
});
});
return info;
},
getSagas: function (query) {

@@ -20,3 +42,3 @@ if (!sagas || _.isEmpty(sagas)) {

}
var res = _.filter(sagas, function (s) {

@@ -27,6 +49,6 @@ var isNameEqual = s.name === query.name;

var isContextEqual = s.context === query.context;
return isNameEqual && isVersionEqual && isAggregateEqual && isContextEqual;
});
return res;

@@ -40,7 +62,7 @@ },

}
sagas.forEach(function (s) {
s.defineOptions(options);
});
return this;

@@ -58,3 +80,3 @@ },

});
return this;

@@ -61,0 +83,0 @@ },

2

package.json
{
"author": "adrai",
"name": "cqrs-saga",
"version": "1.1.3",
"version": "1.2.0",
"private": false,

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

@@ -291,2 +291,40 @@ # Introduction

## Request saga information
After the initialization you can request the saga information:
pm.init(function (err) {
pm.getInfo();
// ==>
// {
// "sagas": [
// {
// "name": "orderConfirmed",
// "aggregate": "order",
// "context": "sale",
// "version": 0
// },
// {
// "name": "orderCreated",
// "aggregate": "order",
// "context": "sale",
// "version": 0
// },
// {
// "name": "paymentAccepted",
// "aggregate": "payment",
// "context": "sale",
// "version": 2
// },
// {
// "name": "seatsReserved",
// "aggregate": "reservation",
// "context": "sale",
// "version": 0
// }
// ]
// }
});
# Components definition

@@ -470,3 +508,3 @@

Copyright (c) 2014 Adriano Raiano
Copyright (c) 2015 Adriano Raiano

@@ -473,0 +511,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -0,1 +1,4 @@

## [v1.2.0](https://github.com/adrai/node-cqrs-saga/compare/v1.1.3...v1.2.0)
- added getInfo function
## [v1.1.3](https://github.com/adrai/node-cqrs-saga/compare/v1.1.2...v1.1.3)

@@ -2,0 +5,0 @@ - added commitstamp to getUndispatchedcommands

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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