parse 5.1.0-alpha.7 → 5.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +21 -25
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +21 -25
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseObject.js +19 -23
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseObject.js +0 -4
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseObject.js +19 -23
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseObject.js +19 -23
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v5.1.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v5.1.0-alpha.8
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -562,7 +562,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
562
562
|
SERVER_AUTH_TOKEN: null,
|
|
563
563
|
LIVEQUERY_SERVER_URL: null,
|
|
564
564
|
ENCRYPTED_KEY: null,
|
|
565
|
-
VERSION: 'js' + "5.1.0-alpha.
|
|
565
|
+
VERSION: 'js' + "5.1.0-alpha.8",
|
|
566
566
|
APPLICATION_ID: null,
|
|
567
567
|
JAVASCRIPT_KEY: null,
|
|
568
568
|
MASTER_KEY: null,
|
|
@@ -8464,10 +8464,6 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
8464
8464
|
json[_attr5] = (0, _encode.default)(attrs[_attr5], false, false, seen, offline);
|
|
8465
8465
|
}
|
|
8466
8466
|
}
|
|
8467
|
-
var pending = this._getPendingOps();
|
|
8468
|
-
for (var _attr6 in pending[0]) {
|
|
8469
|
-
json[_attr6] = pending[0][_attr6].toJSON(offline);
|
|
8470
|
-
}
|
|
8471
8467
|
if (this.id) {
|
|
8472
8468
|
json.objectId = this.id;
|
|
8473
8469
|
}
|
|
@@ -8536,13 +8532,13 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
8536
8532
|
var pendingOps = this._getPendingOps();
|
|
8537
8533
|
var keys = {};
|
|
8538
8534
|
for (var i = 0; i < pendingOps.length; i++) {
|
|
8539
|
-
for (var
|
|
8540
|
-
keys[
|
|
8535
|
+
for (var _attr6 in pendingOps[i]) {
|
|
8536
|
+
keys[_attr6] = true;
|
|
8541
8537
|
}
|
|
8542
8538
|
}
|
|
8543
8539
|
var dirtyObjects = this._getDirtyObjectAttributes();
|
|
8544
|
-
for (var
|
|
8545
|
-
keys[
|
|
8540
|
+
for (var _attr7 in dirtyObjects) {
|
|
8541
|
+
keys[_attr7] = true;
|
|
8546
8542
|
}
|
|
8547
8543
|
return (0, _keys.default)(keys);
|
|
8548
8544
|
}
|
|
@@ -8747,11 +8743,11 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
8747
8743
|
|
|
8748
8744
|
// Calculate new values
|
|
8749
8745
|
var newValues = {};
|
|
8750
|
-
for (var
|
|
8751
|
-
if (newOps[
|
|
8752
|
-
newValues[
|
|
8753
|
-
} else if (!(newOps[
|
|
8754
|
-
newValues[
|
|
8746
|
+
for (var _attr8 in newOps) {
|
|
8747
|
+
if (newOps[_attr8] instanceof _ParseOp.RelationOp) {
|
|
8748
|
+
newValues[_attr8] = newOps[_attr8].applyTo(currentAttributes[_attr8], this, _attr8);
|
|
8749
|
+
} else if (!(newOps[_attr8] instanceof _ParseOp.UnsetOp)) {
|
|
8750
|
+
newValues[_attr8] = newOps[_attr8].applyTo(currentAttributes[_attr8]);
|
|
8755
8751
|
}
|
|
8756
8752
|
}
|
|
8757
8753
|
|
|
@@ -8770,9 +8766,9 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
8770
8766
|
var pendingOps = this._getPendingOps();
|
|
8771
8767
|
var last = pendingOps.length - 1;
|
|
8772
8768
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
8773
|
-
for (var
|
|
8774
|
-
var nextOp = newOps[
|
|
8775
|
-
stateController.setPendingOp(this._getStateIdentifier(),
|
|
8769
|
+
for (var _attr9 in newOps) {
|
|
8770
|
+
var nextOp = newOps[_attr9].mergeWith(pendingOps[last][_attr9]);
|
|
8771
|
+
stateController.setPendingOp(this._getStateIdentifier(), _attr9, nextOp);
|
|
8776
8772
|
}
|
|
8777
8773
|
return this;
|
|
8778
8774
|
}
|
|
@@ -9186,9 +9182,9 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
9186
9182
|
if (typeof this.constructor.readOnlyAttributes === 'function') {
|
|
9187
9183
|
readonly = (0, _concat.default)(readonly).call(readonly, this.constructor.readOnlyAttributes());
|
|
9188
9184
|
}
|
|
9189
|
-
for (var
|
|
9190
|
-
if ((0, _indexOf.default)(readonly).call(readonly,
|
|
9191
|
-
erasable[
|
|
9185
|
+
for (var _attr10 in attributes) {
|
|
9186
|
+
if ((0, _indexOf.default)(readonly).call(readonly, _attr10) < 0) {
|
|
9187
|
+
erasable[_attr10] = true;
|
|
9192
9188
|
}
|
|
9193
9189
|
}
|
|
9194
9190
|
return this.set(erasable, {
|
|
@@ -10034,11 +10030,11 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
10034
10030
|
var constructor = classMap[json.className];
|
|
10035
10031
|
var o = constructor ? new constructor(json.className) : new ParseObject(json.className);
|
|
10036
10032
|
var otherAttributes = {};
|
|
10037
|
-
for (var
|
|
10038
|
-
if (
|
|
10039
|
-
otherAttributes[
|
|
10033
|
+
for (var _attr11 in json) {
|
|
10034
|
+
if (_attr11 !== 'className' && _attr11 !== '__type') {
|
|
10035
|
+
otherAttributes[_attr11] = json[_attr11];
|
|
10040
10036
|
if (dirty) {
|
|
10041
|
-
o.set(
|
|
10037
|
+
o.set(_attr11, json[_attr11]);
|
|
10042
10038
|
}
|
|
10043
10039
|
}
|
|
10044
10040
|
}
|