parse 3.5.1-beta.1 → 4.0.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.
Files changed (51) hide show
  1. package/README.md +17 -4
  2. package/dist/parse.js +451 -364
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +451 -364
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -1
  7. package/lib/browser/EventuallyQueue.js +31 -27
  8. package/lib/browser/LiveQueryClient.js +35 -18
  9. package/lib/browser/LocalDatastore.js +20 -20
  10. package/lib/browser/LocalDatastoreController.js +16 -14
  11. package/lib/browser/LocalDatastoreController.react-native.js +10 -10
  12. package/lib/browser/ParseCLP.js +32 -32
  13. package/lib/browser/ParseFile.js +26 -15
  14. package/lib/browser/ParseLiveQuery.js +6 -6
  15. package/lib/browser/ParseObject.js +84 -69
  16. package/lib/browser/ParseOp.js +3 -1
  17. package/lib/browser/ParseQuery.js +115 -88
  18. package/lib/browser/ParseUser.js +74 -64
  19. package/lib/browser/RESTController.js +6 -7
  20. package/lib/node/CoreManager.js +1 -1
  21. package/lib/node/LiveQueryClient.js +27 -14
  22. package/lib/node/ObjectStateMutations.js +14 -43
  23. package/lib/node/ParseCLP.js +12 -41
  24. package/lib/node/ParseFile.js +15 -41
  25. package/lib/node/ParseObject.js +13 -41
  26. package/lib/node/ParseQuery.js +3 -1
  27. package/lib/node/RESTController.js +2 -43
  28. package/lib/react-native/CoreManager.js +1 -1
  29. package/lib/react-native/LiveQueryClient.js +35 -18
  30. package/lib/react-native/LocalDatastore.js +3 -2
  31. package/lib/react-native/ParseCLP.js +32 -32
  32. package/lib/react-native/ParseFile.js +9 -3
  33. package/lib/react-native/ParseObject.js +14 -9
  34. package/lib/react-native/ParseOp.js +3 -1
  35. package/lib/react-native/ParseQuery.js +21 -7
  36. package/lib/react-native/RESTController.js +6 -7
  37. package/lib/weapp/CoreManager.js +1 -1
  38. package/lib/weapp/EventuallyQueue.js +31 -27
  39. package/lib/weapp/LiveQueryClient.js +35 -18
  40. package/lib/weapp/LocalDatastore.js +20 -20
  41. package/lib/weapp/LocalDatastoreController.js +16 -14
  42. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  43. package/lib/weapp/ParseCLP.js +32 -32
  44. package/lib/weapp/ParseFile.js +26 -15
  45. package/lib/weapp/ParseLiveQuery.js +6 -6
  46. package/lib/weapp/ParseObject.js +84 -69
  47. package/lib/weapp/ParseOp.js +3 -1
  48. package/lib/weapp/ParseQuery.js +115 -88
  49. package/lib/weapp/ParseUser.js +74 -64
  50. package/lib/weapp/RESTController.js +6 -7
  51. package/package.json +6 -2
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.1-beta.1
2
+ * Parse JavaScript SDK v4.0.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
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "3.5.1-beta.1",
702
+ VERSION: 'js' + "4.0.0-alpha.2",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -1543,7 +1543,7 @@ var EventuallyQueue = {
1543
1543
 
1544
1544
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1545
1545
  var queueData, queueId, index, prop;
1546
- return _regeneratorRuntime().wrap(function (_context) {
1546
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1547
1547
  while (1) {
1548
1548
  switch (_context.prev = _context.next) {
1549
1549
  case 0:
@@ -1586,10 +1586,10 @@ var EventuallyQueue = {
1586
1586
  }, _callee);
1587
1587
  }))();
1588
1588
  },
