@graffy/core
Advanced tools
Comparing version 0.14.1 to 0.14.2-alpha1
129
Graffy.js
@@ -8,2 +8,4 @@ "use strict"; | ||
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map")); | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator")); | ||
@@ -17,6 +19,2 @@ | ||
var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/awaitAsyncGenerator")); | ||
var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/wrapAsyncGenerator")); | ||
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncIterator")); | ||
@@ -337,97 +335,12 @@ | ||
_proto.watch = function watch() { | ||
var _this = this; | ||
var _validateArgs7 = validateArgs.apply(void 0, arguments), | ||
path = _validateArgs7[0], | ||
porcelainQuery = _validateArgs7[1], | ||
options = _validateArgs7[2]; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
return (0, _wrapAsyncGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee5() { | ||
var _validateArgs7, path, porcelainQuery, options, query, stream, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _value2, value; | ||
return _regenerator["default"].wrap(function _callee5$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_validateArgs7 = validateArgs.apply(void 0, args), path = _validateArgs7[0], porcelainQuery = _validateArgs7[1], options = _validateArgs7[2]; | ||
query = (0, _common.wrap)((0, _common.makeQuery)(porcelainQuery), path); | ||
stream = _this.call('watch', query, options || {}); | ||
_iteratorNormalCompletion2 = true; | ||
_didIteratorError2 = false; | ||
_context7.prev = 5; | ||
_iterator2 = (0, _asyncIterator2["default"])(stream); | ||
case 7: | ||
_context7.next = 9; | ||
return (0, _awaitAsyncGenerator2["default"])(_iterator2.next()); | ||
case 9: | ||
_step2 = _context7.sent; | ||
_iteratorNormalCompletion2 = _step2.done; | ||
_context7.next = 13; | ||
return (0, _awaitAsyncGenerator2["default"])(_step2.value); | ||
case 13: | ||
_value2 = _context7.sent; | ||
if (_iteratorNormalCompletion2) { | ||
_context7.next = 21; | ||
break; | ||
} | ||
value = _value2; | ||
_context7.next = 18; | ||
return (0, _common.descend)((0, _common.decorate)(value), path); | ||
case 18: | ||
_iteratorNormalCompletion2 = true; | ||
_context7.next = 7; | ||
break; | ||
case 21: | ||
_context7.next = 27; | ||
break; | ||
case 23: | ||
_context7.prev = 23; | ||
_context7.t0 = _context7["catch"](5); | ||
_didIteratorError2 = true; | ||
_iteratorError2 = _context7.t0; | ||
case 27: | ||
_context7.prev = 27; | ||
_context7.prev = 28; | ||
if (!(!_iteratorNormalCompletion2 && _iterator2["return"] != null)) { | ||
_context7.next = 32; | ||
break; | ||
} | ||
_context7.next = 32; | ||
return (0, _awaitAsyncGenerator2["default"])(_iterator2["return"]()); | ||
case 32: | ||
_context7.prev = 32; | ||
if (!_didIteratorError2) { | ||
_context7.next = 35; | ||
break; | ||
} | ||
throw _iteratorError2; | ||
case 35: | ||
return _context7.finish(32); | ||
case 36: | ||
return _context7.finish(27); | ||
case 37: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}, _callee5, null, [[5, 23, 27, 37], [28,, 32, 36]]); | ||
}))(); | ||
var query = (0, _common.wrap)((0, _common.makeQuery)(porcelainQuery), path); | ||
var stream = this.call('watch', query, options || {}); | ||
return (0, _map["default"])(stream).call(stream, function (value) { | ||
return (0, _common.descend)((0, _common.decorate)(value), path); | ||
}); | ||
}; | ||
@@ -440,3 +353,3 @@ | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee6() { | ||
_regenerator["default"].mark(function _callee5() { | ||
var _validateArgs8, | ||
@@ -448,23 +361,23 @@ path, | ||
writtenChange, | ||
_args7 = arguments; | ||
_args6 = arguments; | ||
return _regenerator["default"].wrap(function _callee6$(_context8) { | ||
return _regenerator["default"].wrap(function _callee5$(_context7) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_validateArgs8 = validateArgs.apply(void 0, _args7), path = _validateArgs8[0], porcelainChange = _validateArgs8[1], options = _validateArgs8[2]; | ||
_validateArgs8 = validateArgs.apply(void 0, _args6), path = _validateArgs8[0], porcelainChange = _validateArgs8[1], options = _validateArgs8[2]; | ||
change = (0, _common.wrap)((0, _common.makeGraph)(porcelainChange), path); | ||
_context8.next = 4; | ||
_context7.next = 4; | ||
return this.call('write', change, options || {}); | ||
case 4: | ||
writtenChange = _context8.sent; | ||
return _context8.abrupt("return", (0, _common.descend)((0, _common.decorate)(writtenChange), path)); | ||
writtenChange = _context7.sent; | ||
return _context7.abrupt("return", (0, _common.descend)((0, _common.decorate)(writtenChange), path)); | ||
case 6: | ||
case "end": | ||
return _context8.stop(); | ||
return _context7.stop(); | ||
} | ||
} | ||
}, _callee6, this); | ||
}, _callee5, this); | ||
})); | ||
@@ -471,0 +384,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"author": "aravind (https://github.com/aravindet)", | ||
"version": "0.14.1", | ||
"version": "0.14.2-alpha1", | ||
"main": "index.js", | ||
@@ -17,5 +17,5 @@ "source": "src/index.js", | ||
"@babel/runtime-corejs3": "^7.8.4", | ||
"@graffy/common": "0.14.1", | ||
"@graffy/stream": "0.14.1" | ||
"@graffy/common": "0.14.2-alpha1", | ||
"@graffy/stream": "0.14.2-alpha1" | ||
} | ||
} |
@@ -106,7 +106,7 @@ import { | ||
async *watch(...args) { | ||
watch(...args) { | ||
const [path, porcelainQuery, options] = validateArgs(...args); | ||
const query = wrap(makeQuery(porcelainQuery), path); | ||
const stream = this.call('watch', query, options || {}); | ||
for await (const value of stream) yield descend(decorate(value), path); | ||
return stream.map(value => descend(decorate(value), path)); | ||
} | ||
@@ -113,0 +113,0 @@ |
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
36846
890
+ Added@graffy/common@0.14.2-alpha1(transitive)
+ Added@graffy/stream@0.14.2-alpha1(transitive)
+ Addednanoid@2.1.11(transitive)
- Removed@graffy/common@0.14.1(transitive)
- Removed@graffy/stream@0.14.1(transitive)
Updated@graffy/common@0.14.2-alpha1
Updated@graffy/stream@0.14.2-alpha1