parse 5.0.0-alpha.2 → 5.0.0-alpha.4

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.0.0-alpha.2
2
+ * Parse JavaScript SDK v5.0.0-alpha.4
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.2",
560
+ VERSION: 'js' + "5.0.0-alpha.4",
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*/{
@@ -16149,13 +16179,8 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
16149
16179
  if (typeof password !== 'string') {
16150
16180
  return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
16151
16181
  }
16152
- options = options || {};
16153
- var verificationOption = {};
16154
- if (options.hasOwnProperty('useMasterKey')) {
16155
- verificationOption.useMasterKey = options.useMasterKey;
16156
- }
16157
16182
  var controller = _CoreManager.default.getUserController();
16158
- return controller.verifyPassword(username, password, verificationOption);
16183
+ return controller.verifyPassword(username, password, options || {});
16159
16184
  }
16160
16185
 
16161
16186
  /**
@@ -16760,6 +16785,7 @@ var uuidv4 = _dereq_('./uuid');
16760
16785
  progress?: any,
16761
16786
  context?: any,
16762
16787
  usePost?: boolean,
16788
+ ignoreEmailVerification?: boolean,
16763
16789
  };*/
16764
16790
  /*:: export type FullOptions = {
16765
16791
  success?: any,
@@ -16975,6 +17001,9 @@ var RESTController = {
16975
17001
  throw new Error('Cannot use the Master Key, it has not been provided.');
16976
17002
  }
16977
17003
  }
17004
+ if (options.ignoreEmailVerification !== undefined) {
17005
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
17006
+ }
16978
17007
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
16979
17008
  payload._RevocableSession = '1';
16980
17009
  }