1589
- store: function (data) {
1589
+ store: function store(data) {
1590
1590
  return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
1591
1591
  },
1592
- load: function () {
1592
+ load: function load() {
1593
1593
  return _Storage.default.getItemAsync(QUEUE_KEY);
1594
1594
  },
1595
1595
 
@@ -1601,11 +1601,13 @@ var EventuallyQueue = {
1601
1601
  * @returns {Promise<Array>}
1602
1602
  * @static
1603
1603
  */
1604
- getQueue: function ()
1604
+ getQueue: function getQueue()
1605
1605
  /*: Promise<Array>*/
1606
1606
  {
1607
+ var _this2 = this;
1608
+
1607
1609
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1608
- return _regeneratorRuntime().wrap(function (_context2) {
1610
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1609
1611
  while (1) {
1610
1612
  switch (_context2.prev = _context2.next) {
1611
1613
  case 0:
@@ -1616,7 +1618,7 @@ var EventuallyQueue = {
1616
1618
 
1617
1619
  _context2.t0 = JSON;
1618
1620
  _context2.next = 4;
1619
- return this.load();
1621
+ return _this2.load();
1620
1622
 
1621
1623
  case 4:
1622
1624
  _context2.t1 = _context2.sent;
@@ -1653,7 +1655,7 @@ var EventuallyQueue = {
1653
1655
  * @static
1654
1656
  * @ignore
1655
1657
  */
1656
- setQueue: function (queue
1658
+ setQueue: function setQueue(queue
1657
1659
  /*: Queue*/
1658
1660
  )
1659
1661
  /*: Promise<void>*/
@@ -1670,7 +1672,7 @@ var EventuallyQueue = {
1670
1672
  * @static
1671
1673
  * @ignore
1672
1674
  */
1673
- remove: function (queueId
1675
+ remove: function remove(queueId
1674
1676
  /*: string*/
1675
1677
  )
1676
1678
  /*: Promise<void>*/
@@ -1679,7 +1681,7 @@ var EventuallyQueue = {
1679
1681
 
1680
1682
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1681
1683
  var queueData, index;
1682
- return _regeneratorRuntime().wrap(function (_context3) {
1684
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1683
1685
  while (1) {
1684
1686
  switch (_context3.prev = _context3.next) {
1685
1687
  case 0:
@@ -1716,7 +1718,7 @@ var EventuallyQueue = {
1716
1718
  * @returns {Promise} A promise that is fulfilled when queue is cleared.
1717
1719
  * @static
1718
1720
  */
1719
- clear: function ()
1721
+ clear: function clear()
1720
1722
  /*: Promise*/
1721
1723
  {
1722
1724
  queueCache = [];
@@ -1732,7 +1734,7 @@ var EventuallyQueue = {
1732
1734
  * @static
1733
1735
  * @ignore
1734
1736
  */
1735
- queueItemExists: function (queue
1737
+ queueItemExists: function queueItemExists(queue
1736
1738
  /*: Queue*/
1737
1739
  , queueId
1738
1740
  /*: string*/
@@ -1752,17 +1754,19 @@ var EventuallyQueue = {
1752
1754
  * @returns {number}
1753
1755
  * @static
1754
1756
  */
1755
- length: function ()
1757
+ length: function length()
1756
1758
  /*: number*/
1757
1759
  {
1760
+ var _this4 = this;
1761
+
1758
1762
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1759
1763
  var queueData;
1760
- return _regeneratorRuntime().wrap(function (_context4) {
1764
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1761
1765
  while (1) {
1762
1766
  switch (_context4.prev = _context4.next) {
1763
1767
  case 0:
1764
1768
  _context4.next = 2;
1765
- return this.getQueue();
1769
+ return _this4.getQueue();
1766
1770
 
1767
1771
  case 2:
1768
1772
  queueData = _context4.sent;
@@ -1785,14 +1789,14 @@ var EventuallyQueue = {
1785
1789
  * @returns {Promise<boolean>} Returns true if queue was sent successfully.
1786
1790
  * @static
1787
1791
  */
1788
- sendQueue: function ()
1792
+ sendQueue: function sendQueue()
1789
1793
  /*: Promise<boolean>*/
1790
1794
  {
1791
1795
  var _this5 = this;
1792
1796
 
1793
1797
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
1794
1798
  var queue, queueData, i, queueObject, id, hash, className, ObjectType;
1795
- return _regeneratorRuntime().wrap(function (_context5) {
1799
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1796
1800
  while (1) {
1797
1801
  switch (_context5.prev = _context5.next) {
1798
1802
  case 0:
@@ -1878,7 +1882,7 @@ var EventuallyQueue = {
1878
1882
  * @static
1879
1883
  * @ignore
1880
1884
  */
1881
- sendQueueCallback: function (object
1885
+ sendQueueCallback: function sendQueueCallback(object
1882
1886
  /*: ParseObject*/
1883
1887
  , queueObject
1884
1888
  /*: QueueObject*/
@@ -1888,7 +1892,7 @@ var EventuallyQueue = {
1888
1892
  var _this6 = this;
1889
1893
 
1890
1894
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1891
- return _regeneratorRuntime().wrap(function (_context6) {
1895
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1892
1896
  while (1) {
1893
1897
  switch (_context6.prev = _context6.next) {
1894
1898
  case 0:
@@ -1986,7 +1990,7 @@ var EventuallyQueue = {
1986
1990
  * @param [ms] Milliseconds to ping the server. Default 2000ms
1987
1991
  * @static
1988
1992
  */
1989
- poll: function () {
1993
+ poll: function poll() {
1990
1994
  var _this7 = this;
1991
1995
 
1992
1996
  var ms
@@ -2021,7 +2025,7 @@ var EventuallyQueue = {
2021
2025
  * @name Parse.EventuallyQueue.stopPoll
2022
2026
  * @static
2023
2027
  */
2024
- stopPoll: function () {
2028
+ stopPoll: function stopPoll() {
2025
2029
  clearInterval(polling);
2026
2030
  polling = undefined;
2027
2031
  },
@@ -2034,25 +2038,25 @@ var EventuallyQueue = {
2034
2038
  * @returns {boolean}
2035
2039
  * @static
2036
2040
  */
2037
- isPolling: function ()
2041
+ isPolling: function isPolling()
2038
2042
  /*: boolean*/
2039
2043
  {
2040
2044
  return !!polling;
2041
2045
  },
2042
- _setPolling: function (flag
2046
+ _setPolling: function _setPolling(flag
2043
2047
  /*: boolean*/
2044
2048
  ) {
2045
2049
  polling = flag;
2046
2050
  },
2047
2051
  process: {
2048
- create: function (ObjectType, queueObject) {
2052
+ create: function create(ObjectType, queueObject) {
2049
2053
  var object = new ObjectType();
2050
2054
  return EventuallyQueue.sendQueueCallback(object, queueObject);
2051
2055
  },
2052
- byId: function (ObjectType, queueObject) {
2056
+ byId: function byId(ObjectType, queueObject) {
2053
2057
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
2054
2058
  var sessionToken, query, results;
2055
- return _regeneratorRuntime().wrap(function (_context7) {
2059
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2056
2060
  while (1) {
2057
2061
  switch (_context7.prev = _context7.next) {
2058
2062
  case 0:
@@ -2076,10 +2080,10 @@ var EventuallyQueue = {
2076
2080
  }, _callee7);
2077
2081
  }))();
2078
2082
  },
2079
- byHash: function (ObjectType, queueObject) {
2083
+ byHash: function byHash(ObjectType, queueObject) {
2080
2084
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
2081
2085
  var sessionToken, query, results;
2082
- return _regeneratorRuntime().wrap(function (_context8) {
2086
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2083
2087
  while (1) {
2084
2088
  switch (_context8.prev = _context8.next) {
2085
2089
  case 0:
@@ -2549,6 +2553,8 @@ var _LiveQuerySubscription = _interopRequireDefault(_dereq_("./LiveQuerySubscrip
2549
2553
 
2550
2554
  var _promiseUtils = _dereq_("./promiseUtils");
2551
2555
 
2556
+ var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
2557
+
2552
2558
  function _createForOfIteratorHelper(o, allowArrayLike) {
2553
2559
  var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"];
2554
2560
 
@@ -2852,6 +2858,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2852
2858
  )
2853
2859
  /*: LiveQuerySubscription*/
2854
2860
  {
2861
+ var _this2 = this;
2862
+
2855
2863
  if (!query) {
2856
2864
  return;
2857
2865
  }
@@ -2878,7 +2886,9 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2878
2886
  this.subscriptions.set(this.requestId, subscription);
2879
2887
  this.requestId += 1;
2880
2888
  this.connectPromise.then(function () {
2881
- this.socket.send((0, _stringify.default)(subscribeRequest));
2889
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2890
+ }).catch(function (error) {
2891
+ subscription.subscribePromise.reject(error);
2882
2892
  });
2883
2893
  return subscription;
2884
2894
  }
@@ -2893,6 +2903,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2893
2903
  value: function (subscription
2894
2904
  /*: Object*/
2895
2905
  ) {
2906
+ var _this3 = this;
2907
+
2896
2908
  if (!subscription) {
2897
2909
  return;
2898
2910
  }
@@ -2903,7 +2915,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2903
2915
  requestId: subscription.id
2904
2916
  };
2905
2917
  this.connectPromise.then(function () {
2906
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2918
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2907
2919
  });
2908
2920
  }
2909
2921
  /**
@@ -3089,26 +3101,35 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
3089
3101
  break;
3090
3102
 
3091
3103
  case OP_EVENTS.ERROR:
3092
- if (data.requestId) {
3093
- if (subscription) {
3094
- subscription.subscribePromise.resolve();
3095
- (0, _setTimeout2.default)(function () {
3096
- return subscription.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR, data.error);
3097
- }, 200);
3104
+ {
3105
+ var parseError = new _ParseError.default(data.code, data.error);
3106
+
3107
+ if (!this.id) {
3108
+ this.connectPromise.reject(parseError);
3109
+ this.state = CLIENT_STATE.DISCONNECTED;
3098
3110
  }
3099
- } else {
3100
- this.emit(CLIENT_EMMITER_TYPES.ERROR, data.error);
3101
- }
3102
3111
 
3103
- if (data.error === 'Additional properties not allowed') {
3104
- this.additionalProperties = false;
3105
- }
3112
+ if (data.requestId) {
3113
+ if (subscription) {
3114
+ subscription.subscribePromise.reject(parseError);
3115
+ (0, _setTimeout2.default)(function () {
3116
+ return subscription.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR, data.error);
3117
+ }, 200);
3118
+ }
3119
+ } else {
3120
+ this.emit(CLIENT_EMMITER_TYPES.ERROR, data.error);
3121
+ }
3106
3122
 
3107
- if (data.reconnect) {
3108
- this._handleReconnect();
3109
- }
3123
+ if (data.error === 'Additional properties not allowed') {
3124
+ this.additionalProperties = false;
3125
+ }
3110
3126
 
3111
- break;
3127
+ if (data.reconnect) {
3128
+ this._handleReconnect();
3129
+ }
3130
+
3131
+ break;
3132
+ }
3112
3133
 
3113
3134
  case OP_EVENTS.UNSUBSCRIBED:
3114
3135
  // We have already deleted subscription in unsubscribe(), do nothing here
@@ -3243,7 +3264,7 @@ _CoreManager.default.setWebSocketController(typeof WebSocket === 'function' || (
3243
3264
 
3244
3265
  var _default = LiveQueryClient;
3245
3266
  exports.default = _default;
3246
- },{"./CoreManager":4,"./EventEmitter":6,"./LiveQuerySubscription":12,"./ParseObject":27,"./promiseUtils":51,"@babel/runtime-corejs3/core-js-stable/array/from":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":56,"@babel/runtime-corejs3/core-js-stable/instance/bind":57,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/core-js-stable/instance/index-of":66,"@babel/runtime-corejs3/core-js-stable/instance/keys":67,"@babel/runtime-corejs3/core-js-stable/instance/slice":71,"@babel/runtime-corejs3/core-js-stable/instance/values":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":76,"@babel/runtime-corejs3/core-js-stable/map":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/reflect/construct":93,"@babel/runtime-corejs3/core-js-stable/set-timeout":95,"@babel/runtime-corejs3/core-js-stable/symbol":97,"@babel/runtime-corejs3/core-js/get-iterator-method":101,"@babel/runtime-corejs3/helpers/assertThisInitialized":119,"@babel/runtime-corejs3/helpers/classCallCheck":121,"@babel/runtime-corejs3/helpers/createClass":123,"@babel/runtime-corejs3/helpers/defineProperty":124,"@babel/runtime-corejs3/helpers/getPrototypeOf":126,"@babel/runtime-corejs3/helpers/inherits":127,"@babel/runtime-corejs3/helpers/interopRequireDefault":128,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":135,"@babel/runtime-corejs3/helpers/typeof":140}],12:[function(_dereq_,module,exports){
3267
+ },{"./CoreManager":4,"./EventEmitter":6,"./LiveQuerySubscription":12,"./ParseError":22,"./ParseObject":27,"./promiseUtils":51,"@babel/runtime-corejs3/core-js-stable/array/from":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":56,"@babel/runtime-corejs3/core-js-stable/instance/bind":57,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/core-js-stable/instance/index-of":66,"@babel/runtime-corejs3/core-js-stable/instance/keys":67,"@babel/runtime-corejs3/core-js-stable/instance/slice":71,"@babel/runtime-corejs3/core-js-stable/instance/values":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":76,"@babel/runtime-corejs3/core-js-stable/map":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/reflect/construct":93,"@babel/runtime-corejs3/core-js-stable/set-timeout":95,"@babel/runtime-corejs3/core-js-stable/symbol":97,"@babel/runtime-corejs3/core-js/get-iterator-method":101,"@babel/runtime-corejs3/helpers/assertThisInitialized":119,"@babel/runtime-corejs3/helpers/classCallCheck":121,"@babel/runtime-corejs3/helpers/createClass":123,"@babel/runtime-corejs3/helpers/defineProperty":124,"@babel/runtime-corejs3/helpers/getPrototypeOf":126,"@babel/runtime-corejs3/helpers/inherits":127,"@babel/runtime-corejs3/helpers/interopRequireDefault":128,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":135,"@babel/runtime-corejs3/helpers/typeof":140}],12:[function(_dereq_,module,exports){
3247
3268
  "use strict";
3248
3269
 
3249
3270
  var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
@@ -4042,7 +4063,7 @@ var LocalDatastore = {
4042
4063
 
4043
4064
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
4044
4065
 
4045
- return _regeneratorRuntime().wrap(function (_context2) {
4066
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4046
4067
  while (1) {
4047
4068
  switch (_context2.prev = _context2.next) {
4048
4069
  case 0:
@@ -4096,7 +4117,7 @@ var LocalDatastore = {
4096
4117
  },
4097
4118
  // Removes object and children keys from pin name
4098
4119
  // Keeps the object and children pinned
4099
- _handleUnPinAllWithName: function (name
4120
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4100
4121
  /*: string*/
4101
4122
  , objects
4102
4123
  /*: Array<ParseObject>*/
@@ -4106,7 +4127,7 @@ var LocalDatastore = {
4106
4127
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4107
4128
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4108
4129
 
4109
- return _regeneratorRuntime().wrap(function (_context4) {
4130
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4110
4131
  while (1) {
4111
4132
  switch (_context4.prev = _context4.next) {
4112
4133
  case 0:
@@ -4228,7 +4249,7 @@ var LocalDatastore = {
4228
4249
  }))();
4229
4250
  },
4230
4251
  // Retrieve all pointer fields from object recursively
4231
- _getChildren: function (object
4252
+ _getChildren: function _getChildren(object
4232
4253
  /*: ParseObject*/
4233
4254
  ) {
4234
4255
  var encountered = {};
@@ -4243,7 +4264,7 @@ var LocalDatastore = {
4243
4264
 
4244
4265
  return encountered;
4245
4266
  },
4246
- _traverse: function (object
4267
+ _traverse: function _traverse(object
4247
4268
  /*: any*/
4248
4269
  , encountered
4249
4270
  /*: any*/
@@ -4273,7 +4294,7 @@ var LocalDatastore = {
4273
4294
  }
4274
4295
  },
4275
4296
  // Transform keys in pin name to objects
4276
- _serializeObjectsFromPinName: function (name
4297
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4277
4298
  /*: string*/
4278
4299
  ) {
4279
4300
  var _this3 = this;
@@ -4282,7 +4303,7 @@ var LocalDatastore = {
4282
4303
  var _context5, _concatInstanceProper, _context6;
4283
4304
 
4284
4305
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4285
- return _regeneratorRuntime().wrap(function (_context7) {
4306
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4286
4307
  while (1) {
4287
4308
  switch (_context7.prev = _context7.next) {
4288
4309
  case 0:
@@ -4342,7 +4363,7 @@ var LocalDatastore = {
4342
4363
  // Replaces object pointers with pinned pointers
4343
4364
  // The object pointers may contain old data
4344
4365
  // Uses Breadth First Search Algorithm
4345
- _serializeObject: function (objectKey
4366
+ _serializeObject: function _serializeObject(objectKey
4346
4367
  /*: string*/
4347
4368
  , localDatastore
4348
4369
  /*: any*/
@@ -4351,7 +4372,7 @@ var LocalDatastore = {
4351
4372
 
4352
4373
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4353
4374
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4354
- return _regeneratorRuntime().wrap(function (_context8) {
4375
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4355
4376
  while (1) {
4356
4377
  switch (_context8.prev = _context8.next) {
4357
4378
  case 0:
@@ -4417,7 +4438,7 @@ var LocalDatastore = {
4417
4438
  },
4418
4439
  // Called when an object is save / fetched
4419
4440
  // Update object pin value
4420
- _updateObjectIfPinned: function (object
4441
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4421
4442
  /*: ParseObject*/
4422
4443
  )
4423
4444
  /*: Promise<void>*/
@@ -4426,7 +4447,7 @@ var LocalDatastore = {
4426
4447
 
4427
4448
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4428
4449
  var objectKey, pinned;
4429
- return _regeneratorRuntime().wrap(function (_context9) {
4450
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4430
4451
  while (1) {
4431
4452
  switch (_context9.prev = _context9.next) {
4432
4453
  case 0:
@@ -4466,14 +4487,14 @@ var LocalDatastore = {
4466
4487
  // Called when object is destroyed
4467
4488
  // Unpin object and remove all references from pin names
4468
4489
  // TODO: Destroy children?
4469
- _destroyObjectIfPinned: function (object
4490
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4470
4491
  /*: ParseObject*/
4471
4492
  ) {
4472
4493
  var _this6 = this;
4473
4494
 
4474
4495
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4475
4496
  var localDatastore, objectKey, pin, promises, key, pinned;
4476
- return _regeneratorRuntime().wrap(function (_context10) {
4497
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4477
4498
  while (1) {
4478
4499
  switch (_context10.prev = _context10.next) {
4479
4500
  case 0:
@@ -4535,7 +4556,7 @@ var LocalDatastore = {
4535
4556
  }))();
4536
4557
  },
4537
4558
  // Update pin and references of the unsaved object
4538
- _updateLocalIdForObject: function (localId
4559
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4539
4560
  /*: string*/
4540
4561
  , object
4541
4562
  /*: ParseObject*/
@@ -4546,7 +4567,7 @@ var LocalDatastore = {
4546
4567
  var _context11, _context12;
4547
4568
 
4548
4569
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4549
- return _regeneratorRuntime().wrap(function (_context13) {
4570
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4550
4571
  while (1) {
4551
4572
  switch (_context13.prev = _context13.next) {
4552
4573
  case 0:
@@ -4618,7 +4639,7 @@ var LocalDatastore = {
4618
4639
  * @name Parse.LocalDatastore.updateFromServer
4619
4640
  * @static
4620
4641
  */
4621
- updateFromServer: function () {
4642
+ updateFromServer: function updateFromServer() {
4622
4643
  var _this8 = this;
4623
4644
 
4624
4645
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4626,7 +4647,7 @@ var LocalDatastore = {
4626
4647
 
4627
4648
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4628
4649
 
4629
- return _regeneratorRuntime().wrap(function (_context15) {
4650
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4630
4651
  while (1) {
4631
4652
  switch (_context15.prev = _context15.next) {
4632
4653
  case 0:
@@ -4745,7 +4766,7 @@ var LocalDatastore = {
4745
4766
  }, _callee8, null, [[24, 35]]);
4746
4767
  }))();
4747
4768
  },
4748
- getKeyForObject: function (object
4769
+ getKeyForObject: function getKeyForObject(object
4749
4770
  /*: any*/
4750
4771
  ) {
4751
4772
  var _context16, _context17;
@@ -4754,7 +4775,7 @@ var LocalDatastore = {
4754
4775
 
4755
4776
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4756
4777
  },
4757
- getPinName: function (pinName
4778
+ getPinName: function getPinName(pinName
4758
4779
  /*: ?string*/
4759
4780
  ) {
4760
4781
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4763,7 +4784,7 @@ var LocalDatastore = {
4763
4784
 
4764
4785
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4765
4786
  },
4766
- checkIfEnabled: function () {
4787
+ checkIfEnabled: function checkIfEnabled() {
4767
4788
  if (!this.isEnabled) {
4768
4789
  console.error('Parse.enableLocalDatastore() must be called first');
4769
4790
  }
@@ -5267,7 +5288,7 @@ var LocalDatastoreController = {
5267
5288
  {
5268
5289
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5269
5290
  var values, objects;
5270
- return _regeneratorRuntime().wrap(function (_context) {
5291
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5271
5292
  while (1) {
5272
5293
  switch (_context.prev = _context.next) {
5273
5294
  case 0:
@@ -5296,7 +5317,7 @@ var LocalDatastoreController = {
5296
5317
  }, _callee);
5297
5318
  }))();
5298
5319
  },
5299
- pinWithName: function (name
5320
+ pinWithName: function pinWithName(name
5300
5321
  /*: string*/
5301
5322
  , value
5302
5323
  /*: any*/
@@ -5304,17 +5325,17 @@ var LocalDatastoreController = {
5304
5325
  var values = (0, _stringify.default)(value);
5305
5326
  return _Storage.default.setItemAsync(name, values);
5306
5327
  },
5307
- unPinWithName: function (name
5328
+ unPinWithName: function unPinWithName(name
5308
5329
  /*: string*/
5309
5330
  ) {
5310
5331
  return _Storage.default.removeItemAsync(name);
5311
5332
  },
5312
- getAllContents: function ()
5333
+ getAllContents: function getAllContents()
5313
5334
  /*: Object*/
5314
5335
  {
5315
5336
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5316
5337
  var keys;
5317
- return _regeneratorRuntime().wrap(function (_context3) {
5338
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5318
5339
  while (1) {
5319
5340
  switch (_context3.prev = _context3.next) {
5320
5341
  case 0:
@@ -5326,7 +5347,7 @@ var LocalDatastoreController = {
5326
5347
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5327
5348
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5328
5349
  var LDS, value;
5329
- return _regeneratorRuntime().wrap(function (_context2) {
5350
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5330
5351
  while (1) {
5331
5352
  switch (_context2.prev = _context2.next) {
5332
5353
  case 0:
@@ -5364,7 +5385,7 @@ var LocalDatastoreController = {
5364
5385
  }, _callee2);
5365
5386
  }));
5366
5387
 
5367
- return function () {
5388
+ return function (_x, _x2) {
5368
5389
  return _ref.apply(this, arguments);
5369
5390
  };
5370
5391
  }(), _promise.default.resolve({})));
@@ -5378,12 +5399,12 @@ var LocalDatastoreController = {
5378
5399
  }))();
5379
5400
  },
5380
5401
  // Used for testing
5381
- getRawStorage: function ()
5402
+ getRawStorage: function getRawStorage()
5382
5403
  /*: Object*/
5383
5404
  {
5384
5405
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5385
5406
  var keys;
5386
- return _regeneratorRuntime().wrap(function (_context5) {
5407
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5387
5408
  while (1) {
5388
5409
  switch (_context5.prev = _context5.next) {
5389
5410
  case 0:
@@ -5395,7 +5416,7 @@ var LocalDatastoreController = {
5395
5416
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5396
5417
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5397
5418
  var LDS, value;
5398
- return _regeneratorRuntime().wrap(function (_context4) {
5419
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5399
5420
  while (1) {
5400
5421
  switch (_context4.prev = _context4.next) {
5401
5422
  case 0:
@@ -5420,7 +5441,7 @@ var LocalDatastoreController = {
5420
5441
  }, _callee4);
5421
5442
  }));
5422
5443
 
5423
- return function () {
5444
+ return function (_x3, _x4) {
5424
5445
  return _ref2.apply(this, arguments);
5425
5446
  };
5426
5447
  }(), _promise.default.resolve({})));
@@ -5433,13 +5454,15 @@ var LocalDatastoreController = {
5433
5454
  }, _callee5);
5434
5455
  }))();
5435
5456
  },
5436
- clear: function ()
5457
+ clear: function clear()
5437
5458
  /*: Promise*/
5438
5459
  {
5460
+ var _this = this;
5461
+
5439
5462
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5440
5463
  var keys, toRemove, _iterator, _step, key, promises;
5441
5464
 
5442
- return _regeneratorRuntime().wrap(function (_context6) {
5465
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5443
5466
  while (1) {
5444
5467
  switch (_context6.prev = _context6.next) {
5445
5468
  case 0:
@@ -5465,7 +5488,7 @@ var LocalDatastoreController = {
5465
5488
  _iterator.f();
5466
5489
  }
5467
5490
 
5468
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5491
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5469
5492
  return _context6.abrupt("return", _promise.default.all(promises));
5470
5493
 
5471
5494
  case 8:
@@ -7860,7 +7883,7 @@ var ParseCLP = /*#__PURE__*/function () {
7860
7883
  _step;
7861
7884
 
7862
7885
  try {
7863
- var _loop = function () {
7886
+ var _loop = function _loop() {
7864
7887
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7865
7888
  operation = _step$value[0],
7866
7889
  group = _step$value[1];
@@ -7991,7 +8014,7 @@ var ParseCLP = /*#__PURE__*/function () {
7991
8014
 
7992
8015
  (0, _createClass2.default)(ParseCLP, [{
7993
8016
  key: "toJSON",
7994
- value: function ()
8017
+ value: function toJSON()
7995
8018
  /*: PermissionsMap*/
7996
8019
  {
7997
8020
  return _objectSpread({}, this.permissionsMap);
@@ -8005,7 +8028,7 @@ var ParseCLP = /*#__PURE__*/function () {
8005
8028
 
8006
8029
  }, {
8007
8030
  key: "equals",
8008
- value: function (other
8031
+ value: function equals(other
8009
8032
  /*: ParseCLP*/
8010
8033
  )
8011
8034
  /*: boolean*/
@@ -8048,7 +8071,7 @@ var ParseCLP = /*#__PURE__*/function () {
8048
8071
  }
8049
8072
  }, {
8050
8073
  key: "_getRoleName",
8051
- value: function (role
8074
+ value: function _getRoleName(role
8052
8075
  /*: ParseRole | string*/
8053
8076
  )
8054
8077
  /*: string*/
@@ -8068,7 +8091,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8091
  }
8069
8092
  }, {
8070
8093
  key: "_parseEntity",
8071
- value: function (entity
8094
+ value: function _parseEntity(entity
8072
8095
  /*: Entity*/
8073
8096
  ) {
8074
8097
  var userId = entity;
@@ -8091,7 +8114,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8114
  }
8092
8115
  }, {
8093
8116
  key: "_setAccess",
8094
- value: function (permission
8117
+ value: function _setAccess(permission
8095
8118
  /*: string*/
8096
8119
  , userId
8097
8120
  /*: Entity*/
@@ -8123,7 +8146,7 @@ var ParseCLP = /*#__PURE__*/function () {
8123
8146
  }
8124
8147
  }, {
8125
8148
  key: "_getAccess",
8126
- value: function (permission
8149
+ value: function _getAccess(permission
8127
8150
  /*: string*/
8128
8151
  , userId
8129
8152
  /*: Entity*/
@@ -8146,7 +8169,7 @@ var ParseCLP = /*#__PURE__*/function () {
8146
8169
  }
8147
8170
  }, {
8148
8171
  key: "_setArrayAccess",
8149
- value: function (permission
8172
+ value: function _setArrayAccess(permission
8150
8173
  /*: string*/
8151
8174
  , userId
8152
8175
  /*: Entity*/
@@ -8172,7 +8195,7 @@ var ParseCLP = /*#__PURE__*/function () {
8172
8195
  }
8173
8196
  }, {
8174
8197
  key: "_setGroupPointerPermission",
8175
- value: function (operation
8198
+ value: function _setGroupPointerPermission(operation
8176
8199
  /*: string*/
8177
8200
  , pointerFields
8178
8201
  /*: string[]*/
@@ -8195,7 +8218,7 @@ var ParseCLP = /*#__PURE__*/function () {
8195
8218
  }
8196
8219
  }, {
8197
8220
  key: "_getGroupPointerPermissions",
8198
- value: function (operation
8221
+ value: function _getGroupPointerPermissions(operation
8199
8222
  /*: string*/
8200
8223
  )
8201
8224
  /*: string[]*/
@@ -8210,7 +8233,7 @@ var ParseCLP = /*#__PURE__*/function () {
8210
8233
 
8211
8234
  }, {
8212
8235
  key: "setReadUserFields",
8213
- value: function (pointerFields
8236
+ value: function setReadUserFields(pointerFields
8214
8237
  /*: string[]*/
8215
8238
  ) {
8216
8239
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8221,7 +8244,7 @@ var ParseCLP = /*#__PURE__*/function () {
8221
8244
 
8222
8245
  }, {
8223
8246
  key: "getReadUserFields",
8224
- value: function ()
8247
+ value: function getReadUserFields()
8225
8248
  /*: string[]*/
8226
8249
  {
8227
8250
  return this._getGroupPointerPermissions('readUserFields');
@@ -8234,7 +8257,7 @@ var ParseCLP = /*#__PURE__*/function () {
8234
8257
 
8235
8258
  }, {
8236
8259
  key: "setWriteUserFields",
8237
- value: function (pointerFields
8260
+ value: function setWriteUserFields(pointerFields
8238
8261
  /*: string[]*/
8239
8262
  ) {
8240
8263
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8245,7 +8268,7 @@ var ParseCLP = /*#__PURE__*/function () {
8245
8268
 
8246
8269
  }, {
8247
8270
  key: "getWriteUserFields",
8248
- value: function ()
8271
+ value: function getWriteUserFields()
8249
8272
  /*: string[]*/
8250
8273
  {
8251
8274
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8259,7 +8282,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8282
 
8260
8283
  }, {
8261
8284
  key: "setProtectedFields",
8262
- value: function (userId
8285
+ value: function setProtectedFields(userId
8263
8286
  /*: Entity*/
8264
8287
  , fields
8265
8288
  /*: string[]*/
@@ -8275,7 +8298,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8298
 
8276
8299
  }, {
8277
8300
  key: "getProtectedFields",
8278
- value: function (userId
8301
+ value: function getProtectedFields(userId
8279
8302
  /*: Entity*/
8280
8303
  )
8281
8304
  /*: string[]*/
@@ -8291,7 +8314,7 @@ var ParseCLP = /*#__PURE__*/function () {
8291
8314
 
8292
8315
  }, {
8293
8316
  key: "setReadAccess",
8294
- value: function (userId
8317
+ value: function setReadAccess(userId
8295
8318
  /*: Entity*/
8296
8319
  , allowed
8297
8320
  /*: boolean*/
@@ -8314,7 +8337,7 @@ var ParseCLP = /*#__PURE__*/function () {
8314
8337
 
8315
8338
  }, {
8316
8339
  key: "getReadAccess",
8317
- value: function (userId
8340
+ value: function getReadAccess(userId
8318
8341
  /*: Entity*/
8319
8342
  )
8320
8343
  /*: boolean*/
@@ -8330,7 +8353,7 @@ var ParseCLP = /*#__PURE__*/function () {
8330
8353
 
8331
8354
  }, {
8332
8355
  key: "setWriteAccess",
8333
- value: function (userId
8356
+ value: function setWriteAccess(userId
8334
8357
  /*: Entity*/
8335
8358
  , allowed
8336
8359
  /*: boolean*/
@@ -8355,7 +8378,7 @@ var ParseCLP = /*#__PURE__*/function () {
8355
8378
 
8356
8379
  }, {
8357
8380
  key: "getWriteAccess",
8358
- value: function (userId
8381
+ value: function getWriteAccess(userId
8359
8382
  /*: Entity*/
8360
8383
  )
8361
8384
  /*: boolean*/
@@ -8370,7 +8393,7 @@ var ParseCLP = /*#__PURE__*/function () {
8370
8393
 
8371
8394
  }, {
8372
8395
  key: "setPublicReadAccess",
8373
- value: function (allowed
8396
+ value: function setPublicReadAccess(allowed
8374
8397
  /*: boolean*/
8375
8398
  ) {
8376
8399
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8383,7 +8406,7 @@ var ParseCLP = /*#__PURE__*/function () {
8383
8406
 
8384
8407
  }, {
8385
8408
  key: "getPublicReadAccess",
8386
- value: function ()
8409
+ value: function getPublicReadAccess()
8387
8410
  /*: boolean*/
8388
8411
  {
8389
8412
  return this.getReadAccess(PUBLIC_KEY);
@@ -8396,7 +8419,7 @@ var ParseCLP = /*#__PURE__*/function () {
8396
8419
 
8397
8420
  }, {
8398
8421
  key: "setPublicWriteAccess",
8399
- value: function (allowed
8422
+ value: function setPublicWriteAccess(allowed
8400
8423
  /*: boolean*/
8401
8424
  ) {
8402
8425
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8409,7 +8432,7 @@ var ParseCLP = /*#__PURE__*/function () {
8409
8432
 
8410
8433
  }, {
8411
8434
  key: "getPublicWriteAccess",
8412
- value: function ()
8435
+ value: function getPublicWriteAccess()
8413
8436
  /*: boolean*/
8414
8437
  {
8415
8438
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8422,7 +8445,7 @@ var ParseCLP = /*#__PURE__*/function () {
8422
8445
 
8423
8446
  }, {
8424
8447
  key: "setPublicProtectedFields",
8425
- value: function (fields
8448
+ value: function setPublicProtectedFields(fields
8426
8449
  /*: string[]*/
8427
8450
  ) {
8428
8451
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8435,7 +8458,7 @@ var ParseCLP = /*#__PURE__*/function () {
8435
8458
 
8436
8459
  }, {
8437
8460
  key: "getPublicProtectedFields",
8438
- value: function ()
8461
+ value: function getPublicProtectedFields()
8439
8462
  /*: string[]*/
8440
8463
  {
8441
8464
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8452,7 +8475,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8475
 
8453
8476
  }, {
8454
8477
  key: "getRoleReadAccess",
8455
- value: function (role
8478
+ value: function getRoleReadAccess(role
8456
8479
  /*: ParseRole | string*/
8457
8480
  )
8458
8481
  /*: boolean*/
@@ -8471,7 +8494,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8494
 
8472
8495
  }, {
8473
8496
  key: "getRoleWriteAccess",
8474
- value: function (role
8497
+ value: function getRoleWriteAccess(role
8475
8498
  /*: ParseRole | string*/
8476
8499
  )
8477
8500
  /*: boolean*/
@@ -8489,7 +8512,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8512
 
8490
8513
  }, {
8491
8514
  key: "setRoleReadAccess",
8492
- value: function (role
8515
+ value: function setRoleReadAccess(role
8493
8516
  /*: ParseRole | string*/
8494
8517
  , allowed
8495
8518
  /*: boolean*/
@@ -8507,7 +8530,7 @@ var ParseCLP = /*#__PURE__*/function () {
8507
8530
 
8508
8531
  }, {
8509
8532
  key: "setRoleWriteAccess",
8510
- value: function (role
8533
+ value: function setRoleWriteAccess(role
8511
8534
  /*: ParseRole | string*/
8512
8535
  , allowed
8513
8536
  /*: boolean*/
@@ -8526,7 +8549,7 @@ var ParseCLP = /*#__PURE__*/function () {
8526
8549
 
8527
8550
  }, {
8528
8551
  key: "getRoleProtectedFields",
8529
- value: function (role
8552
+ value: function getRoleProtectedFields(role
8530
8553
  /*: ParseRole | string*/
8531
8554
  )
8532
8555
  /*: string[]*/
@@ -8544,7 +8567,7 @@ var ParseCLP = /*#__PURE__*/function () {
8544
8567
 
8545
8568
  }, {
8546
8569
  key: "setRoleProtectedFields",
8547
- value: function (role
8570
+ value: function setRoleProtectedFields(role
8548
8571
  /*: ParseRole | string*/
8549
8572
  , fields
8550
8573
  /*: string[]*/
@@ -10120,6 +10143,8 @@ var ParseFile = /*#__PURE__*/function () {
10120
10143
  key: "getData",
10121
10144
  value: function () {
10122
10145
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10146
+ var _this = this;
10147
+
10123
10148
  var options, controller, result;
10124
10149
  return _regeneratorRuntime().wrap(function (_context4) {
10125
10150
  while (1) {
@@ -10143,7 +10168,7 @@ var ParseFile = /*#__PURE__*/function () {
10143
10168
  case 4:
10144
10169
  options = {
10145
10170
  requestTask: function (task) {
10146
- return this._requestTask = task;
10171
+ return _this._requestTask = task;
10147
10172
  }
10148
10173
  };
10149
10174
  controller = _CoreManager.default.getFileController();
@@ -10163,9 +10188,11 @@ var ParseFile = /*#__PURE__*/function () {
10163
10188
  }, _callee, this);
10164
10189
  }));
10165
10190
 
10166
- return function () {
10191
+ function getData() {
10167
10192
  return _getData.apply(this, arguments);
10168
- };
10193
+ }
10194
+
10195
+ return getData;
10169
10196
  }()
10170
10197
  /**
10171
10198
  * Gets the name of the file. Before save is called, this is the filename
@@ -10410,11 +10437,13 @@ var ParseFile = /*#__PURE__*/function () {
10410
10437
  value: function (metadata
10411
10438
  /*: any*/
10412
10439
  ) {
10440
+ var _this4 = this;
10441
+
10413
10442
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10414
10443
  var _context5;
10415
10444
 
10416
10445
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10417
- this.addMetadata(key, metadata[key]);
10446
+ _this4.addMetadata(key, metadata[key]);
10418
10447
  });
10419
10448
  }
10420
10449
  }
@@ -10447,11 +10476,13 @@ var ParseFile = /*#__PURE__*/function () {
10447
10476
  value: function (tags
10448
10477
  /*: any*/
10449
10478
  ) {
10479
+ var _this5 = this;
10480
+
10450
10481
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10451
10482
  var _context6;
10452
10483
 
10453
10484
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10454
- this.addTag(key, tags[key]);
10485
+ _this5.addTag(key, tags[key]);
10455
10486
  });
10456
10487
  }
10457
10488
  }
@@ -10522,7 +10553,7 @@ var DefaultController = {
10522
10553
  ) {
10523
10554
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10524
10555
 
10525
- return _regeneratorRuntime().wrap(function (_context7) {
10556
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10526
10557
  while (1) {
10527
10558
  switch (_context7.prev = _context7.next) {
10528
10559
  case 0:
@@ -10577,11 +10608,13 @@ var DefaultController = {
10577
10608
  }, _callee2);
10578
10609
  }));
10579
10610
 
10580
- return function () {
10611
+ function saveFile(_x, _x2, _x3) {
10581
10612
  return _saveFile.apply(this, arguments);
10582
- };
10613
+ }
10614
+
10615
+ return saveFile;
10583
10616
  }(),
10584
- saveBase64: function (name
10617
+ saveBase64: function saveBase64(name
10585
10618
  /*: string*/
10586
10619
  , source
10587
10620
  /*: FileSource*/
@@ -10608,16 +10641,17 @@ var DefaultController = {
10608
10641
  data._ContentType = source.type;
10609
10642
  }
10610
10643
 
10611
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10644
+ var path = 'files/' + name;
10645
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10612
10646
  },
10613
- download: function (uri, options) {
10647
+ download: function download(uri, options) {
10614
10648
  if (XHR) {
10615
10649
  return this.downloadAjax(uri, options);
10616
10650
  } else {
10617
10651
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10618
10652
  }
10619
10653
  },
10620
- downloadAjax: function (uri, options) {
10654
+ downloadAjax: function downloadAjax(uri, options) {
10621
10655
  return new _promise.default(function (resolve, reject) {
10622
10656
  var xhr = new XHR();
10623
10657
  xhr.open('GET', uri, true);
@@ -10647,7 +10681,7 @@ var DefaultController = {
10647
10681
  xhr.send();
10648
10682
  });
10649
10683
  },
10650
- deleteFile: function (name
10684
+ deleteFile: function deleteFile(name
10651
10685
  /*: string*/
10652
10686
  , options
10653
10687
  /*:: ?: FullOptions*/
@@ -10676,12 +10710,12 @@ var DefaultController = {
10676
10710
  }
10677
10711
  });
10678
10712
  },
10679
- _setXHR: function (xhr
10713
+ _setXHR: function _setXHR(xhr
10680
10714
  /*: any*/
10681
10715
  ) {
10682
10716
  XHR = xhr;
10683
10717
  },
10684
- _getXHR: function () {
10718
+ _getXHR: function _getXHR() {
10685
10719
  return XHR;
10686
10720
  }
10687
10721
  };
@@ -11500,7 +11534,7 @@ var LiveQuery = new _EventEmitter.default();
11500
11534
 
11501
11535
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11502
11536
  var liveQueryClient;
11503
- return _regeneratorRuntime().wrap(function (_context) {
11537
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11504
11538
  while (1) {
11505
11539
  switch (_context.prev = _context.next) {
11506
11540
  case 0:
@@ -11528,7 +11562,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11528
11562
 
11529
11563
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11530
11564
  var liveQueryClient;
11531
- return _regeneratorRuntime().wrap(function (_context2) {
11565
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11532
11566
  while (1) {
11533
11567
  switch (_context2.prev = _context2.next) {
11534
11568
  case 0:
@@ -11552,18 +11586,18 @@ var _default = LiveQuery;
11552
11586
  exports.default = _default;
11553
11587
  var defaultLiveQueryClient;
11554
11588
  var DefaultLiveQueryController = {
11555
- setDefaultLiveQueryClient: function (liveQueryClient
11589
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11556
11590
  /*: LiveQueryClient*/
11557
11591
  ) {
11558
11592
  defaultLiveQueryClient = liveQueryClient;
11559
11593
  },
11560
- getDefaultLiveQueryClient: function ()
11594
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11561
11595
  /*: Promise<LiveQueryClient>*/
11562
11596
  {
11563
11597
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11564
11598
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11565
11599
 
11566
- return _regeneratorRuntime().wrap(function (_context3) {
11600
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11567
11601
  while (1) {
11568
11602
  switch (_context3.prev = _context3.next) {
11569
11603
  case 0:
@@ -11634,7 +11668,7 @@ var DefaultLiveQueryController = {
11634
11668
  }, _callee3);
11635
11669
  }))();
11636
11670
  },
11637
- _clearCachedDefaultClient: function () {
11671
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11638
11672
  defaultLiveQueryClient = null;
11639
11673
  }
11640
11674
  };
@@ -13583,7 +13617,7 @@ var ParseObject = /*#__PURE__*/function () {
13583
13617
  /*:: ?: RequestOptions*/
13584
13618
  ) {
13585
13619
  var query;
13586
- return _regeneratorRuntime().wrap(function (_context) {
13620
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13587
13621
  while (1) {
13588
13622
  switch (_context.prev = _context.next) {
13589
13623
  case 0:
@@ -13625,9 +13659,11 @@ var ParseObject = /*#__PURE__*/function () {
13625
13659
  }, _callee, this, [[2, 9]]);
13626
13660
  }));
13627
13661
 
13628
- return function () {
13662
+ function exists(_x) {
13629
13663
  return _exists.apply(this, arguments);
13630
- };
13664
+ }
13665
+
13666
+ return exists;
13631
13667
  }()
13632
13668
  /**
13633
13669
  * Checks if the model is currently in a valid state.
@@ -13637,7 +13673,7 @@ var ParseObject = /*#__PURE__*/function () {
13637
13673
 
13638
13674
  }, {
13639
13675
  key: "isValid",
13640
- value: function ()
13676
+ value: function isValid()
13641
13677
  /*: boolean*/
13642
13678
  {
13643
13679
  return !this.validate(this.attributes);
@@ -13655,7 +13691,7 @@ var ParseObject = /*#__PURE__*/function () {
13655
13691
 
13656
13692
  }, {
13657
13693
  key: "validate",
13658
- value: function (attrs
13694
+ value: function validate(attrs
13659
13695
  /*: AttributeMap*/
13660
13696
  )
13661
13697
  /*: ParseError | boolean*/
@@ -13681,7 +13717,7 @@ var ParseObject = /*#__PURE__*/function () {
13681
13717
 
13682
13718
  }, {
13683
13719
  key: "getACL",
13684
- value: function ()
13720
+ value: function getACL()
13685
13721
  /*: ?ParseACL*/
13686
13722
  {
13687
13723
  var acl = this.get('ACL');
@@ -13703,7 +13739,7 @@ var ParseObject = /*#__PURE__*/function () {
13703
13739
 
13704
13740
  }, {
13705
13741
  key: "setACL",
13706
- value: function (acl
13742
+ value: function setACL(acl
13707
13743
  /*: ParseACL*/
13708
13744
  , options
13709
13745
  /*:: ?: mixed*/
@@ -13720,7 +13756,7 @@ var ParseObject = /*#__PURE__*/function () {
13720
13756
 
13721
13757
  }, {
13722
13758
  key: "revert",
13723
- value: function ()
13759
+ value: function revert()
13724
13760
  /*: void*/
13725
13761
  {
13726
13762
  var keysToRevert;
@@ -13762,7 +13798,7 @@ var ParseObject = /*#__PURE__*/function () {
13762
13798
 
13763
13799
  }, {
13764
13800
  key: "clear",
13765
- value: function ()
13801
+ value: function clear()
13766
13802
  /*: ParseObject | boolean*/
13767
13803
  {
13768
13804
  var attributes = this.attributes;
@@ -13803,7 +13839,7 @@ var ParseObject = /*#__PURE__*/function () {
13803
13839
 
13804
13840
  }, {
13805
13841
  key: "fetch",
13806
- value: function (options
13842
+ value: function fetch(options
13807
13843
  /*: RequestOptions*/
13808
13844
  )
13809
13845
  /*: Promise*/
@@ -13868,7 +13904,7 @@ var ParseObject = /*#__PURE__*/function () {
13868
13904
 
13869
13905
  }, {
13870
13906
  key: "fetchWithInclude",
13871
- value: function (keys
13907
+ value: function fetchWithInclude(keys
13872
13908
  /*: String | Array<string | Array<string>>*/
13873
13909
  , options
13874
13910
  /*: RequestOptions*/
@@ -13910,7 +13946,7 @@ var ParseObject = /*#__PURE__*/function () {
13910
13946
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13911
13947
  /*: SaveOptions*/
13912
13948
  ) {
13913
- return _regeneratorRuntime().wrap(function (_context4) {
13949
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13914
13950
  while (1) {
13915
13951
  switch (_context4.prev = _context4.next) {
13916
13952
  case 0:
@@ -13948,9 +13984,11 @@ var ParseObject = /*#__PURE__*/function () {
13948
13984
  }, _callee2, this, [[0, 5]]);
13949
13985
  }));
13950
13986
 
13951
- return function () {
13987
+ function saveEventually(_x2) {
13952
13988
  return _saveEventually.apply(this, arguments);
13953
- };
13989
+ }
13990
+
13991
+ return saveEventually;
13954
13992
  }()
13955
13993
  /**
13956
13994
  * Set a hash of model attributes, and save the model to the server.
@@ -14018,7 +14056,7 @@ var ParseObject = /*#__PURE__*/function () {
14018
14056
 
14019
14057
  }, {
14020
14058
  key: "save",
14021
- value: function (arg1
14059
+ value: function save(arg1
14022
14060
  /*: ?string | { [attr: string]: mixed }*/
14023
14061
  , arg2
14024
14062
  /*: SaveOptions | mixed*/
@@ -14027,6 +14065,8 @@ var ParseObject = /*#__PURE__*/function () {
14027
14065
  )
14028
14066
  /*: Promise*/
14029
14067
  {
14068
+ var _this = this;
14069
+
14030
14070
  var attrs;
14031
14071
  var options;
14032
14072
 
@@ -14075,7 +14115,7 @@ var ParseObject = /*#__PURE__*/function () {
14075
14115
 
14076
14116
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14077
14117
  return controller.save(unsaved, saveOptions).then(function () {
14078
- return controller.save(this, saveOptions);
14118
+ return controller.save(_this, saveOptions);
14079
14119
  });
14080
14120
  }
14081
14121
  /**
@@ -14107,7 +14147,7 @@ var ParseObject = /*#__PURE__*/function () {
14107
14147
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14108
14148
  /*: RequestOptions*/
14109
14149
  ) {
14110
- return _regeneratorRuntime().wrap(function (_context5) {
14150
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14111
14151
  while (1) {
14112
14152
  switch (_context5.prev = _context5.next) {
14113
14153
  case 0:
@@ -14145,9 +14185,11 @@ var ParseObject = /*#__PURE__*/function () {
14145
14185
  }, _callee3, this, [[0, 5]]);
14146
14186
  }));
14147
14187
 
14148
- return function () {
14188
+ function destroyEventually(_x3) {
14149
14189
  return _destroyEventually.apply(this, arguments);
14150
- };
14190
+ }
14191
+
14192
+ return destroyEventually;
14151
14193
  }()
14152
14194
  /**
14153
14195
  * Destroy this model on the server if it was already persisted.
@@ -14166,7 +14208,7 @@ var ParseObject = /*#__PURE__*/function () {
14166
14208
 
14167
14209
  }, {
14168
14210
  key: "destroy",
14169
- value: function (options
14211
+ value: function destroy(options
14170
14212
  /*: RequestOptions*/
14171
14213
  )
14172
14214
  /*: Promise*/
@@ -14211,7 +14253,7 @@ var ParseObject = /*#__PURE__*/function () {
14211
14253
 
14212
14254
  }, {
14213
14255
  key: "pin",
14214
- value: function ()
14256
+ value: function pin()
14215
14257
  /*: Promise<void>*/
14216
14258
  {
14217
14259
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14229,7 +14271,7 @@ var ParseObject = /*#__PURE__*/function () {
14229
14271
 
14230
14272
  }, {
14231
14273
  key: "unPin",
14232
- value: function ()
14274
+ value: function unPin()
14233
14275
  /*: Promise<void>*/
14234
14276
  {
14235
14277
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14249,7 +14291,7 @@ var ParseObject = /*#__PURE__*/function () {
14249
14291
  value: function () {
14250
14292
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14251
14293
  var localDatastore, objectKey, pin;
14252
- return _regeneratorRuntime().wrap(function (_context6) {
14294
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14253
14295
  while (1) {
14254
14296
  switch (_context6.prev = _context6.next) {
14255
14297
  case 0:
@@ -14279,9 +14321,11 @@ var ParseObject = /*#__PURE__*/function () {
14279
14321
  }, _callee4, this);
14280
14322
  }));
14281
14323
 
14282
- return function () {
14324
+ function isPinned() {
14283
14325
  return _isPinned.apply(this, arguments);
14284
- };
14326
+ }
14327
+
14328
+ return isPinned;
14285
14329
  }()
14286
14330
  /**
14287
14331
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14302,7 +14346,7 @@ var ParseObject = /*#__PURE__*/function () {
14302
14346
 
14303
14347
  }, {
14304
14348
  key: "pinWithName",
14305
- value: function (name
14349
+ value: function pinWithName(name
14306
14350
  /*: string*/
14307
14351
  )
14308
14352
  /*: Promise<void>*/
@@ -14322,7 +14366,7 @@ var ParseObject = /*#__PURE__*/function () {
14322
14366
 
14323
14367
  }, {
14324
14368
  key: "unPinWithName",
14325
- value: function (name
14369
+ value: function unPinWithName(name
14326
14370
  /*: string*/
14327
14371
  )
14328
14372
  /*: Promise<void>*/
@@ -14347,7 +14391,7 @@ var ParseObject = /*#__PURE__*/function () {
14347
14391
  value: function () {
14348
14392
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14349
14393
  var localDatastore, objectKey, pinned, result;
14350
- return _regeneratorRuntime().wrap(function (_context7) {
14394
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14351
14395
  while (1) {
14352
14396
  switch (_context7.prev = _context7.next) {
14353
14397
  case 0:
@@ -14390,20 +14434,22 @@ var ParseObject = /*#__PURE__*/function () {
14390
14434
  }, _callee5, this);
14391
14435
  }));
14392
14436
 
14393
- return function () {
14437
+ function fetchFromLocalDatastore() {
14394
14438
  return _fetchFromLocalDatastore.apply(this, arguments);
14395
- };
14439
+ }
14440
+
14441
+ return fetchFromLocalDatastore;
14396
14442
  }()
14397
14443
  /** Static methods **/
14398
14444
 
14399
14445
  }], [{
14400
14446
  key: "_getClassMap",
14401
- value: function () {
14447
+ value: function _getClassMap() {
14402
14448
  return classMap;
14403
14449
  }
14404
14450
  }, {
14405
14451
  key: "_clearAllState",
14406
- value: function () {
14452
+ value: function _clearAllState() {
14407
14453
  var stateController = _CoreManager.default.getObjectStateController();
14408
14454
 
14409
14455
  stateController.clearAllState();
@@ -14437,7 +14483,7 @@ var ParseObject = /*#__PURE__*/function () {
14437
14483
 
14438
14484
  }, {
14439
14485
  key: "fetchAll",
14440
- value: function (list
14486
+ value: function fetchAll(list
14441
14487
  /*: Array<ParseObject>*/
14442
14488
  ) {
14443
14489
  var options
@@ -14491,7 +14537,7 @@ var ParseObject = /*#__PURE__*/function () {
14491
14537
 
14492
14538
  }, {
14493
14539
  key: "fetchAllWithInclude",
14494
- value: function (list
14540
+ value: function fetchAllWithInclude(list
14495
14541
  /*: Array<ParseObject>*/
14496
14542
  , keys
14497
14543
  /*: String | Array<string | Array<string>>*/
@@ -14535,7 +14581,7 @@ var ParseObject = /*#__PURE__*/function () {
14535
14581
 
14536
14582
  }, {
14537
14583
  key: "fetchAllIfNeededWithInclude",
14538
- value: function (list
14584
+ value: function fetchAllIfNeededWithInclude(list
14539
14585
  /*: Array<ParseObject>*/
14540
14586
  , keys
14541
14587
  /*: String | Array<string | Array<string>>*/
@@ -14567,7 +14613,7 @@ var ParseObject = /*#__PURE__*/function () {
14567
14613
 
14568
14614
  }, {
14569
14615
  key: "fetchAllIfNeeded",
14570
- value: function (list
14616
+ value: function fetchAllIfNeeded(list
14571
14617
  /*: Array<ParseObject>*/
14572
14618
  , options) {
14573
14619
  options = options || {};
@@ -14589,7 +14635,7 @@ var ParseObject = /*#__PURE__*/function () {
14589
14635
  }
14590
14636
  }, {
14591
14637
  key: "handleIncludeOptions",
14592
- value: function (options) {
14638
+ value: function handleIncludeOptions(options) {
14593
14639
  var include = [];
14594
14640
 
14595
14641
  if ((0, _isArray.default)(options.include)) {
@@ -14657,7 +14703,7 @@ var ParseObject = /*#__PURE__*/function () {
14657
14703
 
14658
14704
  }, {
14659
14705
  key: "destroyAll",
14660
- value: function (list
14706
+ value: function destroyAll(list
14661
14707
  /*: Array<ParseObject>*/
14662
14708
  ) {
14663
14709
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14702,7 +14748,7 @@ var ParseObject = /*#__PURE__*/function () {
14702
14748
 
14703
14749
  }, {
14704
14750
  key: "saveAll",
14705
- value: function (list
14751
+ value: function saveAll(list
14706
14752
  /*: Array<ParseObject>*/
14707
14753
  ) {
14708
14754
  var options
@@ -14745,7 +14791,7 @@ var ParseObject = /*#__PURE__*/function () {
14745
14791
 
14746
14792
  }, {
14747
14793
  key: "createWithoutData",
14748
- value: function (id
14794
+ value: function createWithoutData(id
14749
14795
  /*: string*/
14750
14796
  ) {
14751
14797
  var obj = new this();
@@ -14765,7 +14811,7 @@ var ParseObject = /*#__PURE__*/function () {
14765
14811
 
14766
14812
  }, {
14767
14813
  key: "fromJSON",
14768
- value: function (json
14814
+ value: function fromJSON(json
14769
14815
  /*: any*/
14770
14816
  , override
14771
14817
  /*:: ?: boolean*/
@@ -14829,7 +14875,7 @@ var ParseObject = /*#__PURE__*/function () {
14829
14875
 
14830
14876
  }, {
14831
14877
  key: "registerSubclass",
14832
- value: function (className
14878
+ value: function registerSubclass(className
14833
14879
  /*: string*/
14834
14880
  , constructor
14835
14881
  /*: any*/
@@ -14860,7 +14906,7 @@ var ParseObject = /*#__PURE__*/function () {
14860
14906
 
14861
14907
  }, {
14862
14908
  key: "unregisterSubclass",
14863
- value: function (className
14909
+ value: function unregisterSubclass(className
14864
14910
  /*: string*/
14865
14911
  ) {
14866
14912
  if (typeof className !== 'string') {
@@ -14909,7 +14955,7 @@ var ParseObject = /*#__PURE__*/function () {
14909
14955
 
14910
14956
  }, {
14911
14957
  key: "extend",
14912
- value: function (className
14958
+ value: function extend(className
14913
14959
  /*: any*/
14914
14960
  , protoProps
14915
14961
  /*: any*/
@@ -14938,7 +14984,7 @@ var ParseObject = /*#__PURE__*/function () {
14938
14984
  parentProto = classMap[adjustedClassName].prototype;
14939
14985
  }
14940
14986
 
14941
- var ParseObjectSubclass = function (attributes, options) {
14987
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14942
14988
  this.className = adjustedClassName;
14943
14989
  this._objCount = objectCount++; // Enable legacy initializers
14944
14990
 
@@ -15013,7 +15059,7 @@ var ParseObject = /*#__PURE__*/function () {
15013
15059
 
15014
15060
  }, {
15015
15061
  key: "enableSingleInstance",
15016
- value: function () {
15062
+ value: function enableSingleInstance() {
15017
15063
  singleInstance = true;
15018
15064
 
15019
15065
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -15029,7 +15075,7 @@ var ParseObject = /*#__PURE__*/function () {
15029
15075
 
15030
15076
  }, {
15031
15077
  key: "disableSingleInstance",
15032
- value: function () {
15078
+ value: function disableSingleInstance() {
15033
15079
  singleInstance = false;
15034
15080
 
15035
15081
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15055,7 +15101,7 @@ var ParseObject = /*#__PURE__*/function () {
15055
15101
 
15056
15102
  }, {
15057
15103
  key: "pinAll",
15058
- value: function (objects
15104
+ value: function pinAll(objects
15059
15105
  /*: Array<ParseObject>*/
15060
15106
  )
15061
15107
  /*: Promise<void>*/
@@ -15089,7 +15135,7 @@ var ParseObject = /*#__PURE__*/function () {
15089
15135
 
15090
15136
  }, {
15091
15137
  key: "pinAllWithName",
15092
- value: function (name
15138
+ value: function pinAllWithName(name
15093
15139
  /*: string*/
15094
15140
  , objects
15095
15141
  /*: Array<ParseObject>*/
@@ -15119,7 +15165,7 @@ var ParseObject = /*#__PURE__*/function () {
15119
15165
 
15120
15166
  }, {
15121
15167
  key: "unPinAll",
15122
- value: function (objects
15168
+ value: function unPinAll(objects
15123
15169
  /*: Array<ParseObject>*/
15124
15170
  )
15125
15171
  /*: Promise<void>*/
@@ -15147,7 +15193,7 @@ var ParseObject = /*#__PURE__*/function () {
15147
15193
 
15148
15194
  }, {
15149
15195
  key: "unPinAllWithName",
15150
- value: function (name
15196
+ value: function unPinAllWithName(name
15151
15197
  /*: string*/
15152
15198
  , objects
15153
15199
  /*: Array<ParseObject>*/
@@ -15175,7 +15221,7 @@ var ParseObject = /*#__PURE__*/function () {
15175
15221
 
15176
15222
  }, {
15177
15223
  key: "unPinAllObjects",
15178
- value: function ()
15224
+ value: function unPinAllObjects()
15179
15225
  /*: Promise<void>*/
15180
15226
  {
15181
15227
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15201,7 +15247,7 @@ var ParseObject = /*#__PURE__*/function () {
15201
15247
 
15202
15248
  }, {
15203
15249
  key: "unPinAllObjectsWithName",
15204
- value: function (name
15250
+ value: function unPinAllObjectsWithName(name
15205
15251
  /*: string*/
15206
15252
  )
15207
15253
  /*: Promise<void>*/
@@ -15219,7 +15265,7 @@ var ParseObject = /*#__PURE__*/function () {
15219
15265
  }();
15220
15266
 
15221
15267
  var DefaultController = {
15222
- fetch: function (target
15268
+ fetch: function fetch(target
15223
15269
  /*: ParseObject | Array<ParseObject>*/
15224
15270
  , forceFetch
15225
15271
  /*: boolean*/
@@ -15281,7 +15327,7 @@ var DefaultController = {
15281
15327
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15282
15328
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15283
15329
 
15284
- return _regeneratorRuntime().wrap(function (_context9) {
15330
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15285
15331
  while (1) {
15286
15332
  switch (_context9.prev = _context9.next) {
15287
15333
  case 0:
@@ -15379,7 +15425,7 @@ var DefaultController = {
15379
15425
  }, _callee6, null, [[13, 23, 26, 29]]);
15380
15426
  }));
15381
15427
 
15382
- return function () {
15428
+ return function (_x4) {
15383
15429
  return _ref.apply(this, arguments);
15384
15430
  };
15385
15431
  }());
@@ -15398,7 +15444,7 @@ var DefaultController = {
15398
15444
 
15399
15445
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15400
15446
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15401
- return _regeneratorRuntime().wrap(function (_context10) {
15447
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15402
15448
  while (1) {
15403
15449
  switch (_context10.prev = _context10.next) {
15404
15450
  case 0:
@@ -15422,7 +15468,7 @@ var DefaultController = {
15422
15468
  }, _callee7);
15423
15469
  }));
15424
15470
 
15425
- return function () {
15471
+ return function (_x5) {
15426
15472
  return _ref2.apply(this, arguments);
15427
15473
  };
15428
15474
  }());
@@ -15430,7 +15476,7 @@ var DefaultController = {
15430
15476
 
15431
15477
  return _promise.default.resolve();
15432
15478
  },
15433
- destroy: function (target
15479
+ destroy: function destroy(target
15434
15480
  /*: ParseObject | Array<ParseObject>*/
15435
15481
  , options
15436
15482
  /*: RequestOptions*/
@@ -15439,7 +15485,7 @@ var DefaultController = {
15439
15485
  {
15440
15486
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15441
15487
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15442
- return _regeneratorRuntime().wrap(function (_context13) {
15488
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15443
15489
  while (1) {
15444
15490
  switch (_context13.prev = _context13.next) {
15445
15491
  case 0:
@@ -15504,7 +15550,7 @@ var DefaultController = {
15504
15550
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15505
15551
  var aggregate, _iterator3, _step3, object;
15506
15552
 
15507
- return _regeneratorRuntime().wrap(function (_context11) {
15553
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15508
15554
  while (1) {
15509
15555
  switch (_context11.prev = _context11.next) {
15510
15556
  case 0:
@@ -15572,7 +15618,7 @@ var DefaultController = {
15572
15618
  }
15573
15619
 
15574
15620
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15575
- return _regeneratorRuntime().wrap(function (_context12) {
15621
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15576
15622
  while (1) {
15577
15623
  switch (_context12.prev = _context12.next) {
15578
15624
  case 0:
@@ -15601,7 +15647,7 @@ var DefaultController = {
15601
15647
  }, _callee10);
15602
15648
  }))();
15603
15649
  },
15604
- save: function (target
15650
+ save: function save(target
15605
15651
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15606
15652
  , options
15607
15653
  /*: RequestOptions*/
@@ -15680,8 +15726,8 @@ var DefaultController = {
15680
15726
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15681
15727
  var ready = new _promiseUtils.resolvingPromise();
15682
15728
  batchReady.push(ready);
15683
- stateController.pushPendingState(obj._getStateIdentifier());
15684
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15729
+
15730
+ var task = function task() {
15685
15731
  ready.resolve();
15686
15732
  return batchReturned.then(function (responses) {
15687
15733
  if (responses[index].hasOwnProperty('success')) {
@@ -15702,7 +15748,10 @@ var DefaultController = {
15702
15748
  obj._handleSaveError();
15703
15749
  }
15704
15750
  });
15705
- }));
15751
+ };
15752
+
15753
+ stateController.pushPendingState(obj._getStateIdentifier());
15754
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15706
15755
  });
15707
15756
  (0, _promiseUtils.when)(batchReady).then(function () {
15708
15757
  // Kick off the batch request
@@ -15721,7 +15770,7 @@ var DefaultController = {
15721
15770
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15722
15771
  var _iterator4, _step4, object;
15723
15772
 
15724
- return _regeneratorRuntime().wrap(function (_context14) {
15773
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15725
15774
  while (1) {
15726
15775
  switch (_context14.prev = _context14.next) {
15727
15776
  case 0:
@@ -15796,7 +15845,7 @@ var DefaultController = {
15796
15845
 
15797
15846
  var targetCopy = target;
15798
15847
 
15799
- var task = function () {
15848
+ var task = function task() {
15800
15849
  var params = targetCopy._getSaveParams();
15801
15850
 
15802
15851
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15813,7 +15862,7 @@ var DefaultController = {
15813
15862
 
15814
15863
  stateController.pushPendingState(target._getStateIdentifier());
15815
15864
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15816
- return _regeneratorRuntime().wrap(function (_context15) {
15865
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15817
15866
  while (1) {
15818
15867
  switch (_context15.prev = _context15.next) {
15819
15868
  case 0:
@@ -16630,10 +16679,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16630
16679
  value: function ()
16631
16680
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16632
16681
  {
16682
+ var _this7 = this;
16683
+
16633
16684
  var idToPointer = function (id) {
16634
16685
  return {
16635
16686
  __type: 'Pointer',
16636
- className: this._targetClassName,
16687
+ className: _this7._targetClassName,
16637
16688
  objectId: id
16638
16689
  };
16639
16690
  };
@@ -17839,9 +17890,11 @@ var ParseQuery = /*#__PURE__*/function () {
17839
17890
  }, _callee, this);
17840
17891
  }));
17841
17892
 
17842
- return function () {
17893
+ function _handleOfflineQuery() {
17843
17894
  return _handleOfflineQuery2.apply(this, arguments);
17844
- };
17895
+ }
17896
+
17897
+ return _handleOfflineQuery;
17845
17898
  }()
17846
17899
  /**
17847
17900
  * Returns a JSON representation of this query.
@@ -18187,7 +18240,7 @@ var ParseQuery = /*#__PURE__*/function () {
18187
18240
  /*:: ?: BatchOptions*/
18188
18241
  ) {
18189
18242
  var result;
18190
- return _regeneratorRuntime().wrap(function (_context7) {
18243
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18191
18244
  while (1) {
18192
18245
  switch (_context7.prev = _context7.next) {
18193
18246
  case 0:
@@ -18214,9 +18267,11 @@ var ParseQuery = /*#__PURE__*/function () {
18214
18267
  }, _callee2, this);
18215
18268
  }));
18216
18269
 
18217
- return function () {
18270
+ function findAll(_x2) {
18218
18271
  return _findAll.apply(this, arguments);
18219
- };
18272
+ }
18273
+
18274
+ return findAll;
18220
18275
  }()
18221
18276
  /**
18222
18277
  * Counts the number of objects that match this query.
@@ -18235,7 +18290,7 @@ var ParseQuery = /*#__PURE__*/function () {
18235
18290
 
18236
18291
  }, {
18237
18292
  key: "count",
18238
- value: function (options
18293
+ value: function count(options
18239
18294
  /*:: ?: FullOptions*/
18240
18295
  )
18241
18296
  /*: Promise<number>*/
@@ -18277,7 +18332,7 @@ var ParseQuery = /*#__PURE__*/function () {
18277
18332
 
18278
18333
  }, {
18279
18334
  key: "distinct",
18280
- value: function (key
18335
+ value: function distinct(key
18281
18336
  /*: string*/
18282
18337
  , options
18283
18338
  /*:: ?: FullOptions*/
@@ -18319,7 +18374,7 @@ var ParseQuery = /*#__PURE__*/function () {
18319
18374
 
18320
18375
  }, {
18321
18376
  key: "aggregate",
18322
- value: function (pipeline
18377
+ value: function aggregate(pipeline
18323
18378
  /*: mixed*/
18324
18379
  , options
18325
18380
  /*:: ?: FullOptions*/
@@ -18382,11 +18437,13 @@ var ParseQuery = /*#__PURE__*/function () {
18382
18437
 
18383
18438
  }, {
18384
18439
  key: "first",
18385
- value: function (options
18440
+ value: function first(options
18386
18441
  /*:: ?: FullOptions*/
18387
18442
  )
18388
18443
  /*: Promise<ParseObject | void>*/
18389
18444
  {
18445
+ var _this4 = this;
18446
+
18390
18447
  options = options || {};
18391
18448
  var findOptions = {};
18392
18449
 
@@ -18428,7 +18485,7 @@ var ParseQuery = /*#__PURE__*/function () {
18428
18485
  }
18429
18486
 
18430
18487
  if (!objects[0].className) {
18431
- objects[0].className = this.className;
18488
+ objects[0].className = _this4.className;
18432
18489
  } // Make sure the data object contains keys for all objects that
18433
18490
  // have been requested with a select, so that our cached state
18434
18491
  // updates correctly.
@@ -18469,7 +18526,7 @@ var ParseQuery = /*#__PURE__*/function () {
18469
18526
 
18470
18527
  }, {
18471
18528
  key: "eachBatch",
18472
- value: function (callback
18529
+ value: function eachBatch(callback
18473
18530
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18474
18531
  , options
18475
18532
  /*:: ?: BatchOptions*/
@@ -18481,7 +18538,8 @@ var ParseQuery = /*#__PURE__*/function () {
18481
18538
  options = options || {};
18482
18539
 
18483
18540
  if (this._order || this._skip || this._limit >= 0) {
18484
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18541
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18542
+ return _promise.default.reject(error);
18485
18543
  }
18486
18544
 
18487
18545
  var query = new ParseQuery(this.className);
@@ -18546,7 +18604,7 @@ var ParseQuery = /*#__PURE__*/function () {
18546
18604
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18547
18605
  var _yield$Promise$all, _yield$Promise$all2, results;
18548
18606
 
18549
- return _regeneratorRuntime().wrap(function (_context10) {
18607
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18550
18608
  while (1) {
18551
18609
  switch (_context10.prev = _context10.next) {
18552
18610
  case 0:
@@ -18616,7 +18674,7 @@ var ParseQuery = /*#__PURE__*/function () {
18616
18674
 
18617
18675
  }, {
18618
18676
  key: "each",
18619
- value: function (callback
18677
+ value: function each(callback
18620
18678
  /*: (obj: ParseObject) => any*/
18621
18679
  , options
18622
18680
  /*:: ?: BatchOptions*/
@@ -18643,7 +18701,7 @@ var ParseQuery = /*#__PURE__*/function () {
18643
18701
 
18644
18702
  }, {
18645
18703
  key: "hint",
18646
- value: function (value
18704
+ value: function hint(value
18647
18705
  /*: mixed*/
18648
18706
  )
18649
18707
  /*: ParseQuery*/
@@ -18664,7 +18722,7 @@ var ParseQuery = /*#__PURE__*/function () {
18664
18722
 
18665
18723
  }, {
18666
18724
  key: "explain",
18667
- value: function ()
18725
+ value: function explain()
18668
18726
  /*: ParseQuery*/
18669
18727
  {
18670
18728
  var _explain
@@ -18710,8 +18768,10 @@ var ParseQuery = /*#__PURE__*/function () {
18710
18768
  , options
18711
18769
  /*:: ?: BatchOptions*/
18712
18770
  ) {
18771
+ var _this5 = this;
18772
+
18713
18773
  var array, index;
18714
- return _regeneratorRuntime().wrap(function (_context11) {
18774
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18715
18775
  while (1) {
18716
18776
  switch (_context11.prev = _context11.next) {
18717
18777
  case 0:
@@ -18719,7 +18779,7 @@ var ParseQuery = /*#__PURE__*/function () {
18719
18779
  index = 0;
18720
18780
  _context11.next = 4;
18721
18781
  return this.each(function (object) {
18722
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18782
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18723
18783
  array.push(result);
18724
18784
  index += 1;
18725
18785
  });
@@ -18736,9 +18796,11 @@ var ParseQuery = /*#__PURE__*/function () {
18736
18796
  }, _callee4, this);
18737
18797
  }));
18738
18798
 
18739
- return function () {
18799
+ function map(_x3, _x4) {
18740
18800
  return _map.apply(this, arguments);
18741
- };
18801
+ }
18802
+
18803
+ return map;
18742
18804
  }()
18743
18805
  /**
18744
18806
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18775,7 +18837,7 @@ var ParseQuery = /*#__PURE__*/function () {
18775
18837
  /*:: ?: BatchOptions*/
18776
18838
  ) {
18777
18839
  var accumulator, index;
18778
- return _regeneratorRuntime().wrap(function (_context12) {
18840
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18779
18841
  while (1) {
18780
18842
  switch (_context12.prev = _context12.next) {
18781
18843
  case 0:
@@ -18816,9 +18878,11 @@ var ParseQuery = /*#__PURE__*/function () {
18816
18878
  }, _callee5, this);
18817
18879
  }));
18818
18880
 
18819
- return function () {
18881
+ function reduce(_x5, _x6, _x7) {
18820
18882
  return _reduce.apply(this, arguments);
18821
- };
18883
+ }
18884
+
18885
+ return reduce;
18822
18886
  }()
18823
18887
  /**
18824
18888
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18852,8 +18916,10 @@ var ParseQuery = /*#__PURE__*/function () {
18852
18916
  , options
18853
18917
  /*:: ?: BatchOptions*/
18854
18918
  ) {
18919
+ var _this6 = this;
18920
+
18855
18921
  var array, index;
18856
- return _regeneratorRuntime().wrap(function (_context13) {
18922
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18857
18923
  while (1) {
18858
18924
  switch (_context13.prev = _context13.next) {
18859
18925
  case 0:
@@ -18861,7 +18927,7 @@ var ParseQuery = /*#__PURE__*/function () {
18861
18927
  index = 0;
18862
18928
  _context13.next = 4;
18863
18929
  return this.each(function (object) {
18864
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18930
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18865
18931
  if (flag) {
18866
18932
  array.push(object);
18867
18933
  }
@@ -18881,9 +18947,11 @@ var ParseQuery = /*#__PURE__*/function () {
18881
18947
  }, _callee6, this);
18882
18948
  }));
18883
18949
 
18884
- return function () {
18950
+ function filter(_x8, _x9) {
18885
18951
  return _filter.apply(this, arguments);
18886
- };
18952
+ }
18953
+
18954
+ return filter;
18887
18955
  }()
18888
18956
  /** Query Conditions **/
18889
18957
 
@@ -18898,13 +18966,15 @@ var ParseQuery = /*#__PURE__*/function () {
18898
18966
 
18899
18967
  }, {
18900
18968
  key: "equalTo",
18901
- value: function (key
18969
+ value: function equalTo(key
18902
18970
  /*: string | { [key: string]: any }*/
18903
18971
  , value
18904
18972
  /*: ?mixed*/
18905
18973
  )
18906
18974
  /*: ParseQuery*/
18907
18975
  {
18976
+ var _this7 = this;
18977
+
18908
18978
  if (key && (0, _typeof2.default)(key) === 'object') {
18909
18979
  var _context14;
18910
18980
 
@@ -18913,7 +18983,7 @@ var ParseQuery = /*#__PURE__*/function () {
18913
18983
  k = _ref3[0],
18914
18984
  val = _ref3[1];
18915
18985
 
18916
- return this.equalTo(k, val);
18986
+ return _this7.equalTo(k, val);
18917
18987
  });
18918
18988
  return this;
18919
18989
  }
@@ -18936,13 +19006,15 @@ var ParseQuery = /*#__PURE__*/function () {
18936
19006
 
18937
19007
  }, {
18938
19008
  key: "notEqualTo",
18939
- value: function (key
19009
+ value: function notEqualTo(key
18940
19010
  /*: string | { [key: string]: any }*/
18941
19011
  , value
18942
19012
  /*: ?mixed*/
18943
19013
  )
18944
19014
  /*: ParseQuery*/
18945
19015
  {
19016
+ var _this8 = this;
19017
+
18946
19018
  if (key && (0, _typeof2.default)(key) === 'object') {
18947
19019
  var _context15;
18948
19020
 
@@ -18951,7 +19023,7 @@ var ParseQuery = /*#__PURE__*/function () {
18951
19023
  k = _ref5[0],
18952
19024
  val = _ref5[1];
18953
19025
 
18954
- return this.notEqualTo(k, val);
19026
+ return _this8.notEqualTo(k, val);
18955
19027
  });
18956
19028
  return this;
18957
19029
  }
@@ -18969,7 +19041,7 @@ var ParseQuery = /*#__PURE__*/function () {
18969
19041
 
18970
19042
  }, {
18971
19043
  key: "lessThan",
18972
- value: function (key
19044
+ value: function lessThan(key
18973
19045
  /*: string*/
18974
19046
  , value
18975
19047
  /*: mixed*/
@@ -18989,7 +19061,7 @@ var ParseQuery = /*#__PURE__*/function () {
18989
19061
 
18990
19062
  }, {
18991
19063
  key: "greaterThan",
18992
- value: function (key
19064
+ value: function greaterThan(key
18993
19065
  /*: string*/
18994
19066
  , value
18995
19067
  /*: mixed*/
@@ -19009,7 +19081,7 @@ var ParseQuery = /*#__PURE__*/function () {
19009
19081
 
19010
19082
  }, {
19011
19083
  key: "lessThanOrEqualTo",
19012
- value: function (key
19084
+ value: function lessThanOrEqualTo(key
19013
19085
  /*: string*/
19014
19086
  , value
19015
19087
  /*: mixed*/
@@ -19029,7 +19101,7 @@ var ParseQuery = /*#__PURE__*/function () {
19029
19101
 
19030
19102
  }, {
19031
19103
  key: "greaterThanOrEqualTo",
19032
- value: function (key
19104
+ value: function greaterThanOrEqualTo(key
19033
19105
  /*: string*/
19034
19106
  , value
19035
19107
  /*: mixed*/
@@ -19049,7 +19121,7 @@ var ParseQuery = /*#__PURE__*/function () {
19049
19121
 
19050
19122
  }, {
19051
19123
  key: "containedIn",
19052
- value: function (key
19124
+ value: function containedIn(key
19053
19125
  /*: string*/
19054
19126
  , value
19055
19127
  /*: mixed*/
@@ -19069,7 +19141,7 @@ var ParseQuery = /*#__PURE__*/function () {
19069
19141
 
19070
19142
  }, {
19071
19143
  key: "notContainedIn",
19072
- value: function (key
19144
+ value: function notContainedIn(key
19073
19145
  /*: string*/
19074
19146
  , value
19075
19147
  /*: mixed*/
@@ -19089,7 +19161,7 @@ var ParseQuery = /*#__PURE__*/function () {
19089
19161
 
19090
19162
  }, {
19091
19163
  key: "containedBy",
19092
- value: function (key
19164
+ value: function containedBy(key
19093
19165
  /*: string*/
19094
19166
  , values
19095
19167
  /*: Array<mixed>*/
@@ -19109,7 +19181,7 @@ var ParseQuery = /*#__PURE__*/function () {
19109
19181
 
19110
19182
  }, {
19111
19183
  key: "containsAll",
19112
- value: function (key
19184
+ value: function containsAll(key
19113
19185
  /*: string*/
19114
19186
  , values
19115
19187
  /*: Array<mixed>*/
@@ -19129,20 +19201,22 @@ var ParseQuery = /*#__PURE__*/function () {
19129
19201
 
19130
19202
  }, {
19131
19203
  key: "containsAllStartingWith",
19132
- value: function (key
19204
+ value: function containsAllStartingWith(key
19133
19205
  /*: string*/
19134
19206
  , values
19135
19207
  /*: Array<string>*/
19136
19208
  )
19137
19209
  /*: ParseQuery*/
19138
19210
  {
19211
+ var _this = this;
19212
+
19139
19213
  if (!(0, _isArray.default)(values)) {
19140
19214
  values = [values];
19141
19215
  }
19142
19216
 
19143
19217
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19144
19218
  return {
19145
- $regex: this._regexStartWith(value)
19219
+ $regex: _this._regexStartWith(value)
19146
19220
  };
19147
19221
  });
19148
19222
  return this.containsAll(key, regexObject);
@@ -19156,7 +19230,7 @@ var ParseQuery = /*#__PURE__*/function () {
19156
19230
 
19157
19231
  }, {
19158
19232
  key: "exists",
19159
- value: function (key
19233
+ value: function exists(key
19160
19234
  /*: string*/
19161
19235
  )
19162
19236
  /*: ParseQuery*/
@@ -19172,7 +19246,7 @@ var ParseQuery = /*#__PURE__*/function () {
19172
19246
 
19173
19247
  }, {
19174
19248
  key: "doesNotExist",
19175
- value: function (key
19249
+ value: function doesNotExist(key
19176
19250
  /*: string*/
19177
19251
  )
19178
19252
  /*: ParseQuery*/
@@ -19192,7 +19266,7 @@ var ParseQuery = /*#__PURE__*/function () {
19192
19266
 
19193
19267
  }, {
19194
19268
  key: "matches",
19195
- value: function (key
19269
+ value: function matches(key
19196
19270
  /*: string*/
19197
19271
  , regex
19198
19272
  /*: RegExp*/
@@ -19233,7 +19307,7 @@ var ParseQuery = /*#__PURE__*/function () {
19233
19307
 
19234
19308
  }, {
19235
19309
  key: "matchesQuery",
19236
- value: function (key
19310
+ value: function matchesQuery(key
19237
19311
  /*: string*/
19238
19312
  , query
19239
19313
  /*: ParseQuery*/
@@ -19256,7 +19330,7 @@ var ParseQuery = /*#__PURE__*/function () {
19256
19330
 
19257
19331
  }, {
19258
19332
  key: "doesNotMatchQuery",
19259
- value: function (key
19333
+ value: function doesNotMatchQuery(key
19260
19334
  /*: string*/
19261
19335
  , query
19262
19336
  /*: ParseQuery*/
@@ -19281,7 +19355,7 @@ var ParseQuery = /*#__PURE__*/function () {
19281
19355
 
19282
19356
  }, {
19283
19357
  key: "matchesKeyInQuery",
19284
- value: function (key
19358
+ value: function matchesKeyInQuery(key
19285
19359
  /*: string*/
19286
19360
  , queryKey
19287
19361
  /*: string*/
@@ -19311,7 +19385,7 @@ var ParseQuery = /*#__PURE__*/function () {
19311
19385
 
19312
19386
  }, {
19313
19387
  key: "doesNotMatchKeyInQuery",
19314
- value: function (key
19388
+ value: function doesNotMatchKeyInQuery(key
19315
19389
  /*: string*/
19316
19390
  , queryKey
19317
19391
  /*: string*/
@@ -19338,7 +19412,7 @@ var ParseQuery = /*#__PURE__*/function () {
19338
19412
 
19339
19413
  }, {
19340
19414
  key: "contains",
19341
- value: function (key
19415
+ value: function contains(key
19342
19416
  /*: string*/
19343
19417
  , substring
19344
19418
  /*: string*/
@@ -19383,7 +19457,7 @@ var ParseQuery = /*#__PURE__*/function () {
19383
19457
 
19384
19458
  }, {
19385
19459
  key: "fullText",
19386
- value: function (key
19460
+ value: function fullText(key
19387
19461
  /*: string*/
19388
19462
  , value
19389
19463
  /*: string*/
@@ -19440,7 +19514,7 @@ var ParseQuery = /*#__PURE__*/function () {
19440
19514
 
19441
19515
  }, {
19442
19516
  key: "sortByTextScore",
19443
- value: function () {
19517
+ value: function sortByTextScore() {
19444
19518
  this.ascending('$score');
19445
19519
  this.select(['$score']);
19446
19520
  return this;
@@ -19458,7 +19532,7 @@ var ParseQuery = /*#__PURE__*/function () {
19458
19532
 
19459
19533
  }, {
19460
19534
  key: "startsWith",
19461
- value: function (key
19535
+ value: function startsWith(key
19462
19536
  /*: string*/
19463
19537
  , prefix
19464
19538
  /*: string*/
@@ -19485,7 +19559,7 @@ var ParseQuery = /*#__PURE__*/function () {
19485
19559
 
19486
19560
  }, {
19487
19561
  key: "endsWith",
19488
- value: function (key
19562
+ value: function endsWith(key
19489
19563
  /*: string*/
19490
19564
  , suffix
19491
19565
  /*: string*/
@@ -19511,7 +19585,7 @@ var ParseQuery = /*#__PURE__*/function () {
19511
19585
 
19512
19586
  }, {
19513
19587
  key: "near",
19514
- value: function (key
19588
+ value: function near(key
19515
19589
  /*: string*/
19516
19590
  , point
19517
19591
  /*: ParseGeoPoint*/
@@ -19540,7 +19614,7 @@ var ParseQuery = /*#__PURE__*/function () {
19540
19614
 
19541
19615
  }, {
19542
19616
  key: "withinRadians",
19543
- value: function (key
19617
+ value: function withinRadians(key
19544
19618
  /*: string*/
19545
19619
  , point
19546
19620
  /*: ParseGeoPoint*/
@@ -19576,7 +19650,7 @@ var ParseQuery = /*#__PURE__*/function () {
19576
19650
 
19577
19651
  }, {
19578
19652
  key: "withinMiles",
19579
- value: function (key
19653
+ value: function withinMiles(key
19580
19654
  /*: string*/
19581
19655
  , point
19582
19656
  /*: ParseGeoPoint*/
@@ -19605,7 +19679,7 @@ var ParseQuery = /*#__PURE__*/function () {
19605
19679
 
19606
19680
  }, {
19607
19681
  key: "withinKilometers",
19608
- value: function (key
19682
+ value: function withinKilometers(key
19609
19683
  /*: string*/
19610
19684
  , point
19611
19685
  /*: ParseGeoPoint*/
@@ -19633,7 +19707,7 @@ var ParseQuery = /*#__PURE__*/function () {
19633
19707
 
19634
19708
  }, {
19635
19709
  key: "withinGeoBox",
19636
- value: function (key
19710
+ value: function withinGeoBox(key
19637
19711
  /*: string*/
19638
19712
  , southwest
19639
19713
  /*: ParseGeoPoint*/
@@ -19670,7 +19744,7 @@ var ParseQuery = /*#__PURE__*/function () {
19670
19744
 
19671
19745
  }, {
19672
19746
  key: "withinPolygon",
19673
- value: function (key
19747
+ value: function withinPolygon(key
19674
19748
  /*: string*/
19675
19749
  , points
19676
19750
  /*: Array<Array<number>>*/
@@ -19692,7 +19766,7 @@ var ParseQuery = /*#__PURE__*/function () {
19692
19766
 
19693
19767
  }, {
19694
19768
  key: "polygonContains",
19695
- value: function (key
19769
+ value: function polygonContains(key
19696
19770
  /*: string*/
19697
19771
  , point
19698
19772
  /*: ParseGeoPoint*/
@@ -19715,7 +19789,7 @@ var ParseQuery = /*#__PURE__*/function () {
19715
19789
 
19716
19790
  }, {
19717
19791
  key: "ascending",
19718
- value: function ()
19792
+ value: function ascending()
19719
19793
  /*: ParseQuery*/
19720
19794
  {
19721
19795
  this._order = [];
@@ -19737,7 +19811,7 @@ var ParseQuery = /*#__PURE__*/function () {
19737
19811
 
19738
19812
  }, {
19739
19813
  key: "addAscending",
19740
- value: function ()
19814
+ value: function addAscending()
19741
19815
  /*: ParseQuery*/
19742
19816
  {
19743
19817
  var _this9 = this;
@@ -19771,7 +19845,7 @@ var ParseQuery = /*#__PURE__*/function () {
19771
19845
 
19772
19846
  }, {
19773
19847
  key: "descending",
19774
- value: function ()
19848
+ value: function descending()
19775
19849
  /*: ParseQuery*/
19776
19850
  {
19777
19851
  this._order = [];
@@ -19793,7 +19867,7 @@ var ParseQuery = /*#__PURE__*/function () {
19793
19867
 
19794
19868
  }, {
19795
19869
  key: "addDescending",
19796
- value: function ()
19870
+ value: function addDescending()
19797
19871
  /*: ParseQuery*/
19798
19872
  {
19799
19873
  var _this10 = this;
@@ -19832,7 +19906,7 @@ var ParseQuery = /*#__PURE__*/function () {
19832
19906
 
19833
19907
  }, {
19834
19908
  key: "skip",
19835
- value: function (n
19909
+ value: function skip(n
19836
19910
  /*: number*/
19837
19911
  )
19838
19912
  /*: ParseQuery*/
@@ -19853,7 +19927,7 @@ var ParseQuery = /*#__PURE__*/function () {
19853
19927
 
19854
19928
  }, {
19855
19929
  key: "limit",
19856
- value: function (n
19930
+ value: function limit(n
19857
19931
  /*: number*/
19858
19932
  )
19859
19933
  /*: ParseQuery*/
@@ -19877,7 +19951,7 @@ var ParseQuery = /*#__PURE__*/function () {
19877
19951
 
19878
19952
  }, {
19879
19953
  key: "withCount",
19880
- value: function ()
19954
+ value: function withCount()
19881
19955
  /*: ParseQuery*/
19882
19956
  {
19883
19957
  var includeCount
@@ -19905,7 +19979,7 @@ var ParseQuery = /*#__PURE__*/function () {
19905
19979
 
19906
19980
  }, {
19907
19981
  key: "include",
19908
- value: function ()
19982
+ value: function include()
19909
19983
  /*: ParseQuery*/
19910
19984
  {
19911
19985
  var _this11 = this;
@@ -19935,7 +20009,7 @@ var ParseQuery = /*#__PURE__*/function () {
19935
20009
 
19936
20010
  }, {
19937
20011
  key: "includeAll",
19938
- value: function ()
20012
+ value: function includeAll()
19939
20013
  /*: ParseQuery*/
19940
20014
  {
19941
20015
  return this.include('*');
@@ -19951,7 +20025,7 @@ var ParseQuery = /*#__PURE__*/function () {
19951
20025
 
19952
20026
  }, {
19953
20027
  key: "select",
19954
- value: function ()
20028
+ value: function select()
19955
20029
  /*: ParseQuery*/
19956
20030
  {
19957
20031
  var _this12 = this;
@@ -19987,7 +20061,7 @@ var ParseQuery = /*#__PURE__*/function () {
19987
20061
 
19988
20062
  }, {
19989
20063
  key: "exclude",
19990
- value: function ()
20064
+ value: function exclude()
19991
20065
  /*: ParseQuery*/
19992
20066
  {
19993
20067
  var _this13 = this;
@@ -20018,7 +20092,7 @@ var ParseQuery = /*#__PURE__*/function () {
20018
20092
 
20019
20093
  }, {
20020
20094
  key: "readPreference",
20021
- value: function (_readPreference
20095
+ value: function readPreference(_readPreference
20022
20096
  /*: string*/
20023
20097
  , includeReadPreference
20024
20098
  /*:: ?: string*/
@@ -20047,7 +20121,7 @@ var ParseQuery = /*#__PURE__*/function () {
20047
20121
  /*:: ?: string*/
20048
20122
  ) {
20049
20123
  var currentUser, liveQueryClient, subscription;
20050
- return _regeneratorRuntime().wrap(function (_context22) {
20124
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
20051
20125
  while (1) {
20052
20126
  switch (_context22.prev = _context22.next) {
20053
20127
  case 0:
@@ -20084,9 +20158,11 @@ var ParseQuery = /*#__PURE__*/function () {
20084
20158
  }, _callee7, this);
20085
20159
  }));
20086
20160
 
20087
- return function () {
20161
+ function subscribe(_x10) {
20088
20162
  return _subscribe.apply(this, arguments);
20089
- };
20163
+ }
20164
+
20165
+ return subscribe;
20090
20166
  }()
20091
20167
  /**
20092
20168
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20109,7 +20185,7 @@ var ParseQuery = /*#__PURE__*/function () {
20109
20185
  *
20110
20186
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20111
20187
  */
20112
- function ()
20188
+ function fromNetwork()
20113
20189
  /*: ParseQuery*/
20114
20190
  {
20115
20191
  this._queriesLocalDatastore = false;
@@ -20124,7 +20200,7 @@ var ParseQuery = /*#__PURE__*/function () {
20124
20200
 
20125
20201
  }, {
20126
20202
  key: "fromLocalDatastore",
20127
- value: function ()
20203
+ value: function fromLocalDatastore()
20128
20204
  /*: ParseQuery*/
20129
20205
  {
20130
20206
  return this.fromPinWithName(null);
@@ -20137,7 +20213,7 @@ var ParseQuery = /*#__PURE__*/function () {
20137
20213
 
20138
20214
  }, {
20139
20215
  key: "fromPin",
20140
- value: function ()
20216
+ value: function fromPin()
20141
20217
  /*: ParseQuery*/
20142
20218
  {
20143
20219
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20151,7 +20227,7 @@ var ParseQuery = /*#__PURE__*/function () {
20151
20227
 
20152
20228
  }, {
20153
20229
  key: "fromPinWithName",
20154
- value: function (name
20230
+ value: function fromPinWithName(name
20155
20231
  /*:: ?: string*/
20156
20232
  )
20157
20233
  /*: ParseQuery*/
@@ -20173,9 +20249,11 @@ var ParseQuery = /*#__PURE__*/function () {
20173
20249
 
20174
20250
  }, {
20175
20251
  key: "cancel",
20176
- value: function ()
20252
+ value: function cancel()
20177
20253
  /*: ParseQuery*/
20178
20254
  {
20255
+ var _this14 = this;
20256
+
20179
20257
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20180
20258
  this._xhrRequest.task._aborted = true;
20181
20259
 
@@ -20189,12 +20267,12 @@ var ParseQuery = /*#__PURE__*/function () {
20189
20267
  }
20190
20268
 
20191
20269
  return this._xhrRequest.onchange = function () {
20192
- return this.cancel();
20270
+ return _this14.cancel();
20193
20271
  };
20194
20272
  }
20195
20273
  }, {
20196
20274
  key: "_setRequestTask",
20197
- value: function (options) {
20275
+ value: function _setRequestTask(options) {
20198
20276
  var _this15 = this;
20199
20277
 
20200
20278
  options.requestTask = function (task) {
@@ -20205,7 +20283,7 @@ var ParseQuery = /*#__PURE__*/function () {
20205
20283
  }
20206
20284
  }], [{
20207
20285
  key: "fromJSON",
20208
- value: function (className
20286
+ value: function fromJSON(className
20209
20287
  /*: string*/
20210
20288
  , json
20211
20289
  /*: QueryJSON*/
@@ -20217,7 +20295,7 @@ var ParseQuery = /*#__PURE__*/function () {
20217
20295
  }
20218
20296
  }, {
20219
20297
  key: "or",
20220
- value: function ()
20298
+ value: function or()
20221
20299
  /*: ParseQuery*/
20222
20300
  {
20223
20301
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20247,7 +20325,7 @@ var ParseQuery = /*#__PURE__*/function () {
20247
20325
 
20248
20326
  }, {
20249
20327
  key: "and",
20250
- value: function ()
20328
+ value: function and()
20251
20329
  /*: ParseQuery*/
20252
20330
  {
20253
20331
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20277,7 +20355,7 @@ var ParseQuery = /*#__PURE__*/function () {
20277
20355
 
20278
20356
  }, {
20279
20357
  key: "nor",
20280
- value: function ()
20358
+ value: function nor()
20281
20359
  /*: ParseQuery*/
20282
20360
  {
20283
20361
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20297,7 +20375,7 @@ var ParseQuery = /*#__PURE__*/function () {
20297
20375
  }();
20298
20376
 
20299
20377
  var DefaultController = {
20300
- find: function (className
20378
+ find: function find(className
20301
20379
  /*: string*/
20302
20380
  , params
20303
20381
  /*: QueryJSON*/
@@ -20310,7 +20388,7 @@ var DefaultController = {
20310
20388
 
20311
20389
  return RESTController.request('GET', 'classes/' + className, params, options);
20312
20390
  },
20313
- aggregate: function (className
20391
+ aggregate: function aggregate(className
20314
20392
  /*: string*/
20315
20393
  , params
20316
20394
  /*: any*/
@@ -22539,7 +22617,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22539
22617
  value: function () {
22540
22618
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22541
22619
  var current;
22542
- return _regeneratorRuntime().wrap(function (_context) {
22620
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22543
22621
  while (1) {
22544
22622
  switch (_context.prev = _context.next) {
22545
22623
  case 0:
@@ -22558,9 +22636,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22558
22636
  }, _callee, this);
22559
22637
  }));
22560
22638
 
22561
- return function () {
22639
+ function isCurrentAsync() {
22562
22640
  return _isCurrentAsync.apply(this, arguments);
22563
- };
22641
+ }
22642
+
22643
+ return isCurrentAsync;
22564
22644
  }()
22565
22645
  /**
22566
22646
  * Returns get("username").
@@ -22570,7 +22650,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22570
22650
 
22571
22651
  }, {
22572
22652
  key: "getUsername",
22573
- value: function ()
22653
+ value: function getUsername()
22574
22654
  /*: ?string*/
22575
22655
  {
22576
22656
  var username = this.get('username');
@@ -22589,7 +22669,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22589
22669
 
22590
22670
  }, {
22591
22671
  key: "setUsername",
22592
- value: function (username
22672
+ value: function setUsername(username
22593
22673
  /*: string*/
22594
22674
  ) {
22595
22675
  // Strip anonymity
@@ -22610,7 +22690,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22610
22690
 
22611
22691
  }, {
22612
22692
  key: "setPassword",
22613
- value: function (password
22693
+ value: function setPassword(password
22614
22694
  /*: string*/
22615
22695
  ) {
22616
22696
  this.set('password', password);
@@ -22623,7 +22703,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22623
22703
 
22624
22704
  }, {
22625
22705
  key: "getEmail",
22626
- value: function ()
22706
+ value: function getEmail()
22627
22707
  /*: ?string*/
22628
22708
  {
22629
22709
  var email = this.get('email');
@@ -22643,7 +22723,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22643
22723
 
22644
22724
  }, {
22645
22725
  key: "setEmail",
22646
- value: function (email
22726
+ value: function setEmail(email
22647
22727
  /*: string*/
22648
22728
  ) {
22649
22729
  return this.set('email', email);
@@ -22658,7 +22738,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22658
22738
 
22659
22739
  }, {
22660
22740
  key: "getSessionToken",
22661
- value: function ()
22741
+ value: function getSessionToken()
22662
22742
  /*: ?string*/
22663
22743
  {
22664
22744
  var token = this.get('sessionToken');
@@ -22677,7 +22757,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22677
22757
 
22678
22758
  }, {
22679
22759
  key: "authenticated",
22680
- value: function ()
22760
+ value: function authenticated()
22681
22761
  /*: boolean*/
22682
22762
  {
22683
22763
  var current = ParseUser.current();
@@ -22699,7 +22779,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22699
22779
 
22700
22780
  }, {
22701
22781
  key: "signUp",
22702
- value: function (attrs
22782
+ value: function signUp(attrs
22703
22783
  /*: AttributeMap*/
22704
22784
  , options
22705
22785
  /*:: ?: FullOptions*/
@@ -22739,7 +22819,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22739
22819
 
22740
22820
  }, {
22741
22821
  key: "logIn",
22742
- value: function (options
22822
+ value: function logIn(options
22743
22823
  /*:: ?: FullOptions*/
22744
22824
  )
22745
22825
  /*: Promise<ParseUser>*/
@@ -22783,7 +22863,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22783
22863
  current,
22784
22864
  _args2 = arguments;
22785
22865
 
22786
- return _regeneratorRuntime().wrap(function (_context2) {
22866
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22787
22867
  while (1) {
22788
22868
  switch (_context2.prev = _context2.next) {
22789
22869
  case 0:
@@ -22819,9 +22899,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22819
22899
  }, _callee2, this);
22820
22900
  }));
22821
22901
 
22822
- return function () {
22902
+ function save() {
22823
22903
  return _save.apply(this, arguments);
22824
- };
22904
+ }
22905
+
22906
+ return save;
22825
22907
  }()
22826
22908
  /**
22827
22909
  * Wrap the default destroy behavior with functionality that logs out
@@ -22841,7 +22923,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22841
22923
  current,
22842
22924
  _args3 = arguments;
22843
22925
 
22844
- return _regeneratorRuntime().wrap(function (_context3) {
22926
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22845
22927
  while (1) {
22846
22928
  switch (_context3.prev = _context3.next) {
22847
22929
  case 0:
@@ -22877,9 +22959,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22877
22959
  }, _callee3, this);
22878
22960
  }));
22879
22961
 
22880
- return function () {
22962
+ function destroy() {
22881
22963
  return _destroy.apply(this, arguments);
22882
- };
22964
+ }
22965
+
22966
+ return destroy;
22883
22967
  }()
22884
22968
  /**
22885
22969
  * Wrap the default fetch behavior with functionality to save to local
@@ -22899,7 +22983,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22899
22983
  current,
22900
22984
  _args4 = arguments;
22901
22985
 
22902
- return _regeneratorRuntime().wrap(function (_context4) {
22986
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22903
22987
  while (1) {
22904
22988
  switch (_context4.prev = _context4.next) {
22905
22989
  case 0:
@@ -22935,9 +23019,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22935
23019
  }, _callee4, this);
22936
23020
  }));
22937
23021
 
22938
- return function () {
23022
+ function fetch() {
22939
23023
  return _fetch.apply(this, arguments);
22940
- };
23024
+ }
23025
+
23026
+ return fetch;
22941
23027
  }()
22942
23028
  /**
22943
23029
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22957,7 +23043,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22957
23043
  current,
22958
23044
  _args5 = arguments;
22959
23045
 
22960
- return _regeneratorRuntime().wrap(function (_context5) {
23046
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22961
23047
  while (1) {
22962
23048
  switch (_context5.prev = _context5.next) {
22963
23049
  case 0:
@@ -22993,9 +23079,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22993
23079
  }, _callee5, this);
22994
23080
  }));
22995
23081
 
22996
- return function () {
23082
+ function fetchWithInclude() {
22997
23083
  return _fetchWithInclude.apply(this, arguments);
22998
- };
23084
+ }
23085
+
23086
+ return fetchWithInclude;
22999
23087
  }()
23000
23088
  /**
23001
23089
  * Verify whether a given password is the password of the current user.
@@ -23008,7 +23096,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23008
23096
 
23009
23097
  }, {
23010
23098
  key: "verifyPassword",
23011
- value: function (password
23099
+ value: function verifyPassword(password
23012
23100
  /*: string*/
23013
23101
  , options
23014
23102
  /*:: ?: RequestOptions*/
@@ -23020,7 +23108,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23020
23108
  }
23021
23109
  }], [{
23022
23110
  key: "readOnlyAttributes",
23023
- value: function () {
23111
+ value: function readOnlyAttributes() {
23024
23112
  return ['sessionToken'];
23025
23113
  }
23026
23114
  /**
@@ -23034,7 +23122,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23034
23122
 
23035
23123
  }, {
23036
23124
  key: "extend",
23037
- value: function (protoProps
23125
+ value: function extend(protoProps
23038
23126
  /*: { [prop: string]: any }*/
23039
23127
  , classProps
23040
23128
  /*: { [prop: string]: any }*/
@@ -23077,7 +23165,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23077
23165
 
23078
23166
  }, {
23079
23167
  key: "current",
23080
- value: function ()
23168
+ value: function current()
23081
23169
  /*: ?ParseUser*/
23082
23170
  {
23083
23171
  if (!canUseCurrentUser) {
@@ -23098,7 +23186,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23098
23186
 
23099
23187
  }, {
23100
23188
  key: "currentAsync",
23101
- value: function ()
23189
+ value: function currentAsync()
23102
23190
  /*: Promise<?ParseUser>*/
23103
23191
  {
23104
23192
  if (!canUseCurrentUser) {
@@ -23126,7 +23214,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23126
23214
 
23127
23215
  }, {
23128
23216
  key: "signUp",
23129
- value: function (username
23217
+ value: function signUp(username
23130
23218
  /*: string*/
23131
23219
  , password
23132
23220
  /*: string*/
@@ -23156,7 +23244,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23156
23244
 
23157
23245
  }, {
23158
23246
  key: "logIn",
23159
- value: function (username
23247
+ value: function logIn(username
23160
23248
  /*: string*/
23161
23249
  , password
23162
23250
  /*: string*/
@@ -23192,7 +23280,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23192
23280
 
23193
23281
  }, {
23194
23282
  key: "become",
23195
- value: function (sessionToken
23283
+ value: function become(sessionToken
23196
23284
  /*: string*/
23197
23285
  , options
23198
23286
  /*:: ?: RequestOptions*/
@@ -23228,7 +23316,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23228
23316
 
23229
23317
  }, {
23230
23318
  key: "me",
23231
- value: function (sessionToken
23319
+ value: function me(sessionToken
23232
23320
  /*: string*/
23233
23321
  ) {
23234
23322
  var options
@@ -23263,7 +23351,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23263
23351
 
23264
23352
  }, {
23265
23353
  key: "hydrate",
23266
- value: function (userJSON
23354
+ value: function hydrate(userJSON
23267
23355
  /*: AttributeMap*/
23268
23356
  ) {
23269
23357
  var controller = _CoreManager.default.getUserController();
@@ -23283,7 +23371,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23283
23371
 
23284
23372
  }, {
23285
23373
  key: "logInWith",
23286
- value: function (provider
23374
+ value: function logInWith(provider
23287
23375
  /*: any*/
23288
23376
  , options
23289
23377
  /*: { authData?: AuthData }*/
@@ -23308,7 +23396,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23308
23396
 
23309
23397
  }, {
23310
23398
  key: "logOut",
23311
- value: function () {
23399
+ value: function logOut() {
23312
23400
  var options
23313
23401
  /*: RequestOptions*/
23314
23402
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23331,7 +23419,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23331
23419
 
23332
23420
  }, {
23333
23421
  key: "requestPasswordReset",
23334
- value: function (email
23422
+ value: function requestPasswordReset(email
23335
23423
  /*: string*/
23336
23424
  , options
23337
23425
  /*:: ?: RequestOptions*/
@@ -23359,7 +23447,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23359
23447
 
23360
23448
  }, {
23361
23449
  key: "requestEmailVerification",
23362
- value: function (email
23450
+ value: function requestEmailVerification(email
23363
23451
  /*: string*/
23364
23452
  , options
23365
23453
  /*:: ?: RequestOptions*/
@@ -23388,7 +23476,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23388
23476
 
23389
23477
  }, {
23390
23478
  key: "verifyPassword",
23391
- value: function (username
23479
+ value: function verifyPassword(username
23392
23480
  /*: string*/
23393
23481
  , password
23394
23482
  /*: string*/
@@ -23426,7 +23514,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23426
23514
 
23427
23515
  }, {
23428
23516
  key: "allowCustomUserClass",
23429
- value: function (isAllowed
23517
+ value: function allowCustomUserClass(isAllowed
23430
23518
  /*: boolean*/
23431
23519
  ) {
23432
23520
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23448,7 +23536,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23448
23536
 
23449
23537
  }, {
23450
23538
  key: "enableRevocableSession",
23451
- value: function (options
23539
+ value: function enableRevocableSession(options
23452
23540
  /*:: ?: RequestOptions*/
23453
23541
  ) {
23454
23542
  options = options || {};
@@ -23475,7 +23563,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23475
23563
 
23476
23564
  }, {
23477
23565
  key: "enableUnsafeCurrentUser",
23478
- value: function () {
23566
+ value: function enableUnsafeCurrentUser() {
23479
23567
  canUseCurrentUser = true;
23480
23568
  }
23481
23569
  /**
@@ -23488,7 +23576,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23488
23576
 
23489
23577
  }, {
23490
23578
  key: "disableUnsafeCurrentUser",
23491
- value: function () {
23579
+ value: function disableUnsafeCurrentUser() {
23492
23580
  canUseCurrentUser = false;
23493
23581
  }
23494
23582
  /**
@@ -23506,7 +23594,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23506
23594
 
23507
23595
  }, {
23508
23596
  key: "_registerAuthenticationProvider",
23509
- value: function (provider
23597
+ value: function _registerAuthenticationProvider(provider
23510
23598
  /*: any*/
23511
23599
  ) {
23512
23600
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23528,7 +23616,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23528
23616
 
23529
23617
  }, {
23530
23618
  key: "_logInWith",
23531
- value: function (provider
23619
+ value: function _logInWith(provider
23532
23620
  /*: any*/
23533
23621
  , options
23534
23622
  /*: { authData?: AuthData }*/
@@ -23540,13 +23628,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23540
23628
  }
23541
23629
  }, {
23542
23630
  key: "_clearCache",
23543
- value: function () {
23631
+ value: function _clearCache() {
23544
23632
  currentUserCache = null;
23545
23633
  currentUserCacheMatchesDisk = false;
23546
23634
  }
23547
23635
  }, {
23548
23636
  key: "_setCurrentUserCache",
23549
- value: function (user
23637
+ value: function _setCurrentUserCache(user
23550
23638
  /*: ParseUser*/
23551
23639
  ) {
23552
23640
  currentUserCache = user;
@@ -23558,7 +23646,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23558
23646
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23559
23647
 
23560
23648
  var DefaultController = {
23561
- updateUserOnDisk: function (user) {
23649
+ updateUserOnDisk: function updateUserOnDisk(user) {
23562
23650
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23563
23651
 
23564
23652
  var json = user.toJSON();
@@ -23576,14 +23664,14 @@ var DefaultController = {
23576
23664
  return user;
23577
23665
  });
23578
23666
  },
23579
- removeUserFromDisk: function () {
23667
+ removeUserFromDisk: function removeUserFromDisk() {
23580
23668
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23581
23669
 
23582
23670
  currentUserCacheMatchesDisk = true;
23583
23671
  currentUserCache = null;
23584
23672
  return _Storage.default.removeItemAsync(path);
23585
23673
  },
23586
- setCurrentUser: function (user) {
23674
+ setCurrentUser: function setCurrentUser(user) {
23587
23675
  currentUserCache = user;
23588
23676
 
23589
23677
  user._cleanupAuthData();
@@ -23592,7 +23680,7 @@ var DefaultController = {
23592
23680
 
23593
23681
  return DefaultController.updateUserOnDisk(user);
23594
23682
  },
23595
- currentUser: function ()
23683
+ currentUser: function currentUser()
23596
23684
  /*: ?ParseUser*/
23597
23685
  {
23598
23686
  if (currentUserCache) {
@@ -23651,7 +23739,7 @@ var DefaultController = {
23651
23739
 
23652
23740
  return current;
23653
23741
  },
23654
- currentUserAsync: function ()
23742
+ currentUserAsync: function currentUserAsync()
23655
23743
  /*: Promise<?ParseUser>*/
23656
23744
  {
23657
23745
  if (currentUserCache) {
@@ -23706,7 +23794,7 @@ var DefaultController = {
23706
23794
  return _promise.default.resolve(current);
23707
23795
  });
23708
23796
  },
23709
- signUp: function (user
23797
+ signUp: function signUp(user
23710
23798
  /*: ParseUser*/
23711
23799
  , attrs
23712
23800
  /*: AttributeMap*/
@@ -23739,7 +23827,7 @@ var DefaultController = {
23739
23827
  return user;
23740
23828
  });
23741
23829
  },
23742
- logIn: function (user
23830
+ logIn: function logIn(user
23743
23831
  /*: ParseUser*/
23744
23832
  , options
23745
23833
  /*: RequestOptions*/
@@ -23773,7 +23861,7 @@ var DefaultController = {
23773
23861
  return DefaultController.setCurrentUser(user);
23774
23862
  });
23775
23863
  },
23776
- become: function (user
23864
+ become: function become(user
23777
23865
  /*: ParseUser*/
23778
23866
  , options
23779
23867
  /*: RequestOptions*/
@@ -23790,7 +23878,7 @@ var DefaultController = {
23790
23878
  return DefaultController.setCurrentUser(user);
23791
23879
  });
23792
23880
  },
23793
- hydrate: function (user
23881
+ hydrate: function hydrate(user
23794
23882
  /*: ParseUser*/
23795
23883
  , userJSON
23796
23884
  /*: AttributeMap*/
@@ -23807,7 +23895,7 @@ var DefaultController = {
23807
23895
  return _promise.default.resolve(user);
23808
23896
  }
23809
23897
  },
23810
- me: function (user
23898
+ me: function me(user
23811
23899
  /*: ParseUser*/
23812
23900
  , options
23813
23901
  /*: RequestOptions*/
@@ -23824,7 +23912,7 @@ var DefaultController = {
23824
23912
  return user;
23825
23913
  });
23826
23914
  },
23827
- logOut: function (options
23915
+ logOut: function logOut(options
23828
23916
  /*: RequestOptions*/
23829
23917
  )
23830
23918
  /*: Promise<ParseUser>*/
@@ -23863,7 +23951,7 @@ var DefaultController = {
23863
23951
  return promise;
23864
23952
  });
23865
23953
  },
23866
- requestPasswordReset: function (email
23954
+ requestPasswordReset: function requestPasswordReset(email
23867
23955
  /*: string*/
23868
23956
  , options
23869
23957
  /*: RequestOptions*/
@@ -23874,14 +23962,14 @@ var DefaultController = {
23874
23962
  email: email
23875
23963
  }, options);
23876
23964
  },
23877
- upgradeToRevocableSession: function (user
23965
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23878
23966
  /*: ParseUser*/
23879
23967
  , options
23880
23968
  /*: RequestOptions*/
23881
23969
  ) {
23882
23970
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23883
23971
  var token, RESTController, result, session, current;
23884
- return _regeneratorRuntime().wrap(function (_context6) {
23972
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23885
23973
  while (1) {
23886
23974
  switch (_context6.prev = _context6.next) {
23887
23975
  case 0:
@@ -23934,7 +24022,7 @@ var DefaultController = {
23934
24022
  }, _callee6);
23935
24023
  }))();
23936
24024
  },
23937
- linkWith: function (user
24025
+ linkWith: function linkWith(user
23938
24026
  /*: ParseUser*/
23939
24027
  , authData
23940
24028
  /*: AuthData*/
@@ -23951,7 +24039,7 @@ var DefaultController = {
23951
24039
  return user;
23952
24040
  });
23953
24041
  },
23954
- verifyPassword: function (username
24042
+ verifyPassword: function verifyPassword(username
23955
24043
  /*: string*/
23956
24044
  , password
23957
24045
  /*: string*/
@@ -23965,7 +24053,7 @@ var DefaultController = {
23965
24053
  password: password
23966
24054
  }, options);
23967
24055
  },
23968
- requestEmailVerification: function (email
24056
+ requestEmailVerification: function requestEmailVerification(email
23969
24057
  /*: string*/
23970
24058
  , options
23971
24059
  /*: RequestOptions*/
@@ -24306,7 +24394,7 @@ var RESTController = {
24306
24394
  var requestId = isIdempotent ? uuidv4() : '';
24307
24395
  var attempts = 0;
24308
24396
 
24309
- var dispatch = function dispatch() {
24397
+ (function dispatch() {
24310
24398
  if (XHR == null) {
24311
24399
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24312
24400
  }
@@ -24435,12 +24523,11 @@ var RESTController = {
24435
24523
  if (options && typeof options.requestTask === 'function') {
24436
24524
  options.requestTask(xhr);
24437
24525
  }
24438
- };
24526
+ })();
24439
24527
 
24440
- dispatch();
24441
24528
  return promise;
24442
24529
  },
24443
- request: function (method
24530
+ request: function request(method
24444
24531
  /*: string*/
24445
24532
  , path
24446
24533
  /*: string*/
@@ -24555,7 +24642,7 @@ var RESTController = {
24555
24642
  });
24556
24643
  }).catch(RESTController.handleError);
24557
24644
  },
24558
- handleError: function (response) {
24645
+ handleError: function handleError(response) {
24559
24646
  // Transform the error into an instance of ParseError by trying to parse
24560
24647
  // the error string as JSON
24561
24648
  var error;
@@ -24575,12 +24662,12 @@ var RESTController = {
24575
24662
 
24576
24663
  return _promise.default.reject(error);
24577
24664
  },
24578
- _setXHR: function (xhr
24665
+ _setXHR: function _setXHR(xhr
24579
24666
  /*: any*/
24580
24667
  ) {
24581
24668
  XHR = xhr;
24582
24669
  },
24583
- _getXHR: function () {
24670
+ _getXHR: function _getXHR() {
24584
24671
  return XHR;
24585
24672
  }
24586
24673
  };