Skip to content

Commit

Permalink
7.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Apr 7, 2018
1 parent 011943e commit 533dd0a
Show file tree
Hide file tree
Showing 42 changed files with 2,914 additions and 1,112 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

### X.X.X (comming soon)
### 7.4.3 (April 7,2018)

Bugfixes:
- Sort by sub object is not working [#585](https://github.com/pubkey/rxdb/issues/585)
Expand Down
6 changes: 4 additions & 2 deletions dist/es/mquery/mquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ var MQuery = function () {

MQuery.prototype.clone = function clone() {
var same = new MQuery();
Object.entries(this).forEach(function (entry) {
same[entry[0]] = util.clone(entry[1]);
Object.entries(this).forEach(function (_ref) {
var k = _ref[0],
v = _ref[1];
return same[k] = util.clone(v);
});
return same;
};
Expand Down
24 changes: 12 additions & 12 deletions dist/es/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ export function addPlugin(plugin) {

// prototype-overwrites
if (plugin.prototypes) {
Object.entries(plugin.prototypes).forEach(function (entry) {
var name = entry[0];
var fun = entry[1];
fun(PROTOTYPES[name]);
Object.entries(plugin.prototypes).forEach(function (_ref) {
var name = _ref[0],
fun = _ref[1];
return fun(PROTOTYPES[name]);
});
}
// overwritable-overwrites
if (plugin.overwritable) {
Object.entries(plugin.overwritable).forEach(function (entry) {
var name = entry[0];
var fun = entry[1];
overwritable[name] = fun;
Object.entries(plugin.overwritable).forEach(function (_ref2) {
var name = _ref2[0],
fun = _ref2[1];
return overwritable[name] = fun;
});
}
// extend-hooks
if (plugin.hooks) {
Object.entries(plugin.hooks).forEach(function (entry) {
var name = entry[0];
var fun = entry[1];
HOOKS[name].push(fun);
Object.entries(plugin.hooks).forEach(function (_ref3) {
var name = _ref3[0],
fun = _ref3[1];
return HOOKS[name].push(fun);
});
}
}
Expand Down
61 changes: 31 additions & 30 deletions dist/es/plugins/attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export var blobBufferUtil = {
};

var _assignMethodsToAttachment = function _assignMethodsToAttachment(attachment) {
Object.entries(attachment.doc.collection._attachments).forEach(function (entry) {
var funName = entry[0];
var fun = entry[1];
attachment.__defineGetter__(funName, function () {
Object.entries(attachment.doc.collection._attachments).forEach(function (_ref2) {
var funName = _ref2[0],
fun = _ref2[1];
return attachment.__defineGetter__(funName, function () {
return fun.bind(attachment);
});
});
Expand All @@ -112,13 +112,13 @@ var _assignMethodsToAttachment = function _assignMethodsToAttachment(attachment)
* wrapped so that you can access the attachment-data
*/
export var RxAttachment = function () {
function RxAttachment(_ref2) {
var doc = _ref2.doc,
id = _ref2.id,
type = _ref2.type,
length = _ref2.length,
digest = _ref2.digest,
rev = _ref2.rev;
function RxAttachment(_ref3) {
var doc = _ref3.doc,
id = _ref3.id,
type = _ref3.type,
length = _ref3.length,
digest = _ref3.digest,
rev = _ref3.rev;

_classCallCheck(this, RxAttachment);

Expand All @@ -133,7 +133,7 @@ export var RxAttachment = function () {
}

RxAttachment.prototype.remove = function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
Expand All @@ -154,7 +154,7 @@ export var RxAttachment = function () {
}));

function remove() {
return _ref3.apply(this, arguments);
return _ref4.apply(this, arguments);
}

return remove;
Expand All @@ -167,7 +167,7 @@ export var RxAttachment = function () {


RxAttachment.prototype.getData = function () {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
var data, dataString;
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
Expand Down Expand Up @@ -204,14 +204,14 @@ export var RxAttachment = function () {
}));

function getData() {
return _ref4.apply(this, arguments);
return _ref5.apply(this, arguments);
}

return getData;
}();

RxAttachment.prototype.getStringData = function () {
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
var bufferBlob;
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) {
Expand All @@ -237,7 +237,7 @@ export var RxAttachment = function () {
}));

function getStringData() {
return _ref5.apply(this, arguments);
return _ref6.apply(this, arguments);
}

return getStringData;
Expand All @@ -262,13 +262,13 @@ function shouldEncrypt(doc) {
}

export var putAttachment = function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref7) {
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref8) {
var _this = this;

var id = _ref7.id,
data = _ref7.data,
_ref7$type = _ref7.type,
type = _ref7$type === undefined ? 'text/plain' : _ref7$type;
var id = _ref8.id,
data = _ref8.data,
_ref8$type = _ref8.type,
type = _ref8$type === undefined ? 'text/plain' : _ref8$type;
var queue, blobBuffer, ret;
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
while (1) {
Expand Down Expand Up @@ -335,7 +335,7 @@ export var putAttachment = function () {
}));

return function putAttachment(_x2) {
return _ref6.apply(this, arguments);
return _ref7.apply(this, arguments);
};
}();;

Expand Down Expand Up @@ -369,7 +369,7 @@ export function allAttachments() {
};

export var preMigrateDocument = function () {
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(action) {
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(action) {
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
Expand All @@ -386,12 +386,12 @@ export var preMigrateDocument = function () {
}));

return function preMigrateDocument(_x3) {
return _ref9.apply(this, arguments);
return _ref10.apply(this, arguments);
};
}();

export var postMigrateDocument = function () {
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(action) {
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(action) {
var primaryPath, attachments, id, stubData, primary, data, res;
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
while (1) {
Expand Down Expand Up @@ -448,7 +448,7 @@ export var postMigrateDocument = function () {
}));

return function postMigrateDocument(_x4) {
return _ref10.apply(this, arguments);
return _ref11.apply(this, arguments);
};
}();

Expand All @@ -468,9 +468,10 @@ export var prototypes = {
}), map(function (attachmentsData) {
return Object.entries(attachmentsData);
}), map(function (entries) {
return entries.map(function (entry) {
var id = entry[0];
var attachmentData = entry[1];
return entries.map(function (_ref12) {
var id = _ref12[0],
attachmentData = _ref12[1];

return RxAttachment.fromPouchDocument(id, attachmentData, _this3);
});
}));
Expand Down
2 changes: 1 addition & 1 deletion dist/es/plugins/error-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var CODES = {
DB3: 'RxDatabase.collection(): collection already exists. use myDatabase.[collectionName] to get it',
DB4: 'RxDatabase.collection(): schema is missing',
DB5: 'RxDatabase.collection(): collection-name not allowed',
DB6: 'RxDatabase.collection(): another instance created this collection with a different schema',
DB6: 'RxDatabase.collection(): another instance created this collection with a different schema. Read this https://pubkey.github.io/rxdb/questions-answers.html#cant-change-the-schema',
DB7: 'RxDatabase.collection(): schema encrypted but no password given',
DB8: 'RxDatabase.create(): A RxDatabase with the same name and adapter already exists.\n' + 'Make sure to use this combination only once or set ignoreDuplicate to true if you do this intentional',
DB9: 'RxDatabase.create(): Adapter not added. Use RxDB.plugin(require(\'pouchdb-adapter-[adaptername]\');',
Expand Down
2 changes: 1 addition & 1 deletion dist/es/plugins/schema-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function checkSchema(jsonID) {
return arr.indexOf(elem) === pos;
}) // unique
.map(function (key) {
var schemaObj = objectPath.get(jsonID, 'properties.' + key.replace('.', '.properties.'));
var schemaObj = objectPath.get(jsonID, 'properties.' + key.replace(/\./g, '.properties.'));
if (!schemaObj || typeof schemaObj !== 'object') {
throw RxError.newRxError('SC21', {
key: key
Expand Down
Loading

0 comments on commit 533dd0a

Please sign in to comment.