parse 5.0.0 → 5.1.0-alpha.1

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.
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
187
187
  SERVER_AUTH_TOKEN: null,
188
188
  LIVEQUERY_SERVER_URL: null,
189
189
  ENCRYPTED_KEY: null,
190
- VERSION: 'js' + "5.0.0",
190
+ VERSION: 'js' + "5.1.0-alpha.1",
191
191
  APPLICATION_ID: null,
192
192
  JAVASCRIPT_KEY: null,
193
193
  MASTER_KEY: null,
@@ -1573,14 +1573,17 @@ var ParseObject = /*#__PURE__*/function () {
1573
1573
  attrs[arg1] = arg2;
1574
1574
  options = arg3;
1575
1575
  }
1576
+ options = options || {};
1576
1577
  if (attrs) {
1577
- var validation = this.validate(attrs);
1578
- if (validation) {
1579
- return _promise.default.reject(validation);
1578
+ var validationError;
1579
+ options.error = function (_, validation) {
1580
+ validationError = validation;
1581
+ };
1582
+ var success = this.set(attrs, options);
1583
+ if (!success) {
1584
+ return _promise.default.reject(validationError);
1580
1585
  }
1581
- this.set(attrs, options);
1582
1586
  }
1583
- options = options || {};
1584
1587
  var saveOptions = {};
1585
1588
  if (options.hasOwnProperty('useMasterKey')) {
1586
1589
  saveOptions.useMasterKey = !!options.useMasterKey;
@@ -1124,13 +1124,8 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
1124
1124
  if (typeof password !== 'string') {
1125
1125
  return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
1126
1126
  }
1127
- options = options || {};
1128
- var verificationOption = {};
1129
- if (options.hasOwnProperty('useMasterKey')) {
1130
- verificationOption.useMasterKey = options.useMasterKey;
1131
- }
1132
1127
  var controller = _CoreManager.default.getUserController();
1133
- return controller.verifyPassword(username, password, verificationOption);
1128
+ return controller.verifyPassword(username, password, options || {});
1134
1129
  }
1135
1130
 
1136
1131
  /**
@@ -56,6 +56,7 @@ var uuidv4 = require('./uuid');
56
56
  progress?: any,
57
57
  context?: any,
58
58
  usePost?: boolean,
59
+ ignoreEmailVerification?: boolean,
59
60
  };*/
60
61
  /*:: export type FullOptions = {
61
62
  success?: any,
@@ -271,6 +272,9 @@ var RESTController = {
271
272
  throw new Error('Cannot use the Master Key, it has not been provided.');
272
273
  }
273
274
  }
275
+ if (options.ignoreEmailVerification !== undefined) {
276
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
277
+ }
274
278
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
275
279
  payload._RevocableSession = '1';
276
280
  }
@@ -183,7 +183,7 @@ const config /*: Config & { [key: string]: mixed }*/ = {
183
183
  SERVER_AUTH_TOKEN: null,
184
184
  LIVEQUERY_SERVER_URL: null,
185
185
  ENCRYPTED_KEY: null,
186
- VERSION: 'js' + "5.0.0",
186
+ VERSION: 'js' + "5.1.0-alpha.1",
187
187
  APPLICATION_ID: null,
188
188
  JAVASCRIPT_KEY: null,
189
189
  MASTER_KEY: null,
@@ -1290,14 +1290,17 @@ class ParseObject {
1290
1290
  attrs[arg1] = arg2;
1291
1291
  options = arg3;
1292
1292
  }
1293
+ options = options || {};
1293
1294
  if (attrs) {
1294
- const validation = this.validate(attrs);
1295
- if (validation) {
1296
- return Promise.reject(validation);
1295
+ let validationError;
1296
+ options.error = (_, validation) => {
1297
+ validationError = validation;
1298
+ };
1299
+ const success = this.set(attrs, options);
1300
+ if (!success) {
1301
+ return Promise.reject(validationError);
1297
1302
  }
1298
- this.set(attrs, options);
1299
1303
  }
1300
- options = options || {};
1301
1304
  const saveOptions = {};
1302
1305
  if (options.hasOwnProperty('useMasterKey')) {
1303
1306
  saveOptions.useMasterKey = !!options.useMasterKey;
@@ -855,13 +855,8 @@ class ParseUser extends _ParseObject.default {
855
855
  if (typeof password !== 'string') {
856
856
  return Promise.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
857
857
  }
858
- options = options || {};
859
- const verificationOption = {};
860
- if (options.hasOwnProperty('useMasterKey')) {
861
- verificationOption.useMasterKey = options.useMasterKey;
862
- }
863
858
  const controller = _CoreManager.default.getUserController();
864
- return controller.verifyPassword(username, password, verificationOption);
859
+ return controller.verifyPassword(username, password, options || {});
865
860
  }
866
861
 
867
862
  /**
@@ -23,6 +23,7 @@ const uuidv4 = require('./uuid');
23
23
  progress?: any,
24
24
  context?: any,
25
25
  usePost?: boolean,
26
+ ignoreEmailVerification?: boolean,
26
27
  };*/
27
28
  /*:: export type FullOptions = {
28
29
  success?: any,
@@ -239,6 +240,9 @@ const RESTController = {
239
240
  throw new Error('Cannot use the Master Key, it has not been provided.');
240
241
  }
241
242
  }
243
+ if (options.ignoreEmailVerification !== undefined) {
244
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
245
+ }
242
246
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
243
247
  payload._RevocableSession = '1';
244
248
  }
@@ -12,7 +12,7 @@ var config = {
12
12
  SERVER_AUTH_TOKEN: null,
13
13
  LIVEQUERY_SERVER_URL: null,
14
14
  ENCRYPTED_KEY: null,
15
- VERSION: 'js' + "5.0.0",
15
+ VERSION: 'js' + "5.1.0-alpha.1",
16
16
  APPLICATION_ID: null,
17
17
  JAVASCRIPT_KEY: null,
18
18
  MASTER_KEY: null,
@@ -882,14 +882,17 @@ var ParseObject = function () {
882
882
  attrs[arg1] = arg2;
883
883
  options = arg3;
884
884
  }
885
+ options = options || {};
885
886
  if (attrs) {
886
- var validation = this.validate(attrs);
887
- if (validation) {
888
- return Promise.reject(validation);
887
+ var validationError;
888
+ options.error = function (_, validation) {
889
+ validationError = validation;
890
+ };
891
+ var success = this.set(attrs, options);
892
+ if (!success) {
893
+ return Promise.reject(validationError);
889
894
  }
890
- this.set(attrs, options);
891
895
  }
892
- options = options || {};
893
896
  var saveOptions = {};
894
897
  if (options.hasOwnProperty('useMasterKey')) {
895
898
  saveOptions.useMasterKey = !!options.useMasterKey;
@@ -634,13 +634,8 @@ var ParseUser = function (_ParseObject) {
634
634
  if (typeof password !== 'string') {
635
635
  return Promise.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
636
636
  }
637
- options = options || {};
638
- var verificationOption = {};
639
- if (options.hasOwnProperty('useMasterKey')) {
640
- verificationOption.useMasterKey = options.useMasterKey;
641
- }
642
637
  var controller = _CoreManager.default.getUserController();
643
- return controller.verifyPassword(username, password, verificationOption);
638
+ return controller.verifyPassword(username, password, options || {});
644
639
  }
645
640
  }, {
646
641
  key: "allowCustomUserClass",
@@ -200,6 +200,9 @@ var RESTController = {
200
200
  throw new Error('Cannot use the Master Key, it has not been provided.');
201
201
  }
202
202
  }
203
+ if (options.ignoreEmailVerification !== undefined) {
204
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
205
+ }
203
206
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
204
207
  payload._RevocableSession = '1';
205
208
  }
@@ -187,7 +187,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
187
187
  SERVER_AUTH_TOKEN: null,
188
188
  LIVEQUERY_SERVER_URL: null,
189
189
  ENCRYPTED_KEY: null,
190
- VERSION: 'js' + "5.0.0",
190
+ VERSION: 'js' + "5.1.0-alpha.1",
191
191
  APPLICATION_ID: null,
192
192
  JAVASCRIPT_KEY: null,
193
193
  MASTER_KEY: null,
@@ -1573,14 +1573,17 @@ var ParseObject = /*#__PURE__*/function () {
1573
1573
  attrs[arg1] = arg2;
1574
1574
  options = arg3;
1575
1575
  }
1576
+ options = options || {};
1576
1577
  if (attrs) {
1577
- var validation = this.validate(attrs);
1578
- if (validation) {
1579
- return _promise.default.reject(validation);
1578
+ var validationError;
1579
+ options.error = function (_, validation) {
1580
+ validationError = validation;
1581
+ };
1582
+ var success = this.set(attrs, options);
1583
+ if (!success) {
1584
+ return _promise.default.reject(validationError);
1580
1585
  }
1581
- this.set(attrs, options);
1582
1586
  }
1583
- options = options || {};
1584
1587
  var saveOptions = {};
1585
1588
  if (options.hasOwnProperty('useMasterKey')) {
1586
1589
  saveOptions.useMasterKey = !!options.useMasterKey;
@@ -1124,13 +1124,8 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
1124
1124
  if (typeof password !== 'string') {
1125
1125
  return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
1126
1126
  }
1127
- options = options || {};
1128
- var verificationOption = {};
1129
- if (options.hasOwnProperty('useMasterKey')) {
1130
- verificationOption.useMasterKey = options.useMasterKey;
1131
- }
1132
1127
  var controller = _CoreManager.default.getUserController();
1133
- return controller.verifyPassword(username, password, verificationOption);
1128
+ return controller.verifyPassword(username, password, options || {});
1134
1129
  }
1135
1130
 
1136
1131
  /**
@@ -56,6 +56,7 @@ var uuidv4 = require('./uuid');
56
56
  progress?: any,
57
57
  context?: any,
58
58
  usePost?: boolean,
59
+ ignoreEmailVerification?: boolean,
59
60
  };*/
60
61
  /*:: export type FullOptions = {
61
62
  success?: any,
@@ -272,6 +273,9 @@ var RESTController = {
272
273
  throw new Error('Cannot use the Master Key, it has not been provided.');
273
274
  }
274
275
  }
276
+ if (options.ignoreEmailVerification !== undefined) {
277
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
278
+ }
275
279
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
276
280
  payload._RevocableSession = '1';
277
281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "5.0.0",
3
+ "version": "5.1.0-alpha.1",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -85,7 +85,7 @@
85
85
  "lint-staged": "13.2.2",
86
86
  "metro-react-native-babel-preset": "0.76.4",
87
87
  "mongodb-runner": "5.4.3",
88
- "parse-server": "7.0.0-alpha.26",
88
+ "parse-server": "7.1.0-alpha.1",
89
89
  "prettier": "3.0.2",
90
90
  "puppeteer": "20.4.0",
91
91
  "regenerator-runtime": "0.13.11",