@graffy/core
Advanced tools
Comparing version 0.14.6-alpha6 to 0.14.6-alpha7
@@ -283,5 +283,13 @@ "use strict"; | ||
_proto.call = function call(type, unwrappedPayload, options) { | ||
var _this = this; | ||
var payload = (0, _common.wrap)(unwrappedPayload, this.path); | ||
var result = this.core.call(type, payload, options); | ||
return (0, _common.unwrap)(result, this.path); | ||
var unwrapResult = function unwrapResult(value) { | ||
return value && (0, _common.unwrap)(value, _this.path); | ||
}; | ||
if (!this.path.length) return result; | ||
return type === 'watch' ? (0, _stream.mapStream)(result, unwrapResult) : result.then(unwrapResult); | ||
}; | ||
@@ -288,0 +296,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"author": "aravind (https://github.com/aravindet)", | ||
"version": "0.14.6-alpha6", | ||
"version": "0.14.6-alpha7", | ||
"main": "index.js", | ||
@@ -17,5 +17,5 @@ "source": "src/index.js", | ||
"@babel/runtime-corejs3": "^7.8.4", | ||
"@graffy/common": "0.14.6-alpha6", | ||
"@graffy/stream": "0.14.6-alpha6" | ||
"@graffy/common": "0.14.6-alpha7", | ||
"@graffy/stream": "0.14.6-alpha7" | ||
} | ||
} |
14
shift.js
@@ -131,3 +131,3 @@ "use strict"; | ||
case 0: | ||
_shiftedNext = function _ref3() { | ||
_shiftedNext = function _ref2() { | ||
_shiftedNext = (0, _asyncToGenerator2["default"])( | ||
@@ -164,3 +164,3 @@ /*#__PURE__*/ | ||
shiftedNext = function _ref2(_x10) { | ||
shiftedNext = function _ref(_x10) { | ||
return _shiftedNext.apply(this, arguments); | ||
@@ -237,3 +237,3 @@ }; | ||
function () { | ||
var _ref = (0, _wrapAsyncGenerator2["default"])( | ||
var _shiftedNextFn = (0, _wrapAsyncGenerator2["default"])( | ||
/*#__PURE__*/ | ||
@@ -340,5 +340,7 @@ _regenerator["default"].mark(function _callee3(unwrappedNextPayload) { | ||
return function shiftedNext(_x4) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
function shiftedNextFn(_x4) { | ||
return _shiftedNextFn.apply(this, arguments); | ||
} | ||
return shiftedNextFn; | ||
}(); | ||
@@ -345,0 +347,0 @@ |
@@ -96,3 +96,11 @@ import { | ||
const result = this.core.call(type, payload, options); | ||
return unwrap(result, this.path); | ||
const unwrapResult = value => { | ||
return value && unwrap(value, this.path); | ||
}; | ||
if (!this.path.length) return result; | ||
return type === 'watch' | ||
? mapStream(result, unwrapResult) | ||
: result.then(unwrapResult); | ||
} | ||
@@ -99,0 +107,0 @@ |
@@ -54,3 +54,3 @@ import { wrap, unwrap, remove, merge, mergeStreams } from '@graffy/common'; | ||
// TODO: This should probably use makeStream and propagate returns. | ||
const shiftedNext = async function*(unwrappedNextPayload) { | ||
const shiftedNext = async function* shiftedNextFn(unwrappedNextPayload) { | ||
nextCalled = true; | ||
@@ -57,0 +57,0 @@ const nextPayload = wrap(unwrappedNextPayload, path); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37194
905
+ Added@graffy/common@0.14.6-alpha7(transitive)
+ Added@graffy/stream@0.14.6-alpha7(transitive)
- Removed@graffy/common@0.14.6-alpha6(transitive)
- Removed@graffy/stream@0.14.6-alpha6(transitive)
Updated@graffy/common@0.14.6-alpha7
Updated@graffy/stream@0.14.6-alpha7