parse 5.1.0-alpha.1 → 5.1.0-alpha.2
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 +56 -23
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +56 -23
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/OfflineQuery.js +3 -2
- package/lib/browser/ParseUser.js +50 -15
- package/lib/browser/RESTController.js +0 -3
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/OfflineQuery.js +3 -2
- package/lib/node/ParseUser.js +19 -13
- package/lib/node/RESTController.js +0 -3
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/OfflineQuery.js +3 -2
- package/lib/react-native/ParseUser.js +5 -2
- package/lib/react-native/RESTController.js +0 -3
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/OfflineQuery.js +3 -2
- package/lib/weapp/ParseUser.js +50 -15
- package/lib/weapp/RESTController.js +0 -3
- 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.2
|
|
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.1.0-alpha.
|
|
560
|
+
VERSION: 'js' + "5.1.0-alpha.2",
|
|
561
561
|
APPLICATION_ID: null,
|
|
562
562
|
JAVASCRIPT_KEY: null,
|
|
563
563
|
MASTER_KEY: null,
|
|
@@ -3995,12 +3995,13 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
|
|
|
3995
3995
|
}
|
|
3996
3996
|
// More complex cases
|
|
3997
3997
|
for (var condition in constraints) {
|
|
3998
|
+
var _compareTo, _compareTo2;
|
|
3998
3999
|
compareTo = constraints[condition];
|
|
3999
|
-
if (compareTo.__type) {
|
|
4000
|
+
if ((_compareTo = compareTo) !== null && _compareTo !== void 0 && _compareTo.__type) {
|
|
4000
4001
|
compareTo = decode(compareTo);
|
|
4001
4002
|
}
|
|
4002
4003
|
// is it a $relativeTime? convert to date
|
|
4003
|
-
if (compareTo['$relativeTime']) {
|
|
4004
|
+
if ((_compareTo2 = compareTo) !== null && _compareTo2 !== void 0 && _compareTo2['$relativeTime']) {
|
|
4004
4005
|
var parserResult = relativeTimeToDate(compareTo['$relativeTime']);
|
|
4005
4006
|
if (parserResult.status !== 'success') {
|
|
4006
4007
|
var _context2;
|
|
@@ -15059,6 +15060,13 @@ exports.default = _default;
|
|
|
15059
15060
|
"use strict";
|
|
15060
15061
|
|
|
15061
15062
|
var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
15063
|
+
var _Object$keys = _dereq_("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
15064
|
+
var _Object$getOwnPropertySymbols = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
15065
|
+
var _filterInstanceProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
15066
|
+
var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
15067
|
+
var _forEachInstanceProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
15068
|
+
var _Object$getOwnPropertyDescriptors = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
15069
|
+
var _Object$defineProperties = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
15062
15070
|
var _Object$defineProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
15063
15071
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
15064
15072
|
_Object$defineProperty2(exports, "__esModule", {
|
|
@@ -15067,8 +15075,9 @@ _Object$defineProperty2(exports, "__esModule", {
|
|
|
15067
15075
|
exports.default = void 0;
|
|
15068
15076
|
var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
|
|
15069
15077
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
15070
|
-
var
|
|
15078
|
+
var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
|
15071
15079
|
var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
15080
|
+
var _defineProperty3 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
15072
15081
|
var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
15073
15082
|
var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
|
|
15074
15083
|
var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
@@ -15083,6 +15092,28 @@ var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
|
|
|
15083
15092
|
var _ParseObject2 = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
15084
15093
|
var _ParseSession = _interopRequireDefault(_dereq_("./ParseSession"));
|
|
15085
15094
|
var _Storage = _interopRequireDefault(_dereq_("./Storage"));
|
|
15095
|
+
function ownKeys(object, enumerableOnly) {
|
|
15096
|
+
var keys = _Object$keys(object);
|
|
15097
|
+
if (_Object$getOwnPropertySymbols) {
|
|
15098
|
+
var symbols = _Object$getOwnPropertySymbols(object);
|
|
15099
|
+
enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
15100
|
+
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
15101
|
+
})), keys.push.apply(keys, symbols);
|
|
15102
|
+
}
|
|
15103
|
+
return keys;
|
|
15104
|
+
}
|
|
15105
|
+
function _objectSpread(target) {
|
|
15106
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
15107
|
+
var _context7, _context8;
|
|
15108
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
15109
|
+
i % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) {
|
|
15110
|
+
(0, _defineProperty3.default)(target, key, source[key]);
|
|
15111
|
+
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys(Object(source))).call(_context8, function (key) {
|
|
15112
|
+
_Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key));
|
|
15113
|
+
});
|
|
15114
|
+
}
|
|
15115
|
+
return target;
|
|
15116
|
+
}
|
|
15086
15117
|
function _createSuper(Derived) {
|
|
15087
15118
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
15088
15119
|
return function () {
|
|
@@ -15819,10 +15850,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15819
15850
|
/**
|
|
15820
15851
|
* Verify whether a given password is the password of the current user.
|
|
15821
15852
|
*
|
|
15822
|
-
* @param {string} password
|
|
15823
|
-
* @param {object} options
|
|
15824
|
-
* @
|
|
15825
|
-
*
|
|
15853
|
+
* @param {string} password The password to be verified.
|
|
15854
|
+
* @param {object} options The options.
|
|
15855
|
+
* @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
|
|
15856
|
+
* the password regardless of whether the email has been verified. This requires the master key.
|
|
15857
|
+
* @returns {Promise} A promise that is fulfilled with a user when the password is correct.
|
|
15826
15858
|
*/
|
|
15827
15859
|
}, {
|
|
15828
15860
|
key: "verifyPassword",
|
|
@@ -15850,7 +15882,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15850
15882
|
if (protoProps) {
|
|
15851
15883
|
for (var _prop in protoProps) {
|
|
15852
15884
|
if (_prop !== 'className') {
|
|
15853
|
-
(0,
|
|
15885
|
+
(0, _defineProperty2.default)(ParseUser.prototype, _prop, {
|
|
15854
15886
|
value: protoProps[_prop],
|
|
15855
15887
|
enumerable: false,
|
|
15856
15888
|
writable: true,
|
|
@@ -15862,7 +15894,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15862
15894
|
if (classProps) {
|
|
15863
15895
|
for (var _prop2 in classProps) {
|
|
15864
15896
|
if (_prop2 !== 'className') {
|
|
15865
|
-
(0,
|
|
15897
|
+
(0, _defineProperty2.default)(ParseUser, _prop2, {
|
|
15866
15898
|
value: classProps[_prop2],
|
|
15867
15899
|
enumerable: false,
|
|
15868
15900
|
writable: true,
|
|
@@ -16165,13 +16197,14 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
16165
16197
|
|
|
16166
16198
|
/**
|
|
16167
16199
|
* Verify whether a given password is the password of the current user.
|
|
16168
|
-
*
|
|
16169
|
-
* @param {string} username A username to be used for identificaiton
|
|
16170
|
-
* @param {string} password A password to be verified
|
|
16171
|
-
* @param {object} options
|
|
16172
16200
|
* @static
|
|
16173
|
-
*
|
|
16174
|
-
*
|
|
16201
|
+
*
|
|
16202
|
+
* @param {string} username The username of the user whose password should be verified.
|
|
16203
|
+
* @param {string} password The password to be verified.
|
|
16204
|
+
* @param {object} options The options.
|
|
16205
|
+
* @param {boolean} [options.ignoreEmailVerification=false] Set to `true` to bypass email verification and verify
|
|
16206
|
+
* the password regardless of whether the email has been verified. This requires the master key.
|
|
16207
|
+
* @returns {Promise} A promise that is fulfilled with a user when the password is correct.
|
|
16175
16208
|
*/
|
|
16176
16209
|
}, {
|
|
16177
16210
|
key: "verifyPassword",
|
|
@@ -16582,10 +16615,13 @@ var DefaultController = {
|
|
|
16582
16615
|
},
|
|
16583
16616
|
verifyPassword: function (username /*: string*/, password /*: string*/, options /*: RequestOptions*/) {
|
|
16584
16617
|
var RESTController = _CoreManager.default.getRESTController();
|
|
16585
|
-
|
|
16618
|
+
var data = _objectSpread({
|
|
16586
16619
|
username: username,
|
|
16587
16620
|
password: password
|
|
16588
|
-
}, options
|
|
16621
|
+
}, options.ignoreEmailVerification !== undefined && {
|
|
16622
|
+
ignoreEmailVerification: options.ignoreEmailVerification
|
|
16623
|
+
});
|
|
16624
|
+
return RESTController.request('GET', 'verifyPassword', data, options);
|
|
16589
16625
|
},
|
|
16590
16626
|
requestEmailVerification: function (email /*: string*/, options /*: RequestOptions*/) {
|
|
16591
16627
|
var RESTController = _CoreManager.default.getRESTController();
|
|
@@ -16597,7 +16633,7 @@ var DefaultController = {
|
|
|
16597
16633
|
_CoreManager.default.setUserController(DefaultController);
|
|
16598
16634
|
var _default = ParseUser;
|
|
16599
16635
|
exports.default = _default;
|
|
16600
|
-
},{"./CoreManager":4,"./ParseError":22,"./ParseObject":27,"./ParseSession":34,"./Storage":39,"./isRevocableSession":49,"@babel/runtime-corejs3/core-js-stable/json/stringify":75,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/core-js-stable/reflect/construct":91,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/classCallCheck":103,"@babel/runtime-corejs3/helpers/createClass":105,"@babel/runtime-corejs3/helpers/get":107,"@babel/runtime-corejs3/helpers/getPrototypeOf":108,"@babel/runtime-corejs3/helpers/inherits":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":117,"@babel/runtime-corejs3/helpers/typeof":125,"@babel/runtime-corejs3/regenerator":128}],36:[function(_dereq_,module,exports){
|
|
16636
|
+
},{"./CoreManager":4,"./ParseError":22,"./ParseObject":27,"./ParseSession":34,"./Storage":39,"./isRevocableSession":49,"@babel/runtime-corejs3/core-js-stable/instance/filter":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/core-js-stable/json/stringify":75,"@babel/runtime-corejs3/core-js-stable/object/define-properties":80,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":85,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":86,"@babel/runtime-corejs3/core-js-stable/object/keys":88,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/core-js-stable/reflect/construct":91,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/classCallCheck":103,"@babel/runtime-corejs3/helpers/createClass":105,"@babel/runtime-corejs3/helpers/defineProperty":106,"@babel/runtime-corejs3/helpers/get":107,"@babel/runtime-corejs3/helpers/getPrototypeOf":108,"@babel/runtime-corejs3/helpers/inherits":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":117,"@babel/runtime-corejs3/helpers/typeof":125,"@babel/runtime-corejs3/regenerator":128}],36:[function(_dereq_,module,exports){
|
|
16601
16637
|
"use strict";
|
|
16602
16638
|
|
|
16603
16639
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -17004,9 +17040,6 @@ var RESTController = {
|
|
|
17004
17040
|
throw new Error('Cannot use the Master Key, it has not been provided.');
|
|
17005
17041
|
}
|
|
17006
17042
|
}
|
|
17007
|
-
if (options.ignoreEmailVerification !== undefined) {
|
|
17008
|
-
payload.ignoreEmailVerification = options.ignoreEmailVerification;
|
|
17009
|
-
}
|
|
17010
17043
|
if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
|
|
17011
17044
|
payload._RevocableSession = '1';
|
|
17012
17045
|
}
|