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.
@@ -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,
@@ -11629,6 +11629,7 @@ var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
11629
11629
  readPreference?: string,
11630
11630
  includeReadPreference?: string,
11631
11631
  subqueryReadPreference?: string,
11632
+ comment?: string,
11632
11633
  };*/
11633
11634
  /**
11634
11635
  * Converts a string into a regex that matches it.
@@ -11831,6 +11832,7 @@ var ParseQuery = /*#__PURE__*/function () {
11831
11832
  (0, _defineProperty2.default)(this, "_hint", void 0);
11832
11833
  (0, _defineProperty2.default)(this, "_explain", void 0);
11833
11834
  (0, _defineProperty2.default)(this, "_xhrRequest", void 0);
11835
+ (0, _defineProperty2.default)(this, "_comment", void 0);
11834
11836
  if (typeof objectClass === 'string') {
11835
11837
  if (objectClass === 'User' && _CoreManager.default.get('PERFORM_USER_REWRITE')) {
11836
11838
  this.className = '_User';
@@ -11866,6 +11868,7 @@ var ParseQuery = /*#__PURE__*/function () {
11866
11868
  task: null,
11867
11869
  onchange: function () {}
11868
11870
  };
11871
+ this._comment = null;
11869
11872
  }
11870
11873
 
11871
11874
  /**
@@ -12082,6 +12085,9 @@ var ParseQuery = /*#__PURE__*/function () {
12082
12085
  if (this._explain) {
12083
12086
  params.explain = true;
12084
12087
  }
12088
+ if (this._comment) {
12089
+ params.comment = this._comment;
12090
+ }
12085
12091
  for (var _key3 in this._extraOptions) {
12086
12092
  params[_key3] = this._extraOptions[_key3];
12087
12093
  }
@@ -12154,10 +12160,13 @@ var ParseQuery = /*#__PURE__*/function () {
12154
12160
  if (json.explain) {
12155
12161
  this._explain = !!json.explain;
12156
12162
  }
12163
+ if (json.comment) {
12164
+ this._comment = json.comment;
12165
+ }
12157
12166
  for (var _key4 in json) {
12158
12167
  if (json.hasOwnProperty(_key4)) {
12159
12168
  var _context4;
12160
- if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain']).call(_context4, _key4) === -1) {
12169
+ if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain', 'comment']).call(_context4, _key4) === -1) {
12161
12170
  this._extraOptions[_key4] = json[_key4];
12162
12171
  }
12163
12172
  }
@@ -13883,6 +13892,27 @@ var ParseQuery = /*#__PURE__*/function () {
13883
13892
  _this16._xhrRequest.onchange();
13884
13893
  };
13885
13894
  }
13895
+
13896
+ /**
13897
+ * Sets a comment to the query so that the query
13898
+ *can be identified when using a the profiler for MongoDB.
13899
+ *
13900
+ * @param {string} value a comment can make your profile data easier to interpret and trace.
13901
+ * @returns {Parse.Query} Returns the query, so you can chain this call.
13902
+ */
13903
+ }, {
13904
+ key: "comment",
13905
+ value: function (value /*: string*/) /*: ParseQuery*/{
13906
+ if (value == null) {
13907
+ delete this._comment;
13908
+ return this;
13909
+ }
13910
+ if (typeof value !== 'string') {
13911
+ throw new Error('The value of a comment to be sent with this query must be a string.');
13912
+ }
13913
+ this._comment = value;
13914
+ return this;
13915
+ }
13886
13916
  }], [{
13887
13917
  key: "fromJSON",
13888
13918
  value: function (className /*: string*/, json /*: QueryJSON*/) /*: ParseQuery*/{
@@ -16142,13 +16172,8 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
16142
16172
  if (typeof password !== 'string') {
16143
16173
  return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
16144
16174
  }
16145
- options = options || {};
16146
- var verificationOption = {};
16147
- if (options.hasOwnProperty('useMasterKey')) {
16148
- verificationOption.useMasterKey = options.useMasterKey;
16149
- }
16150
16175
  var controller = _CoreManager.default.getUserController();
16151
- return controller.verifyPassword(username, password, verificationOption);
16176
+ return controller.verifyPassword(username, password, options || {});
16152
16177
  }
16153
16178
 
16154
16179
  /**
@@ -16753,6 +16778,7 @@ var uuidv4 = _dereq_('./uuid');
16753
16778
  progress?: any,
16754
16779
  context?: any,
16755
16780
  usePost?: boolean,
16781
+ ignoreEmailVerification?: boolean,
16756
16782
  };*/
16757
16783
  /*:: export type FullOptions = {
16758
16784
  success?: any,
@@ -16969,6 +16995,9 @@ var RESTController = {
16969
16995
  throw new Error('Cannot use the Master Key, it has not been provided.');
16970
16996
  }
16971
16997
  }
16998
+ if (options.ignoreEmailVerification !== undefined) {
16999
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
17000
+ }
16972
17001
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
16973
17002
  payload._RevocableSession = '1';
16974
17003
  }