Comparing version 0.3.2 to 0.4.0
@@ -137,3 +137,5 @@ 'use strict'; | ||
var transport = config.transport, | ||
types = config.types; | ||
types = config.types, | ||
_config$flushDelay = config.flushDelay, | ||
flushDelay = _config$flushDelay === undefined ? 0 : _config$flushDelay; | ||
@@ -145,2 +147,3 @@ (0, _checkers.checkTransport)(transport); | ||
_this.types = types; | ||
_this.flushDelay = flushDelay; | ||
_this.documents = {}; | ||
@@ -147,0 +150,0 @@ _this.id = null; |
@@ -299,3 +299,4 @@ 'use strict'; | ||
var type = this.type, | ||
var client = this.client, | ||
type = this.type, | ||
version = this.version, | ||
@@ -305,2 +306,4 @@ id = this.id, | ||
value = this.value; | ||
var _client$flushDelay = client.flushDelay, | ||
flushDelay = _client$flushDelay === undefined ? 0 : _client$flushDelay; | ||
@@ -341,5 +344,5 @@ | ||
// Delay flushing to allow composing multiple queued operations. | ||
process.nextTick(function () { | ||
setTimeout(function () { | ||
return _this3.flush(); | ||
}); | ||
}, flushDelay); | ||
} | ||
@@ -346,0 +349,0 @@ |
@@ -417,2 +417,3 @@ 'use strict'; | ||
* | ||
* @param {Object} config | ||
* @param {Object} context | ||
@@ -425,3 +426,5 @@ * @return {Client} | ||
value: function () { | ||
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(context) { | ||
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() { | ||
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var context = arguments[1]; | ||
var types, transport, client; | ||
@@ -440,3 +443,6 @@ return regeneratorRuntime.wrap(function _callee7$(_context7) { | ||
case 5: | ||
client = new _client2.default({ types: types, transport: transport.client }); | ||
client = new _client2.default(_extends({}, config, { | ||
types: types, | ||
transport: transport.client | ||
})); | ||
return _context7.abrupt('return', client); | ||
@@ -452,3 +458,3 @@ | ||
function client(_x5) { | ||
function client() { | ||
return _ref7.apply(this, arguments); | ||
@@ -455,0 +461,0 @@ } |
{ | ||
"name": "nexus", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
117091
3056