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

seneca

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seneca - npm Package Compare versions

Comparing version 3.8.4 to 3.9.0

5

CHANGES.md

@@ -0,1 +1,6 @@

## 3.9.0 2019-05-06
* Added custom$ and fixed$ directives to seneca.add - see test/custom.test.js:custom-add - allows fixed message arguments and meta custom values on individual messages.
## 3.8.4 2019-03-03

@@ -2,0 +7,0 @@

7

lib/common.js

@@ -297,2 +297,3 @@ /* Copyright © 2010-2018 Richard Rodger and other contributors, MIT License. */

(so.debug && so.debug.print && 'full' === so.debug.print.fatal) || false
var print_env = (so.debug && so.debug.print.env) || false

@@ -346,3 +347,7 @@ if (0 < diecount) {

Util.inspect(process.argv).replace(/\n/g, '') +
(!full ? '' : ', env=' + Util.inspect(process.env).replace(/\n/g, ''))
(!full
? ''
: !print_env
? ''
: ', env=' + Util.inspect(process.env).replace(/\n/g, ''))

@@ -349,0 +354,0 @@ var when = new Date()

27

lib/inward.js

@@ -1,2 +0,2 @@

/* Copyright © 2010-2018 Richard Rodger and other contributors, MIT License. */
/* Copyright © 2010-2019 Richard Rodger and other contributors, MIT License. */
'use strict'

@@ -12,2 +12,3 @@

module.exports = {
msg_modify: inward_msg_modify,
closed: inward_closed,

@@ -21,3 +22,2 @@ act_cache: inward_act_cache,

limit_msg: inward_limit_msg,
msg_modify: inward_msg_modify,
act_stats: inward_act_stats,

@@ -28,2 +28,20 @@ prepare_delegate: inward_prepare_delegate,

function inward_msg_modify(ctxt, data) {
var meta = data.meta
if (ctxt.actdef) {
var fixed = ctxt.actdef.fixed
var custom = ctxt.actdef.custom
if (fixed) {
Object.assign(data.msg, fixed)
}
if (custom) {
meta.custom = meta.custom || {}
Object.assign(meta.custom, custom)
}
}
}
function inward_limit_msg(ctxt, data) {

@@ -268,7 +286,2 @@ var so = ctxt.options

// TODO: remove
function inward_msg_modify() {
//Common.setmeta(data.msg, data.meta)
}
function inward_prepare_delegate(ctxt, data) {

@@ -275,0 +288,0 @@ Assert(data.reply)

{
"name": "seneca",
"description": "A Microservices Framework for Node.js",
"version": "3.8.4",
"version": "3.9.0",
"license": "MIT",

@@ -94,8 +94,7 @@ "homepage": "http://senecajs.org",

"patrun": "^1.0.0",
"qs": "^6.6.0",
"qs": "^6.7.0",
"rolling-stats": "^0.1.1",
"semver": "^5.6.0",
"seneca-transport": "^3.0.0",
"use-plugin": "^4.0.0",
"wreck": "^12.5.1"
"wreck": "^12"
},

@@ -108,10 +107,11 @@ "devDependencies": {

"coveralls": "^3.0.2",
"handlebars": "^4.1.0",
"hoek": "^5.0.4",
"handlebars": "^4.1.2",
"hoek": "^5",
"lab": "^18.0.2",
"prettier": "^1.16.4",
"seneca-entity": "^3.2.0",
"prettier": "^1.17.0",
"seneca-entity": "^3.3.0",
"seneca-error-test": "^0.2.2",
"seneca-joi": "^3.1.0"
"seneca-joi": "^3.1.0",
"seneca-promisify": "^0.7.1"
}
}

@@ -81,3 +81,7 @@ /* Copyright © 2010-2018 Richard Rodger and other contributors, MIT License. */

// Amount of information to print on fatal error: 'summary', 'full'
fatal: 'summary'
fatal: 'summary',
// Include environment when printing full crash report.
// Default: false for security.
env: false
},

@@ -566,2 +570,3 @@

private$.inward = Ordu({ name: 'inward' })
.add(Inward.msg_modify)
.add(Inward.closed)

@@ -577,3 +582,2 @@ .add(Inward.act_cache)

.add(Inward.prepare_delegate)
.add(Inward.msg_modify)
.add(Inward.announce)

@@ -640,2 +644,5 @@

actdef.fixed = Jsonic(raw_pattern.fixed$ || {})
actdef.custom = Jsonic(raw_pattern.custom$ || {})
var strict_add =

@@ -646,4 +653,2 @@ raw_pattern.strict$ && raw_pattern.strict$.add !== null

// QQQ
var addroute = true

@@ -953,16 +958,22 @@

function api_fix() {
function api_fix(patargs, msgargs, custom) {
var self = this
var defargs = Common.parsePattern(self, arguments)
// var defargs = Common.parsePattern(self, arguments)
patargs = Jsonic(patargs || {})
var fix = self.delegate(defargs.pattern)
var fix_delegate = self.delegate(patargs)
fix.add = function fix_add() {
var args = Common.parsePattern(fix, arguments, 'rest:.*', defargs.pattern)
var addargs = [args.pattern].concat(args.rest)
return self.add.apply(fix, addargs)
fix_delegate.add = function fix_add() {
var args = Common.parsePattern(this, arguments, 'rest:.*', patargs)
var addargs = [args.pattern]
.concat({
fixed$: Object.assign({}, msgargs, args.pattern.fixed$),
custom$: Object.assign({}, custom, args.pattern.custom$)
})
.concat(args.rest)
return self.add.apply(this, addargs)
}
return fix
return fix_delegate
}

@@ -969,0 +980,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