@graffy/core
Advanced tools
Comparing version 0.15.0-alpha.1 to 0.15.0-alpha2
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
exports.__esModule = true; | ||
exports.default = void 0; | ||
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify")); | ||
var _common = require("@graffy/common"); | ||
@@ -13,3 +17,3 @@ | ||
if (i >= handlers.length) { | ||
throw Error('resolve.no_providers_for ' + JSON.stringify(payload)); | ||
throw Error('resolve.no_providers_for ' + (0, _stringify.default)(payload)); | ||
} | ||
@@ -16,0 +20,0 @@ |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
@@ -8,6 +8,12 @@ exports.__esModule = true; | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator")); | ||
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncIterator")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/asyncToGenerator")); | ||
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat")); | ||
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify")); | ||
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/asyncIterator")); | ||
var _common = require("@graffy/common"); | ||
@@ -22,2 +28,4 @@ | ||
function validateArgs(first) { | ||
var _context; | ||
var path; | ||
@@ -40,7 +48,7 @@ | ||
if (typeof arg !== 'undefined' && typeof arg !== 'object' && typeof arg !== 'function') { | ||
throw Error('validateArgs.invalid_argument ' + JSON.stringify(arg)); | ||
throw Error('validateArgs.invalid_argument ' + (0, _stringify.default)(arg)); | ||
} | ||
} | ||
return [path].concat(args); | ||
return (0, _concat.default)(_context = [path]).call(_context, args); | ||
} | ||
@@ -65,2 +73,4 @@ | ||
_proto.on = function on(type) { | ||
var _context2; | ||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | ||
@@ -74,3 +84,3 @@ args[_key2 - 1] = arguments[_key2]; | ||
var path = this.path.concat(rawPath); | ||
var path = (0, _concat.default)(_context2 = this.path).call(_context2, rawPath); | ||
var handler = path.length ? (type === 'watch' ? _shift.shiftGen : _shift.shiftFn)(rawHandler, path) : rawHandler; | ||
@@ -86,21 +96,21 @@ this.core.on(type, path, handler); | ||
this.on('read', path, /*#__PURE__*/function () { | ||
var _porcelainRead = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee(query, options) { | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
var _porcelainRead = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(query, options) { | ||
return _regenerator.default.wrap(function _callee$(_context3) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context.t0 = _common.finalize; | ||
_context.t1 = _common.makeGraph; | ||
_context.next = 4; | ||
_context3.t0 = _common.finalize; | ||
_context3.t1 = _common.makeGraph; | ||
_context3.next = 4; | ||
return handle((0, _common.decorateQuery)(query), options); | ||
case 4: | ||
_context.t2 = _context.sent; | ||
_context.t3 = (0, _context.t1)(_context.t2); | ||
_context.t4 = query; | ||
return _context.abrupt("return", (0, _context.t0)(_context.t3, _context.t4)); | ||
_context3.t2 = _context3.sent; | ||
_context3.t3 = (0, _context3.t1)(_context3.t2); | ||
_context3.t4 = query; | ||
return _context3.abrupt("return", (0, _context3.t0)(_context3.t3, _context3.t4)); | ||
case 8: | ||
case "end": | ||
return _context.stop(); | ||
return _context3.stop(); | ||
} | ||
@@ -127,36 +137,36 @@ } | ||
var subscription = handle((0, _common.decorateQuery)(query), options); | ||
(0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() { | ||
(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { | ||
var firstValue, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value; | ||
return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
return _regenerator.default.wrap(function _callee2$(_context4) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
_context2.prev = 0; | ||
_context2.next = 3; | ||
_context4.prev = 0; | ||
_context4.next = 3; | ||
return subscription.next(); | ||
case 3: | ||
firstValue = _context2.sent.value; | ||
firstValue = _context4.sent.value; | ||
push(firstValue && (0, _common.finalize)((0, _common.makeGraph)(firstValue), query)); | ||
_iteratorNormalCompletion = true; | ||
_didIteratorError = false; | ||
_context2.prev = 7; | ||
_context4.prev = 7; | ||
_iterator = (0, _asyncIterator2.default)(subscription); | ||
case 9: | ||
_context2.next = 11; | ||
_context4.next = 11; | ||
return _iterator.next(); | ||
case 11: | ||
_step = _context2.sent; | ||
_step = _context4.sent; | ||
_iteratorNormalCompletion = _step.done; | ||
_context2.next = 15; | ||
_context4.next = 15; | ||
return _step.value; | ||
case 15: | ||
_value = _context2.sent; | ||
_value = _context4.sent; | ||
if (_iteratorNormalCompletion) { | ||
_context2.next = 22; | ||
_context4.next = 22; | ||
break; | ||
@@ -170,32 +180,32 @@ } | ||
_iteratorNormalCompletion = true; | ||
_context2.next = 9; | ||
_context4.next = 9; | ||
break; | ||
case 22: | ||
_context2.next = 28; | ||
_context4.next = 28; | ||
break; | ||
case 24: | ||
_context2.prev = 24; | ||
_context2.t0 = _context2["catch"](7); | ||
_context4.prev = 24; | ||
_context4.t0 = _context4["catch"](7); | ||
_didIteratorError = true; | ||
_iteratorError = _context2.t0; | ||
_iteratorError = _context4.t0; | ||
case 28: | ||
_context2.prev = 28; | ||
_context2.prev = 29; | ||
_context4.prev = 28; | ||
_context4.prev = 29; | ||
if (!(!_iteratorNormalCompletion && _iterator.return != null)) { | ||
_context2.next = 33; | ||
_context4.next = 33; | ||
break; | ||
} | ||
_context2.next = 33; | ||
_context4.next = 33; | ||
return _iterator.return(); | ||
case 33: | ||
_context2.prev = 33; | ||
_context4.prev = 33; | ||
if (!_didIteratorError) { | ||
_context2.next = 36; | ||
_context4.next = 36; | ||
break; | ||
@@ -207,19 +217,19 @@ } | ||
case 36: | ||
return _context2.finish(33); | ||
return _context4.finish(33); | ||
case 37: | ||
return _context2.finish(28); | ||
return _context4.finish(28); | ||
case 38: | ||
_context2.next = 43; | ||
_context4.next = 43; | ||
break; | ||
case 40: | ||
_context2.prev = 40; | ||
_context2.t1 = _context2["catch"](0); | ||
end(_context2.t1); | ||
_context4.prev = 40; | ||
_context4.t1 = _context4["catch"](0); | ||
end(_context4.t1); | ||
case 43: | ||
case "end": | ||
return _context2.stop(); | ||
return _context4.stop(); | ||
} | ||
@@ -242,18 +252,18 @@ } | ||
this.on('write', path, /*#__PURE__*/function () { | ||
var _porcelainWrite = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(change, options) { | ||
return regeneratorRuntime.wrap(function _callee3$(_context3) { | ||
var _porcelainWrite = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(change, options) { | ||
return _regenerator.default.wrap(function _callee3$(_context5) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
_context3.t0 = _common.makeGraph; | ||
_context3.next = 3; | ||
_context5.t0 = _common.makeGraph; | ||
_context5.next = 3; | ||
return handle((0, _common.decorate)(change), options); | ||
case 3: | ||
_context3.t1 = _context3.sent; | ||
return _context3.abrupt("return", (0, _context3.t0)(_context3.t1)); | ||
_context5.t1 = _context5.sent; | ||
return _context5.abrupt("return", (0, _context5.t0)(_context5.t1)); | ||
case 5: | ||
case "end": | ||
return _context3.stop(); | ||
return _context5.stop(); | ||
} | ||
@@ -295,3 +305,3 @@ } | ||
_proto.read = /*#__PURE__*/function () { | ||
var _read = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() { | ||
var _read = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { | ||
var _validateArgs6, | ||
@@ -305,18 +315,18 @@ path, | ||
return regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
return _regenerator.default.wrap(function _callee4$(_context6) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
_validateArgs6 = validateArgs.apply(void 0, _args5), path = _validateArgs6[0], porcelainQuery = _validateArgs6[1], options = _validateArgs6[2]; | ||
query = (0, _common.wrap)((0, _common.makeQuery)(porcelainQuery), path); | ||
_context4.next = 4; | ||
_context6.next = 4; | ||
return this.call('read', query, options || {}); | ||
case 4: | ||
result = _context4.sent; | ||
return _context4.abrupt("return", (0, _common.descend)((0, _common.decorate)(result), path)); | ||
result = _context6.sent; | ||
return _context6.abrupt("return", (0, _common.descend)((0, _common.decorate)(result), path)); | ||
case 6: | ||
case "end": | ||
return _context4.stop(); | ||
return _context6.stop(); | ||
} | ||
@@ -348,3 +358,3 @@ } | ||
_proto.write = /*#__PURE__*/function () { | ||
var _write = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() { | ||
var _write = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { | ||
var _validateArgs8, | ||
@@ -358,18 +368,18 @@ path, | ||
return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
return _regenerator.default.wrap(function _callee5$(_context7) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_validateArgs8 = validateArgs.apply(void 0, _args6), path = _validateArgs8[0], porcelainChange = _validateArgs8[1], options = _validateArgs8[2]; | ||
change = (0, _common.wrap)((0, _common.makeGraph)(porcelainChange), path); | ||
_context5.next = 4; | ||
_context7.next = 4; | ||
return this.call('write', change, options || {}); | ||
case 4: | ||
writtenChange = _context5.sent; | ||
return _context5.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 _context5.stop(); | ||
return _context7.stop(); | ||
} | ||
@@ -376,0 +386,0 @@ } |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
@@ -5,0 +5,0 @@ exports.__esModule = true; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
@@ -9,12 +9,14 @@ exports.__esModule = true; | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator")); | ||
var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapAsyncGenerator")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/asyncToGenerator")); | ||
var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/awaitAsyncGenerator")); | ||
var _wrapAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator")); | ||
var _asyncGeneratorDelegate2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncGeneratorDelegate")); | ||
var _awaitAsyncGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator")); | ||
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncIterator")); | ||
var _asyncGeneratorDelegate2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate")); | ||
var _asyncIterator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/esm/asyncIterator")); | ||
var _common = require("@graffy/common"); | ||
@@ -29,6 +31,6 @@ | ||
function _mapStream() { | ||
_mapStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(stream, fn) { | ||
_mapStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(stream, fn) { | ||
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, value; | ||
return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
return _regenerator.default.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
@@ -118,6 +120,6 @@ switch (_context5.prev = _context5.next) { | ||
return /*#__PURE__*/function () { | ||
var _shiftedFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(payload, options, next) { | ||
var _shiftedFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(payload, options, next) { | ||
var nextCalled, remainingNextResult, unwrappedPayload, remainingPayload, shiftedNext, _shiftedNext, result; | ||
return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
return _regenerator.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
@@ -127,5 +129,5 @@ switch (_context2.prev = _context2.next) { | ||
_shiftedNext = function _shiftedNext3() { | ||
_shiftedNext = (0, _asyncToGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee(unwrappedNextPayload) { | ||
_shiftedNext = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(unwrappedNextPayload) { | ||
var nextPayload, nextResult; | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -211,5 +213,5 @@ switch (_context.prev = _context.next) { | ||
return /*#__PURE__*/function () { | ||
var _shiftedGen = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(payload, options, next) { | ||
var _shiftedGen = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(payload, options, next) { | ||
var nextCalled, remainingNextStream, unwrappedPayload, remainingPayload, shiftedNext, unwrappedStream, firstValue, resultStream; | ||
return regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
return _regenerator.default.wrap(function _callee4$(_context4) { | ||
while (1) { | ||
@@ -223,6 +225,6 @@ switch (_context4.prev = _context4.next) { | ||
shiftedNext = /*#__PURE__*/function () { | ||
var _shiftedNextFn = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(unwrappedNextPayload) { | ||
var _shiftedNextFn = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(unwrappedNextPayload) { | ||
var nextPayload, pushRemaining, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _value2, value, unwrappedValue, remainingValue; | ||
return regeneratorRuntime.wrap(function _callee3$(_context3) { | ||
return _regenerator.default.wrap(function _callee3$(_context3) { | ||
while (1) { | ||
@@ -229,0 +231,0 @@ switch (_context3.prev = _context3.next) { |
@@ -5,3 +5,3 @@ { | ||
"author": "aravind (https://github.com/aravindet)", | ||
"version": "0.15.0-alpha.1", | ||
"version": "0.15.0-alpha2", | ||
"main": "./cjs/index.js", | ||
@@ -16,5 +16,6 @@ "module": "./esm/index.js", | ||
"@babel/runtime": "^7.10.4", | ||
"@graffy/common": "0.15.0-alpha.1", | ||
"@graffy/stream": "0.15.0-alpha.1" | ||
"@babel/runtime-corejs3": "^7.10.4", | ||
"@graffy/common": "0.15.0-alpha2", | ||
"@graffy/stream": "0.15.0-alpha2" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36720
851
0
4
+ Added@babel/runtime-corejs3@7.26.0(transitive)
+ Added@graffy/common@0.15.0-alpha2(transitive)
+ Added@graffy/stream@0.15.0-alpha2(transitive)
+ Addedcore-js-pure@3.40.0(transitive)
- Removed@graffy/common@0.15.0-alpha.1(transitive)
- Removed@graffy/stream@0.15.0-alpha.1(transitive)
Updated@graffy/common@0.15.0-alpha2
Updated@graffy/stream@0.15.0-alpha2