@orbit/record-cache
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -98,20 +98,60 @@ "use strict"; | ||
_proto.getRelatedRecordAsync = async function getRelatedRecordAsync(identity, relationship) { | ||
var record = await this.getRecordAsync(identity); | ||
_proto.getRelatedRecordAsync = function getRelatedRecordAsync(identity, relationship) { | ||
var record; | ||
return regeneratorRuntime.async(function getRelatedRecordAsync$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return regeneratorRuntime.awrap(this.getRecordAsync(identity)); | ||
if (record) { | ||
return (0, _utils.deepGet)(record, ['relationships', relationship, 'data']); | ||
} | ||
case 2: | ||
record = _context.sent; | ||
return undefined; | ||
if (!record) { | ||
_context.next = 5; | ||
break; | ||
} | ||
return _context.abrupt("return", (0, _utils.deepGet)(record, ['relationships', relationship, 'data'])); | ||
case 5: | ||
return _context.abrupt("return", undefined); | ||
case 6: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.getRelatedRecordsAsync = async function getRelatedRecordsAsync(identity, relationship) { | ||
var record = await this.getRecordAsync(identity); | ||
_proto.getRelatedRecordsAsync = function getRelatedRecordsAsync(identity, relationship) { | ||
var record; | ||
return regeneratorRuntime.async(function getRelatedRecordsAsync$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(this.getRecordAsync(identity)); | ||
if (record) { | ||
return (0, _utils.deepGet)(record, ['relationships', relationship, 'data']); | ||
} | ||
case 2: | ||
record = _context2.sent; | ||
return undefined; | ||
if (!record) { | ||
_context2.next = 5; | ||
break; | ||
} | ||
return _context2.abrupt("return", (0, _utils.deepGet)(record, ['relationships', relationship, 'data'])); | ||
case 5: | ||
return _context2.abrupt("return", undefined); | ||
case 6: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} | ||
@@ -123,5 +163,21 @@ /** | ||
_proto.query = async function query(queryOrExpression, options, id) { | ||
var query = (0, _data.buildQuery)(queryOrExpression, options, id, this._queryBuilder); | ||
return await this._query(query.expression); | ||
_proto.query = function query(queryOrExpression, options, id) { | ||
var query; | ||
return regeneratorRuntime.async(function query$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
query = (0, _data.buildQuery)(queryOrExpression, options, id, this._queryBuilder); | ||
_context3.next = 3; | ||
return regeneratorRuntime.awrap(this._query(query.expression)); | ||
case 3: | ||
return _context3.abrupt("return", _context3.sent); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} | ||
@@ -133,20 +189,43 @@ /** | ||
_proto.patch = async function patch(operationOrOperations) { | ||
if (typeof operationOrOperations === 'function') { | ||
operationOrOperations = operationOrOperations(this._transformBuilder); | ||
} | ||
_proto.patch = function patch(operationOrOperations) { | ||
var result; | ||
return regeneratorRuntime.async(function patch$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
if (typeof operationOrOperations === 'function') { | ||
operationOrOperations = operationOrOperations(this._transformBuilder); | ||
} | ||
var result = { | ||
inverse: [], | ||
data: [] | ||
}; | ||
result = { | ||
inverse: [], | ||
data: [] | ||
}; | ||
if (Array.isArray(operationOrOperations)) { | ||
await this._applyPatchOperations(operationOrOperations, result, true); | ||
} else { | ||
await this._applyPatchOperation(operationOrOperations, result, true); | ||
} | ||
if (!Array.isArray(operationOrOperations)) { | ||
_context4.next = 7; | ||
break; | ||
} | ||
result.inverse.reverse(); | ||
return result; | ||
_context4.next = 5; | ||
return regeneratorRuntime.awrap(this._applyPatchOperations(operationOrOperations, result, true)); | ||
case 5: | ||
_context4.next = 9; | ||
break; | ||
case 7: | ||
_context4.next = 9; | ||
return regeneratorRuntime.awrap(this._applyPatchOperation(operationOrOperations, result, true)); | ||
case 9: | ||
result.inverse.reverse(); | ||
return _context4.abrupt("return", result); | ||
case 11: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} ///////////////////////////////////////////////////////////////////////////// | ||
@@ -157,81 +236,537 @@ // Protected methods | ||
_proto._query = async function _query(expression) { | ||
var queryOperator = this.getQueryOperator(expression.op); | ||
_proto._query = function _query(expression) { | ||
var queryOperator; | ||
return regeneratorRuntime.async(function _query$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
queryOperator = this.getQueryOperator(expression.op); | ||
if (!queryOperator) { | ||
throw new Error("Unable to find query operator: " + expression.op); | ||
} | ||
if (queryOperator) { | ||
_context5.next = 3; | ||
break; | ||
} | ||
return await queryOperator(this, expression); | ||
throw new Error("Unable to find query operator: " + expression.op); | ||
case 3: | ||
_context5.next = 5; | ||
return regeneratorRuntime.awrap(queryOperator(this, expression)); | ||
case 5: | ||
return _context5.abrupt("return", _context5.sent); | ||
case 6: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto._applyPatchOperations = async function _applyPatchOperations(ops, result) { | ||
var primary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
_proto._applyPatchOperations = function _applyPatchOperations(ops, result) { | ||
var primary, | ||
_iteratorNormalCompletion, | ||
_didIteratorError, | ||
_iteratorError, | ||
_iterator, | ||
_step, | ||
op, | ||
_args6 = arguments; | ||
for (var op of ops) { | ||
await this._applyPatchOperation(op, result, primary); | ||
} | ||
return regeneratorRuntime.async(function _applyPatchOperations$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
primary = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : false; | ||
_iteratorNormalCompletion = true; | ||
_didIteratorError = false; | ||
_iteratorError = undefined; | ||
_context6.prev = 4; | ||
_iterator = ops[Symbol.iterator](); | ||
case 6: | ||
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) { | ||
_context6.next = 13; | ||
break; | ||
} | ||
op = _step.value; | ||
_context6.next = 10; | ||
return regeneratorRuntime.awrap(this._applyPatchOperation(op, result, primary)); | ||
case 10: | ||
_iteratorNormalCompletion = true; | ||
_context6.next = 6; | ||
break; | ||
case 13: | ||
_context6.next = 19; | ||
break; | ||
case 15: | ||
_context6.prev = 15; | ||
_context6.t0 = _context6["catch"](4); | ||
_didIteratorError = true; | ||
_iteratorError = _context6.t0; | ||
case 19: | ||
_context6.prev = 19; | ||
_context6.prev = 20; | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
case 22: | ||
_context6.prev = 22; | ||
if (!_didIteratorError) { | ||
_context6.next = 25; | ||
break; | ||
} | ||
throw _iteratorError; | ||
case 25: | ||
return _context6.finish(22); | ||
case 26: | ||
return _context6.finish(19); | ||
case 27: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}, null, this, [[4, 15, 19, 27], [20,, 22, 26]]); | ||
}; | ||
_proto._applyPatchOperation = async function _applyPatchOperation(operation, result) { | ||
var primary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
_proto._applyPatchOperation = function _applyPatchOperation(operation, result) { | ||
var primary, | ||
_iteratorNormalCompletion2, | ||
_didIteratorError2, | ||
_iteratorError2, | ||
_iterator2, | ||
_step2, | ||
_processor4, | ||
inversePatchOperator, | ||
inverseOp, | ||
_iteratorNormalCompletion3, | ||
_didIteratorError3, | ||
_iteratorError3, | ||
_iterator3, | ||
_step3, | ||
processor, | ||
preparedOps, | ||
_iteratorNormalCompletion4, | ||
_didIteratorError4, | ||
_iteratorError4, | ||
_iterator4, | ||
_step4, | ||
_processor, | ||
patchOperator, | ||
data, | ||
_iteratorNormalCompletion5, | ||
_didIteratorError5, | ||
_iteratorError5, | ||
_iterator5, | ||
_step5, | ||
_processor2, | ||
_i, | ||
_preparedOps, | ||
ops, | ||
_iteratorNormalCompletion6, | ||
_didIteratorError6, | ||
_iteratorError6, | ||
_iterator6, | ||
_step6, | ||
_processor3, | ||
_args7 = arguments; | ||
if (operation.op === 'replaceRecord') { | ||
_core.default.deprecate('The `replaceRecord` operation has been deprecated - use `updateRecord` instead.'); | ||
return regeneratorRuntime.async(function _applyPatchOperation$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
primary = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : false; | ||
operation = { | ||
op: 'updateRecord', | ||
record: operation.record | ||
}; | ||
} | ||
if (operation.op === 'replaceRecord') { | ||
_core.default.deprecate('The `replaceRecord` operation has been deprecated - use `updateRecord` instead.'); | ||
for (var processor of this._processors) { | ||
await processor.validate(operation); | ||
} | ||
operation = { | ||
op: 'updateRecord', | ||
record: operation.record | ||
}; | ||
} | ||
var inversePatchOperator = this.getInversePatchOperator(operation.op); | ||
var inverseOp = await inversePatchOperator(this, operation); | ||
_iteratorNormalCompletion2 = true; | ||
_didIteratorError2 = false; | ||
_iteratorError2 = undefined; | ||
_context7.prev = 5; | ||
_iterator2 = this._processors[Symbol.iterator](); | ||
if (inverseOp) { | ||
result.inverse.push(inverseOp); // Query and perform related `before` operations | ||
case 7: | ||
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) { | ||
_context7.next = 14; | ||
break; | ||
} | ||
for (var _processor of this._processors) { | ||
await this._applyPatchOperations((await _processor.before(operation)), result); | ||
} // Query related `after` operations before performing | ||
// the requested operation. These will be applied on success. | ||
_processor4 = _step2.value; | ||
_context7.next = 11; | ||
return regeneratorRuntime.awrap(_processor4.validate(operation)); | ||
case 11: | ||
_iteratorNormalCompletion2 = true; | ||
_context7.next = 7; | ||
break; | ||
var preparedOps = []; | ||
case 14: | ||
_context7.next = 20; | ||
break; | ||
for (var _processor2 of this._processors) { | ||
preparedOps.push((await _processor2.after(operation))); | ||
} // Perform the requested operation | ||
case 16: | ||
_context7.prev = 16; | ||
_context7.t0 = _context7["catch"](5); | ||
_didIteratorError2 = true; | ||
_iteratorError2 = _context7.t0; | ||
case 20: | ||
_context7.prev = 20; | ||
_context7.prev = 21; | ||
var patchOperator = this.getPatchOperator(operation.op); | ||
var data = await patchOperator(this, operation); | ||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) { | ||
_iterator2.return(); | ||
} | ||
if (primary) { | ||
result.data.push(data); | ||
} // Query and perform related `immediate` operations | ||
case 23: | ||
_context7.prev = 23; | ||
if (!_didIteratorError2) { | ||
_context7.next = 26; | ||
break; | ||
} | ||
for (var _processor3 of this._processors) { | ||
await _processor3.immediate(operation); | ||
} // Emit event | ||
throw _iteratorError2; | ||
case 26: | ||
return _context7.finish(23); | ||
this.emit('patch', operation, data); // Perform prepared operations after performing the requested operation | ||
case 27: | ||
return _context7.finish(20); | ||
for (var ops of preparedOps) { | ||
await this._applyPatchOperations(ops, result); | ||
} // Query and perform related `finally` operations | ||
case 28: | ||
inversePatchOperator = this.getInversePatchOperator(operation.op); | ||
_context7.next = 31; | ||
return regeneratorRuntime.awrap(inversePatchOperator(this, operation)); | ||
case 31: | ||
inverseOp = _context7.sent; | ||
for (var _processor4 of this._processors) { | ||
await this._applyPatchOperations((await _processor4.finally(operation)), result); | ||
if (!inverseOp) { | ||
_context7.next = 172; | ||
break; | ||
} | ||
result.inverse.push(inverseOp); // Query and perform related `before` operations | ||
_iteratorNormalCompletion3 = true; | ||
_didIteratorError3 = false; | ||
_iteratorError3 = undefined; | ||
_context7.prev = 37; | ||
_iterator3 = this._processors[Symbol.iterator](); | ||
case 39: | ||
if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { | ||
_context7.next = 53; | ||
break; | ||
} | ||
processor = _step3.value; | ||
_context7.t1 = regeneratorRuntime; | ||
_context7.t2 = this; | ||
_context7.next = 45; | ||
return regeneratorRuntime.awrap(processor.before(operation)); | ||
case 45: | ||
_context7.t3 = _context7.sent; | ||
_context7.t4 = result; | ||
_context7.t5 = _context7.t2._applyPatchOperations.call(_context7.t2, _context7.t3, _context7.t4); | ||
_context7.next = 50; | ||
return _context7.t1.awrap.call(_context7.t1, _context7.t5); | ||
case 50: | ||
_iteratorNormalCompletion3 = true; | ||
_context7.next = 39; | ||
break; | ||
case 53: | ||
_context7.next = 59; | ||
break; | ||
case 55: | ||
_context7.prev = 55; | ||
_context7.t6 = _context7["catch"](37); | ||
_didIteratorError3 = true; | ||
_iteratorError3 = _context7.t6; | ||
case 59: | ||
_context7.prev = 59; | ||
_context7.prev = 60; | ||
if (!_iteratorNormalCompletion3 && _iterator3.return != null) { | ||
_iterator3.return(); | ||
} | ||
case 62: | ||
_context7.prev = 62; | ||
if (!_didIteratorError3) { | ||
_context7.next = 65; | ||
break; | ||
} | ||
throw _iteratorError3; | ||
case 65: | ||
return _context7.finish(62); | ||
case 66: | ||
return _context7.finish(59); | ||
case 67: | ||
// Query related `after` operations before performing | ||
// the requested operation. These will be applied on success. | ||
preparedOps = []; | ||
_iteratorNormalCompletion4 = true; | ||
_didIteratorError4 = false; | ||
_iteratorError4 = undefined; | ||
_context7.prev = 71; | ||
_iterator4 = this._processors[Symbol.iterator](); | ||
case 73: | ||
if (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done) { | ||
_context7.next = 83; | ||
break; | ||
} | ||
_processor = _step4.value; | ||
_context7.t7 = preparedOps; | ||
_context7.next = 78; | ||
return regeneratorRuntime.awrap(_processor.after(operation)); | ||
case 78: | ||
_context7.t8 = _context7.sent; | ||
_context7.t7.push.call(_context7.t7, _context7.t8); | ||
case 80: | ||
_iteratorNormalCompletion4 = true; | ||
_context7.next = 73; | ||
break; | ||
case 83: | ||
_context7.next = 89; | ||
break; | ||
case 85: | ||
_context7.prev = 85; | ||
_context7.t9 = _context7["catch"](71); | ||
_didIteratorError4 = true; | ||
_iteratorError4 = _context7.t9; | ||
case 89: | ||
_context7.prev = 89; | ||
_context7.prev = 90; | ||
if (!_iteratorNormalCompletion4 && _iterator4.return != null) { | ||
_iterator4.return(); | ||
} | ||
case 92: | ||
_context7.prev = 92; | ||
if (!_didIteratorError4) { | ||
_context7.next = 95; | ||
break; | ||
} | ||
throw _iteratorError4; | ||
case 95: | ||
return _context7.finish(92); | ||
case 96: | ||
return _context7.finish(89); | ||
case 97: | ||
// Perform the requested operation | ||
patchOperator = this.getPatchOperator(operation.op); | ||
_context7.next = 100; | ||
return regeneratorRuntime.awrap(patchOperator(this, operation)); | ||
case 100: | ||
data = _context7.sent; | ||
if (primary) { | ||
result.data.push(data); | ||
} // Query and perform related `immediate` operations | ||
_iteratorNormalCompletion5 = true; | ||
_didIteratorError5 = false; | ||
_iteratorError5 = undefined; | ||
_context7.prev = 105; | ||
_iterator5 = this._processors[Symbol.iterator](); | ||
case 107: | ||
if (_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done) { | ||
_context7.next = 114; | ||
break; | ||
} | ||
_processor2 = _step5.value; | ||
_context7.next = 111; | ||
return regeneratorRuntime.awrap(_processor2.immediate(operation)); | ||
case 111: | ||
_iteratorNormalCompletion5 = true; | ||
_context7.next = 107; | ||
break; | ||
case 114: | ||
_context7.next = 120; | ||
break; | ||
case 116: | ||
_context7.prev = 116; | ||
_context7.t10 = _context7["catch"](105); | ||
_didIteratorError5 = true; | ||
_iteratorError5 = _context7.t10; | ||
case 120: | ||
_context7.prev = 120; | ||
_context7.prev = 121; | ||
if (!_iteratorNormalCompletion5 && _iterator5.return != null) { | ||
_iterator5.return(); | ||
} | ||
case 123: | ||
_context7.prev = 123; | ||
if (!_didIteratorError5) { | ||
_context7.next = 126; | ||
break; | ||
} | ||
throw _iteratorError5; | ||
case 126: | ||
return _context7.finish(123); | ||
case 127: | ||
return _context7.finish(120); | ||
case 128: | ||
// Emit event | ||
this.emit('patch', operation, data); // Perform prepared operations after performing the requested operation | ||
_i = 0, _preparedOps = preparedOps; | ||
case 130: | ||
if (!(_i < _preparedOps.length)) { | ||
_context7.next = 137; | ||
break; | ||
} | ||
ops = _preparedOps[_i]; | ||
_context7.next = 134; | ||
return regeneratorRuntime.awrap(this._applyPatchOperations(ops, result)); | ||
case 134: | ||
_i++; | ||
_context7.next = 130; | ||
break; | ||
case 137: | ||
// Query and perform related `finally` operations | ||
_iteratorNormalCompletion6 = true; | ||
_didIteratorError6 = false; | ||
_iteratorError6 = undefined; | ||
_context7.prev = 140; | ||
_iterator6 = this._processors[Symbol.iterator](); | ||
case 142: | ||
if (_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done) { | ||
_context7.next = 156; | ||
break; | ||
} | ||
_processor3 = _step6.value; | ||
_context7.t11 = regeneratorRuntime; | ||
_context7.t12 = this; | ||
_context7.next = 148; | ||
return regeneratorRuntime.awrap(_processor3.finally(operation)); | ||
case 148: | ||
_context7.t13 = _context7.sent; | ||
_context7.t14 = result; | ||
_context7.t15 = _context7.t12._applyPatchOperations.call(_context7.t12, _context7.t13, _context7.t14); | ||
_context7.next = 153; | ||
return _context7.t11.awrap.call(_context7.t11, _context7.t15); | ||
case 153: | ||
_iteratorNormalCompletion6 = true; | ||
_context7.next = 142; | ||
break; | ||
case 156: | ||
_context7.next = 162; | ||
break; | ||
case 158: | ||
_context7.prev = 158; | ||
_context7.t16 = _context7["catch"](140); | ||
_didIteratorError6 = true; | ||
_iteratorError6 = _context7.t16; | ||
case 162: | ||
_context7.prev = 162; | ||
_context7.prev = 163; | ||
if (!_iteratorNormalCompletion6 && _iterator6.return != null) { | ||
_iterator6.return(); | ||
} | ||
case 165: | ||
_context7.prev = 165; | ||
if (!_didIteratorError6) { | ||
_context7.next = 168; | ||
break; | ||
} | ||
throw _iteratorError6; | ||
case 168: | ||
return _context7.finish(165); | ||
case 169: | ||
return _context7.finish(162); | ||
case 170: | ||
_context7.next = 173; | ||
break; | ||
case 172: | ||
if (primary) { | ||
result.data.push(null); | ||
} | ||
case 173: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
} else if (primary) { | ||
result.data.push(null); | ||
} | ||
}, null, this, [[5, 16, 20, 28], [21,, 23, 27], [37, 55, 59, 67], [60,, 62, 66], [71, 85, 89, 97], [90,, 92, 96], [105, 116, 120, 128], [121,, 123, 127], [140, 158, 162, 170], [163,, 165, 169]]); | ||
}; | ||
@@ -271,2 +806,2 @@ | ||
exports.AsyncRecordCache = AsyncRecordCache = __decorate([_core.evented], AsyncRecordCache); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzeW5jLXJlY29yZC1jYWNoZS5qcyJdLCJuYW1lcyI6WyJfX2RlY29yYXRlIiwiYyIsImFyZ3VtZW50cyIsInIiLCJkZXNjIiwiT2JqZWN0IiwiUmVmbGVjdCIsImkiLCJkZWNvcmF0b3JzIiwiZCIsImFzc2VydCIsIk9yYml0IiwiQXN5bmNSZWNvcmRDYWNoZSIsInNldHRpbmdzIiwicmVjb3JkSW5pdGlhbGl6ZXIiLCJfc2NoZW1hIiwicHJvY2Vzc29ycyIsInByb2Nlc3NvciIsImdldFF1ZXJ5T3BlcmF0b3IiLCJnZXRQYXRjaE9wZXJhdG9yIiwiZ2V0SW52ZXJzZVBhdGNoT3BlcmF0b3IiLCJyZWNvcmQiLCJkZWVwR2V0IiwicXVlcnkiLCJidWlsZFF1ZXJ5Iiwib3BlcmF0aW9uT3JPcGVyYXRpb25zIiwicmVzdWx0IiwiaW52ZXJzZSIsImRhdGEiLCJBcnJheSIsInF1ZXJ5T3BlcmF0b3IiLCJleHByZXNzaW9uIiwicHJpbWFyeSIsIm9wZXJhdGlvbiIsIm9wIiwiaW52ZXJzZVBhdGNoT3BlcmF0b3IiLCJpbnZlcnNlT3AiLCJwcmVwYXJlZE9wcyIsInBhdGNoT3BlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFRQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWpCQSxJQUFJQSxVQUFVLEdBQUcsVUFBUSxTQUFSLFVBQUEsSUFBMkIsVUFBQSxVQUFBLEVBQUEsTUF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SBfX2RlY29yYXRlKFtldmVudGVkXSwgQXN5bmNSZWNvcmRDYWNoZSk7XG5leHBvcnQgeyBBc3luY1JlY29yZENhY2hlIH07Il19 |
@@ -53,113 +53,314 @@ "use strict"; | ||
_proto.after = async function after(operation) { | ||
switch (operation.op) { | ||
case 'replaceRelatedRecord': | ||
await this.removeInverseRelationship(operation.record, operation.relationship, (await this.accessor.getRelatedRecordAsync(operation.record, operation.relationship))); | ||
return []; | ||
_proto.after = function after(operation) { | ||
return regeneratorRuntime.async(function after$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'replaceRelatedRecord' ? 3 : _context.t0 === 'replaceRelatedRecords' ? 14 : _context.t0 === 'removeFromRelatedRecords' ? 25 : _context.t0 === 'removeRecord' ? 28 : _context.t0 === 'updateRecord' ? 31 : 34; | ||
break; | ||
case 'replaceRelatedRecords': | ||
await this.removeInverseRelationships(operation.record, operation.relationship, (await this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship))); | ||
return []; | ||
case 3: | ||
_context.t1 = regeneratorRuntime; | ||
_context.t2 = this; | ||
_context.t3 = operation.record; | ||
_context.t4 = operation.relationship; | ||
_context.next = 9; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordAsync(operation.record, operation.relationship)); | ||
case 'removeFromRelatedRecords': | ||
await this.removeInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
case 9: | ||
_context.t5 = _context.sent; | ||
_context.t6 = _context.t2.removeInverseRelationship.call(_context.t2, _context.t3, _context.t4, _context.t5); | ||
_context.next = 13; | ||
return _context.t1.awrap.call(_context.t1, _context.t6); | ||
case 'removeRecord': | ||
await this.removeAllInverseRelationships(operation.record); | ||
return []; | ||
case 13: | ||
return _context.abrupt("return", []); | ||
case 'updateRecord': | ||
await this.removeAllInverseRelationships(operation.record); | ||
return []; | ||
case 14: | ||
_context.t7 = regeneratorRuntime; | ||
_context.t8 = this; | ||
_context.t9 = operation.record; | ||
_context.t10 = operation.relationship; | ||
_context.next = 20; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship)); | ||
default: | ||
return []; | ||
} | ||
case 20: | ||
_context.t11 = _context.sent; | ||
_context.t12 = _context.t8.removeInverseRelationships.call(_context.t8, _context.t9, _context.t10, _context.t11); | ||
_context.next = 24; | ||
return _context.t7.awrap.call(_context.t7, _context.t12); | ||
case 24: | ||
return _context.abrupt("return", []); | ||
case 25: | ||
_context.next = 27; | ||
return regeneratorRuntime.awrap(this.removeInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 27: | ||
return _context.abrupt("return", []); | ||
case 28: | ||
_context.next = 30; | ||
return regeneratorRuntime.awrap(this.removeAllInverseRelationships(operation.record)); | ||
case 30: | ||
return _context.abrupt("return", []); | ||
case 31: | ||
_context.next = 33; | ||
return regeneratorRuntime.awrap(this.removeAllInverseRelationships(operation.record)); | ||
case 33: | ||
return _context.abrupt("return", []); | ||
case 34: | ||
return _context.abrupt("return", []); | ||
case 35: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.finally = async function _finally(operation) { | ||
switch (operation.op) { | ||
case 'replaceRelatedRecord': | ||
await this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
_proto.finally = function _finally(operation) { | ||
return regeneratorRuntime.async(function _finally$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.t0 = operation.op; | ||
_context2.next = _context2.t0 === 'replaceRelatedRecord' ? 3 : _context2.t0 === 'replaceRelatedRecords' ? 6 : _context2.t0 === 'addToRelatedRecords' ? 9 : _context2.t0 === 'addRecord' ? 12 : _context2.t0 === 'updateRecord' ? 15 : _context2.t0 === 'removeRecord' ? 18 : 21; | ||
break; | ||
case 'replaceRelatedRecords': | ||
await this.addInverseRelationships(operation.record, operation.relationship, operation.relatedRecords); | ||
return []; | ||
case 3: | ||
_context2.next = 5; | ||
return regeneratorRuntime.awrap(this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'addToRelatedRecords': | ||
await this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
case 5: | ||
return _context2.abrupt("return", []); | ||
case 'addRecord': | ||
await this.addAllInverseRelationships(operation.record); | ||
return []; | ||
case 6: | ||
_context2.next = 8; | ||
return regeneratorRuntime.awrap(this.addInverseRelationships(operation.record, operation.relationship, operation.relatedRecords)); | ||
case 'updateRecord': | ||
await this.addAllInverseRelationships(operation.record); | ||
return []; | ||
case 8: | ||
return _context2.abrupt("return", []); | ||
case 'removeRecord': | ||
return await this.clearInverseRelationshipOps(operation.record); | ||
case 9: | ||
_context2.next = 11; | ||
return regeneratorRuntime.awrap(this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
default: | ||
return []; | ||
} | ||
case 11: | ||
return _context2.abrupt("return", []); | ||
case 12: | ||
_context2.next = 14; | ||
return regeneratorRuntime.awrap(this.addAllInverseRelationships(operation.record)); | ||
case 14: | ||
return _context2.abrupt("return", []); | ||
case 15: | ||
_context2.next = 17; | ||
return regeneratorRuntime.awrap(this.addAllInverseRelationships(operation.record)); | ||
case 17: | ||
return _context2.abrupt("return", []); | ||
case 18: | ||
_context2.next = 20; | ||
return regeneratorRuntime.awrap(this.clearInverseRelationshipOps(operation.record)); | ||
case 20: | ||
return _context2.abrupt("return", _context2.sent); | ||
case 21: | ||
return _context2.abrupt("return", []); | ||
case 22: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addInverseRelationship = async function addInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship = (0, _cacheIntegrityUtils.getInverseRelationship)(this.accessor.schema, record, relationship, relatedRecord); | ||
_proto.addInverseRelationship = function addInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship; | ||
return regeneratorRuntime.async(function addInverseRelationship$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
inverseRelationship = (0, _cacheIntegrityUtils.getInverseRelationship)(this.accessor.schema, record, relationship, relatedRecord); | ||
if (inverseRelationship) { | ||
await this.accessor.addInverseRelationshipsAsync([inverseRelationship]); | ||
} | ||
if (!inverseRelationship) { | ||
_context3.next = 4; | ||
break; | ||
} | ||
_context3.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync([inverseRelationship])); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addInverseRelationships = async function addInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships = (0, _cacheIntegrityUtils.getInverseRelationships)(this.accessor.schema, record, relationship, relatedRecords); | ||
_proto.addInverseRelationships = function addInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function addInverseRelationships$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
inverseRelationships = (0, _cacheIntegrityUtils.getInverseRelationships)(this.accessor.schema, record, relationship, relatedRecords); | ||
if (inverseRelationships) { | ||
await this.accessor.addInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!inverseRelationships) { | ||
_context4.next = 4; | ||
break; | ||
} | ||
_context4.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addAllInverseRelationships = async function addAllInverseRelationships(record) { | ||
var inverseRelationships = (0, _cacheIntegrityUtils.getAllInverseRelationships)(this.accessor.schema, record); | ||
_proto.addAllInverseRelationships = function addAllInverseRelationships(record) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function addAllInverseRelationships$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
inverseRelationships = (0, _cacheIntegrityUtils.getAllInverseRelationships)(this.accessor.schema, record); | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.addInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!(inverseRelationships.length > 0)) { | ||
_context5.next = 4; | ||
break; | ||
} | ||
_context5.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeInverseRelationship = async function removeInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship = (0, _cacheIntegrityUtils.getInverseRelationship)(this.accessor.schema, record, relationship, relatedRecord); | ||
_proto.removeInverseRelationship = function removeInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship; | ||
return regeneratorRuntime.async(function removeInverseRelationship$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
inverseRelationship = (0, _cacheIntegrityUtils.getInverseRelationship)(this.accessor.schema, record, relationship, relatedRecord); | ||
if (inverseRelationship) { | ||
await this.accessor.removeInverseRelationshipsAsync([inverseRelationship]); | ||
} | ||
if (!inverseRelationship) { | ||
_context6.next = 4; | ||
break; | ||
} | ||
_context6.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync([inverseRelationship])); | ||
case 4: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeInverseRelationships = async function removeInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships = (0, _cacheIntegrityUtils.getInverseRelationships)(this.accessor.schema, record, relationship, relatedRecords); | ||
_proto.removeInverseRelationships = function removeInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function removeInverseRelationships$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
inverseRelationships = (0, _cacheIntegrityUtils.getInverseRelationships)(this.accessor.schema, record, relationship, relatedRecords); | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.removeInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!(inverseRelationships.length > 0)) { | ||
_context7.next = 4; | ||
break; | ||
} | ||
_context7.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeAllInverseRelationships = async function removeAllInverseRelationships(record) { | ||
var currentRecord = await this.accessor.getRecordAsync(record); | ||
_proto.removeAllInverseRelationships = function removeAllInverseRelationships(record) { | ||
var currentRecord, inverseRelationships; | ||
return regeneratorRuntime.async(function removeAllInverseRelationships$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
_context8.next = 2; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(record)); | ||
if (currentRecord) { | ||
var inverseRelationships = (0, _cacheIntegrityUtils.getAllInverseRelationships)(this.accessor.schema, currentRecord); | ||
case 2: | ||
currentRecord = _context8.sent; | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.removeInverseRelationshipsAsync(inverseRelationships); | ||
if (!currentRecord) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
inverseRelationships = (0, _cacheIntegrityUtils.getAllInverseRelationships)(this.accessor.schema, currentRecord); | ||
if (!(inverseRelationships.length > 0)) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
_context8.next = 8; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync(inverseRelationships)); | ||
case 8: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.clearInverseRelationshipOps = async function clearInverseRelationshipOps(record) { | ||
return (0, _cacheIntegrityUtils.getInverseRelationshipRemovalOps)(this.accessor.schema, (await this.accessor.getInverseRelationshipsAsync(record))); | ||
_proto.clearInverseRelationshipOps = function clearInverseRelationshipOps(record) { | ||
return regeneratorRuntime.async(function clearInverseRelationshipOps$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
_context9.t0 = _cacheIntegrityUtils.getInverseRelationshipRemovalOps; | ||
_context9.t1 = this.accessor.schema; | ||
_context9.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.getInverseRelationshipsAsync(record)); | ||
case 4: | ||
_context9.t2 = _context9.sent; | ||
return _context9.abrupt("return", (0, _context9.t0)(_context9.t1, _context9.t2)); | ||
case 6: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -171,2 +372,2 @@ | ||
exports.default = AsyncCacheIntegrityProcessor; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL2FzeW5jLWNhY2hlLWludGVncml0eS1wcm9jZXNzb3IuanMiXSwibmFtZXMiOlsiQXN5bmNDYWNoZUludGVncml0eVByb2Nlc3NvciIsIkFzeW5jT3BlcmF0aW9uUHJvY2Vzc29yIiwiYWZ0ZXIiLCJvcGVyYXRpb24iLCJmaW5hbGx5IiwiYWRkSW52ZXJzZVJlbGF0aW9uc2hpcCIsImludmVyc2VSZWxhdGlvbnNoaXAiLCJnZXRJbnZlcnNlUmVsYXRpb25zaGlwIiwiYWRkSW52ZXJzZVJlbGF0aW9uc2hpcHMiLCJpbnZlcnNlUmVsYXRpb25zaGlwcyIsImdldEludmVyc2VSZWxhdGlvbnNoaXBzIiwiYWRkQWxsSW52ZXJzZVJlbGF0aW9uc2hpcHMiLCJnZXRBbGxJbnZlcnNlUmVsYXRpb25zaGlwcyIsInJlbW92ZUludmVyc2VSZWxhdGlvbnNoaXAiLCJyZW1vdmVJbnZlcnNlUmVsYXRpb25zaGlwcyIsInJ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function after(operation) { | ||
switch (operation.op) { | ||
case 'addRecord': | ||
return (0, _schemaConsistencyUtils.recordAdded)(this.accessor.schema, operation.record); | ||
_proto.after = function after(operation) { | ||
return regeneratorRuntime.async(function after$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'addRecord' ? 3 : _context.t0 === 'addToRelatedRecords' ? 4 : _context.t0 === 'replaceRelatedRecord' ? 5 : _context.t0 === 'replaceRelatedRecords' ? 14 : _context.t0 === 'removeFromRelatedRecords' ? 23 : _context.t0 === 'removeRecord' ? 32 : _context.t0 === 'updateRecord' ? 38 : 45; | ||
break; | ||
case 'addToRelatedRecords': | ||
return (0, _schemaConsistencyUtils.relatedRecordAdded)(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord); | ||
case 3: | ||
return _context.abrupt("return", (0, _schemaConsistencyUtils.recordAdded)(this.accessor.schema, operation.record)); | ||
case 'replaceRelatedRecord': | ||
return (0, _schemaConsistencyUtils.relatedRecordReplaced)(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord, (await this.accessor.getRelatedRecordAsync(operation.record, operation.relationship))); | ||
case 4: | ||
return _context.abrupt("return", (0, _schemaConsistencyUtils.relatedRecordAdded)(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecords': | ||
return (0, _schemaConsistencyUtils.relatedRecordsReplaced)(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecords, (await this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship))); | ||
case 5: | ||
_context.t1 = _schemaConsistencyUtils.relatedRecordReplaced; | ||
_context.t2 = this.accessor.schema; | ||
_context.t3 = operation.record; | ||
_context.t4 = operation.relationship; | ||
_context.t5 = operation.relatedRecord; | ||
_context.next = 12; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordAsync(operation.record, operation.relationship)); | ||
case 'removeFromRelatedRecords': | ||
return (0, _schemaConsistencyUtils.relatedRecordRemoved)(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord, (await this.accessor.getRecordAsync(operation.relatedRecord))); | ||
case 12: | ||
_context.t6 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t1)(_context.t2, _context.t3, _context.t4, _context.t5, _context.t6)); | ||
case 'removeRecord': | ||
return (0, _schemaConsistencyUtils.recordRemoved)(this.accessor.schema, (await this.accessor.getRecordAsync(operation.record))); | ||
case 14: | ||
_context.t7 = _schemaConsistencyUtils.relatedRecordsReplaced; | ||
_context.t8 = this.accessor.schema; | ||
_context.t9 = operation.record; | ||
_context.t10 = operation.relationship; | ||
_context.t11 = operation.relatedRecords; | ||
_context.next = 21; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship)); | ||
case 'updateRecord': | ||
return (0, _schemaConsistencyUtils.recordUpdated)(this.accessor.schema, operation.record, (await this.accessor.getRecordAsync(operation.record))); | ||
case 21: | ||
_context.t12 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t7)(_context.t8, _context.t9, _context.t10, _context.t11, _context.t12)); | ||
default: | ||
return []; | ||
} | ||
case 23: | ||
_context.t13 = _schemaConsistencyUtils.relatedRecordRemoved; | ||
_context.t14 = this.accessor.schema; | ||
_context.t15 = operation.record; | ||
_context.t16 = operation.relationship; | ||
_context.t17 = operation.relatedRecord; | ||
_context.next = 30; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.relatedRecord)); | ||
case 30: | ||
_context.t18 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t13)(_context.t14, _context.t15, _context.t16, _context.t17, _context.t18)); | ||
case 32: | ||
_context.t19 = _schemaConsistencyUtils.recordRemoved; | ||
_context.t20 = this.accessor.schema; | ||
_context.next = 36; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.record)); | ||
case 36: | ||
_context.t21 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t19)(_context.t20, _context.t21)); | ||
case 38: | ||
_context.t22 = _schemaConsistencyUtils.recordUpdated; | ||
_context.t23 = this.accessor.schema; | ||
_context.t24 = operation.record; | ||
_context.next = 43; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.record)); | ||
case 43: | ||
_context.t25 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t22)(_context.t23, _context.t24, _context.t25)); | ||
case 45: | ||
return _context.abrupt("return", []); | ||
case 46: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -83,2 +141,2 @@ | ||
exports.default = AsyncSchemaConsistencyProcessor; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL2FzeW5jLXNjaGVtYS1jb25zaXN0ZW5jeS1wcm9jZXNzb3IuanMiXSwibmFtZXMiOlsiQXN5bmNTY2hlbWFDb25zaXN0ZW5jeVByb2Nlc3NvciIsIkFzeW5jT3BlcmF0aW9uUHJvY2Vzc29yIiwiYWZ0ZXIiLCJvcGVyYXRpb24iLCJyZWNvcmRBZGRlZCIsInJlbGF0ZWRSZWNvcmRBZGRlZCIsInJlbGF0ZWRSZWNvcmRSZXBsYWNlZCIsInJlbGF0ZWRSZWNvcmRzUmVwbGFjZWQiLCJyZWxhdGVkUmVjb3JkUmVtb3ZlZCIsInJlY29yZFJlbW92ZWQiLCJyZWNvcmRVcGRhdGVkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0FBQ0E7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBOzs7OztJQU1xQkEsK0I7Ozs7Ozs7Ozs7O1NBQ2JFLEssR0FBTixlQUFBLEtBQUEsQ0FBQSxTQUFBLEVBQXVCO0FBQ3JCLFlBQVFDLFNBQVMsQ0FBakIsRUFBQTtBQUNFLFdBQUEsV0FBQTtBQUNFLGVBQU9DLHlDQUFZLEtBQUEsUUFB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ICByZXR1cm4gcmVsYXRlZFJlY29yZFJlbW92ZWQodGhpcy5hY2Nlc3Nvci5zY2hlbWEsIG9wZXJhdGlvbi5yZWNvcmQsIG9wZXJhdGlvbi5yZWxhdGlvbnNoaXAsIG9wZXJhdGlvbi5yZWxhdGVkUmVjb3JkLCAoYXdhaXQgdGhpcy5hY2Nlc3Nvci5nZXRSZWNvcmRBc3luYyhvcGVyYXRpb24ucmVsYXRlZFJlY29yZCkpKTtcblxuICAgICAgY2FzZSAncmVtb3ZlUmVjb3JkJzpcbiAgICAgICAgcmV0dXJuIHJlY29yZFJlbW92ZWQodGhpcy5hY2Nlc3Nvci5zY2hlbWEsIChhd2FpdCB0aGlzLmFjY2Vzc29yLmdldFJlY29yZEFzeW5jKG9wZXJhdGlvbi5yZWNvcmQpKSk7XG5cbiAgICAgIGNhc2UgJ3VwZGF0ZVJlY29yZCc6XG4gICAgICAgIHJldHVybiByZWNvcmRVcGRhdGVkKHRoaXMuYWNjZXNzb3Iuc2NoZW1hLCBvcGVyYXRpb24ucmVjb3JkLCAoYXdhaXQgdGhpcy5hY2Nlc3Nvci5nZXRSZWNvcmRBc3luYyhvcGVyYXRpb24ucmVjb3JkKSkpO1xuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZXR1cm4gW107XG4gICAgfVxuICB9XG5cbn0iXX0= |
@@ -49,34 +49,47 @@ "use strict"; | ||
_proto.validate = async function validate(operation) { | ||
switch (operation.op) { | ||
case 'addRecord': | ||
return this._recordAdded(operation.record); | ||
_proto.validate = function validate(operation) { | ||
return regeneratorRuntime.async(function validate$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'addRecord' ? 3 : _context.t0 === 'updateRecord' ? 4 : _context.t0 === 'removeRecord' ? 5 : _context.t0 === 'replaceKey' ? 6 : _context.t0 === 'replaceAttribute' ? 7 : _context.t0 === 'addToRelatedRecords' ? 8 : _context.t0 === 'removeFromRelatedRecords' ? 9 : _context.t0 === 'replaceRelatedRecords' ? 10 : _context.t0 === 'replaceRelatedRecord' ? 11 : 12; | ||
break; | ||
case 'updateRecord': | ||
return this._recordReplaced(operation.record); | ||
case 3: | ||
return _context.abrupt("return", this._recordAdded(operation.record)); | ||
case 'removeRecord': | ||
return this._recordRemoved(operation.record); | ||
case 4: | ||
return _context.abrupt("return", this._recordReplaced(operation.record)); | ||
case 'replaceKey': | ||
return this._keyReplaced(operation.record); | ||
case 5: | ||
return _context.abrupt("return", this._recordRemoved(operation.record)); | ||
case 'replaceAttribute': | ||
return this._attributeReplaced(operation.record); | ||
case 6: | ||
return _context.abrupt("return", this._keyReplaced(operation.record)); | ||
case 'addToRelatedRecords': | ||
return this._relatedRecordAdded(operation.record, operation.relationship, operation.relatedRecord); | ||
case 7: | ||
return _context.abrupt("return", this._attributeReplaced(operation.record)); | ||
case 'removeFromRelatedRecords': | ||
return this._relatedRecordRemoved(operation.record, operation.relationship, operation.relatedRecord); | ||
case 8: | ||
return _context.abrupt("return", this._relatedRecordAdded(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecords': | ||
return this._relatedRecordsReplaced(operation.record, operation.relationship, operation.relatedRecords); | ||
case 9: | ||
return _context.abrupt("return", this._relatedRecordRemoved(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecord': | ||
return this._relatedRecordReplaced(operation.record, operation.relationship, operation.relatedRecord); | ||
case 10: | ||
return _context.abrupt("return", this._relatedRecordsReplaced(operation.record, operation.relationship, operation.relatedRecords)); | ||
default: | ||
return; | ||
} | ||
case 11: | ||
return _context.abrupt("return", this._relatedRecordReplaced(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 12: | ||
return _context.abrupt("return"); | ||
case 13: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -176,2 +189,2 @@ | ||
exports.default = AsyncSchemaValidationProcessor; | ||
//# sourceMappingURL=data:application/json;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B7XG4gICAgICAgIHRocm93IG5ldyBJbmNvcnJlY3RSZWxhdGVkUmVjb3JkVHlwZShyZWxhdGVkUmVjb3JkLnR5cGUsIHJlbGF0aW9uc2hpcCwgcmVjb3JkLnR5cGUpO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAodHlwZW9mIHJlbGF0aW9uc2hpcERlZi5tb2RlbCA9PT0gJ3N0cmluZycpIHtcbiAgICAgIGlmIChyZWxhdGlvbnNoaXBEZWYubW9kZWwgIT09IHJlbGF0ZWRSZWNvcmQudHlwZSkge1xuICAgICAgICB0aHJvdyBuZXcgSW5jb3JyZWN0UmVsYXRlZFJlY29yZFR5cGUocmVsYXRlZFJlY29yZC50eXBlLCByZWxhdGlvbnNoaXAsIHJlY29yZC50eXBlKTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBfZ2V0TW9kZWxTY2hlbWEodHlwZSkge1xuICAgIHJldHVybiB0aGlzLmFjY2Vzc29yLnNjaGVtYS5nZXRNb2RlbCh0eXBlKTtcbiAgfVxuXG59Il19 |
@@ -57,8 +57,28 @@ "use strict"; | ||
if (Array.isArray(relationshipData)) { | ||
for (var relatedRecord of relationshipData) { | ||
inverseRelationships.push({ | ||
record: recordIdentity, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
for (var _iterator = relationshipData[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var relatedRecord = _step.value; | ||
inverseRelationships.push({ | ||
record: recordIdentity, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
@@ -78,21 +98,40 @@ } else if (relationshipData) { | ||
var ops = []; | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
for (var inverseRelationship of inverseRelationships) { | ||
var relationshipDef = schema.getRelationship(inverseRelationship.record.type, inverseRelationship.relationship); | ||
try { | ||
for (var _iterator2 = inverseRelationships[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var inverseRelationship = _step2.value; | ||
var relationshipDef = schema.getRelationship(inverseRelationship.record.type, inverseRelationship.relationship); | ||
if (relationshipDef.type === 'hasMany') { | ||
ops.push({ | ||
op: 'removeFromRelatedRecords', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: inverseRelationship.relatedRecord | ||
}); | ||
} else { | ||
ops.push({ | ||
op: 'replaceRelatedRecord', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: null | ||
}); | ||
if (relationshipDef.type === 'hasMany') { | ||
ops.push({ | ||
op: 'removeFromRelatedRecords', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: inverseRelationship.relatedRecord | ||
}); | ||
} else { | ||
ops.push({ | ||
op: 'replaceRelatedRecord', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: null | ||
}); | ||
} | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) { | ||
_iterator2.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
} | ||
@@ -102,2 +141,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJ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JlbGF0aW9uc2hpcCxcbiAgICAgICAgcmVsYXRlZFJlY29yZDogbnVsbFxuICAgICAgfSk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIG9wcztcbn0iXX0= |
@@ -13,231 +13,416 @@ "use strict"; | ||
var AsyncInversePatchOperators = { | ||
addRecord: async function (cache, op) { | ||
var _op$record = op.record, | ||
type = _op$record.type, | ||
id = _op$record.id; | ||
var current = await cache.getRecordAsync(op.record); | ||
addRecord: function _callee(cache, op) { | ||
var _op$record, type, id, current; | ||
if (current) { | ||
if ((0, _utils.eq)(current, op.record)) { | ||
return; | ||
} else { | ||
return { | ||
op: 'updateRecord', | ||
record: current | ||
}; | ||
} | ||
} else { | ||
return { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_op$record = op.record, type = _op$record.type, id = _op$record.id; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
}, | ||
updateRecord: async function (cache, op) { | ||
var current = await cache.getRecordAsync(op.record); | ||
var replacement = op.record; | ||
var type = replacement.type, | ||
id = replacement.id; | ||
case 3: | ||
current = _context.sent; | ||
if (current) { | ||
var result = { | ||
type: type, | ||
id: id | ||
}; | ||
var changed = false; | ||
['attributes', 'keys'].forEach(function (grouping) { | ||
if (replacement[grouping]) { | ||
Object.keys(replacement[grouping]).forEach(function (field) { | ||
var value = replacement[grouping][field]; | ||
var currentValue = (0, _utils.deepGet)(current, [grouping, field]); | ||
if (!current) { | ||
_context.next = 12; | ||
break; | ||
} | ||
if (!(0, _utils.eq)(value, currentValue)) { | ||
changed = true; | ||
(0, _utils.deepSet)(result, [grouping, field], currentValue === undefined ? null : currentValue); | ||
if (!(0, _utils.eq)(current, op.record)) { | ||
_context.next = 9; | ||
break; | ||
} | ||
}); | ||
return _context.abrupt("return"); | ||
case 9: | ||
return _context.abrupt("return", { | ||
op: 'updateRecord', | ||
record: current | ||
}); | ||
case 10: | ||
_context.next = 13; | ||
break; | ||
case 12: | ||
return _context.abrupt("return", { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}); | ||
case 13: | ||
return _context.abrupt("return"); | ||
case 14: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}); | ||
} | ||
}); | ||
}, | ||
updateRecord: function _callee2(cache, op) { | ||
var current, replacement, type, id, result, changed; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (replacement.relationships) { | ||
Object.keys(replacement.relationships).forEach(function (field) { | ||
var data = (0, _utils.deepGet)(replacement, ['relationships', field, 'data']); | ||
case 2: | ||
current = _context2.sent; | ||
replacement = op.record; | ||
type = replacement.type, id = replacement.id; | ||
if (data !== undefined) { | ||
var currentData = (0, _utils.deepGet)(current, ['relationships', field, 'data']); | ||
var relationshipChanged; | ||
if (!current) { | ||
_context2.next = 14; | ||
break; | ||
} | ||
if (Array.isArray(data)) { | ||
if (currentData) { | ||
relationshipChanged = !(0, _data.equalRecordIdentitySets)(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = []; | ||
result = { | ||
type: type, | ||
id: id | ||
}; | ||
changed = false; | ||
['attributes', 'keys'].forEach(function (grouping) { | ||
if (replacement[grouping]) { | ||
Object.keys(replacement[grouping]).forEach(function (field) { | ||
var value = replacement[grouping][field]; | ||
var currentValue = (0, _utils.deepGet)(current, [grouping, field]); | ||
if (!(0, _utils.eq)(value, currentValue)) { | ||
changed = true; | ||
(0, _utils.deepSet)(result, [grouping, field], currentValue === undefined ? null : currentValue); | ||
} | ||
}); | ||
} | ||
} else { | ||
if (currentData) { | ||
relationshipChanged = !(0, _data.equalRecordIdentities)(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = null; | ||
} | ||
}); | ||
if (replacement.relationships) { | ||
Object.keys(replacement.relationships).forEach(function (field) { | ||
var data = (0, _utils.deepGet)(replacement, ['relationships', field, 'data']); | ||
if (data !== undefined) { | ||
var currentData = (0, _utils.deepGet)(current, ['relationships', field, 'data']); | ||
var relationshipChanged; | ||
if (Array.isArray(data)) { | ||
if (currentData) { | ||
relationshipChanged = !(0, _data.equalRecordIdentitySets)(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = []; | ||
} | ||
} else { | ||
if (currentData) { | ||
relationshipChanged = !(0, _data.equalRecordIdentities)(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = null; | ||
} | ||
} | ||
if (relationshipChanged) { | ||
changed = true; | ||
(0, _utils.deepSet)(result, ['relationships', field, 'data'], currentData); | ||
} | ||
} | ||
}); | ||
} | ||
if (relationshipChanged) { | ||
changed = true; | ||
(0, _utils.deepSet)(result, ['relationships', field, 'data'], currentData); | ||
if (!changed) { | ||
_context2.next = 12; | ||
break; | ||
} | ||
} | ||
}); | ||
} | ||
if (changed) { | ||
return { | ||
op: 'updateRecord', | ||
record: result | ||
}; | ||
return _context2.abrupt("return", { | ||
op: 'updateRecord', | ||
record: result | ||
}); | ||
case 12: | ||
_context2.next = 15; | ||
break; | ||
case 14: | ||
return _context2.abrupt("return", { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}); | ||
case 15: | ||
return _context2.abrupt("return"); | ||
case 16: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
} else { | ||
return { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}; | ||
} | ||
return; | ||
}); | ||
}, | ||
removeRecord: async function (cache, op) { | ||
var current = await cache.getRecordAsync(op.record); | ||
removeRecord: function _callee3(cache, op) { | ||
var current; | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (current) { | ||
return { | ||
op: 'addRecord', | ||
record: current | ||
}; | ||
} | ||
case 2: | ||
current = _context3.sent; | ||
return; | ||
if (!current) { | ||
_context3.next = 5; | ||
break; | ||
} | ||
return _context3.abrupt("return", { | ||
op: 'addRecord', | ||
record: current | ||
}); | ||
case 5: | ||
return _context3.abrupt("return"); | ||
case 6: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceKey: async function (cache, op) { | ||
var key = op.key; | ||
var record = await cache.getRecordAsync(op.record); | ||
var current = record && (0, _utils.deepGet)(record, ['keys', key]); | ||
replaceKey: function _callee4(cache, op) { | ||
var key, record, current, _op$record2, type, id; | ||
if (!(0, _utils.eq)(current, op.value)) { | ||
var _op$record2 = op.record, | ||
type = _op$record2.type, | ||
id = _op$record2.id; | ||
return { | ||
op: 'replaceKey', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
key: key, | ||
value: current | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
key = op.key; | ||
_context4.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
case 3: | ||
record = _context4.sent; | ||
current = record && (0, _utils.deepGet)(record, ['keys', key]); | ||
if ((0, _utils.eq)(current, op.value)) { | ||
_context4.next = 8; | ||
break; | ||
} | ||
_op$record2 = op.record, type = _op$record2.type, id = _op$record2.id; | ||
return _context4.abrupt("return", { | ||
op: 'replaceKey', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
key: key, | ||
value: current | ||
}); | ||
case 8: | ||
return _context4.abrupt("return"); | ||
case 9: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceAttribute: async function (cache, op) { | ||
var attribute = op.attribute; | ||
var record = await cache.getRecordAsync(op.record); | ||
var current = record && (0, _utils.deepGet)(record, ['attributes', attribute]); | ||
replaceAttribute: function _callee5(cache, op) { | ||
var attribute, record, current, _op$record3, type, id; | ||
if (!(0, _utils.eq)(current, op.value)) { | ||
var _op$record3 = op.record, | ||
type = _op$record3.type, | ||
id = _op$record3.id; | ||
return { | ||
op: 'replaceAttribute', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
attribute: attribute, | ||
value: current | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
attribute = op.attribute; | ||
_context5.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
case 3: | ||
record = _context5.sent; | ||
current = record && (0, _utils.deepGet)(record, ['attributes', attribute]); | ||
if ((0, _utils.eq)(current, op.value)) { | ||
_context5.next = 8; | ||
break; | ||
} | ||
_op$record3 = op.record, type = _op$record3.type, id = _op$record3.id; | ||
return _context5.abrupt("return", { | ||
op: 'replaceAttribute', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
attribute: attribute, | ||
value: current | ||
}); | ||
case 8: | ||
return _context5.abrupt("return"); | ||
case 9: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
addToRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
addToRelatedRecords: function _callee6(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context6.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords === undefined || !(0, _data.recordsInclude)(currentRelatedRecords, relatedRecord)) { | ||
return { | ||
op: 'removeFromRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context6.sent; | ||
return; | ||
if (!(currentRelatedRecords === undefined || !(0, _data.recordsInclude)(currentRelatedRecords, relatedRecord))) { | ||
_context6.next = 6; | ||
break; | ||
} | ||
return _context6.abrupt("return", { | ||
op: 'removeFromRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
case 6: | ||
return _context6.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
removeFromRelatedRecords: function _callee7(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context7.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords !== undefined && (0, _data.recordsInclude)(currentRelatedRecords, relatedRecord)) { | ||
return { | ||
op: 'addToRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context7.sent; | ||
return; | ||
if (!(currentRelatedRecords !== undefined && (0, _data.recordsInclude)(currentRelatedRecords, relatedRecord))) { | ||
_context7.next = 6; | ||
break; | ||
} | ||
return _context7.abrupt("return", { | ||
op: 'addToRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
case 6: | ||
return _context7.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecords = op.relatedRecords; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
replaceRelatedRecords: function _callee8(cache, op) { | ||
var record, relationship, relatedRecords, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecords = op.relatedRecords; | ||
_context8.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords === undefined || !(0, _data.equalRecordIdentitySets)(currentRelatedRecords, relatedRecords)) { | ||
return { | ||
op: 'replaceRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecords: currentRelatedRecords || [] | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context8.sent; | ||
return; | ||
if (!(currentRelatedRecords === undefined || !(0, _data.equalRecordIdentitySets)(currentRelatedRecords, relatedRecords))) { | ||
_context8.next = 6; | ||
break; | ||
} | ||
return _context8.abrupt("return", { | ||
op: 'replaceRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecords: currentRelatedRecords || [] | ||
}); | ||
case 6: | ||
return _context8.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecord: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecord = await cache.getRelatedRecordAsync(record, relationship); | ||
replaceRelatedRecord: function _callee9(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecord; | ||
return regeneratorRuntime.async(function _callee9$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context9.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordAsync(record, relationship)); | ||
if (currentRelatedRecord === undefined || !(0, _data.equalRecordIdentities)(currentRelatedRecord, relatedRecord)) { | ||
return { | ||
op: 'replaceRelatedRecord', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: currentRelatedRecord || null | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecord = _context9.sent; | ||
return; | ||
if (!(currentRelatedRecord === undefined || !(0, _data.equalRecordIdentities)(currentRelatedRecord, relatedRecord))) { | ||
_context9.next = 6; | ||
break; | ||
} | ||
return _context9.abrupt("return", { | ||
op: 'replaceRelatedRecord', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: currentRelatedRecord || null | ||
}); | ||
case 6: | ||
return _context9.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
exports.AsyncInversePatchOperators = AsyncInversePatchOperators; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1pbnZlcnNlLXBhdGNoLW9wZXJhdG9ycy5qcyJdLCJuYW1lcyI6WyJBc3luY0ludmVyc2VQYXRjaE9wZXJhdG9ycyIsImFkZFJlY29yZCIsInR5cGUiLCJpZCIsIm9wIiwiY3VycmVudCIsImNhY2hlIiwiZXEiLCJyZWNvcmQiLCJ1cGRhdGVSZWNvcmQiLCJyZXBsYWNlbWVudCIsInJlc3VsdCIsImNoYW5nZWQiLCJPYmplY3QiLCJ2YWx1ZSIsImN1cnJlbnRWYWx1ZSIsImRlZXBHZXQiLCJkZWVwU2V0IiwiZGF0YSIsImN1cnJlbnREYXRhIiwiQXJyYXkiLCJyZWxhdGlvbnNoaXBDaGFuZ2VkIiwiZXF1YWxSZWNvcmRJZ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gIHJldHVybiB7XG4gICAgICAgICAgb3A6ICd1cGRhdGVSZWNvcmQnLFxuICAgICAgICAgIHJlY29yZDogY3VycmVudFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBvcDogJ3JlbW92ZVJlY29yZCcsXG4gICAgICAgIHJlY29yZDoge1xuICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgaWRcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG5cbiAgYXN5bmMgdXBkYXRlUmVjb3JkKGNhY2hlLCBvcCkge1xuICAgIGNvbnN0IGN1cnJlbnQgPSBhd2FpdCBjYWNoZS5nZXRSZWNvcmRBc3luYyhvcC5yZWNvcmQpO1xuICAgIGNvbnN0IHJlcGxhY2VtZW50ID0gb3AucmVjb3JkO1xuICAgIGNvbnN0IHtcbiAgICAgIHR5cGUsXG4gICAgICBpZFxuICAgIH0gPSByZXBsYWNlbWVudDtcblxuICAgIGlmIChjdXJyZW50KSB7XG4gICAgICBsZXQgcmVzdWx0ID0ge1xuICAgICAgICB0eXBlLFxuICAgICAgICBpZFxuICAgICAgfTtcbiAgICAgIGxldCBjaGFuZ2VkID0gZmFsc2U7XG4gICAgICBbJ2F0dHJpYnV0ZXMnLCAna2V5cyddLmZvckVhY2goZ3JvdXBpbmcgPT4ge1xuICAgICAgICBpZiAocmVwbGFjZW1lbnRbZ3JvdXBpbmddKSB7XG4gICAgICAgICAgT2JqZWN0LmtleXMocmVwbGFjZW1lbnRbZ3JvdXBpbmddKS5mb3JFYWNoKGZpZWxkID0+IHtcbiAgICAgICAgICAgIGxldCB2YWx1ZSA9IHJlcGxhY2VtZW50W2dyb3VwaW5nXVtmaWVsZF07XG4gICAgICAgICAgICBsZXQgY3VycmVudFZhbHVlID0gZGVlcEdldChjdXJyZW50LCBbZ3JvdXBpbmcsIGZpZWxkXSk7XG5cbiAgICAgICAgICAgIGlmICghZXEodmFsdWUsIGN1cnJlbnRWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgY2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgIGRlZXBTZXQocmVzdWx0LCBbZ3JvdXBpbmcsIGZpZWxkXSwgY3VycmVudFZhbHVlID09PSB1bmRlZmluZWQgPyBudWxsIDogY3VycmVudFZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGlmIChyZXBsYWNlbWVudC5yZWxhdGlvbnNoaXBzKSB7XG4gICAgICAgIE9iamVjdC5rZXlzKHJlcGxhY2VtZW50LnJlbGF0aW9uc2hpcHMpLmZvckVhY2goZmllbGQgPT4ge1xuICAgICAgICAgIGxldCBkYXRhID0gZGVlcEdldChyZXBsYWNlbWVudCwgWydyZWxhdGlvbnNoaXBzJywgZmllbGQsICdkYXRhJ10pO1xuXG4gICAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgbGV0IGN1cnJlbnREYXRhID0gZGVlcEdldChjdXJyZW50LCBbJ3JlbGF0aW9uc2hpcHMnLCBmaWVsZCwgJ2RhdGEnXSk7XG4gICAgICAgICAgICBsZXQgcmVsYXRpb25zaGlwQ2hhbmdlZDtcblxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGF0YSkpIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXR5U2V0cyhjdXJyZW50RGF0YSwgZGF0YSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY3VycmVudERhdGEgPSBbXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXRpZXMoY3VycmVudERhdGEsIGRhdGEpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcENoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRhID0gbnVsbDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocmVsYXRpb25zaGlwQ2hhbmdlZCkge1xuICAgICAgICAgICAgICBjaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgZGVlcFNldChyZXN1bHQsIFsncmVsYXRpb25zaGlwcycsIGZpZWxkLCAnZGF0YSddLCBjdXJyZW50RGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKGNoYW5nZWQpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBvcDogJ3VwZGF0ZVJlY29yZCcsXG4gICAgICAgICAgcmVjb3JkOiByZXN1bHRcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdyZW1vdmVSZWNvcmQnLFxuICAgICAgICByZWNvcmQ6IHtcbiAgICAgICAgICB0eXBlLFxuICAgICAgICAgIGlkXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuXG4gIGFzeW5jIHJlbW92ZVJlY29yZChjYWNoZSwgb3ApIHtcbiAgICBjb25zdCBjdXJyZW50ID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcblxuICAgIGlmIChjdXJyZW50KSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBvcDogJ2FkZFJlY29yZCcsXG4gICAgICAgIHJlY29yZDogY3VycmVudFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG5cbiAgYXN5bmMgcmVwbGFjZUtleShjYWNoZSwgb3ApIHtcbiAgICBjb25zdCB7XG4gICAgICBrZXlcbiAgICB9ID0gb3A7XG4gICAgY29uc3QgcmVjb3JkID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcbiAgICBjb25zdCBjdXJyZW50ID0gcmVjb3JkICYmIGRlZXBHZXQocmVjb3JkLCBbJ2tleXMnLCBrZXldKTtcblxuICAgIGlmICghZXEoY3VycmVudCwgb3AudmFsdWUpKSB7XG4gICAgICBjb25zdCB7XG4gICAgICAgIHR5cGUsXG4gICAgICAgIGlkXG4gICAgICB9ID0gb3AucmVjb3JkO1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdyZXBsYWNlS2V5JyxcbiAgICAgICAgcmVjb3JkOiB7XG4gICAgICAgICAgdHlwZSxcbiAgICAgICAgICBpZFxuICAgICAgICB9LFxuICAgICAgICBrZXksXG4gICAgICAgIHZhbHVlOiBjdXJyZW50XG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybjtcbiAgfSxcblxuICBhc3luYyByZXBsYWNlQXR0cmlidXRlKGNhY2hlLCBvcCkge1xuICAgIGNvbnN0IHtcbiAgICAgIGF0dHJpYnV0ZVxuICAgIH0gPSBvcDtcbiAgICBjb25zdCByZWNvcmQgPSBhd2FpdCBjYWNoZS5nZXRSZWNvcmRBc3luYyhvcC5yZWNvcmQpO1xuICAgIGNvbnN0IGN1cnJlbnQgPSByZWNvcmQgJiYgZGVlcEdldChyZWNvcmQsIFsnYXR0cmlidXRlcycsIGF0dHJpYnV0ZV0pO1xuXG4gICAgaWYgKCFlcShjdXJyZW50LCBvcC52YWx1ZSkpIHtcbiAg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WxkXSwgY3VycmVudFZhbHVlID09PSB1bmRlZmluZWQgPyBudWxsIDogY3VycmVudFZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGlmIChyZXBsYWNlbWVudC5yZWxhdGlvbnNoaXBzKSB7XG4gICAgICAgIE9iamVjdC5rZXlzKHJlcGxhY2VtZW50LnJlbGF0aW9uc2hpcHMpLmZvckVhY2goZmllbGQgPT4ge1xuICAgICAgICAgIGxldCBkYXRhID0gZGVlcEdldChyZXBsYWNlbWVudCwgWydyZWxhdGlvbnNoaXBzJywgZmllbGQsICdkYXRhJ10pO1xuXG4gICAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgbGV0IGN1cnJlbnREYXRhID0gZGVlcEdldChjdXJyZW50LCBbJ3JlbGF0aW9uc2hpcHMnLCBmaWVsZCwgJ2RhdGEnXSk7XG4gICAgICAgICAgICBsZXQgcmVsYXRpb25zaGlwQ2hhbmdlZDtcblxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGF0YSkpIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXR5U2V0cyhjdXJyZW50RGF0YSwgZGF0YSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY3VycmVudERhdGEgPSBbXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXRpZXMoY3VycmVudERhdGEsIGRhdGEpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcENoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRhID0gbnVsbDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocmVsYXRpb25zaGlwQ2hhbmdlZCkge1xuICAgICAgICAgICAgICBjaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgZGVlcFNldChyZXN1bHQsIFsncmVsYXRpb25zaGlwcycsIGZpZWxkLCAnZGF0YSddLCBjdXJyZW50RGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKGNoYW5nZWQpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBvcDogJ3VwZGF0ZVJlY29yZCcsXG4gICAgICAgICAgcmVjb3JkOiByZXN1bHRcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdyZW1vdmVSZWNvcmQnLFxuICAgICAgICByZWNvcmQ6IHtcbiAgICAgICAgICB0eXBlLFxuICAgICAgICAgIGlkXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuXG4gIGFzeW5jIHJlbW92ZVJlY29yZChjYWNoZSwgb3ApIHtcbiAgICBjb25zdCBjdXJyZW50ID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcblxuICAgIGlmIChjdXJyZW50KSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBvcDogJ2FkZFJlY29yZCcsXG4gICAgICAgIHJlY29yZDogY3VycmVudFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG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LFxuXG4gIGFzeW5jIHJlcGxhY2VSZWxhdGVkUmVjb3JkKGNhY2hlLCBvcCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHJlY29yZCxcbiAgICAgIHJlbGF0aW9uc2hpcCxcbiAgICAgIHJlbGF0ZWRSZWNvcmRcbiAgICB9ID0gb3A7XG4gICAgY29uc3QgY3VycmVudFJlbGF0ZWRSZWNvcmQgPSBhd2FpdCBjYWNoZS5nZXRSZWxhdGVkUmVjb3JkQXN5bmMocmVjb3JkLCByZWxhdGlvbnNoaXApO1xuXG4gICAgaWYgKGN1cnJlbnRSZWxhdGVkUmVjb3JkID09PSB1bmRlZmluZWQgfHwgIWVxdWFsUmVjb3JkSWRlbnRpdGllcyhjdXJyZW50UmVsYXRlZFJlY29yZCwgcmVsYXRlZFJlY29yZCkpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIG9wOiAncmVwbGFjZVJlbGF0ZWRSZWNvcmQnLFxuICAgICAgICByZWNvcmQsXG4gICAgICAgIHJlbGF0aW9uc2hpcCxcbiAgICAgICAgcmVsYXRlZFJlY29yZDogY3VycmVudFJlbGF0ZWRSZWNvcmQgfHwgbnVsbFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH1cblxufTsiXX0= |
@@ -13,145 +13,310 @@ "use strict"; | ||
var AsyncPatchOperators = { | ||
addRecord: async function (cache, op) { | ||
var record = op.record; | ||
await cache.setRecordAsync(record); | ||
addRecord: function _callee(cache, op) { | ||
var record; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
record = op.record; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
case 3: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
return record; | ||
return _context.abrupt("return", record); | ||
case 5: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
updateRecord: async function (cache, op) { | ||
var record = op.record; | ||
var currentRecord = await cache.getRecordAsync(record); | ||
var mergedRecord = (0, _data.mergeRecords)(currentRecord || null, record); | ||
await cache.setRecordAsync(mergedRecord); | ||
updateRecord: function _callee2(cache, op) { | ||
var record, currentRecord, mergedRecord; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
record = op.record; | ||
_context2.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(mergedRecord); | ||
} | ||
case 3: | ||
currentRecord = _context2.sent; | ||
mergedRecord = (0, _data.mergeRecords)(currentRecord || null, record); | ||
_context2.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(mergedRecord)); | ||
return mergedRecord; | ||
case 7: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(mergedRecord); | ||
} | ||
return _context2.abrupt("return", mergedRecord); | ||
case 9: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeRecord: async function (cache, op) { | ||
return await cache.removeRecordAsync(op.record); | ||
removeRecord: function _callee3(cache, op) { | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return regeneratorRuntime.awrap(cache.removeRecordAsync(op.record)); | ||
case 2: | ||
return _context3.abrupt("return", _context3.sent); | ||
case 3: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceKey: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
replaceKey: function _callee4(cache, op) { | ||
var currentRecord, record; | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
_context4.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context4.sent; | ||
(0, _utils.deepSet)(record, ['keys', op.key], op.value); | ||
await cache.setRecordAsync(record); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
(0, _utils.deepSet)(record, ['keys', op.key], op.value); | ||
_context4.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
return record; | ||
}, | ||
replaceAttribute: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
case 7: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
return _context4.abrupt("return", record); | ||
(0, _utils.deepSet)(record, ['attributes', op.attribute], op.value); | ||
await cache.setRecordAsync(record); | ||
return record; | ||
case 9: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
addToRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
replaceAttribute: function _callee5(cache, op) { | ||
var currentRecord, record; | ||
return regeneratorRuntime.async(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
_context5.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context5.sent; | ||
var relatedRecords = (0, _utils.deepGet)(record, ['relationships', relationship, 'data']) || []; | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
if (!(0, _data.recordsInclude)(relatedRecords, relatedRecord)) { | ||
relatedRecords.push(relatedRecord); | ||
(0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords); | ||
await cache.setRecordAsync(record); | ||
} | ||
(0, _utils.deepSet)(record, ['attributes', op.attribute], op.value); | ||
_context5.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
return record; | ||
case 7: | ||
return _context5.abrupt("return", record); | ||
case 8: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
addToRelatedRecords: function _callee6(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord, relatedRecords; | ||
return regeneratorRuntime.async(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
_context6.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
var relatedRecords = (0, _utils.deepGet)(record, ['relationships', relationship, 'data']); | ||
case 2: | ||
currentRecord = _context6.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
if (relatedRecords) { | ||
relatedRecords = relatedRecords.filter(function (r) { | ||
return !(0, _data.equalRecordIdentities)(r, relatedRecord); | ||
}); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
if ((0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
await cache.setRecordAsync(record); | ||
relatedRecords = (0, _utils.deepGet)(record, ['relationships', relationship, 'data']) || []; | ||
if ((0, _data.recordsInclude)(relatedRecords, relatedRecord)) { | ||
_context6.next = 11; | ||
break; | ||
} | ||
relatedRecords.push(relatedRecord); | ||
(0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords); | ||
_context6.next = 11; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 11: | ||
return _context6.abrupt("return", record); | ||
case 12: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: function _callee7(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord, relatedRecords; | ||
return regeneratorRuntime.async(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_context7.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return record; | ||
} | ||
case 2: | ||
currentRecord = _context7.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
return null; | ||
if (!currentRecord) { | ||
_context7.next = 13; | ||
break; | ||
} | ||
record = (0, _utils.clone)(currentRecord); | ||
relatedRecords = (0, _utils.deepGet)(record, ['relationships', relationship, 'data']); | ||
if (!relatedRecords) { | ||
_context7.next = 12; | ||
break; | ||
} | ||
relatedRecords = relatedRecords.filter(function (r) { | ||
return !(0, _data.equalRecordIdentities)(r, relatedRecord); | ||
}); | ||
if (!(0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
_context7.next = 12; | ||
break; | ||
} | ||
_context7.next = 12; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 12: | ||
return _context7.abrupt("return", record); | ||
case 13: | ||
return _context7.abrupt("return", null); | ||
case 14: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecords = op.relatedRecords; | ||
replaceRelatedRecords: function _callee8(cache, op) { | ||
var currentRecord, record, relationship, relatedRecords; | ||
return regeneratorRuntime.async(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
_context8.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context8.sent; | ||
relationship = op.relationship, relatedRecords = op.relatedRecords; | ||
if ((0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
await cache.setRecordAsync(record); | ||
} | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
return record; | ||
if (!(0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
_context8.next = 8; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 8: | ||
return _context8.abrupt("return", record); | ||
case 9: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecord: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
replaceRelatedRecord: function _callee9(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord; | ||
return regeneratorRuntime.async(function _callee9$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
_context9.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context9.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
if ((0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecord)) { | ||
await cache.setRecordAsync(record); | ||
} | ||
if (currentRecord) { | ||
record = (0, _utils.clone)(currentRecord); | ||
} else { | ||
record = (0, _data.cloneRecordIdentity)(op.record); | ||
} | ||
return record; | ||
if (!(0, _utils.deepSet)(record, ['relationships', relationship, 'data'], relatedRecord)) { | ||
_context9.next = 8; | ||
break; | ||
} | ||
_context9.next = 8; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 8: | ||
return _context9.abrupt("return", record); | ||
case 9: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
exports.AsyncPatchOperators = AsyncPatchOperators; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1wYXRjaC1vcGVyYXRvcnMuanMiXSwibmFtZXMiOlsiQXN5bmNQYXRjaE9wZXJhdG9ycyIsImFkZFJlY29yZCIsInJlY29yZCIsIm9wIiwiY2FjaGUiLCJ1cGRhdGVSZWNvcmQiLCJjdXJyZW50UmVjb3JkIiwibWVyZ2VkUmVjb3JkIiwibWVyZ2VSZWNvcmRzIiwicmVtb3ZlUmVjb3JkIiwicmVwbGFjZUtleSIsImNsb25lIiwiY2xvbmVSZWNvcmRJZGVudGl0eSIsImRlZXBTZXQiLCJyZXBsYWNlQXR0cmlidXRlIiwiYWRkVG9SZWxhdGVkUmVjb3JkcyIsInJlbGF0aW9uc2hpcCIsInJlbGF0ZWRSZWNvcmQiLCJyZWxhdGVkUmVjb3JkcyIsImRlZXBHZXQiLCJyZWNvcmRzSW5jbHVkZSIsInJlbW92ZUZyb21SZWxhdGVkUmVjb3JkcyIsImVxdWFsUmVjb3JkSWRlbnRpdGllcyIsInJlcGx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4gICAgICBhd2FpdCBjYWNoZS5zZXRSZWNvcmRBc3luYyhyZWNvcmQpO1xuICAgIH1cblxuICAgIHJldHVybiByZWNvcmQ7XG4gIH0sXG5cbiAgYXN5bmMgcmVwbGFjZVJlbGF0ZWRSZWNvcmQoY2FjaGUsIG9wKSB7XG4gICAgbGV0IGN1cnJlbnRSZWNvcmQgPSBhd2FpdCBjYWNoZS5nZXRSZWNvcmRBc3luYyhvcC5yZWNvcmQpO1xuICAgIGxldCByZWNvcmQ7XG4gICAgY29uc3Qge1xuICAgICAgcmVsYXRpb25zaGlwLFxuICAgICAgcmVsYXRlZFJlY29yZFxuICAgIH0gPSBvcDtcblxuICAgIGlmIChjdXJyZW50UmVjb3JkKSB7XG4gICAgICByZWNvcmQgPSBjbG9uZShjdXJyZW50UmVjb3JkKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmVjb3JkID0gY2xvbmVSZWNvcmRJZGVudGl0eShvcC5yZWNvcmQpO1xuICAgIH1cblxuICAgIGlmIChkZWVwU2V0KHJlY29yZCwgWydyZWxhdGlvbnNoaXBzJywgcmVsYXRpb25zaGlwLCAnZGF0YSddLCByZWxhdGVkUmVjb3JkKSkge1xuICAgICAgYXdhaXQgY2FjaGUuc2V0UmVjb3JkQXN5bmMocmVjb3JkKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmVjb3JkO1xuICB9XG5cbn07Il19 |
@@ -13,72 +13,180 @@ "use strict"; | ||
var AsyncQueryOperators = { | ||
findRecord: async function (cache, expression) { | ||
var record = expression.record; | ||
var currentRecord = await cache.getRecordAsync(record); | ||
findRecord: function _callee(cache, expression) { | ||
var record, currentRecord; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
record = expression.record; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (!currentRecord) { | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
} | ||
case 3: | ||
currentRecord = _context.sent; | ||
return currentRecord; | ||
if (currentRecord) { | ||
_context.next = 6; | ||
break; | ||
} | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
case 6: | ||
return _context.abrupt("return", currentRecord); | ||
case 7: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRecords: async function (cache, expression) { | ||
var results = await cache.getRecordsAsync(expression.records || expression.type); | ||
findRecords: function _callee2(cache, expression) { | ||
var results; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordsAsync(expression.records || expression.type)); | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
case 2: | ||
results = _context2.sent; | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
return results; | ||
}, | ||
findRelatedRecords: async function (cache, expression) { | ||
var record = expression.record, | ||
relationship = expression.relationship; | ||
var relatedIds = await cache.getRelatedRecordsAsync(record, relationship); | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
if (!relatedIds || relatedIds.length === 0) { | ||
if (!(await cache.getRecordAsync(record))) { | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
return _context2.abrupt("return", results); | ||
case 7: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRelatedRecords: function _callee3(cache, expression) { | ||
var record, relationship, relatedIds, results; | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
record = expression.record, relationship = expression.relationship; | ||
_context3.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
return []; | ||
} | ||
case 3: | ||
relatedIds = _context3.sent; | ||
var results = await cache.getRecordsAsync(relatedIds); | ||
if (!(!relatedIds || relatedIds.length === 0)) { | ||
_context3.next = 10; | ||
break; | ||
} | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
_context3.next = 7; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
case 7: | ||
if (_context3.sent) { | ||
_context3.next = 9; | ||
break; | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
return results; | ||
case 9: | ||
return _context3.abrupt("return", []); | ||
case 10: | ||
_context3.next = 12; | ||
return regeneratorRuntime.awrap(cache.getRecordsAsync(relatedIds)); | ||
case 12: | ||
results = _context3.sent; | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
return _context3.abrupt("return", results); | ||
case 17: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRelatedRecord: async function (cache, expression) { | ||
var record = expression.record, | ||
relationship = expression.relationship; | ||
var relatedId = await cache.getRelatedRecordAsync(record, relationship); | ||
findRelatedRecord: function _callee4(cache, expression) { | ||
var record, relationship, relatedId; | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
record = expression.record, relationship = expression.relationship; | ||
_context4.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordAsync(record, relationship)); | ||
if (relatedId) { | ||
return (await cache.getRecordAsync(relatedId)) || null; | ||
} else { | ||
if (!(await cache.getRecordAsync(record))) { | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
case 3: | ||
relatedId = _context4.sent; | ||
if (!relatedId) { | ||
_context4.next = 13; | ||
break; | ||
} | ||
_context4.next = 7; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(relatedId)); | ||
case 7: | ||
_context4.t0 = _context4.sent; | ||
if (_context4.t0) { | ||
_context4.next = 10; | ||
break; | ||
} | ||
_context4.t0 = null; | ||
case 10: | ||
return _context4.abrupt("return", _context4.t0); | ||
case 13: | ||
_context4.next = 15; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
case 15: | ||
if (_context4.sent) { | ||
_context4.next = 17; | ||
break; | ||
} | ||
throw new _data.RecordNotFoundException(record.type, record.id); | ||
case 17: | ||
return _context4.abrupt("return", null); | ||
case 18: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
return null; | ||
} | ||
}); | ||
} | ||
@@ -231,2 +339,2 @@ }; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1xdWVyeS1vcGVyYXRvcnMuanMiXSwibmFtZXMiOlsiQXN5bmNRdWVyeU9wZXJhdG9ycyIsImZpbmRSZWNvcmQiLCJyZWNvcmQiLCJleHByZXNzaW9uIiwiY3VycmVudFJlY29yZCIsImNhY2hlIiwiZmluZFJlY29yZHMiLCJyZXN1bHRzIiwiZmlsdGVyUmVjb3JkcyIsInNvcnRSZWNvcmRzIiwicGFnaW5hdGVSZWNvcmRzIiwiZmluZFJlbGF0ZWRSZWNvcmRzIiwicmVsYXRpb25zaGlwIiwicmVsYXRlZElkcyIsImZpbmRSZWxhdGVkUmVjb3JkIiwicmVsYXRlZElkIiwiaSIsImwiLCJmaWx0ZXJzIiwiYXBwbHlGaWx0ZXIiLCJmaWx0ZXIiLCJhY3R1YWwiLCJkZWVwR2V0IiwiZXhwZWN0ZWQiLCJyZWxhdGlvbiIsImEiLCJlIiwiQXJyYXkiLCJjb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5hdGlvbk9wdGlvbnMubGltaXQgIT09IHVuZGVmaW5lZCkge1xuICAgIGxldCBvZmZzZXQgPSBwYWdpbmF0aW9uT3B0aW9ucy5vZmZzZXQgPT09IHVuZGVmaW5lZCA/IDAgOiBwYWdpbmF0aW9uT3B0aW9ucy5vZmZzZXQ7XG4gICAgbGV0IGxpbWl0ID0gcGFnaW5hdGlvbk9wdGlvbnMubGltaXQ7XG4gICAgcmV0dXJuIHJlY29yZHMuc2xpY2Uob2Zmc2V0LCBvZmZzZXQgKyBsaW1pdCk7XG4gIH0gZWxzZSB7XG4gICAgdGhyb3cgbmV3IFF1ZXJ5RXhwcmVzc2lvblBhcnNlRXJyb3IoJ1BhZ2luYXRpb24gb3B0aW9ucyBub3QgcmVjb2duaXplZCBmb3IgU3RvcmUuIFBsZWFzZSBzcGVjaWZ5IGBvZmZzZXRgIGFuZCBgbGltaXRgLicsIHBhZ2luYXRpb25PcHRpb25zKTtcbiAgfVxufSJdfQ== |
@@ -65,20 +65,60 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
_proto.getRelatedRecordAsync = async function getRelatedRecordAsync(identity, relationship) { | ||
var record = await this.getRecordAsync(identity); | ||
_proto.getRelatedRecordAsync = function getRelatedRecordAsync(identity, relationship) { | ||
var record; | ||
return regeneratorRuntime.async(function getRelatedRecordAsync$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return regeneratorRuntime.awrap(this.getRecordAsync(identity)); | ||
if (record) { | ||
return deepGet(record, ['relationships', relationship, 'data']); | ||
} | ||
case 2: | ||
record = _context.sent; | ||
return undefined; | ||
if (!record) { | ||
_context.next = 5; | ||
break; | ||
} | ||
return _context.abrupt("return", deepGet(record, ['relationships', relationship, 'data'])); | ||
case 5: | ||
return _context.abrupt("return", undefined); | ||
case 6: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.getRelatedRecordsAsync = async function getRelatedRecordsAsync(identity, relationship) { | ||
var record = await this.getRecordAsync(identity); | ||
_proto.getRelatedRecordsAsync = function getRelatedRecordsAsync(identity, relationship) { | ||
var record; | ||
return regeneratorRuntime.async(function getRelatedRecordsAsync$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(this.getRecordAsync(identity)); | ||
if (record) { | ||
return deepGet(record, ['relationships', relationship, 'data']); | ||
} | ||
case 2: | ||
record = _context2.sent; | ||
return undefined; | ||
if (!record) { | ||
_context2.next = 5; | ||
break; | ||
} | ||
return _context2.abrupt("return", deepGet(record, ['relationships', relationship, 'data'])); | ||
case 5: | ||
return _context2.abrupt("return", undefined); | ||
case 6: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} | ||
@@ -90,5 +130,21 @@ /** | ||
_proto.query = async function query(queryOrExpression, options, id) { | ||
var query = buildQuery(queryOrExpression, options, id, this._queryBuilder); | ||
return await this._query(query.expression); | ||
_proto.query = function query(queryOrExpression, options, id) { | ||
var query; | ||
return regeneratorRuntime.async(function query$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
query = buildQuery(queryOrExpression, options, id, this._queryBuilder); | ||
_context3.next = 3; | ||
return regeneratorRuntime.awrap(this._query(query.expression)); | ||
case 3: | ||
return _context3.abrupt("return", _context3.sent); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} | ||
@@ -100,20 +156,43 @@ /** | ||
_proto.patch = async function patch(operationOrOperations) { | ||
if (typeof operationOrOperations === 'function') { | ||
operationOrOperations = operationOrOperations(this._transformBuilder); | ||
} | ||
_proto.patch = function patch(operationOrOperations) { | ||
var result; | ||
return regeneratorRuntime.async(function patch$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
if (typeof operationOrOperations === 'function') { | ||
operationOrOperations = operationOrOperations(this._transformBuilder); | ||
} | ||
var result = { | ||
inverse: [], | ||
data: [] | ||
}; | ||
result = { | ||
inverse: [], | ||
data: [] | ||
}; | ||
if (Array.isArray(operationOrOperations)) { | ||
await this._applyPatchOperations(operationOrOperations, result, true); | ||
} else { | ||
await this._applyPatchOperation(operationOrOperations, result, true); | ||
} | ||
if (!Array.isArray(operationOrOperations)) { | ||
_context4.next = 7; | ||
break; | ||
} | ||
result.inverse.reverse(); | ||
return result; | ||
_context4.next = 5; | ||
return regeneratorRuntime.awrap(this._applyPatchOperations(operationOrOperations, result, true)); | ||
case 5: | ||
_context4.next = 9; | ||
break; | ||
case 7: | ||
_context4.next = 9; | ||
return regeneratorRuntime.awrap(this._applyPatchOperation(operationOrOperations, result, true)); | ||
case 9: | ||
result.inverse.reverse(); | ||
return _context4.abrupt("return", result); | ||
case 11: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, null, this); | ||
} ///////////////////////////////////////////////////////////////////////////// | ||
@@ -124,80 +203,536 @@ // Protected methods | ||
_proto._query = async function _query(expression) { | ||
var queryOperator = this.getQueryOperator(expression.op); | ||
_proto._query = function _query(expression) { | ||
var queryOperator; | ||
return regeneratorRuntime.async(function _query$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
queryOperator = this.getQueryOperator(expression.op); | ||
if (!queryOperator) { | ||
throw new Error("Unable to find query operator: " + expression.op); | ||
} | ||
if (queryOperator) { | ||
_context5.next = 3; | ||
break; | ||
} | ||
return await queryOperator(this, expression); | ||
throw new Error("Unable to find query operator: " + expression.op); | ||
case 3: | ||
_context5.next = 5; | ||
return regeneratorRuntime.awrap(queryOperator(this, expression)); | ||
case 5: | ||
return _context5.abrupt("return", _context5.sent); | ||
case 6: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto._applyPatchOperations = async function _applyPatchOperations(ops, result) { | ||
var primary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
_proto._applyPatchOperations = function _applyPatchOperations(ops, result) { | ||
var primary, | ||
_iteratorNormalCompletion, | ||
_didIteratorError, | ||
_iteratorError, | ||
_iterator, | ||
_step, | ||
op, | ||
_args6 = arguments; | ||
for (var op of ops) { | ||
await this._applyPatchOperation(op, result, primary); | ||
} | ||
return regeneratorRuntime.async(function _applyPatchOperations$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
primary = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : false; | ||
_iteratorNormalCompletion = true; | ||
_didIteratorError = false; | ||
_iteratorError = undefined; | ||
_context6.prev = 4; | ||
_iterator = ops[Symbol.iterator](); | ||
case 6: | ||
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) { | ||
_context6.next = 13; | ||
break; | ||
} | ||
op = _step.value; | ||
_context6.next = 10; | ||
return regeneratorRuntime.awrap(this._applyPatchOperation(op, result, primary)); | ||
case 10: | ||
_iteratorNormalCompletion = true; | ||
_context6.next = 6; | ||
break; | ||
case 13: | ||
_context6.next = 19; | ||
break; | ||
case 15: | ||
_context6.prev = 15; | ||
_context6.t0 = _context6["catch"](4); | ||
_didIteratorError = true; | ||
_iteratorError = _context6.t0; | ||
case 19: | ||
_context6.prev = 19; | ||
_context6.prev = 20; | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
case 22: | ||
_context6.prev = 22; | ||
if (!_didIteratorError) { | ||
_context6.next = 25; | ||
break; | ||
} | ||
throw _iteratorError; | ||
case 25: | ||
return _context6.finish(22); | ||
case 26: | ||
return _context6.finish(19); | ||
case 27: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}, null, this, [[4, 15, 19, 27], [20,, 22, 26]]); | ||
}; | ||
_proto._applyPatchOperation = async function _applyPatchOperation(operation, result) { | ||
var primary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
_proto._applyPatchOperation = function _applyPatchOperation(operation, result) { | ||
var primary, | ||
_iteratorNormalCompletion2, | ||
_didIteratorError2, | ||
_iteratorError2, | ||
_iterator2, | ||
_step2, | ||
_processor4, | ||
inversePatchOperator, | ||
inverseOp, | ||
_iteratorNormalCompletion3, | ||
_didIteratorError3, | ||
_iteratorError3, | ||
_iterator3, | ||
_step3, | ||
processor, | ||
preparedOps, | ||
_iteratorNormalCompletion4, | ||
_didIteratorError4, | ||
_iteratorError4, | ||
_iterator4, | ||
_step4, | ||
_processor, | ||
patchOperator, | ||
data, | ||
_iteratorNormalCompletion5, | ||
_didIteratorError5, | ||
_iteratorError5, | ||
_iterator5, | ||
_step5, | ||
_processor2, | ||
_i, | ||
_preparedOps, | ||
ops, | ||
_iteratorNormalCompletion6, | ||
_didIteratorError6, | ||
_iteratorError6, | ||
_iterator6, | ||
_step6, | ||
_processor3, | ||
_args7 = arguments; | ||
if (operation.op === 'replaceRecord') { | ||
Orbit.deprecate('The `replaceRecord` operation has been deprecated - use `updateRecord` instead.'); | ||
operation = { | ||
op: 'updateRecord', | ||
record: operation.record | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _applyPatchOperation$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
primary = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : false; | ||
for (var processor of this._processors) { | ||
await processor.validate(operation); | ||
} | ||
if (operation.op === 'replaceRecord') { | ||
Orbit.deprecate('The `replaceRecord` operation has been deprecated - use `updateRecord` instead.'); | ||
operation = { | ||
op: 'updateRecord', | ||
record: operation.record | ||
}; | ||
} | ||
var inversePatchOperator = this.getInversePatchOperator(operation.op); | ||
var inverseOp = await inversePatchOperator(this, operation); | ||
_iteratorNormalCompletion2 = true; | ||
_didIteratorError2 = false; | ||
_iteratorError2 = undefined; | ||
_context7.prev = 5; | ||
_iterator2 = this._processors[Symbol.iterator](); | ||
if (inverseOp) { | ||
result.inverse.push(inverseOp); // Query and perform related `before` operations | ||
case 7: | ||
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) { | ||
_context7.next = 14; | ||
break; | ||
} | ||
for (var _processor of this._processors) { | ||
await this._applyPatchOperations((await _processor.before(operation)), result); | ||
} // Query related `after` operations before performing | ||
// the requested operation. These will be applied on success. | ||
_processor4 = _step2.value; | ||
_context7.next = 11; | ||
return regeneratorRuntime.awrap(_processor4.validate(operation)); | ||
case 11: | ||
_iteratorNormalCompletion2 = true; | ||
_context7.next = 7; | ||
break; | ||
var preparedOps = []; | ||
case 14: | ||
_context7.next = 20; | ||
break; | ||
for (var _processor2 of this._processors) { | ||
preparedOps.push((await _processor2.after(operation))); | ||
} // Perform the requested operation | ||
case 16: | ||
_context7.prev = 16; | ||
_context7.t0 = _context7["catch"](5); | ||
_didIteratorError2 = true; | ||
_iteratorError2 = _context7.t0; | ||
case 20: | ||
_context7.prev = 20; | ||
_context7.prev = 21; | ||
var patchOperator = this.getPatchOperator(operation.op); | ||
var data = await patchOperator(this, operation); | ||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) { | ||
_iterator2.return(); | ||
} | ||
if (primary) { | ||
result.data.push(data); | ||
} // Query and perform related `immediate` operations | ||
case 23: | ||
_context7.prev = 23; | ||
if (!_didIteratorError2) { | ||
_context7.next = 26; | ||
break; | ||
} | ||
for (var _processor3 of this._processors) { | ||
await _processor3.immediate(operation); | ||
} // Emit event | ||
throw _iteratorError2; | ||
case 26: | ||
return _context7.finish(23); | ||
this.emit('patch', operation, data); // Perform prepared operations after performing the requested operation | ||
case 27: | ||
return _context7.finish(20); | ||
for (var ops of preparedOps) { | ||
await this._applyPatchOperations(ops, result); | ||
} // Query and perform related `finally` operations | ||
case 28: | ||
inversePatchOperator = this.getInversePatchOperator(operation.op); | ||
_context7.next = 31; | ||
return regeneratorRuntime.awrap(inversePatchOperator(this, operation)); | ||
case 31: | ||
inverseOp = _context7.sent; | ||
for (var _processor4 of this._processors) { | ||
await this._applyPatchOperations((await _processor4.finally(operation)), result); | ||
if (!inverseOp) { | ||
_context7.next = 172; | ||
break; | ||
} | ||
result.inverse.push(inverseOp); // Query and perform related `before` operations | ||
_iteratorNormalCompletion3 = true; | ||
_didIteratorError3 = false; | ||
_iteratorError3 = undefined; | ||
_context7.prev = 37; | ||
_iterator3 = this._processors[Symbol.iterator](); | ||
case 39: | ||
if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { | ||
_context7.next = 53; | ||
break; | ||
} | ||
processor = _step3.value; | ||
_context7.t1 = regeneratorRuntime; | ||
_context7.t2 = this; | ||
_context7.next = 45; | ||
return regeneratorRuntime.awrap(processor.before(operation)); | ||
case 45: | ||
_context7.t3 = _context7.sent; | ||
_context7.t4 = result; | ||
_context7.t5 = _context7.t2._applyPatchOperations.call(_context7.t2, _context7.t3, _context7.t4); | ||
_context7.next = 50; | ||
return _context7.t1.awrap.call(_context7.t1, _context7.t5); | ||
case 50: | ||
_iteratorNormalCompletion3 = true; | ||
_context7.next = 39; | ||
break; | ||
case 53: | ||
_context7.next = 59; | ||
break; | ||
case 55: | ||
_context7.prev = 55; | ||
_context7.t6 = _context7["catch"](37); | ||
_didIteratorError3 = true; | ||
_iteratorError3 = _context7.t6; | ||
case 59: | ||
_context7.prev = 59; | ||
_context7.prev = 60; | ||
if (!_iteratorNormalCompletion3 && _iterator3.return != null) { | ||
_iterator3.return(); | ||
} | ||
case 62: | ||
_context7.prev = 62; | ||
if (!_didIteratorError3) { | ||
_context7.next = 65; | ||
break; | ||
} | ||
throw _iteratorError3; | ||
case 65: | ||
return _context7.finish(62); | ||
case 66: | ||
return _context7.finish(59); | ||
case 67: | ||
// Query related `after` operations before performing | ||
// the requested operation. These will be applied on success. | ||
preparedOps = []; | ||
_iteratorNormalCompletion4 = true; | ||
_didIteratorError4 = false; | ||
_iteratorError4 = undefined; | ||
_context7.prev = 71; | ||
_iterator4 = this._processors[Symbol.iterator](); | ||
case 73: | ||
if (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done) { | ||
_context7.next = 83; | ||
break; | ||
} | ||
_processor = _step4.value; | ||
_context7.t7 = preparedOps; | ||
_context7.next = 78; | ||
return regeneratorRuntime.awrap(_processor.after(operation)); | ||
case 78: | ||
_context7.t8 = _context7.sent; | ||
_context7.t7.push.call(_context7.t7, _context7.t8); | ||
case 80: | ||
_iteratorNormalCompletion4 = true; | ||
_context7.next = 73; | ||
break; | ||
case 83: | ||
_context7.next = 89; | ||
break; | ||
case 85: | ||
_context7.prev = 85; | ||
_context7.t9 = _context7["catch"](71); | ||
_didIteratorError4 = true; | ||
_iteratorError4 = _context7.t9; | ||
case 89: | ||
_context7.prev = 89; | ||
_context7.prev = 90; | ||
if (!_iteratorNormalCompletion4 && _iterator4.return != null) { | ||
_iterator4.return(); | ||
} | ||
case 92: | ||
_context7.prev = 92; | ||
if (!_didIteratorError4) { | ||
_context7.next = 95; | ||
break; | ||
} | ||
throw _iteratorError4; | ||
case 95: | ||
return _context7.finish(92); | ||
case 96: | ||
return _context7.finish(89); | ||
case 97: | ||
// Perform the requested operation | ||
patchOperator = this.getPatchOperator(operation.op); | ||
_context7.next = 100; | ||
return regeneratorRuntime.awrap(patchOperator(this, operation)); | ||
case 100: | ||
data = _context7.sent; | ||
if (primary) { | ||
result.data.push(data); | ||
} // Query and perform related `immediate` operations | ||
_iteratorNormalCompletion5 = true; | ||
_didIteratorError5 = false; | ||
_iteratorError5 = undefined; | ||
_context7.prev = 105; | ||
_iterator5 = this._processors[Symbol.iterator](); | ||
case 107: | ||
if (_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done) { | ||
_context7.next = 114; | ||
break; | ||
} | ||
_processor2 = _step5.value; | ||
_context7.next = 111; | ||
return regeneratorRuntime.awrap(_processor2.immediate(operation)); | ||
case 111: | ||
_iteratorNormalCompletion5 = true; | ||
_context7.next = 107; | ||
break; | ||
case 114: | ||
_context7.next = 120; | ||
break; | ||
case 116: | ||
_context7.prev = 116; | ||
_context7.t10 = _context7["catch"](105); | ||
_didIteratorError5 = true; | ||
_iteratorError5 = _context7.t10; | ||
case 120: | ||
_context7.prev = 120; | ||
_context7.prev = 121; | ||
if (!_iteratorNormalCompletion5 && _iterator5.return != null) { | ||
_iterator5.return(); | ||
} | ||
case 123: | ||
_context7.prev = 123; | ||
if (!_didIteratorError5) { | ||
_context7.next = 126; | ||
break; | ||
} | ||
throw _iteratorError5; | ||
case 126: | ||
return _context7.finish(123); | ||
case 127: | ||
return _context7.finish(120); | ||
case 128: | ||
// Emit event | ||
this.emit('patch', operation, data); // Perform prepared operations after performing the requested operation | ||
_i = 0, _preparedOps = preparedOps; | ||
case 130: | ||
if (!(_i < _preparedOps.length)) { | ||
_context7.next = 137; | ||
break; | ||
} | ||
ops = _preparedOps[_i]; | ||
_context7.next = 134; | ||
return regeneratorRuntime.awrap(this._applyPatchOperations(ops, result)); | ||
case 134: | ||
_i++; | ||
_context7.next = 130; | ||
break; | ||
case 137: | ||
// Query and perform related `finally` operations | ||
_iteratorNormalCompletion6 = true; | ||
_didIteratorError6 = false; | ||
_iteratorError6 = undefined; | ||
_context7.prev = 140; | ||
_iterator6 = this._processors[Symbol.iterator](); | ||
case 142: | ||
if (_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done) { | ||
_context7.next = 156; | ||
break; | ||
} | ||
_processor3 = _step6.value; | ||
_context7.t11 = regeneratorRuntime; | ||
_context7.t12 = this; | ||
_context7.next = 148; | ||
return regeneratorRuntime.awrap(_processor3.finally(operation)); | ||
case 148: | ||
_context7.t13 = _context7.sent; | ||
_context7.t14 = result; | ||
_context7.t15 = _context7.t12._applyPatchOperations.call(_context7.t12, _context7.t13, _context7.t14); | ||
_context7.next = 153; | ||
return _context7.t11.awrap.call(_context7.t11, _context7.t15); | ||
case 153: | ||
_iteratorNormalCompletion6 = true; | ||
_context7.next = 142; | ||
break; | ||
case 156: | ||
_context7.next = 162; | ||
break; | ||
case 158: | ||
_context7.prev = 158; | ||
_context7.t16 = _context7["catch"](140); | ||
_didIteratorError6 = true; | ||
_iteratorError6 = _context7.t16; | ||
case 162: | ||
_context7.prev = 162; | ||
_context7.prev = 163; | ||
if (!_iteratorNormalCompletion6 && _iterator6.return != null) { | ||
_iterator6.return(); | ||
} | ||
case 165: | ||
_context7.prev = 165; | ||
if (!_didIteratorError6) { | ||
_context7.next = 168; | ||
break; | ||
} | ||
throw _iteratorError6; | ||
case 168: | ||
return _context7.finish(165); | ||
case 169: | ||
return _context7.finish(162); | ||
case 170: | ||
_context7.next = 173; | ||
break; | ||
case 172: | ||
if (primary) { | ||
result.data.push(null); | ||
} | ||
case 173: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
} else if (primary) { | ||
result.data.push(null); | ||
} | ||
}, null, this, [[5, 16, 20, 28], [21,, 23, 27], [37, 55, 59, 67], [60,, 62, 66], [71, 85, 89, 97], [90,, 92, 96], [105, 116, 120, 128], [121,, 123, 127], [140, 158, 162, 170], [163,, 165, 169]]); | ||
}; | ||
@@ -237,2 +772,2 @@ | ||
export { AsyncRecordCache }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzeW5jLXJlY29yZC1jYWNoZS5qcyJdLCJuYW1lcyI6WyJfX2RlY29yYXRlIiwiZGVjb3JhdG9ycyIsInRhcmdldCIsImtleSIsImRlc2MiLCJjIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwiciIsIk9iamVjdCIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsImQiLCJSZWZsZWN0IiwiZGVjb3JhdGUiLCJpIiwiZGVmaW5lUHJvcGVydHkiLCJPcmJpdCIsImV2ZW50ZWQiLCJkZWVwR2V0IiwiUXVlcnlCdWlsZGVyIiwiYnVpbGRRdWVyeSIsIlRyYW5zZm9ybUJ1aWxkZXIiLCJBc3luY09wZXJhdGlvblByb2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ChsZXQgcHJvY2Vzc29yIG9mIHRoaXMuX3Byb2Nlc3NvcnMpIHtcbiAgICAgICAgYXdhaXQgcHJvY2Vzc29yLmltbWVkaWF0ZShvcGVyYXRpb24pO1xuICAgICAgfSAvLyBFbWl0IGV2ZW50XG5cblxuICAgICAgdGhpcy5lbWl0KCdwYXRjaCcsIG9wZXJhdGlvbiwgZGF0YSk7IC8vIFBlcmZvcm0gcHJlcGFyZWQgb3BlcmF0aW9ucyBhZnRlciBwZXJmb3JtaW5nIHRoZSByZXF1ZXN0ZWQgb3BlcmF0aW9uXG5cbiAgICAgIGZvciAobGV0IG9wcyBvZiBwcmVwYXJlZE9wcykge1xuICAgICAgICBhd2FpdCB0aGlzLl9hcHBseVBhdGNoT3BlcmF0aW9ucyhvcHMsIHJlc3VsdCk7XG4gICAgICB9IC8vIFF1ZXJ5IGFuZCBwZXJmb3JtIHJlbGF0ZWQgYGZpbmFsbHlgIG9wZXJhdGlvbnNcblxuXG4gICAgICBmb3IgKGxldCBwcm9jZXNzb3Igb2YgdGhpcy5fcHJvY2Vzc29ycykge1xuICAgICAgICBhd2FpdCB0aGlzLl9hcHBseVBhdGNoT3BlcmF0aW9ucygoYXdhaXQgcHJvY2Vzc29yLmZpbmFsbHkob3BlcmF0aW9uKSksIHJlc3VsdCk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChwcmltYXJ5KSB7XG4gICAgICByZXN1bHQuZGF0YS5wdXNoKG51bGwpO1xuICAgIH1cbiAgfVxuXG59O1xuQXN5bmNSZWNvcmRDYWNoZSA9IF9fZGVjb3JhdGUoW2V2ZW50ZWRdLCBBc3luY1JlY29yZENhY2hlKTtcbmV4cG9ydCB7IEFzeW5jUmVjb3JkQ2FjaGUgfTsiXX0= |
@@ -27,113 +27,314 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
_proto.after = async function after(operation) { | ||
switch (operation.op) { | ||
case 'replaceRelatedRecord': | ||
await this.removeInverseRelationship(operation.record, operation.relationship, (await this.accessor.getRelatedRecordAsync(operation.record, operation.relationship))); | ||
return []; | ||
_proto.after = function after(operation) { | ||
return regeneratorRuntime.async(function after$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'replaceRelatedRecord' ? 3 : _context.t0 === 'replaceRelatedRecords' ? 14 : _context.t0 === 'removeFromRelatedRecords' ? 25 : _context.t0 === 'removeRecord' ? 28 : _context.t0 === 'updateRecord' ? 31 : 34; | ||
break; | ||
case 'replaceRelatedRecords': | ||
await this.removeInverseRelationships(operation.record, operation.relationship, (await this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship))); | ||
return []; | ||
case 3: | ||
_context.t1 = regeneratorRuntime; | ||
_context.t2 = this; | ||
_context.t3 = operation.record; | ||
_context.t4 = operation.relationship; | ||
_context.next = 9; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordAsync(operation.record, operation.relationship)); | ||
case 'removeFromRelatedRecords': | ||
await this.removeInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
case 9: | ||
_context.t5 = _context.sent; | ||
_context.t6 = _context.t2.removeInverseRelationship.call(_context.t2, _context.t3, _context.t4, _context.t5); | ||
_context.next = 13; | ||
return _context.t1.awrap.call(_context.t1, _context.t6); | ||
case 'removeRecord': | ||
await this.removeAllInverseRelationships(operation.record); | ||
return []; | ||
case 13: | ||
return _context.abrupt("return", []); | ||
case 'updateRecord': | ||
await this.removeAllInverseRelationships(operation.record); | ||
return []; | ||
case 14: | ||
_context.t7 = regeneratorRuntime; | ||
_context.t8 = this; | ||
_context.t9 = operation.record; | ||
_context.t10 = operation.relationship; | ||
_context.next = 20; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship)); | ||
default: | ||
return []; | ||
} | ||
case 20: | ||
_context.t11 = _context.sent; | ||
_context.t12 = _context.t8.removeInverseRelationships.call(_context.t8, _context.t9, _context.t10, _context.t11); | ||
_context.next = 24; | ||
return _context.t7.awrap.call(_context.t7, _context.t12); | ||
case 24: | ||
return _context.abrupt("return", []); | ||
case 25: | ||
_context.next = 27; | ||
return regeneratorRuntime.awrap(this.removeInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 27: | ||
return _context.abrupt("return", []); | ||
case 28: | ||
_context.next = 30; | ||
return regeneratorRuntime.awrap(this.removeAllInverseRelationships(operation.record)); | ||
case 30: | ||
return _context.abrupt("return", []); | ||
case 31: | ||
_context.next = 33; | ||
return regeneratorRuntime.awrap(this.removeAllInverseRelationships(operation.record)); | ||
case 33: | ||
return _context.abrupt("return", []); | ||
case 34: | ||
return _context.abrupt("return", []); | ||
case 35: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.finally = async function _finally(operation) { | ||
switch (operation.op) { | ||
case 'replaceRelatedRecord': | ||
await this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
_proto.finally = function _finally(operation) { | ||
return regeneratorRuntime.async(function _finally$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.t0 = operation.op; | ||
_context2.next = _context2.t0 === 'replaceRelatedRecord' ? 3 : _context2.t0 === 'replaceRelatedRecords' ? 6 : _context2.t0 === 'addToRelatedRecords' ? 9 : _context2.t0 === 'addRecord' ? 12 : _context2.t0 === 'updateRecord' ? 15 : _context2.t0 === 'removeRecord' ? 18 : 21; | ||
break; | ||
case 'replaceRelatedRecords': | ||
await this.addInverseRelationships(operation.record, operation.relationship, operation.relatedRecords); | ||
return []; | ||
case 3: | ||
_context2.next = 5; | ||
return regeneratorRuntime.awrap(this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'addToRelatedRecords': | ||
await this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord); | ||
return []; | ||
case 5: | ||
return _context2.abrupt("return", []); | ||
case 'addRecord': | ||
await this.addAllInverseRelationships(operation.record); | ||
return []; | ||
case 6: | ||
_context2.next = 8; | ||
return regeneratorRuntime.awrap(this.addInverseRelationships(operation.record, operation.relationship, operation.relatedRecords)); | ||
case 'updateRecord': | ||
await this.addAllInverseRelationships(operation.record); | ||
return []; | ||
case 8: | ||
return _context2.abrupt("return", []); | ||
case 'removeRecord': | ||
return await this.clearInverseRelationshipOps(operation.record); | ||
case 9: | ||
_context2.next = 11; | ||
return regeneratorRuntime.awrap(this.addInverseRelationship(operation.record, operation.relationship, operation.relatedRecord)); | ||
default: | ||
return []; | ||
} | ||
case 11: | ||
return _context2.abrupt("return", []); | ||
case 12: | ||
_context2.next = 14; | ||
return regeneratorRuntime.awrap(this.addAllInverseRelationships(operation.record)); | ||
case 14: | ||
return _context2.abrupt("return", []); | ||
case 15: | ||
_context2.next = 17; | ||
return regeneratorRuntime.awrap(this.addAllInverseRelationships(operation.record)); | ||
case 17: | ||
return _context2.abrupt("return", []); | ||
case 18: | ||
_context2.next = 20; | ||
return regeneratorRuntime.awrap(this.clearInverseRelationshipOps(operation.record)); | ||
case 20: | ||
return _context2.abrupt("return", _context2.sent); | ||
case 21: | ||
return _context2.abrupt("return", []); | ||
case 22: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addInverseRelationship = async function addInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship = getInverseRelationship(this.accessor.schema, record, relationship, relatedRecord); | ||
_proto.addInverseRelationship = function addInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship; | ||
return regeneratorRuntime.async(function addInverseRelationship$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
inverseRelationship = getInverseRelationship(this.accessor.schema, record, relationship, relatedRecord); | ||
if (inverseRelationship) { | ||
await this.accessor.addInverseRelationshipsAsync([inverseRelationship]); | ||
} | ||
if (!inverseRelationship) { | ||
_context3.next = 4; | ||
break; | ||
} | ||
_context3.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync([inverseRelationship])); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addInverseRelationships = async function addInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships = getInverseRelationships(this.accessor.schema, record, relationship, relatedRecords); | ||
_proto.addInverseRelationships = function addInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function addInverseRelationships$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
inverseRelationships = getInverseRelationships(this.accessor.schema, record, relationship, relatedRecords); | ||
if (inverseRelationships) { | ||
await this.accessor.addInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!inverseRelationships) { | ||
_context4.next = 4; | ||
break; | ||
} | ||
_context4.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.addAllInverseRelationships = async function addAllInverseRelationships(record) { | ||
var inverseRelationships = getAllInverseRelationships(this.accessor.schema, record); | ||
_proto.addAllInverseRelationships = function addAllInverseRelationships(record) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function addAllInverseRelationships$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
inverseRelationships = getAllInverseRelationships(this.accessor.schema, record); | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.addInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!(inverseRelationships.length > 0)) { | ||
_context5.next = 4; | ||
break; | ||
} | ||
_context5.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.addInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeInverseRelationship = async function removeInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship = getInverseRelationship(this.accessor.schema, record, relationship, relatedRecord); | ||
_proto.removeInverseRelationship = function removeInverseRelationship(record, relationship, relatedRecord) { | ||
var inverseRelationship; | ||
return regeneratorRuntime.async(function removeInverseRelationship$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
inverseRelationship = getInverseRelationship(this.accessor.schema, record, relationship, relatedRecord); | ||
if (inverseRelationship) { | ||
await this.accessor.removeInverseRelationshipsAsync([inverseRelationship]); | ||
} | ||
if (!inverseRelationship) { | ||
_context6.next = 4; | ||
break; | ||
} | ||
_context6.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync([inverseRelationship])); | ||
case 4: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeInverseRelationships = async function removeInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships = getInverseRelationships(this.accessor.schema, record, relationship, relatedRecords); | ||
_proto.removeInverseRelationships = function removeInverseRelationships(record, relationship, relatedRecords) { | ||
var inverseRelationships; | ||
return regeneratorRuntime.async(function removeInverseRelationships$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
inverseRelationships = getInverseRelationships(this.accessor.schema, record, relationship, relatedRecords); | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.removeInverseRelationshipsAsync(inverseRelationships); | ||
} | ||
if (!(inverseRelationships.length > 0)) { | ||
_context7.next = 4; | ||
break; | ||
} | ||
_context7.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync(inverseRelationships)); | ||
case 4: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.removeAllInverseRelationships = async function removeAllInverseRelationships(record) { | ||
var currentRecord = await this.accessor.getRecordAsync(record); | ||
_proto.removeAllInverseRelationships = function removeAllInverseRelationships(record) { | ||
var currentRecord, inverseRelationships; | ||
return regeneratorRuntime.async(function removeAllInverseRelationships$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
_context8.next = 2; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(record)); | ||
if (currentRecord) { | ||
var inverseRelationships = getAllInverseRelationships(this.accessor.schema, currentRecord); | ||
case 2: | ||
currentRecord = _context8.sent; | ||
if (inverseRelationships.length > 0) { | ||
await this.accessor.removeInverseRelationshipsAsync(inverseRelationships); | ||
if (!currentRecord) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
inverseRelationships = getAllInverseRelationships(this.accessor.schema, currentRecord); | ||
if (!(inverseRelationships.length > 0)) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
_context8.next = 8; | ||
return regeneratorRuntime.awrap(this.accessor.removeInverseRelationshipsAsync(inverseRelationships)); | ||
case 8: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
_proto.clearInverseRelationshipOps = async function clearInverseRelationshipOps(record) { | ||
return getInverseRelationshipRemovalOps(this.accessor.schema, (await this.accessor.getInverseRelationshipsAsync(record))); | ||
_proto.clearInverseRelationshipOps = function clearInverseRelationshipOps(record) { | ||
return regeneratorRuntime.async(function clearInverseRelationshipOps$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
_context9.t0 = getInverseRelationshipRemovalOps; | ||
_context9.t1 = this.accessor.schema; | ||
_context9.next = 4; | ||
return regeneratorRuntime.awrap(this.accessor.getInverseRelationshipsAsync(record)); | ||
case 4: | ||
_context9.t2 = _context9.sent; | ||
return _context9.abrupt("return", (0, _context9.t0)(_context9.t1, _context9.t2)); | ||
case 6: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -145,2 +346,2 @@ | ||
export { AsyncCacheIntegrityProcessor as default }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL2FzeW5jLWNhY2hlLWludGVncml0eS1wcm9jZXNzb3IuanMiXSwibmFtZXMiOlsiQXN5bmNPcGVyYXRpb25Qcm9jZXNzb3IiLCJnZXRJbnZlcnNlUmVsYXRpb25zaGlwIiwiZ2V0SW52ZXJzZVJlbGF0aW9uc2hpcHMiLCJnZXRBbGxJbnZlcnNlUmVsYXRpb25zaGlwcyIsImdldEludmVyc2VSZWxhdGlvbnNoaXBSZW1vdmFsT3BzIiwiQXN5bmNDYWNoZUludGVncml0eVByb2Nlc3NvciIsImFmdGVyIiwib3BlcmF0aW9uIiwib3AiLCJyZW1vdmVJbnZlcnNlUmVsYXRpb25zaGlwIiwicmVjb3JkIiwicmVsYXRpb25zaGlwIiwiYWNjZXNzb3IiLCJnZXRSZWxhdGVkUmVjb3JkQXN5bmMiLCJyZW1vdmVJbnZlcnNlUmVsYXRpb25zaGlwcyIsImdldFJlbGF0ZWRSZWNvcmRzQXN5bmMiLCJyZWxhdGVkUmVjb3JkIiwicmVtb3ZlQWxsSW52ZXJzZVJlbGF0aW9uc2hpcHMiLCJmaW5hbGx5IiwiYWRkSW52ZXJzZVJlbGF0aW9uc2hpcCIsImFkZEludmVyc2VSZWxhdGlvbnNoaXBzIiwicmVsYXRlZFJlY29yZHMiLCJhZGRBbGxJbnZlcnNlUmVsYXRpb25zaGlwcyIsImNsZWFySW52ZXJzZVJlbGF0aW9uc2hpcE9wcyIsImludmVyc2VSZWxhdGlvbnNoaXAiLCJzY2hlbWEiLCJhZGRJbnZlcnNlUmVsYXRpb25zaGlwc0FzeW5jIiwiaW52ZXJzZVJlbGF0aW9uc2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ge1xuICAgICAgYXdhaXQgdGhpcy5hY2Nlc3Nvci5yZW1vdmVJbnZlcnNlUmVsYXRpb25zaGlwc0FzeW5jKGludmVyc2VSZWxhdGlvbnNoaXBzKTtcbiAgICB9XG4gIH1cblxuICBhc3luYyByZW1vdmVBbGxJbnZlcnNlUmVsYXRpb25zaGlwcyhyZWNvcmQpIHtcbiAgICBjb25zdCBjdXJyZW50UmVjb3JkID0gYXdhaXQgdGhpcy5hY2Nlc3Nvci5nZXRSZWNvcmRBc3luYyhyZWNvcmQpO1xuXG4gICAgaWYgKGN1cnJlbnRSZWNvcmQpIHtcbiAgICAgIGNvbnN0IGludmVyc2VSZWxhdGlvbnNoaXBzID0gZ2V0QWxsSW52ZXJzZVJlbGF0aW9uc2hpcHModGhpcy5hY2Nlc3Nvci5zY2hlbWEsIGN1cnJlbnRSZWNvcmQpO1xuXG4gICAgICBpZiAoaW52ZXJzZVJlbGF0aW9uc2hpcHMubGVuZ3RoID4gMCkge1xuICAgICAgICBhd2FpdCB0aGlzLmFjY2Vzc29yLnJlbW92ZUludmVyc2VSZWxhdGlvbnNoaXBzQXN5bmMoaW52ZXJzZVJlbGF0aW9uc2hpcHMpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIGFzeW5jIGNsZWFySW52ZXJzZVJlbGF0aW9uc2hpcE9wcyhyZWNvcmQpIHtcbiAgICByZXR1cm4gZ2V0SW52ZXJzZVJlbGF0aW9uc2hpcFJlbW92YWxPcHModGhpcy5hY2Nlc3Nvci5zY2hlbWEsIChhd2FpdCB0aGlzLmFjY2Vzc29yLmdldEludmVyc2VSZWxhdGlvbnNoaXBzQXN5bmMocmVjb3JkKSkpO1xuICB9XG5cbn0iXX0= |
@@ -24,28 +24,86 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
_proto.after = async function after(operation) { | ||
switch (operation.op) { | ||
case 'addRecord': | ||
return recordAdded(this.accessor.schema, operation.record); | ||
_proto.after = function after(operation) { | ||
return regeneratorRuntime.async(function after$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'addRecord' ? 3 : _context.t0 === 'addToRelatedRecords' ? 4 : _context.t0 === 'replaceRelatedRecord' ? 5 : _context.t0 === 'replaceRelatedRecords' ? 14 : _context.t0 === 'removeFromRelatedRecords' ? 23 : _context.t0 === 'removeRecord' ? 32 : _context.t0 === 'updateRecord' ? 38 : 45; | ||
break; | ||
case 'addToRelatedRecords': | ||
return relatedRecordAdded(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord); | ||
case 3: | ||
return _context.abrupt("return", recordAdded(this.accessor.schema, operation.record)); | ||
case 'replaceRelatedRecord': | ||
return relatedRecordReplaced(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord, (await this.accessor.getRelatedRecordAsync(operation.record, operation.relationship))); | ||
case 4: | ||
return _context.abrupt("return", relatedRecordAdded(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecords': | ||
return relatedRecordsReplaced(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecords, (await this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship))); | ||
case 5: | ||
_context.t1 = relatedRecordReplaced; | ||
_context.t2 = this.accessor.schema; | ||
_context.t3 = operation.record; | ||
_context.t4 = operation.relationship; | ||
_context.t5 = operation.relatedRecord; | ||
_context.next = 12; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordAsync(operation.record, operation.relationship)); | ||
case 'removeFromRelatedRecords': | ||
return relatedRecordRemoved(this.accessor.schema, operation.record, operation.relationship, operation.relatedRecord, (await this.accessor.getRecordAsync(operation.relatedRecord))); | ||
case 12: | ||
_context.t6 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t1)(_context.t2, _context.t3, _context.t4, _context.t5, _context.t6)); | ||
case 'removeRecord': | ||
return recordRemoved(this.accessor.schema, (await this.accessor.getRecordAsync(operation.record))); | ||
case 14: | ||
_context.t7 = relatedRecordsReplaced; | ||
_context.t8 = this.accessor.schema; | ||
_context.t9 = operation.record; | ||
_context.t10 = operation.relationship; | ||
_context.t11 = operation.relatedRecords; | ||
_context.next = 21; | ||
return regeneratorRuntime.awrap(this.accessor.getRelatedRecordsAsync(operation.record, operation.relationship)); | ||
case 'updateRecord': | ||
return recordUpdated(this.accessor.schema, operation.record, (await this.accessor.getRecordAsync(operation.record))); | ||
case 21: | ||
_context.t12 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t7)(_context.t8, _context.t9, _context.t10, _context.t11, _context.t12)); | ||
default: | ||
return []; | ||
} | ||
case 23: | ||
_context.t13 = relatedRecordRemoved; | ||
_context.t14 = this.accessor.schema; | ||
_context.t15 = operation.record; | ||
_context.t16 = operation.relationship; | ||
_context.t17 = operation.relatedRecord; | ||
_context.next = 30; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.relatedRecord)); | ||
case 30: | ||
_context.t18 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t13)(_context.t14, _context.t15, _context.t16, _context.t17, _context.t18)); | ||
case 32: | ||
_context.t19 = recordRemoved; | ||
_context.t20 = this.accessor.schema; | ||
_context.next = 36; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.record)); | ||
case 36: | ||
_context.t21 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t19)(_context.t20, _context.t21)); | ||
case 38: | ||
_context.t22 = recordUpdated; | ||
_context.t23 = this.accessor.schema; | ||
_context.t24 = operation.record; | ||
_context.next = 43; | ||
return regeneratorRuntime.awrap(this.accessor.getRecordAsync(operation.record)); | ||
case 43: | ||
_context.t25 = _context.sent; | ||
return _context.abrupt("return", (0, _context.t22)(_context.t23, _context.t24, _context.t25)); | ||
case 45: | ||
return _context.abrupt("return", []); | ||
case 46: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -57,2 +115,2 @@ | ||
export { AsyncSchemaConsistencyProcessor as default }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL2FzeW5jLXNjaGVtYS1jb25zaXN0ZW5jeS1wcm9jZXNzb3IuanMiXSwibmFtZXMiOlsiQXN5bmNPcGVyYXRpb25Qcm9jZXNzb3IiLCJyZWNvcmRBZGRlZCIsInJlbGF0ZWRSZWNvcmRBZGRlZCIsInJlbGF0ZWRSZWNvcmRSZW1vdmVkIiwicmVsYXRlZFJlY29yZFJlcGxhY2VkIiwicmVsYXRlZFJlY29yZHNSZXBsYWNlZCIsInJlY29yZFJlbW92ZWQiLCJyZWNvcmRVcGRhdGVkIiwiQXN5bmNTY2hlbWFDb25zaXN0ZW5jeVByb2Nlc3NvciIsImFmdGVyIiwib3BlcmF0aW9uIiwib3AiLCJhY2Nlc3NvciIsInNjaGVtYSIsInJlY29yZCIsInJlbGF0aW9uc2hpcCIsInJlbGF0ZWRSZWNvcmQiLCJnZXRSZWxhdGVkUmVjb3JkQXN5bmMiLCJyZWxhdGVkUmVjb3JkcyIsImdldFJlbGF0ZWRSZWNvcmRzQXN5bmMiLCJnZXRSZWNvcmRBc3luYyJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLFNBQVNBLHVCQUFULFFBQXdDLDhCQUF4QztBQUNBLFNBQVNDLFdBQVQsRUFBc0JDLGtCQUF0QixFQUEwQ0Msb0JBQTFDLEVBQWdFQyxxQkFBaEUsRUFBdUZDLHNCQUF2RixFQUErR0MsYUFBL0csRUFBOEhDLGFBQTlILFFBQW1KLGtDQUFuSjtBQUNBOzs7Ozs7SUFNcUJDLCtCOzs7Ozs7Ozs7OztTQUNiQyxLLEdBQU4scUJBQVlDLFNBQVosRUFB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ZWNvcmRSZW1vdmVkKHRoaXMuYWNjZXNzb3Iuc2NoZW1hLCAoYXdhaXQgdGhpcy5hY2Nlc3Nvci5nZXRSZWNvcmRBc3luYyhvcGVyYXRpb24ucmVjb3JkKSkpO1xuXG4gICAgICBjYXNlICd1cGRhdGVSZWNvcmQnOlxuICAgICAgICByZXR1cm4gcmVjb3JkVXBkYXRlZCh0aGlzLmFjY2Vzc29yLnNjaGVtYSwgb3BlcmF0aW9uLnJlY29yZCwgKGF3YWl0IHRoaXMuYWNjZXNzb3IuZ2V0UmVjb3JkQXN5bmMob3BlcmF0aW9uLnJlY29yZCkpKTtcblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgIH1cbiAgfVxuXG59Il19 |
@@ -23,34 +23,47 @@ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
_proto.validate = async function validate(operation) { | ||
switch (operation.op) { | ||
case 'addRecord': | ||
return this._recordAdded(operation.record); | ||
_proto.validate = function validate(operation) { | ||
return regeneratorRuntime.async(function validate$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.t0 = operation.op; | ||
_context.next = _context.t0 === 'addRecord' ? 3 : _context.t0 === 'updateRecord' ? 4 : _context.t0 === 'removeRecord' ? 5 : _context.t0 === 'replaceKey' ? 6 : _context.t0 === 'replaceAttribute' ? 7 : _context.t0 === 'addToRelatedRecords' ? 8 : _context.t0 === 'removeFromRelatedRecords' ? 9 : _context.t0 === 'replaceRelatedRecords' ? 10 : _context.t0 === 'replaceRelatedRecord' ? 11 : 12; | ||
break; | ||
case 'updateRecord': | ||
return this._recordReplaced(operation.record); | ||
case 3: | ||
return _context.abrupt("return", this._recordAdded(operation.record)); | ||
case 'removeRecord': | ||
return this._recordRemoved(operation.record); | ||
case 4: | ||
return _context.abrupt("return", this._recordReplaced(operation.record)); | ||
case 'replaceKey': | ||
return this._keyReplaced(operation.record); | ||
case 5: | ||
return _context.abrupt("return", this._recordRemoved(operation.record)); | ||
case 'replaceAttribute': | ||
return this._attributeReplaced(operation.record); | ||
case 6: | ||
return _context.abrupt("return", this._keyReplaced(operation.record)); | ||
case 'addToRelatedRecords': | ||
return this._relatedRecordAdded(operation.record, operation.relationship, operation.relatedRecord); | ||
case 7: | ||
return _context.abrupt("return", this._attributeReplaced(operation.record)); | ||
case 'removeFromRelatedRecords': | ||
return this._relatedRecordRemoved(operation.record, operation.relationship, operation.relatedRecord); | ||
case 8: | ||
return _context.abrupt("return", this._relatedRecordAdded(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecords': | ||
return this._relatedRecordsReplaced(operation.record, operation.relationship, operation.relatedRecords); | ||
case 9: | ||
return _context.abrupt("return", this._relatedRecordRemoved(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 'replaceRelatedRecord': | ||
return this._relatedRecordReplaced(operation.record, operation.relationship, operation.relatedRecord); | ||
case 10: | ||
return _context.abrupt("return", this._relatedRecordsReplaced(operation.record, operation.relationship, operation.relatedRecords)); | ||
default: | ||
return; | ||
} | ||
case 11: | ||
return _context.abrupt("return", this._relatedRecordReplaced(operation.record, operation.relationship, operation.relatedRecord)); | ||
case 12: | ||
return _context.abrupt("return"); | ||
case 13: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, this); | ||
}; | ||
@@ -150,2 +163,2 @@ | ||
export { AsyncSchemaValidationProcessor as default }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL2FzeW5jLXNjaGVtYS12YWxpZGF0aW9uLXByb2Nlc3Nvci5qcyJdLCJuYW1lcyI6WyJSZWxhdGlvbnNoaXBOb3RGb3VuZCI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mVsYXRpb25zaGlwRGVmID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHRocm93IG5ldyBSZWxhdGlvbnNoaXBOb3RGb3VuZChyZWxhdGlvbnNoaXAsIHJlY29yZC50eXBlKTtcbiAgICB9XG5cbiAgICBpZiAoQXJyYXkuaXNBcnJheShyZWxhdGlvbnNoaXBEZWYubW9kZWwpKSB7XG4gICAgICBpZiAoIXJlbGF0aW9uc2hpcERlZi5tb2RlbC5pbmNsdWRlcyhyZWxhdGVkUmVjb3JkLnR5cGUpKSB7XG4gICAgICAgIHRocm93IG5ldyBJbmNvcnJlY3RSZWxhdGVkUmVjb3JkVHlwZShyZWxhdGVkUmVjb3JkLnR5cGUsIHJlbGF0aW9uc2hpcCwgcmVjb3JkLnR5cGUpO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAodHlwZW9mIHJlbGF0aW9uc2hpcERlZi5tb2RlbCA9PT0gJ3N0cmluZycpIHtcbiAgICAgIGlmIChyZWxhdGlvbnNoaXBEZWYubW9kZWwgIT09IHJlbGF0ZWRSZWNvcmQudHlwZSkge1xuICAgICAgICB0aHJvdyBuZXcgSW5jb3JyZWN0UmVsYXRlZFJlY29yZFR5cGUocmVsYXRlZFJlY29yZC50eXBlLCByZWxhdGlvbnNoaXAsIHJlY29yZC50eXBlKTtcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICBfZ2V0TW9kZWxTY2hlbWEodHlwZSkge1xuICAgIHJldHVybiB0aGlzLmFjY2Vzc29yLnNjaGVtYS5nZXRNb2RlbCh0eXBlKTtcbiAgfVxuXG59Il19 |
@@ -43,8 +43,28 @@ import { cloneRecordIdentity } from '@orbit/data'; | ||
if (Array.isArray(relationshipData)) { | ||
for (var relatedRecord of relationshipData) { | ||
inverseRelationships.push({ | ||
record: recordIdentity, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
for (var _iterator = relationshipData[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var relatedRecord = _step.value; | ||
inverseRelationships.push({ | ||
record: recordIdentity, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
@@ -63,21 +83,40 @@ } else if (relationshipData) { | ||
var ops = []; | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
for (var inverseRelationship of inverseRelationships) { | ||
var relationshipDef = schema.getRelationship(inverseRelationship.record.type, inverseRelationship.relationship); | ||
try { | ||
for (var _iterator2 = inverseRelationships[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var inverseRelationship = _step2.value; | ||
var relationshipDef = schema.getRelationship(inverseRelationship.record.type, inverseRelationship.relationship); | ||
if (relationshipDef.type === 'hasMany') { | ||
ops.push({ | ||
op: 'removeFromRelatedRecords', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: inverseRelationship.relatedRecord | ||
}); | ||
} else { | ||
ops.push({ | ||
op: 'replaceRelatedRecord', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: null | ||
}); | ||
if (relationshipDef.type === 'hasMany') { | ||
ops.push({ | ||
op: 'removeFromRelatedRecords', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: inverseRelationship.relatedRecord | ||
}); | ||
} else { | ||
ops.push({ | ||
op: 'replaceRelatedRecord', | ||
record: inverseRelationship.record, | ||
relationship: inverseRelationship.relationship, | ||
relatedRecord: null | ||
}); | ||
} | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) { | ||
_iterator2.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
} | ||
@@ -87,2 +126,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdGlvbi1wcm9jZXNzb3JzL3V0aWxzL2NhY2hlLWludGVncml0eS11dGlscy5qcyJdLCJuYW1lcyI6WyJjbG9uZVJlY29yZElkZW50aXR5IiwiZGVlcEdldCIsImdldEludmVyc2VSZWxhdGlvbnNoaXAiLCJzY2hlbWEiLCJyZWNvcmQiLCJyZWxhdGlvbnNoaXAiLCJyZWxhdGVkUmVjb3JkIiwicmVsYXRpb25zaGlwRGVmIiwiZ2V0UmVsYXRpb25zaGlwIiwidHlwZSIsImludmVyc2UiLCJnZXRJbnZlcnNlUmVsYXRpb25zaGlwcyIsInJlbGF0ZWRSZWNvcmRzIiwibGVuZ3RoIiwicmVjb3JkSWRlbnRpdHkiLCJtYXAiLCJnZXRBbGxJbnZlcnNlUmVsYXRpb25zaGlwcyIsImludmVyc2VSZWxhdGlvbnNoaXBzIiwiZWFjaFJlbGF0aW9uc2hpcCIsInJlbGF0aW9uc2hpcERhdGEiLCJBcnJheSIsImlzQXJyYXkiLCJwdXNoIiwiZ2V0SW52ZXJzZVJlbGF0aW9uc2hpcFJlbW92YWxPcHMiLCJvcHMiLCJpbnZlcnNlUmVsYXRpb25zaGlwIiwib3AiXSwibWFwcGluZ3MiOiJBQUFBLFNBQVNBLG1CQUFULFFBQW9DLGFBQXBDO0FBQ0EsU0FBU0MsT0FBVCxRQUF3QixjQUF4QjtBQUNBLE9BQU8sU0FBU0Msc0JBQVQsQ0FBZ0N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dGlvbnNoaXAsXG4gICAgICAgIHJlbGF0ZWRSZWNvcmQ6IG51bGxcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBvcHM7XG59Il19 |
import { deepGet, deepSet, eq } from '@orbit/utils'; | ||
import { equalRecordIdentities, equalRecordIdentitySets, recordsInclude } from '@orbit/data'; | ||
export var AsyncInversePatchOperators = { | ||
addRecord: async function (cache, op) { | ||
var _op$record = op.record, | ||
type = _op$record.type, | ||
id = _op$record.id; | ||
var current = await cache.getRecordAsync(op.record); | ||
addRecord: function _callee(cache, op) { | ||
var _op$record, type, id, current; | ||
if (current) { | ||
if (eq(current, op.record)) { | ||
return; | ||
} else { | ||
return { | ||
op: 'updateRecord', | ||
record: current | ||
}; | ||
} | ||
} else { | ||
return { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_op$record = op.record, type = _op$record.type, id = _op$record.id; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
}, | ||
updateRecord: async function (cache, op) { | ||
var current = await cache.getRecordAsync(op.record); | ||
var replacement = op.record; | ||
var type = replacement.type, | ||
id = replacement.id; | ||
case 3: | ||
current = _context.sent; | ||
if (current) { | ||
var result = { | ||
type: type, | ||
id: id | ||
}; | ||
var changed = false; | ||
['attributes', 'keys'].forEach(function (grouping) { | ||
if (replacement[grouping]) { | ||
Object.keys(replacement[grouping]).forEach(function (field) { | ||
var value = replacement[grouping][field]; | ||
var currentValue = deepGet(current, [grouping, field]); | ||
if (!current) { | ||
_context.next = 12; | ||
break; | ||
} | ||
if (!eq(value, currentValue)) { | ||
changed = true; | ||
deepSet(result, [grouping, field], currentValue === undefined ? null : currentValue); | ||
if (!eq(current, op.record)) { | ||
_context.next = 9; | ||
break; | ||
} | ||
}); | ||
return _context.abrupt("return"); | ||
case 9: | ||
return _context.abrupt("return", { | ||
op: 'updateRecord', | ||
record: current | ||
}); | ||
case 10: | ||
_context.next = 13; | ||
break; | ||
case 12: | ||
return _context.abrupt("return", { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}); | ||
case 13: | ||
return _context.abrupt("return"); | ||
case 14: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}); | ||
} | ||
}); | ||
}, | ||
updateRecord: function _callee2(cache, op) { | ||
var current, replacement, type, id, result, changed; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (replacement.relationships) { | ||
Object.keys(replacement.relationships).forEach(function (field) { | ||
var data = deepGet(replacement, ['relationships', field, 'data']); | ||
case 2: | ||
current = _context2.sent; | ||
replacement = op.record; | ||
type = replacement.type, id = replacement.id; | ||
if (data !== undefined) { | ||
var currentData = deepGet(current, ['relationships', field, 'data']); | ||
var relationshipChanged; | ||
if (!current) { | ||
_context2.next = 14; | ||
break; | ||
} | ||
if (Array.isArray(data)) { | ||
if (currentData) { | ||
relationshipChanged = !equalRecordIdentitySets(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = []; | ||
result = { | ||
type: type, | ||
id: id | ||
}; | ||
changed = false; | ||
['attributes', 'keys'].forEach(function (grouping) { | ||
if (replacement[grouping]) { | ||
Object.keys(replacement[grouping]).forEach(function (field) { | ||
var value = replacement[grouping][field]; | ||
var currentValue = deepGet(current, [grouping, field]); | ||
if (!eq(value, currentValue)) { | ||
changed = true; | ||
deepSet(result, [grouping, field], currentValue === undefined ? null : currentValue); | ||
} | ||
}); | ||
} | ||
} else { | ||
if (currentData) { | ||
relationshipChanged = !equalRecordIdentities(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = null; | ||
} | ||
}); | ||
if (replacement.relationships) { | ||
Object.keys(replacement.relationships).forEach(function (field) { | ||
var data = deepGet(replacement, ['relationships', field, 'data']); | ||
if (data !== undefined) { | ||
var currentData = deepGet(current, ['relationships', field, 'data']); | ||
var relationshipChanged; | ||
if (Array.isArray(data)) { | ||
if (currentData) { | ||
relationshipChanged = !equalRecordIdentitySets(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = []; | ||
} | ||
} else { | ||
if (currentData) { | ||
relationshipChanged = !equalRecordIdentities(currentData, data); | ||
} else { | ||
relationshipChanged = true; | ||
currentData = null; | ||
} | ||
} | ||
if (relationshipChanged) { | ||
changed = true; | ||
deepSet(result, ['relationships', field, 'data'], currentData); | ||
} | ||
} | ||
}); | ||
} | ||
if (relationshipChanged) { | ||
changed = true; | ||
deepSet(result, ['relationships', field, 'data'], currentData); | ||
if (!changed) { | ||
_context2.next = 12; | ||
break; | ||
} | ||
} | ||
}); | ||
} | ||
if (changed) { | ||
return { | ||
op: 'updateRecord', | ||
record: result | ||
}; | ||
return _context2.abrupt("return", { | ||
op: 'updateRecord', | ||
record: result | ||
}); | ||
case 12: | ||
_context2.next = 15; | ||
break; | ||
case 14: | ||
return _context2.abrupt("return", { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}); | ||
case 15: | ||
return _context2.abrupt("return"); | ||
case 16: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
} else { | ||
return { | ||
op: 'removeRecord', | ||
record: { | ||
type: type, | ||
id: id | ||
} | ||
}; | ||
} | ||
return; | ||
}); | ||
}, | ||
removeRecord: async function (cache, op) { | ||
var current = await cache.getRecordAsync(op.record); | ||
removeRecord: function _callee3(cache, op) { | ||
var current; | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (current) { | ||
return { | ||
op: 'addRecord', | ||
record: current | ||
}; | ||
} | ||
case 2: | ||
current = _context3.sent; | ||
return; | ||
if (!current) { | ||
_context3.next = 5; | ||
break; | ||
} | ||
return _context3.abrupt("return", { | ||
op: 'addRecord', | ||
record: current | ||
}); | ||
case 5: | ||
return _context3.abrupt("return"); | ||
case 6: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceKey: async function (cache, op) { | ||
var key = op.key; | ||
var record = await cache.getRecordAsync(op.record); | ||
var current = record && deepGet(record, ['keys', key]); | ||
replaceKey: function _callee4(cache, op) { | ||
var key, record, current, _op$record2, type, id; | ||
if (!eq(current, op.value)) { | ||
var _op$record2 = op.record, | ||
type = _op$record2.type, | ||
id = _op$record2.id; | ||
return { | ||
op: 'replaceKey', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
key: key, | ||
value: current | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
key = op.key; | ||
_context4.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
case 3: | ||
record = _context4.sent; | ||
current = record && deepGet(record, ['keys', key]); | ||
if (eq(current, op.value)) { | ||
_context4.next = 8; | ||
break; | ||
} | ||
_op$record2 = op.record, type = _op$record2.type, id = _op$record2.id; | ||
return _context4.abrupt("return", { | ||
op: 'replaceKey', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
key: key, | ||
value: current | ||
}); | ||
case 8: | ||
return _context4.abrupt("return"); | ||
case 9: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceAttribute: async function (cache, op) { | ||
var attribute = op.attribute; | ||
var record = await cache.getRecordAsync(op.record); | ||
var current = record && deepGet(record, ['attributes', attribute]); | ||
replaceAttribute: function _callee5(cache, op) { | ||
var attribute, record, current, _op$record3, type, id; | ||
if (!eq(current, op.value)) { | ||
var _op$record3 = op.record, | ||
type = _op$record3.type, | ||
id = _op$record3.id; | ||
return { | ||
op: 'replaceAttribute', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
attribute: attribute, | ||
value: current | ||
}; | ||
} | ||
return regeneratorRuntime.async(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
attribute = op.attribute; | ||
_context5.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return; | ||
case 3: | ||
record = _context5.sent; | ||
current = record && deepGet(record, ['attributes', attribute]); | ||
if (eq(current, op.value)) { | ||
_context5.next = 8; | ||
break; | ||
} | ||
_op$record3 = op.record, type = _op$record3.type, id = _op$record3.id; | ||
return _context5.abrupt("return", { | ||
op: 'replaceAttribute', | ||
record: { | ||
type: type, | ||
id: id | ||
}, | ||
attribute: attribute, | ||
value: current | ||
}); | ||
case 8: | ||
return _context5.abrupt("return"); | ||
case 9: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
addToRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
addToRelatedRecords: function _callee6(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context6.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords === undefined || !recordsInclude(currentRelatedRecords, relatedRecord)) { | ||
return { | ||
op: 'removeFromRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context6.sent; | ||
return; | ||
if (!(currentRelatedRecords === undefined || !recordsInclude(currentRelatedRecords, relatedRecord))) { | ||
_context6.next = 6; | ||
break; | ||
} | ||
return _context6.abrupt("return", { | ||
op: 'removeFromRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
case 6: | ||
return _context6.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
removeFromRelatedRecords: function _callee7(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context7.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords !== undefined && recordsInclude(currentRelatedRecords, relatedRecord)) { | ||
return { | ||
op: 'addToRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context7.sent; | ||
return; | ||
if (!(currentRelatedRecords !== undefined && recordsInclude(currentRelatedRecords, relatedRecord))) { | ||
_context7.next = 6; | ||
break; | ||
} | ||
return _context7.abrupt("return", { | ||
op: 'addToRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: relatedRecord | ||
}); | ||
case 6: | ||
return _context7.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecords: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecords = op.relatedRecords; | ||
var currentRelatedRecords = await cache.getRelatedRecordsAsync(record, relationship); | ||
replaceRelatedRecords: function _callee8(cache, op) { | ||
var record, relationship, relatedRecords, currentRelatedRecords; | ||
return regeneratorRuntime.async(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecords = op.relatedRecords; | ||
_context8.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
if (currentRelatedRecords === undefined || !equalRecordIdentitySets(currentRelatedRecords, relatedRecords)) { | ||
return { | ||
op: 'replaceRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecords: currentRelatedRecords || [] | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecords = _context8.sent; | ||
return; | ||
if (!(currentRelatedRecords === undefined || !equalRecordIdentitySets(currentRelatedRecords, relatedRecords))) { | ||
_context8.next = 6; | ||
break; | ||
} | ||
return _context8.abrupt("return", { | ||
op: 'replaceRelatedRecords', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecords: currentRelatedRecords || [] | ||
}); | ||
case 6: | ||
return _context8.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecord: async function (cache, op) { | ||
var record = op.record, | ||
relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
var currentRelatedRecord = await cache.getRelatedRecordAsync(record, relationship); | ||
replaceRelatedRecord: function _callee9(cache, op) { | ||
var record, relationship, relatedRecord, currentRelatedRecord; | ||
return regeneratorRuntime.async(function _callee9$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
record = op.record, relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
_context9.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordAsync(record, relationship)); | ||
if (currentRelatedRecord === undefined || !equalRecordIdentities(currentRelatedRecord, relatedRecord)) { | ||
return { | ||
op: 'replaceRelatedRecord', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: currentRelatedRecord || null | ||
}; | ||
} | ||
case 3: | ||
currentRelatedRecord = _context9.sent; | ||
return; | ||
if (!(currentRelatedRecord === undefined || !equalRecordIdentities(currentRelatedRecord, relatedRecord))) { | ||
_context9.next = 6; | ||
break; | ||
} | ||
return _context9.abrupt("return", { | ||
op: 'replaceRelatedRecord', | ||
record: record, | ||
relationship: relationship, | ||
relatedRecord: currentRelatedRecord || null | ||
}); | ||
case 6: | ||
return _context9.abrupt("return"); | ||
case 7: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1pbnZlcnNlLXBhdGNoLW9wZXJhdG9ycy5qcyJdLCJuYW1lcyI6WyJkZWVwR2V0IiwiZGVlcFNldCIsImVxIiwiZXF1YWxSZWNvcmRJZGVudGl0aWVzIiwiZXF1YWxSZWNvcmRJZGVudGl0eVNldHMiLCJyZWNvcmRzSW5jbHVkZSIsIkFzeW5jSW52ZXJzZVBhdGNoT3BlcmF0b3JzIiwiYWRkUmVjb3JkIiwiY2FjaGUiLCJvcCIsInJlY29yZCIsInR5cGUiLCJpZCIsImN1cnJlbnQiLCJnZXRSZWNvcmRBc3luYyIsInVwZGF0ZVJlY29yZCIsInJlcGxhY2VtZW50IiwicmVzdWx0IiwiY2hhbmdlZCIsImZvckVhY2giLCJncm91cGluZyIsIk9iamVjdCIsImtleXMiLCJmaWVsZCIsInZhbHVlIiwiY3VycmVudFZhbHVlIiwidW5kZWZpbmVkIiwicmVsYXRpb25zaGlwcyIsImRhdGEiLCJjdXJyZW50RGF0YSIsInJlbGF0aW9uc2hpcENoYW5nZWQiLCJBcnJheSIsImlzQXJyYXkiLCJyZW1vdmVSZWNvcmQiLCJyZXBsYWNlS2V5Iiwia2V5IiwicmVwbGFjZUF0dHJpYnV0ZSIsImF0dHJp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7XG4gICAgICBpZiAoZXEoY3VycmVudCwgb3AucmVjb3JkKSkge1xuICAgICAgICByZXR1cm47XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIG9wOiAndXBkYXRlUmVjb3JkJyxcbiAgICAgICAgICByZWNvcmQ6IGN1cnJlbnRcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdyZW1vdmVSZWNvcmQnLFxuICAgICAgICByZWNvcmQ6IHtcbiAgICAgICAgICB0eXBlLFxuICAgICAgICAgIGlkXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuXG4gIGFzeW5jIHVwZGF0ZVJlY29yZChjYWNoZSwgb3ApIHtcbiAgICBjb25zdCBjdXJyZW50ID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcbiAgICBjb25zdCByZXBsYWNlbWVudCA9IG9wLnJlY29yZDtcbiAgICBjb25zdCB7XG4gICAgICB0eXBlLFxuICAgICAgaWRcbiAgICB9ID0gcmVwbGFjZW1lbnQ7XG5cbiAgICBpZiAoY3VycmVudCkge1xuICAgICAgbGV0IHJlc3VsdCA9IHtcbiAgICAgICAgdHlwZSxcbiAgICAgICAgaWRcbiAgICAgIH07XG4gICAgICBsZXQgY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgWydhdHRyaWJ1dGVzJywgJ2tleXMnXS5mb3JFYWNoKGdyb3VwaW5nID0+IHtcbiAgICAgICAgaWYgKHJlcGxhY2VtZW50W2dyb3VwaW5nXSkge1xuICAgICAgICAgIE9iamVjdC5rZXlzKHJlcGxhY2VtZW50W2dyb3VwaW5nXSkuZm9yRWFjaChmaWVsZCA9PiB7XG4gICAgICAgICAgICBsZXQgdmFsdWUgPSByZXBsYWNlbWVudFtncm91cGluZ11bZmllbGRdO1xuICAgICAgICAg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9uc2hpcENoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRhID0gW107XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGlmIChjdXJyZW50RGF0YSkge1xuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcENoYW5nZWQgPSAhZXF1YWxSZWNvcmRJZGVudGl0aWVzKGN1cnJlbnREYXRhLCBkYXRhKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBDaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0YSA9IG51bGw7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHJlbGF0aW9uc2hpcENoYW5nZWQpIHtcbiAgICAgICAgICAgICAgY2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgIGRlZXBTZXQocmVzdWx0LCBbJ3JlbGF0aW9uc2hpcHMnLCBmaWVsZCwgJ2RhdGEnXSwgY3VycmVudERhdGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChjaGFuZ2VkKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgb3A6ICd1cGRhdGVSZWNvcmQnLFxuICAgICAgICAgIHJlY29yZDogcmVzdWx0XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIG9wOiAncmVtb3ZlUmVjb3JkJyxcbiAgICAgICAgcmVjb3JkOiB7XG4gICAgICAgICAgdHlwZSxcbiAgICAgICAgICBpZFxuICAgICAgICB9XG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybjtcbiAgfSxcblxuICBhc3luYyByZW1vdmVSZWNvcmQoY2FjaGUsIG9wKSB7XG4gICAgY29uc3QgY3VycmVudCA9IGF3YWl0IGNhY2hlLmdldFJlY29yZEFzeW5jKG9wLnJlY29yZCk7XG5cbiAgICBpZiAoY3VycmVudCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdhZGRSZWNvcmQnLFxuICAgICAgICByZWNvcmQ6IGN1cnJlbnRcbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuXG4gIGFzeW5jIHJlcGxhY2VLZXkoY2FjaGUsIG9wKSB7XG4gICAgY29uc3Qge1xuICAgICAga2V5XG4gICAgfSA9IG9wO1xuICAgIGNvbnN0IHJlY29yZCA9IGF3YWl0IGNhY2hlLmdldFJlY29yZEFzeW5jKG9wLnJlY29yZCk7XG4gICAgY29uc3QgY3VycmVudCA9IHJlY29yZCAmJiBkZWVwR2V0KHJlY29yZCwgWydrZXlzJywga2V5XSk7XG5cbiAgICBpZiAoIWVxKGN1cnJlbnQsIG9wLnZhbHVlKSkge1xuICAgICAgY29uc3Qge1xuICAgICAgICB0eXBlLFxuICAgICAgICBpZFxuICAgICAgfSA9IG9wLnJlY29yZDtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIG9wOiAncmVwbGFjZUtleScsXG4gICAgICAgIHJlY29yZDoge1xuICAgICAgICAgIHR5cGUsXG4gICAgICAgICAgaWRcbiAgICAgICAgfSxcbiAgICAgICAga2V5LFxuICAgICAgICB2YWx1ZTogY3VycmVudFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG5cbiAgYXN5bmMgcmVwbGFjZUF0dHJpYnV0ZShjYWNoZSwgb3ApIHtcbiAgICBjb25zdCB7XG4gICAgICBhdHRyaWJ1dGVcbiAgICB9ID0gb3A7XG4gICAgY29uc3QgcmVjb3JkID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcbiAgICBjb25zdCBjdXJyZW50ID0gcmVjb3JkICYmIGRlZXBHZ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m4ge1xuICAgICAgICBvcDogJ3JlcGxhY2VSZWxhdGVkUmVjb3JkcycsXG4gICAgICAgIHJlY29yZCxcbiAgICAgICAgcmVsYXRpb25zaGlwLFxuICAgICAgICByZWxhdGVkUmVjb3JkczogY3VycmVudFJlbGF0ZWRSZWNvcmRzIHx8IFtdXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybjtcbiAgfSxcblxuICBhc3luYyByZXBsYWNlUmVsYXRlZFJlY29yZChjYWNoZSwgb3ApIHtcbiAgICBjb25zdCB7XG4gICAgICByZWNvcmQsXG4gICAgICByZWxhdGlvbnNoaXAsXG4gICAgICByZWxhdGVkUmVjb3JkXG4gICAgfSA9IG9wO1xuICAgIGNvbnN0IGN1cnJlbnRSZWxhdGVkUmVjb3JkID0gYXdhaXQgY2FjaGUuZ2V0UmVsYXRlZFJlY29yZEFzeW5jKHJlY29yZCwgcmVsYXRpb25zaGlwKTtcblxuICAgIGlmIChjdXJyZW50UmVsYXRlZFJlY29yZCA9PT0gdW5kZWZpbmVkIHx8ICFlcXVhbFJlY29yZElkZW50aXRpZXMoY3VycmVudFJlbGF0ZWRSZWNvcmQsIHJlbGF0ZWRSZWNvcmQpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBvcDogJ3JlcGxhY2VSZWxhdGVkUmVjb3JkJyxcbiAgICAgICAgcmVjb3JkLFxuICAgICAgICByZWxhdGlvbnNoaXAsXG4gICAgICAgIHJlbGF0ZWRSZWNvcmQ6IGN1cnJlbnRSZWxhdGVkUmVjb3JkIHx8IG51bGxcbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9XG5cbn07Il19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1pbnZlcnNlLXBhdGNoLW9wZXJhdG9ycy5qcyJdLCJuYW1lcyI6WyJkZWVwR2V0IiwiZGVlcFNldCIsImVxIiwi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ogY3VycmVudFZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIGlmIChyZXBsYWNlbWVudC5yZWxhdGlvbnNoaXBzKSB7XG4gICAgICAgIE9iamVjdC5rZXlzKHJlcGxhY2VtZW50LnJlbGF0aW9uc2hpcHMpLmZvckVhY2goZmllbGQgPT4ge1xuICAgICAgICAgIGxldCBkYXRhID0gZGVlcEdldChyZXBsYWNlbWVudCwgWydyZWxhdGlvbnNoaXBzJywgZmllbGQsICdkYXRhJ10pO1xuXG4gICAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgbGV0IGN1cnJlbnREYXRhID0gZGVlcEdldChjdXJyZW50LCBbJ3JlbGF0aW9uc2hpcHMnLCBmaWVsZCwgJ2RhdGEnXSk7XG4gICAgICAgICAgICBsZXQgcmVsYXRpb25zaGlwQ2hhbmdlZDtcblxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGF0YSkpIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXR5U2V0cyhjdXJyZW50RGF0YSwgZGF0YSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY3VycmVudERhdGEgPSBbXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGN1cnJlbnREYXRhKSB7XG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwQ2hhbmdlZCA9ICFlcXVhbFJlY29yZElkZW50aXRpZXMoY3VycmVudERhdGEsIGRhdGEpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcENoYW5nZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRhID0gbnVsbDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocmVsYXRpb25zaGlwQ2hhbmdlZCkge1xuICAgICAgICAgICAgICBjaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgZGVlcFNldChyZXN1bHQsIFsncmVsYXRpb25zaGlwcycsIGZpZWxkLCAnZGF0YSddLCBjdXJyZW50RGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKGNoYW5nZWQpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBvcDogJ3VwZGF0ZVJlY29yZCcsXG4gICAgICAgICAgcmVjb3JkOiByZXN1bHRcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgb3A6ICdyZW1vdmVSZWNvcmQnLFxuICAgICAgICByZWNvcmQ6IHtcbiAgICAgICAgICB0eXBlLFxuICAgICAgICAgIGlkXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuXG4gIGFzeW5jIHJlbW92ZVJlY29yZChjYWNoZSwgb3ApIHtcbiAgICBjb25zdCBjdXJyZW50ID0gYXdhaXQgY2FjaGUuZ2V0UmVjb3JkQXN5bmMob3AucmVjb3JkKTtcblxuICAgIGlmIChjdXJyZW50KSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBvcDogJ2FkZFJlY29yZCcsXG4gICAgICAgIHJlY29yZDogY3VycmVudFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG5cbiAgYXN5bmMgcmVwbGFjZUtleShjYWNoZSwgb3ApIHtcbiA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hY2hlLCBvcCkge1xuICAgIGNvbnN0IHtcbiAgICAgIHJlY29yZCxcbiAgICAgIHJlbGF0aW9uc2hpcCxcbiAgICAgIHJlbGF0ZWRSZWNvcmRcbiAgICB9ID0gb3A7XG4gICAgY29uc3QgY3VycmVudFJlbGF0ZWRSZWNvcmQgPSBhd2FpdCBjYWNoZS5nZXRSZWxhdGVkUmVjb3JkQXN5bmMocmVjb3JkLCByZWxhdGlvbnNoaXApO1xuXG4gICAgaWYgKGN1cnJlbnRSZWxhdGVkUmVjb3JkID09PSB1bmRlZmluZWQgfHwgIWVxdWFsUmVjb3JkSWRlbnRpdGllcyhjdXJyZW50UmVsYXRlZFJlY29yZCwgcmVsYXRlZFJlY29yZCkpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIG9wOiAncmVwbGFjZVJlbGF0ZWRSZWNvcmQnLFxuICAgICAgICByZWNvcmQsXG4gICAgICAgIHJlbGF0aW9uc2hpcCxcbiAgICAgICAgcmVsYXRlZFJlY29yZDogY3VycmVudFJlbGF0ZWRSZWNvcmQgfHwgbnVsbFxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH1cblxufTsiXX0= |
import { clone, deepGet, deepSet } from '@orbit/utils'; | ||
import { cloneRecordIdentity, equalRecordIdentities, mergeRecords, recordsInclude } from '@orbit/data'; | ||
export var AsyncPatchOperators = { | ||
addRecord: async function (cache, op) { | ||
var record = op.record; | ||
await cache.setRecordAsync(record); | ||
addRecord: function _callee(cache, op) { | ||
var record; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
record = op.record; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
case 3: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
return record; | ||
return _context.abrupt("return", record); | ||
case 5: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
updateRecord: async function (cache, op) { | ||
var record = op.record; | ||
var currentRecord = await cache.getRecordAsync(record); | ||
var mergedRecord = mergeRecords(currentRecord || null, record); | ||
await cache.setRecordAsync(mergedRecord); | ||
updateRecord: function _callee2(cache, op) { | ||
var record, currentRecord, mergedRecord; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
record = op.record; | ||
_context2.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(mergedRecord); | ||
} | ||
case 3: | ||
currentRecord = _context2.sent; | ||
mergedRecord = mergeRecords(currentRecord || null, record); | ||
_context2.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(mergedRecord)); | ||
return mergedRecord; | ||
case 7: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(mergedRecord); | ||
} | ||
return _context2.abrupt("return", mergedRecord); | ||
case 9: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeRecord: async function (cache, op) { | ||
return await cache.removeRecordAsync(op.record); | ||
removeRecord: function _callee3(cache, op) { | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return regeneratorRuntime.awrap(cache.removeRecordAsync(op.record)); | ||
case 2: | ||
return _context3.abrupt("return", _context3.sent); | ||
case 3: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceKey: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
replaceKey: function _callee4(cache, op) { | ||
var currentRecord, record; | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
_context4.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context4.sent; | ||
deepSet(record, ['keys', op.key], op.value); | ||
await cache.setRecordAsync(record); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
deepSet(record, ['keys', op.key], op.value); | ||
_context4.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
return record; | ||
}, | ||
replaceAttribute: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
case 7: | ||
if (cache.keyMap) { | ||
cache.keyMap.pushRecord(record); | ||
} | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
return _context4.abrupt("return", record); | ||
deepSet(record, ['attributes', op.attribute], op.value); | ||
await cache.setRecordAsync(record); | ||
return record; | ||
case 9: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
addToRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
replaceAttribute: function _callee5(cache, op) { | ||
var currentRecord, record; | ||
return regeneratorRuntime.async(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
_context5.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context5.sent; | ||
var relatedRecords = deepGet(record, ['relationships', relationship, 'data']) || []; | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
if (!recordsInclude(relatedRecords, relatedRecord)) { | ||
relatedRecords.push(relatedRecord); | ||
deepSet(record, ['relationships', relationship, 'data'], relatedRecords); | ||
await cache.setRecordAsync(record); | ||
} | ||
deepSet(record, ['attributes', op.attribute], op.value); | ||
_context5.next = 7; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
return record; | ||
case 7: | ||
return _context5.abrupt("return", record); | ||
case 8: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
addToRelatedRecords: function _callee6(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord, relatedRecords; | ||
return regeneratorRuntime.async(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
_context6.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
var relatedRecords = deepGet(record, ['relationships', relationship, 'data']); | ||
case 2: | ||
currentRecord = _context6.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
if (relatedRecords) { | ||
relatedRecords = relatedRecords.filter(function (r) { | ||
return !equalRecordIdentities(r, relatedRecord); | ||
}); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
if (deepSet(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
await cache.setRecordAsync(record); | ||
relatedRecords = deepGet(record, ['relationships', relationship, 'data']) || []; | ||
if (recordsInclude(relatedRecords, relatedRecord)) { | ||
_context6.next = 11; | ||
break; | ||
} | ||
relatedRecords.push(relatedRecord); | ||
deepSet(record, ['relationships', relationship, 'data'], relatedRecords); | ||
_context6.next = 11; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 11: | ||
return _context6.abrupt("return", record); | ||
case 12: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
removeFromRelatedRecords: function _callee7(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord, relatedRecords; | ||
return regeneratorRuntime.async(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_context7.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
return record; | ||
} | ||
case 2: | ||
currentRecord = _context7.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
return null; | ||
if (!currentRecord) { | ||
_context7.next = 13; | ||
break; | ||
} | ||
record = clone(currentRecord); | ||
relatedRecords = deepGet(record, ['relationships', relationship, 'data']); | ||
if (!relatedRecords) { | ||
_context7.next = 12; | ||
break; | ||
} | ||
relatedRecords = relatedRecords.filter(function (r) { | ||
return !equalRecordIdentities(r, relatedRecord); | ||
}); | ||
if (!deepSet(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
_context7.next = 12; | ||
break; | ||
} | ||
_context7.next = 12; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 12: | ||
return _context7.abrupt("return", record); | ||
case 13: | ||
return _context7.abrupt("return", null); | ||
case 14: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecords: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecords = op.relatedRecords; | ||
replaceRelatedRecords: function _callee8(cache, op) { | ||
var currentRecord, record, relationship, relatedRecords; | ||
return regeneratorRuntime.async(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
_context8.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context8.sent; | ||
relationship = op.relationship, relatedRecords = op.relatedRecords; | ||
if (deepSet(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
await cache.setRecordAsync(record); | ||
} | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
return record; | ||
if (!deepSet(record, ['relationships', relationship, 'data'], relatedRecords)) { | ||
_context8.next = 8; | ||
break; | ||
} | ||
_context8.next = 8; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 8: | ||
return _context8.abrupt("return", record); | ||
case 9: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
replaceRelatedRecord: async function (cache, op) { | ||
var currentRecord = await cache.getRecordAsync(op.record); | ||
var record; | ||
var relationship = op.relationship, | ||
relatedRecord = op.relatedRecord; | ||
replaceRelatedRecord: function _callee9(cache, op) { | ||
var currentRecord, record, relationship, relatedRecord; | ||
return regeneratorRuntime.async(function _callee9$(_context9) { | ||
while (1) { | ||
switch (_context9.prev = _context9.next) { | ||
case 0: | ||
_context9.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(op.record)); | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
case 2: | ||
currentRecord = _context9.sent; | ||
relationship = op.relationship, relatedRecord = op.relatedRecord; | ||
if (deepSet(record, ['relationships', relationship, 'data'], relatedRecord)) { | ||
await cache.setRecordAsync(record); | ||
} | ||
if (currentRecord) { | ||
record = clone(currentRecord); | ||
} else { | ||
record = cloneRecordIdentity(op.record); | ||
} | ||
return record; | ||
if (!deepSet(record, ['relationships', relationship, 'data'], relatedRecord)) { | ||
_context9.next = 8; | ||
break; | ||
} | ||
_context9.next = 8; | ||
return regeneratorRuntime.awrap(cache.setRecordAsync(record)); | ||
case 8: | ||
return _context9.abrupt("return", record); | ||
case 9: | ||
case "end": | ||
return _context9.stop(); | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1wYXRjaC1vcGVyYXRvcnMuanMiXSwibmFtZXMiOlsiY2xvbmUiLCJkZWVwR2V0IiwiZGVlcFNldCIsImNsb25lUmVjb3JkSWRlbnRpdHkiLCJlcXVhbFJlY29yZElkZW50aXRpZXMiLCJtZXJnZVJlY29yZHMiLCJyZWNvcmRzSW5jbHVkZSIsIkFzeW5jUGF0Y2hPcGVyYXRvcnMiLCJhZGRSZWNvcmQiLCJjYWNoZSIsIm9wIiwicmVjb3JkIiwic2V0UmVjb3JkQXN5bmMiLCJrZXlNYXAiLCJwdXNoUmVjb3JkIiwidXBkYXRlUmVjb3JkIiwiY3VycmVudFJlY29yZCIsImdldFJlY29yZEFzeW5jIiwibWVyZ2VkUmVjb3JkIiwicmVtb3ZlUmVjb3JkIiwicmVtb3ZlUmVjb3JkQXN5bmMiLCJyZXBsYWNlS2V5Iiwia2V5IiwidmFsdWUiLCJyZXBsYWNlQXR0cmlidXRlIiwiYXR0cmlidXRlIiwiYWRkVG9SZWxhdGVkUmVjb3JkcyIsInJlbGF0aW9uc2hpcCIsInJlbGF0ZWRSZWNvcmQiLCJyZWxhdGVkUmVjb3JkcyIsInB1c2giLCJyZW1vdmVGcm9tUmVsYXRlZFJlY29yZHMiLCJmaWx0ZXIiLCJyIiwicmVwbGFjZVJlbGF0ZWRSZWNvcmRzIiwicmVwbGFjZVJlbGF0ZWRSZWNvcmQiXSwibWFwcGluZ3MiOiJBQUFBLFNBQVNBLEtBQVQsRUFBZ0JDLE9BQWhCLEVBQXlCQyxPQUF6QixRQUF3QyxjQUF4QztBQUNBLFNBQVNDLG1CQUFULEVBQThCQyxxQkFBOUIsRUFBcURDLFlBQXJ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JkKTtcbiAgICB9XG5cbiAgICBpZiAoZGVlcFNldChyZWNvcmQsIFsncmVsYXRpb25zaGlwcycsIHJlbGF0aW9uc2hpcCwgJ2RhdGEnXSwgcmVsYXRlZFJlY29yZHMpKSB7XG4gICAgICBhd2FpdCBjYWNoZS5zZXRSZWNvcmRBc3luYyhyZWNvcmQpO1xuICAgIH1cblxuICAgIHJldHVybiByZWNvcmQ7XG4gIH0sXG5cbiAgYXN5bmMgcmVwbGFjZVJlbGF0ZWRSZWNvcmQoY2FjaGUsIG9wKSB7XG4gICAgbGV0IGN1cnJlbnRSZWNvcmQgPSBhd2FpdCBjYWNoZS5nZXRSZWNvcmRBc3luYyhvcC5yZWNvcmQpO1xuICAgIGxldCByZWNvcmQ7XG4gICAgY29uc3Qge1xuICAgICAgcmVsYXRpb25zaGlwLFxuICAgICAgcmVsYXRlZFJlY29yZFxuICAgIH0gPSBvcDtcblxuICAgIGlmIChjdXJyZW50UmVjb3JkKSB7XG4gICAgICByZWNvcmQgPSBjbG9uZShjdXJyZW50UmVjb3JkKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmVjb3JkID0gY2xvbmVSZWNvcmRJZGVudGl0eShvcC5yZWNvcmQpO1xuICAgIH1cblxuICAgIGlmIChkZWVwU2V0KHJlY29yZCwgWydyZWxhdGlvbnNoaXBzJywgcmVsYXRpb25zaGlwLCAnZGF0YSddLCByZWxhdGVkUmVjb3JkKSkge1xuICAgICAgYXdhaXQgY2FjaGUuc2V0UmVjb3JkQXN5bmMocmVjb3JkKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmVjb3JkO1xuICB9XG5cbn07Il19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1wYXRjaC1vcGVyYXRvcnMuanMiXSwibmFtZXMiOlsiY2xvbmUiLCJkZWVwR2V0IiwiZGVlcFNldCIsImNsb25lUmVjb3JkSWRlbnRp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cC5yZWNvcmQpO1xuICAgIGxldCByZWNvcmQ7XG4gICAgY29uc3Qge1xuICAgICAgcmVsYXRpb25zaGlwLFxuICAgICAgcmVsYXRlZFJlY29yZFxuICAgIH0gPSBvcDtcblxuICAgIGlmIChjdXJyZW50UmVjb3JkKSB7XG4gICAgICByZWNvcmQgPSBjbG9uZShjdXJyZW50UmVjb3JkKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmVjb3JkID0gY2xvbmVSZWNvcmRJZGVudGl0eShvcC5yZWNvcmQpO1xuICAgIH1cblxuICAgIGlmIChkZWVwU2V0KHJlY29yZCwgWydyZWxhdGlvbnNoaXBzJywgcmVsYXRpb25zaGlwLCAnZGF0YSddLCByZWxhdGVkUmVjb3JkKSkge1xuICAgICAgYXdhaXQgY2FjaGUuc2V0UmVjb3JkQXN5bmMocmVjb3JkKTtcbiAgICB9XG5cbiAgICByZXR1cm4gcmVjb3JkO1xuICB9XG5cbn07Il19 |
import { deepGet, isNone } from '@orbit/utils'; | ||
import { RecordNotFoundException, QueryExpressionParseError } from '@orbit/data'; | ||
export var AsyncQueryOperators = { | ||
findRecord: async function (cache, expression) { | ||
var record = expression.record; | ||
var currentRecord = await cache.getRecordAsync(record); | ||
findRecord: function _callee(cache, expression) { | ||
var record, currentRecord; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
record = expression.record; | ||
_context.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (!currentRecord) { | ||
throw new RecordNotFoundException(record.type, record.id); | ||
} | ||
case 3: | ||
currentRecord = _context.sent; | ||
return currentRecord; | ||
if (currentRecord) { | ||
_context.next = 6; | ||
break; | ||
} | ||
throw new RecordNotFoundException(record.type, record.id); | ||
case 6: | ||
return _context.abrupt("return", currentRecord); | ||
case 7: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRecords: async function (cache, expression) { | ||
var results = await cache.getRecordsAsync(expression.records || expression.type); | ||
findRecords: function _callee2(cache, expression) { | ||
var results; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return regeneratorRuntime.awrap(cache.getRecordsAsync(expression.records || expression.type)); | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
case 2: | ||
results = _context2.sent; | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
return results; | ||
}, | ||
findRelatedRecords: async function (cache, expression) { | ||
var record = expression.record, | ||
relationship = expression.relationship; | ||
var relatedIds = await cache.getRelatedRecordsAsync(record, relationship); | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
if (!relatedIds || relatedIds.length === 0) { | ||
if (!(await cache.getRecordAsync(record))) { | ||
throw new RecordNotFoundException(record.type, record.id); | ||
return _context2.abrupt("return", results); | ||
case 7: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRelatedRecords: function _callee3(cache, expression) { | ||
var record, relationship, relatedIds, results; | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
record = expression.record, relationship = expression.relationship; | ||
_context3.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordsAsync(record, relationship)); | ||
return []; | ||
} | ||
case 3: | ||
relatedIds = _context3.sent; | ||
var results = await cache.getRecordsAsync(relatedIds); | ||
if (!(!relatedIds || relatedIds.length === 0)) { | ||
_context3.next = 10; | ||
break; | ||
} | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
_context3.next = 7; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
case 7: | ||
if (_context3.sent) { | ||
_context3.next = 9; | ||
break; | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
throw new RecordNotFoundException(record.type, record.id); | ||
return results; | ||
case 9: | ||
return _context3.abrupt("return", []); | ||
case 10: | ||
_context3.next = 12; | ||
return regeneratorRuntime.awrap(cache.getRecordsAsync(relatedIds)); | ||
case 12: | ||
results = _context3.sent; | ||
if (expression.filter) { | ||
results = filterRecords(results, expression.filter); | ||
} | ||
if (expression.sort) { | ||
results = sortRecords(results, expression.sort); | ||
} | ||
if (expression.page) { | ||
results = paginateRecords(results, expression.page); | ||
} | ||
return _context3.abrupt("return", results); | ||
case 17: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}); | ||
}, | ||
findRelatedRecord: async function (cache, expression) { | ||
var record = expression.record, | ||
relationship = expression.relationship; | ||
var relatedId = await cache.getRelatedRecordAsync(record, relationship); | ||
findRelatedRecord: function _callee4(cache, expression) { | ||
var record, relationship, relatedId; | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
record = expression.record, relationship = expression.relationship; | ||
_context4.next = 3; | ||
return regeneratorRuntime.awrap(cache.getRelatedRecordAsync(record, relationship)); | ||
if (relatedId) { | ||
return (await cache.getRecordAsync(relatedId)) || null; | ||
} else { | ||
if (!(await cache.getRecordAsync(record))) { | ||
throw new RecordNotFoundException(record.type, record.id); | ||
case 3: | ||
relatedId = _context4.sent; | ||
if (!relatedId) { | ||
_context4.next = 13; | ||
break; | ||
} | ||
_context4.next = 7; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(relatedId)); | ||
case 7: | ||
_context4.t0 = _context4.sent; | ||
if (_context4.t0) { | ||
_context4.next = 10; | ||
break; | ||
} | ||
_context4.t0 = null; | ||
case 10: | ||
return _context4.abrupt("return", _context4.t0); | ||
case 13: | ||
_context4.next = 15; | ||
return regeneratorRuntime.awrap(cache.getRecordAsync(record)); | ||
case 15: | ||
if (_context4.sent) { | ||
_context4.next = 17; | ||
break; | ||
} | ||
throw new RecordNotFoundException(record.type, record.id); | ||
case 17: | ||
return _context4.abrupt("return", null); | ||
case 18: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
return null; | ||
} | ||
}); | ||
} | ||
@@ -220,2 +328,2 @@ }; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9wZXJhdG9ycy9hc3luYy1xdWVyeS1vcGVyYXRvcnMuanMiXSwibmFtZXMiOlsiZGVlcEdldCIsImlzTm9uZSIsIlJlY29yZE5vdEZvdW5kRXhjZXB0aW9uIiwiUXVlcnlFeHByZXNzaW9uUGFyc2VFcnJvciIsIkFzeW5jUXVlcnlPcGVyYXRvcnMiLCJmaW5kUmVjb3JkIiwiY2FjaGUiLCJleHByZXNzaW9uIiwicmVjb3JkIiwiY3VycmVudFJlY29yZCIsImdldFJlY29yZEFzeW5jIiwidHlwZSIsImlkIiwiZmluZFJlY29yZHMiLCJyZXN1bHRzIiwiZ2V0UmVjb3Jkc0FzeW5jIiwicmVjb3JkcyIsImZpbHRlciIsImZpbHRlclJlY29yZHMiLCJzb3J0Iiwic29ydFJlY29yZHMiLCJwYWdlIiwicGFnaW5hdGVSZWNvcmRzIiwiZmluZFJlbGF0ZWRSZWNvcmRzIiwicmVsYXRpb25zaGlwIiwicmVsYXRlZElkcyIsImdldFJlbGF0ZWRSZWNvcmRzQXN5bmMiLCJsZW5ndGgiLCJmaW5kUmVsYXRlZFJlY29yZCIsInJlbGF0ZWRJZCIsImdldFJlbGF0ZWRSZWNvcmRBc3luYyIsImZpbHRlcnMiLCJpIiwibCIsImFwcGx5RmlsdGVyIiwia2luZCIsImFjdHVhbCIsImF0dHJpYnV0ZSIsIm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 |
{ | ||
"name": "@orbit/record-cache", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"description": "Orbit base classes used to access and maintain a set of records.", | ||
@@ -16,4 +16,4 @@ "contributors": [ | ||
"license": "MIT", | ||
"main": "dist/commonjs/es5/index.js", | ||
"module": "dist/modules/es5/index.js", | ||
"main": "dist/commonjs/es2017/index.js", | ||
"module": "dist/modules/es2017/index.js", | ||
"types": "dist/types/index.d.ts", | ||
@@ -30,8 +30,8 @@ "scripts": { | ||
"dependencies": { | ||
"@orbit/core": "^0.16.0", | ||
"@orbit/data": "^0.16.0", | ||
"@orbit/utils": "^0.16.0" | ||
"@orbit/core": "^0.16.1", | ||
"@orbit/data": "^0.16.1", | ||
"@orbit/utils": "^0.16.1" | ||
}, | ||
"devDependencies": { | ||
"@glimmer/build": "^0.10.1", | ||
"@glimmer/build": "^0.10.3", | ||
"@typescript-eslint/eslint-plugin": "^1.10.2", | ||
@@ -44,3 +44,3 @@ "@typescript-eslint/parser": "^1.10.2", | ||
}, | ||
"gitHead": "e8c3d6d56dc0f9b11f8d9216df37a3a16514ce6d" | ||
"gitHead": "1270dbd43aa93da57e36664e0b8330e809c082fc" | ||
} |
Sorry, the diff of this file is too big to display
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
1523024
142
21313
Updated@orbit/core@^0.16.1
Updated@orbit/data@^0.16.1
Updated@orbit/utils@^0.16.1