parse 5.0.0-alpha.2 → 5.0.0-alpha.3
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 +33 -3
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +33 -3
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseQuery.js +31 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseQuery.js +29 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseQuery.js +21 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseQuery.js +31 -1
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v5.0.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v5.0.0-alpha.3
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -557,7 +557,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
557
557
|
SERVER_AUTH_TOKEN: null,
|
|
558
558
|
LIVEQUERY_SERVER_URL: null,
|
|
559
559
|
ENCRYPTED_KEY: null,
|
|
560
|
-
VERSION: 'js' + "5.0.0-alpha.
|
|
560
|
+
VERSION: 'js' + "5.0.0-alpha.3",
|
|
561
561
|
APPLICATION_ID: null,
|
|
562
562
|
JAVASCRIPT_KEY: null,
|
|
563
563
|
MASTER_KEY: null,
|
|
@@ -11636,6 +11636,7 @@ var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
|
|
|
11636
11636
|
readPreference?: string,
|
|
11637
11637
|
includeReadPreference?: string,
|
|
11638
11638
|
subqueryReadPreference?: string,
|
|
11639
|
+
comment?: string,
|
|
11639
11640
|
};*/
|
|
11640
11641
|
/**
|
|
11641
11642
|
* Converts a string into a regex that matches it.
|
|
@@ -11838,6 +11839,7 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
11838
11839
|
(0, _defineProperty2.default)(this, "_hint", void 0);
|
|
11839
11840
|
(0, _defineProperty2.default)(this, "_explain", void 0);
|
|
11840
11841
|
(0, _defineProperty2.default)(this, "_xhrRequest", void 0);
|
|
11842
|
+
(0, _defineProperty2.default)(this, "_comment", void 0);
|
|
11841
11843
|
if (typeof objectClass === 'string') {
|
|
11842
11844
|
if (objectClass === 'User' && _CoreManager.default.get('PERFORM_USER_REWRITE')) {
|
|
11843
11845
|
this.className = '_User';
|
|
@@ -11873,6 +11875,7 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
11873
11875
|
task: null,
|
|
11874
11876
|
onchange: function () {}
|
|
11875
11877
|
};
|
|
11878
|
+
this._comment = null;
|
|
11876
11879
|
}
|
|
11877
11880
|
|
|
11878
11881
|
/**
|
|
@@ -12089,6 +12092,9 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12089
12092
|
if (this._explain) {
|
|
12090
12093
|
params.explain = true;
|
|
12091
12094
|
}
|
|
12095
|
+
if (this._comment) {
|
|
12096
|
+
params.comment = this._comment;
|
|
12097
|
+
}
|
|
12092
12098
|
for (var _key3 in this._extraOptions) {
|
|
12093
12099
|
params[_key3] = this._extraOptions[_key3];
|
|
12094
12100
|
}
|
|
@@ -12161,10 +12167,13 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12161
12167
|
if (json.explain) {
|
|
12162
12168
|
this._explain = !!json.explain;
|
|
12163
12169
|
}
|
|
12170
|
+
if (json.comment) {
|
|
12171
|
+
this._comment = json.comment;
|
|
12172
|
+
}
|
|
12164
12173
|
for (var _key4 in json) {
|
|
12165
12174
|
if (json.hasOwnProperty(_key4)) {
|
|
12166
12175
|
var _context4;
|
|
12167
|
-
if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain']).call(_context4, _key4) === -1) {
|
|
12176
|
+
if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain', 'comment']).call(_context4, _key4) === -1) {
|
|
12168
12177
|
this._extraOptions[_key4] = json[_key4];
|
|
12169
12178
|
}
|
|
12170
12179
|
}
|
|
@@ -13890,6 +13899,27 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13890
13899
|
_this16._xhrRequest.onchange();
|
|
13891
13900
|
};
|
|
13892
13901
|
}
|
|
13902
|
+
|
|
13903
|
+
/**
|
|
13904
|
+
* Sets a comment to the query so that the query
|
|
13905
|
+
*can be identified when using a the profiler for MongoDB.
|
|
13906
|
+
*
|
|
13907
|
+
* @param {string} value a comment can make your profile data easier to interpret and trace.
|
|
13908
|
+
* @returns {Parse.Query} Returns the query, so you can chain this call.
|
|
13909
|
+
*/
|
|
13910
|
+
}, {
|
|
13911
|
+
key: "comment",
|
|
13912
|
+
value: function (value /*: string*/) /*: ParseQuery*/{
|
|
13913
|
+
if (value == null) {
|
|
13914
|
+
delete this._comment;
|
|
13915
|
+
return this;
|
|
13916
|
+
}
|
|
13917
|
+
if (typeof value !== 'string') {
|
|
13918
|
+
throw new Error('The value of a comment to be sent with this query must be a string.');
|
|
13919
|
+
}
|
|
13920
|
+
this._comment = value;
|
|
13921
|
+
return this;
|
|
13922
|
+
}
|
|
13893
13923
|
}], [{
|
|
13894
13924
|
key: "fromJSON",
|
|
13895
13925
|
value: function (className /*: string*/, json /*: QueryJSON*/) /*: ParseQuery*/{
|