seneca-transport
Advanced tools
Comparing version 5.0.1 to 6.0.0
@@ -18,4 +18,4 @@ /* Copyright (c) 2013-2015 Richard Rodger, MIT License */ | ||
exports.listen = function(options, transportUtil) { | ||
return function(msg, callback) { | ||
exports.listen = function (options, transportUtil) { | ||
return function (msg, callback) { | ||
var seneca = this.root.delegate() | ||
@@ -34,6 +34,6 @@ | ||
server.on('request', function(req, res) { | ||
server.on('request', function (req, res) { | ||
internals.timeout(listenOptions, req, res) | ||
req.query = Qs.parse(Url.parse(req.url).query) | ||
internals.setBody(seneca, transportUtil, req, res, function(err) { | ||
internals.setBody(seneca, transportUtil, req, res, function (err) { | ||
if (err) { | ||
@@ -47,3 +47,3 @@ return res.end() | ||
server.on('error', function(err) { | ||
server.on('error', function (err) { | ||
if ( | ||
@@ -70,3 +70,3 @@ 'EADDRINUSE' === err.code && | ||
server.on('listening', function() { | ||
server.on('listening', function () { | ||
listen_details.port = server.address().port | ||
@@ -90,3 +90,3 @@ seneca.log.debug('listen', listen_details) | ||
transportUtil.close(seneca, function(done) { | ||
transportUtil.close(seneca, function (done) { | ||
// node 0.10 workaround, otherwise it throws | ||
@@ -103,4 +103,4 @@ if (listener && listener._handle) { | ||
exports.client = function(options, transportUtil) { | ||
return function(msg, callback) { | ||
exports.client = function (options, transportUtil) { | ||
return function (msg, callback) { | ||
var seneca = this.root.delegate() | ||
@@ -125,7 +125,7 @@ | ||
'seneca-time-listen-recv', | ||
'seneca-time-listen-sent' | ||
'seneca-time-listen-sent', | ||
]) | ||
} | ||
var send = function(spec, topic, send_done) { | ||
var send = function (spec, topic, send_done) { | ||
var host = transportUtil.resolveDynamicValue( | ||
@@ -164,3 +164,3 @@ clientOptions.host, | ||
), | ||
'seneca-time-client-sent': data.time.client_sent | ||
'seneca-time-client-sent': data.time.client_sent, | ||
} | ||
@@ -176,3 +176,3 @@ | ||
timeout: clientOptions.timeout, | ||
payload: JSON.stringify(data.act) | ||
payload: JSON.stringify(data.act), | ||
} | ||
@@ -183,6 +183,6 @@ | ||
postP | ||
.then(function(out) { | ||
.then(function (out) { | ||
handle_post(null, out.res, out.payload) | ||
}) | ||
.catch(function(err) { | ||
.catch(function (err) { | ||
handle_post(err) | ||
@@ -196,3 +196,3 @@ }) | ||
error: err, | ||
sync: (msg.meta$ || meta).sync | ||
sync: (msg.meta$ || meta).sync, | ||
} | ||
@@ -207,3 +207,3 @@ | ||
listen_recv: res.headers['seneca-time-listen-recv'], | ||
listen_sent: res.headers['seneca-time-listen-sent'] | ||
listen_sent: res.headers['seneca-time-listen-sent'], | ||
} | ||
@@ -225,3 +225,3 @@ | ||
transportUtil.close(seneca, function(done) { | ||
transportUtil.close(seneca, function (done) { | ||
done() | ||
@@ -234,9 +234,9 @@ }) | ||
internals.setBody = function(seneca, transportUtil, req, res, next) { | ||
internals.setBody = function (seneca, transportUtil, req, res, next) { | ||
var buf = [] | ||
req.setEncoding('utf8') | ||
req.on('data', function(chunk) { | ||
req.on('data', function (chunk) { | ||
buf.push(chunk) | ||
}) | ||
req.on('end', function() { | ||
req.on('end', function () { | ||
try { | ||
@@ -277,3 +277,3 @@ var bufstr = buf.join('') | ||
internals.trackHeaders = function( | ||
internals.trackHeaders = function ( | ||
listenOptions, | ||
@@ -302,5 +302,5 @@ seneca, | ||
time: { | ||
client_sent: req.headers['seneca-time-client-sent'] | ||
client_sent: req.headers['seneca-time-client-sent'], | ||
}, | ||
act: req.body | ||
act: req.body, | ||
} | ||
@@ -317,9 +317,9 @@ } | ||
time: { | ||
client_sent: Date.now() | ||
client_sent: Date.now(), | ||
}, | ||
act: req.body | ||
act: req.body, | ||
} | ||
} | ||
transportUtil.handle_request(seneca, data, listenOptions, function(out) { | ||
transportUtil.handle_request(seneca, data, listenOptions, function (out) { | ||
internals.sendResponse(seneca, transportUtil, res, out, data) | ||
@@ -329,3 +329,3 @@ }) | ||
internals.sendResponse = function(seneca, transportUtil, res, out, data) { | ||
internals.sendResponse = function (seneca, transportUtil, res, out, data) { | ||
var outJson = 'null' | ||
@@ -345,3 +345,3 @@ var httpcode = 200 | ||
'Cache-Control': 'private, max-age=0, no-cache, no-store', | ||
'Content-Length': Buffer.Buffer.byteLength(outJson) | ||
'Content-Length': Buffer.Buffer.byteLength(outJson), | ||
} | ||
@@ -365,4 +365,4 @@ | ||
internals.timeout = function(listenOptions, req, res) { | ||
var id = setTimeout(function() { | ||
internals.timeout = function (listenOptions, req, res) { | ||
var id = setTimeout(function () { | ||
res.statusCode = 503 | ||
@@ -373,3 +373,3 @@ res.statusMessage = 'Response timeout' | ||
var clearTimeoutId = function() { | ||
var clearTimeoutId = function () { | ||
clearTimeout(id) | ||
@@ -376,0 +376,0 @@ } |
@@ -14,4 +14,4 @@ /* Copyright (c) 2013-2015 Richard Rodger, MIT License */ | ||
exports.listen = function(options, transportUtil) { | ||
return function(args, callback) { | ||
exports.listen = function (options, transportUtil) { | ||
return function (args, callback) { | ||
var seneca = this.root.delegate() | ||
@@ -24,3 +24,3 @@ | ||
var listener = Net.createServer(function(connection) { | ||
var listener = Net.createServer(function (connection) { | ||
seneca.log.debug( | ||
@@ -37,7 +37,7 @@ 'listen', | ||
var stringifier = Ndjson.stringify() | ||
parser.on('error', function(error) { | ||
parser.on('error', function (error) { | ||
console.error(error) | ||
connection.end() | ||
}) | ||
parser.on('data', function(data) { | ||
parser.on('data', function (data) { | ||
if (data instanceof Error) { | ||
@@ -52,3 +52,3 @@ var out = transportUtil.prepareResponse(seneca, {}) | ||
transportUtil.handle_request(seneca, data, options, function(out) { | ||
transportUtil.handle_request(seneca, data, options, function (out) { | ||
if (out === null || !out.sync) { | ||
@@ -65,3 +65,3 @@ return | ||
connection.on('error', function(err) { | ||
connection.on('error', function (err) { | ||
seneca.log.error( | ||
@@ -78,3 +78,3 @@ 'listen', | ||
listener.once('listening', function() { | ||
listener.once('listening', function () { | ||
listenOptions.port = listener.address().port | ||
@@ -85,3 +85,3 @@ seneca.log.debug('listen', 'open', listenOptions) | ||
listener.on('error', function(err) { | ||
listener.on('error', function (err) { | ||
seneca.log.error('listen', 'net-error', listenOptions, err && err.stack) | ||
@@ -109,3 +109,3 @@ | ||
listener.on('close', function() { | ||
listener.on('close', function () { | ||
seneca.log.debug('listen', 'close', listenOptions) | ||
@@ -123,3 +123,3 @@ }) | ||
transportUtil.close(seneca, function(next) { | ||
transportUtil.close(seneca, function (next) { | ||
// node 0.10 workaround, otherwise it throws | ||
@@ -135,4 +135,4 @@ if (listener._handle) { | ||
exports.client = function(options, transportUtil) { | ||
return function(args, callback) { | ||
exports.client = function (options, transportUtil) { | ||
return function (args, callback) { | ||
var seneca = this.root.delegate() | ||
@@ -155,6 +155,6 @@ var conStream | ||
var connect = function() { | ||
var connect = function () { | ||
seneca.log.debug('client', type, 'send-init', '', '', clientOptions) | ||
var reconnect = internals.reconnect(function(stream) { | ||
var reconnect = internals.reconnect(function (stream) { | ||
conStream = stream | ||
@@ -169,7 +169,3 @@ var msger = internals.clientMessager( | ||
stream | ||
.pipe(parser) | ||
.pipe(msger) | ||
.pipe(stringifier) | ||
.pipe(stream) | ||
stream.pipe(parser).pipe(msger).pipe(stringifier).pipe(stream) | ||
@@ -180,3 +176,3 @@ if (!established) reconnect.emit('s_connected', stringifier) | ||
reconnect.on('connect', function(connection) { | ||
reconnect.on('connect', function (connection) { | ||
seneca.log.debug('client', type, 'connect', '', '', clientOptions) | ||
@@ -188,6 +184,6 @@ // connection.clientOptions = clientOptions // unique per connection | ||
reconnect.on('reconnect', function() { | ||
reconnect.on('reconnect', function () { | ||
seneca.log.debug('client', type, 'reconnect', '', '', clientOptions) | ||
}) | ||
reconnect.on('disconnect', function(err) { | ||
reconnect.on('disconnect', function (err) { | ||
seneca.log.debug( | ||
@@ -205,3 +201,3 @@ 'client', | ||
}) | ||
reconnect.on('error', function(err) { | ||
reconnect.on('error', function (err) { | ||
seneca.log.debug( | ||
@@ -220,6 +216,6 @@ 'client', | ||
port: clientOptions.port, | ||
host: clientOptions.host | ||
host: clientOptions.host, | ||
}) | ||
transportUtil.close(seneca, function(done) { | ||
transportUtil.close(seneca, function (done) { | ||
reconnect.disconnect() | ||
@@ -242,6 +238,6 @@ internals.closeConnections([conStream], seneca) | ||
var send = function(spec, topic, send_done) { | ||
send_done(null, function(args, done, meta) { | ||
var send = function (spec, topic, send_done) { | ||
send_done(null, function (args, done, meta) { | ||
var self = this | ||
getClient(function(stringifier) { | ||
getClient(function (stringifier) { | ||
var outmsg = transportUtil.prepare_request(self, args, done, meta) | ||
@@ -257,6 +253,6 @@ if (!outmsg.replied) stringifier.write(outmsg) | ||
internals.clientMessager = function(seneca, options, transportUtil) { | ||
internals.clientMessager = function (seneca, options, transportUtil) { | ||
var messager = new Stream.Duplex({ objectMode: true }) | ||
messager._read = function() {} | ||
messager._write = function(data, enc, callback) { | ||
messager._read = function () {} | ||
messager._write = function (data, enc, callback) { | ||
transportUtil.handle_response(seneca, data, options) | ||
@@ -268,3 +264,3 @@ return callback() | ||
internals.closeConnections = function(connections, seneca) { | ||
internals.closeConnections = function (connections, seneca) { | ||
for (var i = 0, il = connections.length; i < il; ++i) { | ||
@@ -275,3 +271,3 @@ internals.destroyConnection(connections[i], seneca) | ||
internals.destroyConnection = function(connection, seneca) { | ||
internals.destroyConnection = function (connection, seneca) { | ||
try { | ||
@@ -284,5 +280,5 @@ connection.destroy() | ||
internals.reconnect = Reconnect(function() { | ||
internals.reconnect = Reconnect(function () { | ||
var args = [].slice.call(arguments) | ||
return Net.connect.apply(null, args) | ||
}) |
@@ -30,9 +30,9 @@ /* Copyright (c) 2015-2017 Richard Rodger, MIT License */ | ||
unexcepted_async_error: | ||
'Unexcepted error response to asynchronous message.' | ||
'Unexcepted error response to asynchronous message.', | ||
}, | ||
override: true | ||
}) | ||
override: true, | ||
}), | ||
} | ||
module.exports = internals.Utils = function(context) { | ||
module.exports = internals.Utils = function (context) { | ||
this._msgprefix = !context.options.msgprefix ? '' : context.options.msgprefix | ||
@@ -44,3 +44,3 @@ this._context = context | ||
internals.Utils.prototype.handle_response = function( | ||
internals.Utils.prototype.handle_response = function ( | ||
seneca, | ||
@@ -81,3 +81,3 @@ data, | ||
Each(data.error, function(value, key) { | ||
Each(data.error, function (value, key) { | ||
err[key] = value | ||
@@ -119,3 +119,3 @@ }) | ||
track: data.track, | ||
time: data.time | ||
time: data.time, | ||
} | ||
@@ -130,3 +130,3 @@ | ||
client_options: client_options, | ||
data: data | ||
data: data, | ||
}) | ||
@@ -137,3 +137,3 @@ | ||
internals.Utils.prototype.callmeta = function(options) { | ||
internals.Utils.prototype.callmeta = function (options) { | ||
try { | ||
@@ -152,3 +152,8 @@ options.callmeta.done(options.err, options.result, options.actinfo) | ||
internals.Utils.prototype.prepare_request = function(seneca, args, done, meta) { | ||
internals.Utils.prototype.prepare_request = function ( | ||
seneca, | ||
args, | ||
done, | ||
meta | ||
) { | ||
var meta$ = args.meta$ || meta || {} | ||
@@ -163,3 +168,3 @@ | ||
done: done.bind(seneca), | ||
when: Date.now() | ||
when: Date.now(), | ||
} | ||
@@ -178,3 +183,3 @@ | ||
client_options: null, | ||
data: null | ||
data: null, | ||
}) | ||
@@ -196,3 +201,3 @@ } | ||
act: seneca.util.clean(args), | ||
sync: meta$.sync | ||
sync: meta$.sync, | ||
} | ||
@@ -212,3 +217,3 @@ | ||
snc: meta$.sync, | ||
pat: meta$.pattern | ||
pat: meta$.pattern, | ||
} | ||
@@ -219,3 +224,3 @@ | ||
internals.Utils.prototype.handle_request = function( | ||
internals.Utils.prototype.handle_request = function ( | ||
seneca, | ||
@@ -241,3 +246,3 @@ data, | ||
input: data, | ||
error: internals.error('invalid_kind_act', { kind: data.kind }) | ||
error: internals.error('invalid_kind_act', { kind: data.kind }), | ||
}) | ||
@@ -285,3 +290,3 @@ } | ||
origin: data.origin, | ||
time: data.time | ||
time: data.time, | ||
} | ||
@@ -294,3 +299,3 @@ | ||
internals.Utils.prototype.requestAct = function( | ||
internals.Utils.prototype.requestAct = function ( | ||
seneca, | ||
@@ -304,3 +309,3 @@ input, | ||
try { | ||
seneca.act(input, function(err, out) { | ||
seneca.act(input, function (err, out) { | ||
self.update_output(input, output, err, out) | ||
@@ -315,3 +320,3 @@ respond(output) | ||
internals.Utils.prototype.make_client = function( | ||
internals.Utils.prototype.make_client = function ( | ||
context_seneca, | ||
@@ -336,3 +341,3 @@ make_send, | ||
var finish = function(err, send) { | ||
var finish = function (err, send) { | ||
if (err) { | ||
@@ -354,5 +359,5 @@ return client_done(err) | ||
internals.Utils.prototype.make_anyclient = function(opts, make_send, done) { | ||
internals.Utils.prototype.make_anyclient = function (opts, make_send, done) { | ||
var self = this | ||
make_send({}, this._msgprefix + 'any', function(err, send) { | ||
make_send({}, this._msgprefix + 'any', function (err, send) { | ||
if (err) { | ||
@@ -367,3 +372,3 @@ return done(err) | ||
id: opts.id || Nid(), | ||
toString: function() { | ||
toString: function () { | ||
return 'any-' + this.id | ||
@@ -379,5 +384,5 @@ }, | ||
send: function(args, done, meta) { | ||
send: function (args, done, meta) { | ||
send.call(this, args, done, meta) | ||
} | ||
}, | ||
} | ||
@@ -389,3 +394,3 @@ | ||
internals.Utils.prototype.make_pinclient = function( | ||
internals.Utils.prototype.make_pinclient = function ( | ||
opts, | ||
@@ -398,3 +403,3 @@ resolvesend, | ||
id: opts.id || Nid(), | ||
toString: function() { | ||
toString: function () { | ||
return 'pin-' + argspatrun.mark + '-' + this.id | ||
@@ -411,7 +416,7 @@ }, | ||
send: function(args, done, meta) { | ||
send: function (args, done, meta) { | ||
var seneca = this | ||
var spec = argspatrun.find(args) | ||
resolvesend(spec, args, function(err, send) { | ||
resolvesend(spec, args, function (err, send) { | ||
if (err) { | ||
@@ -422,3 +427,3 @@ return done(err) | ||
}) | ||
} | ||
}, | ||
} | ||
@@ -429,3 +434,3 @@ | ||
internals.Utils.prototype.resolve_pins = function(opts) { | ||
internals.Utils.prototype.resolve_pins = function (opts) { | ||
var pins = opts.pin || opts.pins | ||
@@ -437,3 +442,3 @@ if (pins) { | ||
if (pins) { | ||
pins = pins.map(function(pin) { | ||
pins = pins.map(function (pin) { | ||
return typeof pin === 'string' ? Jsonic(pin) : pin | ||
@@ -446,6 +451,6 @@ }) | ||
internals.Utils.prototype.make_argspatrun = function(pins) { | ||
internals.Utils.prototype.make_argspatrun = function (pins) { | ||
var argspatrun = Patrun({ gex: true }) | ||
Each(pins, function(pin) { | ||
Each(pins, function (pin) { | ||
var spec = { pin: pin } | ||
@@ -455,5 +460,3 @@ argspatrun.add(pin, spec) | ||
argspatrun.mark = Util.inspect(pins) | ||
.replace(/\s+/g, '') | ||
.replace(/\n/g, '') | ||
argspatrun.mark = Util.inspect(pins).replace(/\s+/g, '').replace(/\n/g, '') | ||
@@ -463,3 +466,3 @@ return argspatrun | ||
internals.Utils.prototype.make_resolvesend = function( | ||
internals.Utils.prototype.make_resolvesend = function ( | ||
opts, | ||
@@ -470,3 +473,3 @@ sendmap, | ||
var self = this | ||
return function(spec, args, done) { | ||
return function (spec, args, done) { | ||
var topic = self.resolve_topic(opts, spec, args) | ||
@@ -478,3 +481,3 @@ var send = sendmap[topic] | ||
make_send(spec, topic, function(err, send) { | ||
make_send(spec, topic, function (err, send) { | ||
if (err) { | ||
@@ -489,6 +492,6 @@ return done(err) | ||
internals.Utils.prototype.resolve_topic = function(opts, spec, args) { | ||
internals.Utils.prototype.resolve_topic = function (opts, spec, args) { | ||
var self = this | ||
if (!spec.pin) { | ||
return function() { | ||
return function () { | ||
return self._msgprefix + 'any' | ||
@@ -501,3 +504,3 @@ } | ||
var topicargs = {} | ||
Each(topicpin, function(v, k) { | ||
Each(topicpin, function (v, k) { | ||
topicargs[k] = args[k] | ||
@@ -507,3 +510,3 @@ }) | ||
var sb = [] | ||
Each(Object.keys(topicargs).sort(), function(k) { | ||
Each(Object.keys(topicargs).sort(), function (k) { | ||
sb.push(k) | ||
@@ -519,3 +522,3 @@ sb.push('=') | ||
internals.Utils.prototype.listen_topics = function( | ||
internals.Utils.prototype.listen_topics = function ( | ||
seneca, | ||
@@ -532,5 +535,5 @@ args, | ||
if (pins) { | ||
Each(this._context.seneca.findpins(pins), function(pin) { | ||
Each(this._context.seneca.findpins(pins), function (pin) { | ||
var sb = [] | ||
Each(Object.keys(pin).sort(), function(k) { | ||
Each(Object.keys(pin).sort(), function (k) { | ||
sb.push(k) | ||
@@ -554,3 +557,3 @@ sb.push('=') | ||
if (typeof do_topic === 'function') { | ||
topics.forEach(function(topic) { | ||
topics.forEach(function (topic) { | ||
do_topic(topic) | ||
@@ -563,3 +566,3 @@ }) | ||
internals.Utils.prototype.update_output = function(input, output, err, out) { | ||
internals.Utils.prototype.update_output = function (input, output, err, out) { | ||
output.res = out | ||
@@ -579,3 +582,3 @@ | ||
internals.Utils.prototype.catch_act_error = function( | ||
internals.Utils.prototype.catch_act_error = function ( | ||
seneca, | ||
@@ -595,3 +598,3 @@ e, | ||
internals.Utils.prototype.prepareResponse = function(seneca, input) { | ||
internals.Utils.prototype.prepareResponse = function (seneca, input) { | ||
return { | ||
@@ -605,5 +608,5 @@ id: input.id, | ||
client_sent: (input.time && input.time.client_sent) || 0, | ||
listen_recv: Date.now() | ||
listen_recv: Date.now(), | ||
}, | ||
sync: input.sync | ||
sync: input.sync, | ||
} | ||
@@ -617,3 +620,3 @@ } | ||
// allow user to specify operations on result | ||
internals.Utils.prototype.handle_entity = function(seneca, raw) { | ||
internals.Utils.prototype.handle_entity = function (seneca, raw) { | ||
if (!raw) { | ||
@@ -629,3 +632,3 @@ return raw | ||
Each(raw, function(value, key) { | ||
Each(raw, function (value, key) { | ||
if ('object' === typeof value && null != value && value.entity$) { | ||
@@ -639,7 +642,7 @@ raw[key] = seneca.make$(value) | ||
internals.Utils.prototype.close = function(seneca, closer) { | ||
seneca.add('role:seneca,cmd:close', function(close_args, done) { | ||
internals.Utils.prototype.close = function (seneca, closer) { | ||
seneca.add('role:seneca,cmd:close', function (close_args, done) { | ||
var seneca = this | ||
closer.call(seneca, function(err) { | ||
closer.call(seneca, function (err) { | ||
if (err) { | ||
@@ -654,3 +657,3 @@ seneca.log.error(err) | ||
internals.Utils.prototype.stringifyJSON = function(seneca, note, obj) { | ||
internals.Utils.prototype.stringifyJSON = function (seneca, note, obj) { | ||
if (!obj) { | ||
@@ -667,3 +670,3 @@ return | ||
internals.Utils.prototype.parseJSON = function(seneca, note, str) { | ||
internals.Utils.prototype.parseJSON = function (seneca, note, str) { | ||
if (!str) { | ||
@@ -687,3 +690,3 @@ return | ||
internals.Utils.prototype.resolveDynamicValue = function(value, options) { | ||
internals.Utils.prototype.resolveDynamicValue = function (value, options) { | ||
if ('function' == typeof value) { | ||
@@ -690,0 +693,0 @@ return value(options) |
{ | ||
"name": "seneca-transport", | ||
"version": "5.0.1", | ||
"version": "6.0.0", | ||
"description": "Seneca transport", | ||
@@ -49,4 +49,4 @@ "main": "transport.js", | ||
"dependencies": { | ||
"@hapi/wreck": "^15.0.2", | ||
"eraro": "^2.0.0", | ||
"@hapi/wreck": "^17.0.0", | ||
"eraro": "^2.1.0", | ||
"gex": "^1.0.0", | ||
@@ -58,19 +58,19 @@ "jsonic": "^0.3.1", | ||
"ndjson": "^1.5.0", | ||
"nid": "^0.3.2", | ||
"patrun": "^2.1.0", | ||
"qs": "^6.9.1", | ||
"nid": "^1.1.0", | ||
"patrun": "^3.0.0", | ||
"qs": "^6.9.4", | ||
"reconnect-core": "^1.3.0" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "^7.0.0", | ||
"@hapi/joi": "^15.1.1", | ||
"@hapi/lab": "^21.0.0", | ||
"async": "^3.1.0", | ||
"@hapi/code": "^8.0.1", | ||
"@hapi/joi": "^17.1.1", | ||
"@hapi/lab": "^22.0.4", | ||
"async": "^3.2.0", | ||
"bench": "^0.3.6", | ||
"coveralls": "^3.0.9", | ||
"prettier": "^1.19.1", | ||
"coveralls": "^3.1.0", | ||
"prettier": "^2.0.5", | ||
"seneca": "plugin", | ||
"seneca-entity": "^5.2.0", | ||
"seneca-entity": "^8.0.0", | ||
"seneca-transport-test": "^1.0.0", | ||
"sinon": "^7.5.0" | ||
"sinon": "^9.0.2" | ||
}, | ||
@@ -77,0 +77,0 @@ "files": [ |
@@ -24,7 +24,7 @@ /* Copyright (c) 2013-2015 Richard Rodger & other contributors, MIT License */ | ||
message_loop: true, | ||
own_message: true | ||
own_message: true, | ||
}, | ||
check: { | ||
message_loop: true, | ||
own_message: true | ||
own_message: true, | ||
}, | ||
@@ -40,3 +40,3 @@ web: { | ||
attempt_delay: 222, | ||
serverOptions: {} | ||
serverOptions: {}, | ||
}, | ||
@@ -47,6 +47,6 @@ tcp: { | ||
port: 10201, | ||
timeout: 5555 | ||
} | ||
timeout: 5555, | ||
}, | ||
}, | ||
plugin: 'transport' | ||
plugin: 'transport', | ||
} | ||
@@ -62,3 +62,3 @@ | ||
seneca: seneca, | ||
options: settings | ||
options: settings, | ||
}) | ||
@@ -114,7 +114,7 @@ | ||
exportmap: { utils: transportUtil }, | ||
options: settings | ||
options: settings, | ||
} | ||
} | ||
module.exports.preload = function() { | ||
module.exports.preload = function () { | ||
var seneca = this | ||
@@ -125,3 +125,3 @@ | ||
exportmap: { | ||
utils: function() { | ||
utils: function () { | ||
var transportUtil = seneca.export(internals.plugin).utils | ||
@@ -131,4 +131,4 @@ if (transportUtil !== meta.exportmap.utils) { | ||
} | ||
} | ||
} | ||
}, | ||
}, | ||
} | ||
@@ -139,6 +139,6 @@ | ||
internals.inflight = function(callmap) { | ||
return function(args, callback) { | ||
internals.inflight = function (callmap) { | ||
return function (args, callback) { | ||
var inflight = {} | ||
callmap.forEach(function(val, key) { | ||
callmap.forEach(function (val, key) { | ||
inflight[key] = val | ||
@@ -150,3 +150,3 @@ }) | ||
internals.listen = function(args, callback) { | ||
internals.listen = function (args, callback) { | ||
var seneca = this | ||
@@ -156,3 +156,3 @@ | ||
role: internals.plugin, | ||
hook: 'listen' | ||
hook: 'listen', | ||
}) | ||
@@ -169,3 +169,3 @@ //var listen_args = seneca.util.clean(_.omit(config, 'cmd')) | ||
internals.client = function(args, callback) { | ||
internals.client = function (args, callback) { | ||
var seneca = this | ||
@@ -175,3 +175,3 @@ | ||
role: internals.plugin, | ||
hook: 'client' | ||
hook: 'client', | ||
}) | ||
@@ -188,3 +188,3 @@ //var client_args = seneca.util.clean(_.omit(config, 'cmd')) | ||
internals.legacyError = function(seneca, type) { | ||
internals.legacyError = function (seneca, type) { | ||
if (type === 'pubsub') { | ||
@@ -191,0 +191,0 @@ return seneca.fail('plugin-needed', { name: 'seneca-redis-transport' }) |
73151
1247
+ Addednid@1.3.3(transitive)
+ Addedpatrun@3.0.0(transitive)
- Removednid@0.3.2(transitive)
- Removedpatrun@2.1.0(transitive)
Updated@hapi/wreck@^17.0.0
Updatederaro@^2.1.0
Updatednid@^1.1.0
Updatedpatrun@^3.0.0
Updatedqs@^6.9.4