Huge News!Announcing our $40M Series B led by Abstract Ventures.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 9.2.25 to 9.2.26

34

lib/Communication.js

@@ -8,2 +8,3 @@ let Cerobee = require('clerobee')

const _ = require( 'isa.js' )

@@ -16,3 +17,5 @@ /**

*/
function Communication (originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response) {
function Communication (mode, originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response) {
this.mode = mode || exports.MODE_REQUEST
this.id = clerobee.generate()

@@ -90,3 +93,3 @@ this.originalId = originalId || this.id

commPrototype.spread = function ( ) {
let comm = new Communication( this.originalId, this.flowId, this.externalId, this.sourceDivision, this.source, this.sourceNodeID, this.division, this.event, this.params )
let comm = new Communication( this.mode, this.originalId, this.flowId, this.externalId, this.sourceDivision, this.source, this.sourceNodeID, this.division, this.event, this.params )
comm.id = this.id

@@ -113,3 +116,3 @@

commPrototype.twist = function ( name, responderNodeID, error, response ) {
let comm = new Communication( this.id, this.flowId, this.externalId, this.sourceDivision, this.source, this.sourceNodeID, this.division, this.event, this.params, this.callback, name, responderNodeID, error, response )
let comm = new Communication( this.mode, this.id, this.flowId, this.externalId, this.sourceDivision, this.source, this.sourceNodeID, this.division, this.event, this.params, this.callback, name, responderNodeID, error, response )
return comm

@@ -128,3 +131,3 @@ }

commPrototype.burst = function ( externalID, flowID, sourceDivision, source, sourceNodeID, division, event, params, callback ) {
let comm = new Communication( null, flowID || this.flowId, externalID || this.externalId, sourceDivision, source, sourceNodeID, division || this.division, event, params, callback )
let comm = new Communication( this.mode, null, flowID || this.flowId, externalID || this.externalId, sourceDivision, source, sourceNodeID, division || this.division, event, params, callback )
comm.terms = this.terms

@@ -190,3 +193,3 @@ return comm

exports.newCommunication = function ( originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response ) {
exports.newCommunication = function ( mode, originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response ) {
let valveIndex = event.indexOf( VALVE_SEPARATOR )

@@ -199,3 +202,3 @@ let valve = VALVE_DEFAULT

let c = new Communication( originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response )
let c = new Communication( mode, originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response )
c.valve = valve

@@ -206,3 +209,3 @@ return c

exports.importCommunication = function ( obj ) {
let c = new Communication( obj.originalId, obj.flowId, obj.externalId, obj.sourceDivision, obj.source, obj.sourceNodeID, obj.division, obj.event, obj.params, obj.callback, obj.responder, obj.responderNodeID, obj.error, obj.response )
let c = new Communication( obj.mode, obj.originalId, obj.flowId, obj.externalId, obj.sourceDivision, obj.source, obj.sourceNodeID, obj.division, obj.event, obj.params, obj.callback, obj.responder, obj.responderNodeID, obj.error, obj.response )

@@ -225,15 +228,6 @@ c.id = obj.id

exports.narrowResponse = function ( obj ) {
return {
id: obj.id,
originalId: obj.originalId,
flowId: obj.flowId,
externalId: obj.externalId,
creationDate: obj.creationDate,
arrivalDate: obj.arrivalDate,
dispatchDate: obj.dispatchDate,
responder: obj.responder,
responderNodeID: obj.responderNodeID,
error: obj.error,
response: obj.response
}
return _.pick( obj, [
'mode', 'id', 'originalId', 'flowId', 'externalId', 'creationDate', 'arrivalDate',
'dispatchDate', 'responder', 'responderNodeID', 'error', 'response'
] )
}

@@ -317,3 +317,3 @@ let Communication = require('./Communication')

return new Promise( async function (resolve, reject) {
let comm = Communication.newCommunication( null, flowId, externalId, self.division, self.name, self.barrel.nodeID, division, event, params, isRequest ? Proback.handler(null, resolve, reject) : null )
let comm = Communication.newCommunication( mode, null, flowId, externalId, self.division, self.name, self.barrel.nodeID, division, event, params, isRequest ? Proback.handler(null, resolve, reject) : null )

@@ -320,0 +320,0 @@ if ( self.terms[ GLOBAL_TERMS ] )

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

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

"proback.js": "^2.1.10",
"vindication.js": "^4.20.0"
"vindication.js": "^4.20.1"
},

@@ -34,0 +34,0 @@ "devDependencies": {

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