parse 4.2.0-alpha.7 → 4.2.0-alpha.9
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 +24 -8
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +24 -8
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +3 -2
- package/lib/browser/EventuallyQueue.js +3 -2
- package/lib/browser/ParseError.js +12 -1
- package/lib/browser/ParseUser.js +3 -0
- package/lib/node/CoreManager.js +3 -2
- package/lib/node/EventuallyQueue.js +3 -2
- package/lib/node/ParseError.js +15 -1
- package/lib/node/ParseUser.js +3 -0
- package/lib/react-native/CoreManager.js +3 -2
- package/lib/react-native/EventuallyQueue.js +3 -2
- package/lib/react-native/ParseError.js +8 -1
- package/lib/react-native/ParseUser.js +3 -0
- package/lib/weapp/CoreManager.js +3 -2
- package/lib/weapp/EventuallyQueue.js +3 -2
- package/lib/weapp/ParseError.js +12 -1
- package/lib/weapp/ParseUser.js +3 -0
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v4.2.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v4.2.0-alpha.9
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -538,7 +538,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
538
538
|
SERVER_AUTH_TOKEN: null,
|
|
539
539
|
LIVEQUERY_SERVER_URL: null,
|
|
540
540
|
ENCRYPTED_KEY: null,
|
|
541
|
-
VERSION: 'js' + "4.2.0-alpha.
|
|
541
|
+
VERSION: 'js' + "4.2.0-alpha.9",
|
|
542
542
|
APPLICATION_ID: null,
|
|
543
543
|
JAVASCRIPT_KEY: null,
|
|
544
544
|
MASTER_KEY: null,
|
|
@@ -547,7 +547,8 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
547
547
|
FORCE_REVOCABLE_SESSION: false,
|
|
548
548
|
ENCRYPTED_USER: false,
|
|
549
549
|
IDEMPOTENCY: false,
|
|
550
|
-
ALLOW_CUSTOM_OBJECT_ID: false
|
|
550
|
+
ALLOW_CUSTOM_OBJECT_ID: false,
|
|
551
|
+
PARSE_ERRORS: []
|
|
551
552
|
};
|
|
552
553
|
function requireMethods(name /*: string*/, methods /*: Array<string>*/, controller /*: any*/) {
|
|
553
554
|
(0, _forEach.default)(methods).call(methods, function (func) {
|
|
@@ -767,6 +768,7 @@ var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regene
|
|
|
767
768
|
var _toConsumableArray2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
768
769
|
var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
769
770
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
771
|
+
var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
|
|
770
772
|
var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
771
773
|
var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
|
|
772
774
|
var _Storage = _interopRequireDefault(_dereq_("./Storage"));
|
|
@@ -1158,7 +1160,7 @@ var EventuallyQueue = {
|
|
|
1158
1160
|
case 14:
|
|
1159
1161
|
_context6.prev = 14;
|
|
1160
1162
|
_context6.t1 = _context6["catch"](7);
|
|
1161
|
-
if (!(_context6.t1.
|
|
1163
|
+
if (!(_context6.t1.code !== _ParseError.default.CONNECTION_FAILED)) {
|
|
1162
1164
|
_context6.next = 19;
|
|
1163
1165
|
break;
|
|
1164
1166
|
}
|
|
@@ -1179,7 +1181,7 @@ var EventuallyQueue = {
|
|
|
1179
1181
|
case 27:
|
|
1180
1182
|
_context6.prev = 27;
|
|
1181
1183
|
_context6.t2 = _context6["catch"](20);
|
|
1182
|
-
if (!(_context6.t2.
|
|
1184
|
+
if (!(_context6.t2.code !== _ParseError.default.CONNECTION_FAILED)) {
|
|
1183
1185
|
_context6.next = 32;
|
|
1184
1186
|
break;
|
|
1185
1187
|
}
|
|
@@ -1309,7 +1311,7 @@ var EventuallyQueue = {
|
|
|
1309
1311
|
module.exports = EventuallyQueue;
|
|
1310
1312
|
var _default = EventuallyQueue;
|
|
1311
1313
|
exports.default = _default;
|
|
1312
|
-
},{"./CoreManager":4,"./ParseObject":27,"./ParseQuery":30,"./Storage":39,"@babel/runtime-corejs3/core-js-stable/instance/find":63,"@babel/runtime-corejs3/core-js-stable/instance/find-index":62,"@babel/runtime-corejs3/core-js-stable/instance/splice":72,"@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/set-interval":92,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/toConsumableArray":122,"@babel/runtime-corejs3/regenerator":128}],8:[function(_dereq_,module,exports){
|
|
1314
|
+
},{"./CoreManager":4,"./ParseError":22,"./ParseObject":27,"./ParseQuery":30,"./Storage":39,"@babel/runtime-corejs3/core-js-stable/instance/find":63,"@babel/runtime-corejs3/core-js-stable/instance/find-index":62,"@babel/runtime-corejs3/core-js-stable/instance/splice":72,"@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/set-interval":92,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/toConsumableArray":122,"@babel/runtime-corejs3/regenerator":128}],8:[function(_dereq_,module,exports){
|
|
1313
1315
|
"use strict";
|
|
1314
1316
|
|
|
1315
1317
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -6067,6 +6069,7 @@ _Object$defineProperty2(exports, "__esModule", {
|
|
|
6067
6069
|
value: true
|
|
6068
6070
|
});
|
|
6069
6071
|
exports.default = void 0;
|
|
6072
|
+
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
6070
6073
|
var _defineProperty = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
|
6071
6074
|
var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
6072
6075
|
var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
|
|
@@ -6075,6 +6078,7 @@ var _inherits2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/
|
|
|
6075
6078
|
var _possibleConstructorReturn2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
6076
6079
|
var _getPrototypeOf2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
6077
6080
|
var _wrapNativeSuper2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/wrapNativeSuper"));
|
|
6081
|
+
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
6078
6082
|
function _createSuper(Derived) {
|
|
6079
6083
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
6080
6084
|
return function () {
|
|
@@ -6103,6 +6107,8 @@ function _isNativeReflectConstruct() {
|
|
|
6103
6107
|
/**
|
|
6104
6108
|
* Constructs a new Parse.Error object with the given code and message.
|
|
6105
6109
|
*
|
|
6110
|
+
* Parse.CoreManager.set('PARSE_ERRORS', [{ code, message }]) can be use to override error messages.
|
|
6111
|
+
*
|
|
6106
6112
|
* @alias Parse.Error
|
|
6107
6113
|
*/
|
|
6108
6114
|
var ParseError = /*#__PURE__*/function (_Error) {
|
|
@@ -6113,13 +6119,20 @@ var ParseError = /*#__PURE__*/function (_Error) {
|
|
|
6113
6119
|
* @param {string} message A detailed description of the error.
|
|
6114
6120
|
*/
|
|
6115
6121
|
function ParseError(code, message) {
|
|
6122
|
+
var _context;
|
|
6116
6123
|
var _this;
|
|
6117
6124
|
(0, _classCallCheck2.default)(this, ParseError);
|
|
6118
6125
|
_this = _super.call(this, message);
|
|
6119
6126
|
_this.code = code;
|
|
6127
|
+
var customMessage = message;
|
|
6128
|
+
(0, _forEach.default)(_context = _CoreManager.default.get('PARSE_ERRORS')).call(_context, function (error) {
|
|
6129
|
+
if (error.code === code && error.code) {
|
|
6130
|
+
customMessage = error.message;
|
|
6131
|
+
}
|
|
6132
|
+
});
|
|
6120
6133
|
(0, _defineProperty.default)((0, _assertThisInitialized2.default)(_this), 'message', {
|
|
6121
6134
|
enumerable: true,
|
|
6122
|
-
value:
|
|
6135
|
+
value: customMessage
|
|
6123
6136
|
});
|
|
6124
6137
|
return _this;
|
|
6125
6138
|
}
|
|
@@ -6648,7 +6661,7 @@ ParseError.FILE_READ_ERROR = 601;
|
|
|
6648
6661
|
ParseError.X_DOMAIN_REQUEST = 602;
|
|
6649
6662
|
var _default = ParseError;
|
|
6650
6663
|
exports.default = _default;
|
|
6651
|
-
},{"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/reflect/construct":91,"@babel/runtime-corejs3/helpers/assertThisInitialized":101,"@babel/runtime-corejs3/helpers/classCallCheck":103,"@babel/runtime-corejs3/helpers/createClass":105,"@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/wrapNativeSuper":127}],23:[function(_dereq_,module,exports){
|
|
6664
|
+
},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/reflect/construct":91,"@babel/runtime-corejs3/helpers/assertThisInitialized":101,"@babel/runtime-corejs3/helpers/classCallCheck":103,"@babel/runtime-corejs3/helpers/createClass":105,"@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/wrapNativeSuper":127}],23:[function(_dereq_,module,exports){
|
|
6652
6665
|
"use strict";
|
|
6653
6666
|
|
|
6654
6667
|
var _Object$keys2 = _dereq_("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
@@ -15573,6 +15586,9 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15573
15586
|
if (options.hasOwnProperty('usePost')) {
|
|
15574
15587
|
loginOptions.usePost = options.usePost;
|
|
15575
15588
|
}
|
|
15589
|
+
if (options.hasOwnProperty('context') && Object.prototype.toString.call(options.context) === '[object Object]') {
|
|
15590
|
+
loginOptions.context = options.context;
|
|
15591
|
+
}
|
|
15576
15592
|
var controller = _CoreManager.default.getUserController();
|
|
15577
15593
|
return controller.logIn(this, loginOptions);
|
|
15578
15594
|
}
|