New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

harcon

Package Overview
Dependencies
Maintainers
1
Versions
326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

harcon - npm Package Compare versions

Comparing version 1.3.1 to 1.3.5

12

lib/Inflicter.js

@@ -8,3 +8,3 @@ var Communication = require('../lib/Communication');

var VERSION = exports.VERSION = '1.3.1';
var VERSION = exports.VERSION = '1.3.5';

@@ -71,3 +71,3 @@ var _ = require('lodash');

self.purifyConfig = { arrayMaxSize: options.arrayMaxSize || 100, maxLevel: options.maxLevel || 3 };
self.purifyConfig = { arrayMaxSize: this.options.arrayMaxSize || 100, maxLevel: this.options.maxLevel || 3 };
self.logger = this.options.logger || new DummyLogger();

@@ -78,8 +78,8 @@ self.logger.harconlog = function( err, message, obj, level ){

this.Barrel = options.Barrel || Barrel;
this.Firestormstarter = options.Firestormstarter || Firestormstarter;
this.Flamestarter = options.Flamestarter || Flamestarter;
this.Barrel = this.options.Barrel || Barrel;
this.Firestormstarter = this.options.Firestormstarter || Firestormstarter;
this.Flamestarter = this.options.Flamestarter || Flamestarter;
this.barrel = new this.Barrel( );
this.barrel.init( this.name, this.logger, _.assign( options.barrel || {}, { groupMessages: !!options.groupMessages } ) );
this.barrel.init( this.name, this.logger, _.assign( this.options.barrel || {}, { groupMessages: !!this.options.groupMessages } ) );

@@ -86,0 +86,0 @@ this.inflicterContext = (this.options.context || {});

{
"name": "harcon",
"version": "1.3.1",
"version": "1.3.5",
"description": "Messaging/Service Bus for the harmonic convergence of node-based enterprise entities.",

@@ -49,3 +49,3 @@ "keywords": [

},
"_id": "harcon@1.3.1"
"_id": "harcon@1.3.5"
}

@@ -64,3 +64,3 @@ Harcon - Proven and reliable microservice solution for the harmonic convergence of JS entities.

// will receive back 2 answers: 'Hi there!' and 'Bonjour!'
inflicter.ignite( null, null, 'greet.everyone', 'Whatsup?', 'How do you do?', function(err, res){
inflicter.simpleIgnite( 'greet.everyone', 'Whatsup?', 'How do you do?', function(err, res){
console.log( err, res );

@@ -109,6 +109,6 @@ } );

...
inflicter.ignite( null, null, 'job.order', {name: 'Stephen', customerID:123}, function(err, res){
inflicter.simpleIgnite( 'job.order', {name: 'Stephen', customerID:123}, function(err, res){
console.log( 'Finished.', err, res );
} );
inflicter.ignite( null, null, 'john.job', {name: 'Stephen', customerID:123}, function(err, res){
inflicter.simpleIgnite( 'john.job', {name: 'Stephen', customerID:123}, function(err, res){
console.log( 'Finished.', err, res );

@@ -131,6 +131,6 @@ } );

...
inflicter.ignite( null, null, 'BookKeeper.newOrder', {name: 'Stephen', customerID:123}, function(err, res){
inflicter.simpleIgnite( 'BookKeeper.newOrder', {name: 'Stephen', customerID:123}, function(err, res){
console.log( 'Finished', err, res );
} );
inflicter.ignite( null, null, 'BookKeeper.ordersOfToday', function(err, res){
inflicter.simpleIgnite( 'BookKeeper.ordersOfToday', function(err, res){
console.log( 'Finished.', err, res );

@@ -157,3 +157,3 @@ } );

inflicter.ignite( null, null, 'greet.simple', function(err, res){
inflicter.simpleIgnite( 'greet.simple', function(err, res){
console.error( err, res );

@@ -187,3 +187,3 @@ } );

inflicter.ignite( null, null, 'greet.simple', function(err, res){
inflicter.simpleIgnite( 'greet.simple', function(err, res){
console.error( err, res );

@@ -256,9 +256,10 @@ } );

...
inflicter.ignite( null, null, 'order.newVPN', {name: 'Stephen', customerID:123}, function(err, res){
inflicter.simpleIgnite( 'order.newVPN', {name: 'Stephen', customerID:123}, function(err, res){
console.log( 'Finished', err, res );
} );
```
That will initiate a small workflow. __inflicter.ignite__ send a message to entity Order who will send within the same workflow to the Allocator. When it answeres, then the message of the beginning will be answered. [harcon](https://github.com/imrefazekas/harcon) will know if you initiate a message within the processing of another one and considers it as part of the ongoing workflow and tracks it.
That will initiate a small workflow. __inflicter.simpleIgnite__ sends a message to entity Order who will send within the same workflow to the Allocator. When it answeres, then the message of the beginning will be answered. [harcon](https://github.com/imrefazekas/harcon) will know if you initiate a message within the processing of another one and considers it as part of the ongoing workflow and tracks it.
Mind the async execution to keep everything in track!
#### Call back or not?

@@ -273,3 +274,3 @@

...
inflicter.ignite( null, null, 'reserve.address', '127.0.0.1' );
inflicter.simpleIgnite( 'reserve.address', '127.0.0.1' );
```

@@ -403,3 +404,13 @@

If you inititate a communication through the inflicter instance, it means, that you wants to drop in a message "from outside" which could mean an integration with an external system or just kick off a workflow.
There are 2 methods to be called:
ignite and simpleIgnite
The different between them is the parameter list. The later does not require to specify external messageId or division, the prior one does as you can see in the example just above.
External ID is very useful, when the workflow is initiated by some external event possessing an id which must be kept for further logging or tracking or just because a communication harmonization across the complete company.
## Entity configuration

@@ -406,0 +417,0 @@

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