parse 3.5.0-alpha.3 → 3.5.0-alpha.5

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/dist/parse.js +5732 -2377
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +5730 -2375
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/CoreManager.js +1 -1
  6. package/lib/browser/EventuallyQueue.js +395 -29
  7. package/lib/browser/LiveQueryClient.js +2 -6
  8. package/lib/browser/LocalDatastore.js +392 -18
  9. package/lib/browser/LocalDatastoreController.js +391 -21
  10. package/lib/browser/LocalDatastoreController.react-native.js +387 -23
  11. package/lib/browser/OfflineQuery.js +29 -8
  12. package/lib/browser/ParseFile.js +388 -22
  13. package/lib/browser/ParseLiveQuery.js +381 -18
  14. package/lib/browser/ParseObject.js +405 -41
  15. package/lib/browser/ParseOp.js +1 -3
  16. package/lib/browser/ParseQuery.js +396 -47
  17. package/lib/browser/ParseUser.js +388 -14
  18. package/lib/browser/StorageController.react-native.js +6 -18
  19. package/lib/node/CoreManager.js +1 -1
  20. package/lib/node/OfflineQuery.js +18 -3
  21. package/lib/node/ParseObject.js +6 -6
  22. package/lib/node/ParseQuery.js +1 -3
  23. package/lib/react-native/CoreManager.js +1 -1
  24. package/lib/react-native/EventuallyQueue.js +376 -27
  25. package/lib/react-native/LiveQueryClient.js +2 -6
  26. package/lib/react-native/LocalDatastore.js +374 -26
  27. package/lib/react-native/LocalDatastoreController.js +365 -16
  28. package/lib/react-native/LocalDatastoreController.react-native.js +363 -14
  29. package/lib/react-native/OfflineQuery.js +28 -7
  30. package/lib/react-native/ParseFile.js +359 -16
  31. package/lib/react-native/ParseLiveQuery.js +357 -8
  32. package/lib/react-native/ParseObject.js +385 -38
  33. package/lib/react-native/ParseOp.js +1 -3
  34. package/lib/react-native/ParseQuery.js +374 -39
  35. package/lib/react-native/ParseUser.js +368 -19
  36. package/lib/react-native/StorageController.react-native.js +6 -18
  37. package/lib/weapp/CoreManager.js +1 -1
  38. package/lib/weapp/EventuallyQueue.js +395 -29
  39. package/lib/weapp/LiveQueryClient.js +2 -6
  40. package/lib/weapp/LocalDatastore.js +392 -18
  41. package/lib/weapp/LocalDatastoreController.js +391 -21
  42. package/lib/weapp/LocalDatastoreController.react-native.js +387 -23
  43. package/lib/weapp/OfflineQuery.js +29 -8
  44. package/lib/weapp/ParseFile.js +388 -22
  45. package/lib/weapp/ParseLiveQuery.js +381 -18
  46. package/lib/weapp/ParseObject.js +405 -41
  47. package/lib/weapp/ParseOp.js +1 -3
  48. package/lib/weapp/ParseQuery.js +396 -47
  49. package/lib/weapp/ParseUser.js +388 -14
  50. package/lib/weapp/StorageController.react-native.js +6 -18
  51. package/package.json +1 -1
@@ -2,8 +2,26 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
4
 
5
+ var _sliceInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
6
+
7
+ var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
8
+
9
+ var _Promise2 = require("@babel/runtime-corejs3/core-js-stable/promise");
10
+
11
+ var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
12
+
13
+ var _typeof3 = require("@babel/runtime-corejs3/helpers/typeof");
14
+
15
+ var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
16
+
17
+ var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
18
+
19
+ var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
20
+
5
21
  var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
22
 
23
+ var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
24
+
7
25
  _Object$defineProperty(exports, "__esModule", {
8
26
  value: true
9
27
  });
@@ -22,8 +40,6 @@ var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stabl
22
40
 
23
41
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
24
42
 
25
- var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
26
-
27
43
  var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
28
44
 
29
45
  var _sort = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/sort"));
@@ -71,17 +87,364 @@ var _ParseObject = _interopRequireDefault(require("./ParseObject"));
71
87
  var _OfflineQuery = _interopRequireDefault(require("./OfflineQuery"));
72
88
 
73
89
  var _LocalDatastoreUtils = require("./LocalDatastoreUtils");
74
- /*
75
- * Copyright (c) 2015-present, Parse, LLC.
76
- * All rights reserved.
77
- *
78
- * This source code is licensed under the BSD-style license found in the
79
- * LICENSE file in the root directory of this source tree. An additional grant
80
- * of patent rights can be found in the PATENTS file in the same directory.
81
- *
82
- * @flow
83
- */
84
90
 
91
+ function _regeneratorRuntime() {
92
+ "use strict";
93
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
94
+
95
+ _regeneratorRuntime = function () {
96
+ return exports;
97
+ };
98
+
99
+ var exports = {},
100
+ Op = Object.prototype,
101
+ hasOwn = Op.hasOwnProperty,
102
+ $Symbol = "function" == typeof _Symbol ? _Symbol : {},
103
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
104
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
105
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
106
+
107
+ function define(obj, key, value) {
108
+ return _Object$defineProperty(obj, key, {
109
+ value: value,
110
+ enumerable: !0,
111
+ configurable: !0,
112
+ writable: !0
113
+ }), obj[key];
114
+ }
115
+
116
+ try {
117
+ define({}, "");
118
+ } catch (err) {
119
+ define = function (obj, key, value) {
120
+ return obj[key] = value;
121
+ };
122
+ }
123
+
124
+ function wrap(innerFn, outerFn, self, tryLocsList) {
125
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
126
+ generator = _Object$create(protoGenerator.prototype),
127
+ context = new Context(tryLocsList || []);
128
+
129
+ return generator._invoke = function (innerFn, self, context) {
130
+ var state = "suspendedStart";
131
+ return function (method, arg) {
132
+ if ("executing" === state) throw new Error("Generator is already running");
133
+
134
+ if ("completed" === state) {
135
+ if ("throw" === method) throw arg;
136
+ return doneResult();
137
+ }
138
+
139
+ for (context.method = method, context.arg = arg;;) {
140
+ var delegate = context.delegate;
141
+
142
+ if (delegate) {
143
+ var delegateResult = maybeInvokeDelegate(delegate, context);
144
+
145
+ if (delegateResult) {
146
+ if (delegateResult === ContinueSentinel) continue;
147
+ return delegateResult;
148
+ }
149
+ }
150
+
151
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
152
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
153
+ context.dispatchException(context.arg);
154
+ } else "return" === context.method && context.abrupt("return", context.arg);
155
+ state = "executing";
156
+ var record = tryCatch(innerFn, self, context);
157
+
158
+ if ("normal" === record.type) {
159
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
160
+ return {
161
+ value: record.arg,
162
+ done: context.done
163
+ };
164
+ }
165
+
166
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
167
+ }
168
+ };
169
+ }(innerFn, self, context), generator;
170
+ }
171
+
172
+ function tryCatch(fn, obj, arg) {
173
+ try {
174
+ return {
175
+ type: "normal",
176
+ arg: fn.call(obj, arg)
177
+ };
178
+ } catch (err) {
179
+ return {
180
+ type: "throw",
181
+ arg: err
182
+ };
183
+ }
184
+ }
185
+
186
+ exports.wrap = wrap;
187
+ var ContinueSentinel = {};
188
+
189
+ function Generator() {}
190
+
191
+ function GeneratorFunction() {}
192
+
193
+ function GeneratorFunctionPrototype() {}
194
+
195
+ var IteratorPrototype = {};
196
+ define(IteratorPrototype, iteratorSymbol, function () {
197
+ return this;
198
+ });
199
+ var getProto = _Object$getPrototypeOf,
200
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
201
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
202
+
203
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);
204
+
205
+ function defineIteratorMethods(prototype) {
206
+ var _context23;
207
+
208
+ _forEachInstanceProperty2(_context23 = ["next", "throw", "return"]).call(_context23, function (method) {
209
+ define(prototype, method, function (arg) {
210
+ return this._invoke(method, arg);
211
+ });
212
+ });
213
+ }
214
+
215
+ function AsyncIterator(generator, PromiseImpl) {
216
+ function invoke(method, arg, resolve, reject) {
217
+ var record = tryCatch(generator[method], generator, arg);
218
+
219
+ if ("throw" !== record.type) {
220
+ var result = record.arg,
221
+ value = result.value;
222
+ return value && "object" == _typeof3(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
223
+ invoke("next", value, resolve, reject);
224
+ }, function (err) {
225
+ invoke("throw", err, resolve, reject);
226
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
227
+ result.value = unwrapped, resolve(result);
228
+ }, function (error) {
229
+ return invoke("throw", error, resolve, reject);
230
+ });
231
+ }
232
+
233
+ reject(record.arg);
234
+ }
235
+
236
+ var previousPromise;
237
+
238
+ this._invoke = function (method, arg) {
239
+ function callInvokeWithMethodAndArg() {
240
+ return new PromiseImpl(function (resolve, reject) {
241
+ invoke(method, arg, resolve, reject);
242
+ });
243
+ }
244
+
245
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
246
+ };
247
+ }
248
+
249
+ function maybeInvokeDelegate(delegate, context) {
250
+ var method = delegate.iterator[context.method];
251
+
252
+ if (undefined === method) {
253
+ if (context.delegate = null, "throw" === context.method) {
254
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
255
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
256
+ }
257
+
258
+ return ContinueSentinel;
259
+ }
260
+
261
+ var record = tryCatch(method, delegate.iterator, context.arg);
262
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
263
+ var info = record.arg;
264
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
265
+ }
266
+
267
+ function pushTryEntry(locs) {
268
+ var entry = {
269
+ tryLoc: locs[0]
270
+ };
271
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
272
+ }
273
+
274
+ function resetTryEntry(entry) {
275
+ var record = entry.completion || {};
276
+ record.type = "normal", delete record.arg, entry.completion = record;
277
+ }
278
+
279
+ function Context(tryLocsList) {
280
+ this.tryEntries = [{
281
+ tryLoc: "root"
282
+ }], _forEachInstanceProperty2(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);
283
+ }
284
+
285
+ function values(iterable) {
286
+ if (iterable) {
287
+ var iteratorMethod = iterable[iteratorSymbol];
288
+ if (iteratorMethod) return iteratorMethod.call(iterable);
289
+ if ("function" == typeof iterable.next) return iterable;
290
+
291
+ if (!isNaN(iterable.length)) {
292
+ var i = -1,
293
+ next = function next() {
294
+ for (; ++i < iterable.length;) {
295
+ if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
296
+ }
297
+
298
+ return next.value = undefined, next.done = !0, next;
299
+ };
300
+
301
+ return next.next = next;
302
+ }
303
+ }
304
+
305
+ return {
306
+ next: doneResult
307
+ };
308
+ }
309
+
310
+ function doneResult() {
311
+ return {
312
+ value: undefined,
313
+ done: !0
314
+ };
315
+ }
316
+
317
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
318
+ var ctor = "function" == typeof genFun && genFun.constructor;
319
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
320
+ }, exports.mark = function (genFun) {
321
+ return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun;
322
+ }, exports.awrap = function (arg) {
323
+ return {
324
+ __await: arg
325
+ };
326
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
327
+ return this;
328
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
329
+ void 0 === PromiseImpl && (PromiseImpl = _Promise2);
330
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
331
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
332
+ return result.done ? result.value : iter.next();
333
+ });
334
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
335
+ return this;
336
+ }), define(Gp, "toString", function () {
337
+ return "[object Generator]";
338
+ }), exports.keys = function (object) {
339
+ var keys = [];
340
+
341
+ for (var key in object) {
342
+ keys.push(key);
343
+ }
344
+
345
+ return _reverseInstanceProperty(keys).call(keys), function next() {
346
+ for (; keys.length;) {
347
+ var key = keys.pop();
348
+ if (key in object) return next.value = key, next.done = !1, next;
349
+ }
350
+
351
+ return next.done = !0, next;
352
+ };
353
+ }, exports.values = values, Context.prototype = {
354
+ constructor: Context,
355
+ reset: function (skipTempReset) {
356
+ var _context24;
357
+
358
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty2(_context24 = this.tryEntries).call(_context24, resetTryEntry), !skipTempReset) for (var name in this) {
359
+ "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty2(name).call(name, 1)) && (this[name] = undefined);
360
+ }
361
+ },
362
+ stop: function () {
363
+ this.done = !0;
364
+ var rootRecord = this.tryEntries[0].completion;
365
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
366
+ return this.rval;
367
+ },
368
+ dispatchException: function (exception) {
369
+ if (this.done) throw exception;
370
+ var context = this;
371
+
372
+ function handle(loc, caught) {
373
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
374
+ }
375
+
376
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
377
+ var entry = this.tryEntries[i],
378
+ record = entry.completion;
379
+ if ("root" === entry.tryLoc) return handle("end");
380
+
381
+ if (entry.tryLoc <= this.prev) {
382
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
383
+ hasFinally = hasOwn.call(entry, "finallyLoc");
384
+
385
+ if (hasCatch && hasFinally) {
386
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
387
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
388
+ } else if (hasCatch) {
389
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
390
+ } else {
391
+ if (!hasFinally) throw new Error("try statement without catch or finally");
392
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
393
+ }
394
+ }
395
+ }
396
+ },
397
+ abrupt: function (type, arg) {
398
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
399
+ var entry = this.tryEntries[i];
400
+
401
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
402
+ var finallyEntry = entry;
403
+ break;
404
+ }
405
+ }
406
+
407
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
408
+ var record = finallyEntry ? finallyEntry.completion : {};
409
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
410
+ },
411
+ complete: function (record, afterLoc) {
412
+ if ("throw" === record.type) throw record.arg;
413
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
414
+ },
415
+ finish: function (finallyLoc) {
416
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
417
+ var entry = this.tryEntries[i];
418
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
419
+ }
420
+ },
421
+ catch: function (tryLoc) {
422
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
423
+ var entry = this.tryEntries[i];
424
+
425
+ if (entry.tryLoc === tryLoc) {
426
+ var record = entry.completion;
427
+
428
+ if ("throw" === record.type) {
429
+ var thrown = record.arg;
430
+ resetTryEntry(entry);
431
+ }
432
+
433
+ return thrown;
434
+ }
435
+ }
436
+
437
+ throw new Error("illegal catch attempt");
438
+ },
439
+ delegateYield: function (iterable, resultName, nextLoc) {
440
+ return this.delegate = {
441
+ iterator: values(iterable),
442
+ resultName: resultName,
443
+ nextLoc: nextLoc
444
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
445
+ }
446
+ }, exports;
447
+ }
85
448
  /**
86
449
  * Converts a string into a regex that matches it.
87
450
  * Surrounding with \Q .. \E does this, we just need to escape any \E's in
@@ -466,14 +829,14 @@ var ParseQuery = /*#__PURE__*/function () {
466
829
  }, {
467
830
  key: "_handleOfflineQuery",
468
831
  value: function () {
469
- var _handleOfflineQuery2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params
832
+ var _handleOfflineQuery2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params
470
833
  /*: any*/
471
834
  ) {
472
835
  var _context,
473
836
  _this2 = this;
474
837
 
475
838
  var localDatastore, objects, results, keys, alwaysSelectedKeys, sorts, count, limit;
476
- return _regenerator.default.wrap(function (_context3) {
839
+ return _regeneratorRuntime().wrap(function (_context3) {
477
840
  while (1) {
478
841
  switch (_context3.prev = _context3.next) {
479
842
  case 0:
@@ -912,11 +1275,11 @@ var ParseQuery = /*#__PURE__*/function () {
912
1275
  }, {
913
1276
  key: "findAll",
914
1277
  value: function () {
915
- var _findAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options
1278
+ var _findAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
916
1279
  /*:: ?: BatchOptions*/
917
1280
  ) {
918
1281
  var result;
919
- return _regenerator.default.wrap(function (_context7) {
1282
+ return _regeneratorRuntime().wrap(function (_context7) {
920
1283
  while (1) {
921
1284
  switch (_context7.prev = _context7.next) {
922
1285
  case 0:
@@ -1116,8 +1479,6 @@ var ParseQuery = /*#__PURE__*/function () {
1116
1479
  )
1117
1480
  /*: Promise<ParseObject | void>*/
1118
1481
  {
1119
- var _this4 = this;
1120
-
1121
1482
  options = options || {};
1122
1483
  var findOptions = {};
1123
1484
 
@@ -1159,7 +1520,7 @@ var ParseQuery = /*#__PURE__*/function () {
1159
1520
  }
1160
1521
 
1161
1522
  if (!objects[0].className) {
1162
- objects[0].className = _this4.className;
1523
+ objects[0].className = this.className;
1163
1524
  } // Make sure the data object contains keys for all objects that
1164
1525
  // have been requested with a select, so that our cached state
1165
1526
  // updates correctly.
@@ -1274,10 +1635,10 @@ var ParseQuery = /*#__PURE__*/function () {
1274
1635
  var previousResults = [];
1275
1636
  return (0, _promiseUtils.continueWhile)(function () {
1276
1637
  return !finished;
1277
- }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
1638
+ }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1278
1639
  var _yield$Promise$all, _yield$Promise$all2, results;
1279
1640
 
1280
- return _regenerator.default.wrap(function (_context10) {
1641
+ return _regeneratorRuntime().wrap(function (_context10) {
1281
1642
  while (1) {
1282
1643
  switch (_context10.prev = _context10.next) {
1283
1644
  case 0:
@@ -1436,15 +1797,13 @@ var ParseQuery = /*#__PURE__*/function () {
1436
1797
  }, {
1437
1798
  key: "map",
1438
1799
  value: function () {
1439
- var _map = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(callback
1800
+ var _map = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(callback
1440
1801
  /*: (currentObject: ParseObject, index: number, query: ParseQuery) => any*/
1441
1802
  , options
1442
1803
  /*:: ?: BatchOptions*/
1443
1804
  ) {
1444
- var _this5 = this;
1445
-
1446
1805
  var array, index;
1447
- return _regenerator.default.wrap(function (_context11) {
1806
+ return _regeneratorRuntime().wrap(function (_context11) {
1448
1807
  while (1) {
1449
1808
  switch (_context11.prev = _context11.next) {
1450
1809
  case 0:
@@ -1452,7 +1811,7 @@ var ParseQuery = /*#__PURE__*/function () {
1452
1811
  index = 0;
1453
1812
  _context11.next = 4;
1454
1813
  return this.each(function (object) {
1455
- return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
1814
+ return _promise.default.resolve(callback(object, index, this)).then(function (result) {
1456
1815
  array.push(result);
1457
1816
  index += 1;
1458
1817
  });
@@ -1500,7 +1859,7 @@ var ParseQuery = /*#__PURE__*/function () {
1500
1859
  }, {
1501
1860
  key: "reduce",
1502
1861
  value: function () {
1503
- var _reduce = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(callback
1862
+ var _reduce = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(callback
1504
1863
  /*: (accumulator: any, currentObject: ParseObject, index: number) => any*/
1505
1864
  , initialValue
1506
1865
  /*: any*/
@@ -1508,7 +1867,7 @@ var ParseQuery = /*#__PURE__*/function () {
1508
1867
  /*:: ?: BatchOptions*/
1509
1868
  ) {
1510
1869
  var accumulator, index;
1511
- return _regenerator.default.wrap(function (_context12) {
1870
+ return _regeneratorRuntime().wrap(function (_context12) {
1512
1871
  while (1) {
1513
1872
  switch (_context12.prev = _context12.next) {
1514
1873
  case 0:
@@ -1580,15 +1939,13 @@ var ParseQuery = /*#__PURE__*/function () {
1580
1939
  }, {
1581
1940
  key: "filter",
1582
1941
  value: function () {
1583
- var _filter = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(callback
1942
+ var _filter = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(callback
1584
1943
  /*: (currentObject: ParseObject, index: number, query: ParseQuery) => boolean*/
1585
1944
  , options
1586
1945
  /*:: ?: BatchOptions*/
1587
1946
  ) {
1588
- var _this6 = this;
1589
-
1590
1947
  var array, index;
1591
- return _regenerator.default.wrap(function (_context13) {
1948
+ return _regeneratorRuntime().wrap(function (_context13) {
1592
1949
  while (1) {
1593
1950
  switch (_context13.prev = _context13.next) {
1594
1951
  case 0:
@@ -1596,7 +1953,7 @@ var ParseQuery = /*#__PURE__*/function () {
1596
1953
  index = 0;
1597
1954
  _context13.next = 4;
1598
1955
  return this.each(function (object) {
1599
- return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
1956
+ return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
1600
1957
  if (flag) {
1601
1958
  array.push(object);
1602
1959
  }
@@ -1640,8 +1997,6 @@ var ParseQuery = /*#__PURE__*/function () {
1640
1997
  )
1641
1998
  /*: ParseQuery*/
1642
1999
  {
1643
- var _this7 = this;
1644
-
1645
2000
  if (key && (0, _typeof2.default)(key) === 'object') {
1646
2001
  var _context14;
1647
2002
 
@@ -1650,7 +2005,7 @@ var ParseQuery = /*#__PURE__*/function () {
1650
2005
  k = _ref3[0],
1651
2006
  val = _ref3[1];
1652
2007
 
1653
- return _this7.equalTo(k, val);
2008
+ return this.equalTo(k, val);
1654
2009
  });
1655
2010
  return this;
1656
2011
  }
@@ -1680,8 +2035,6 @@ var ParseQuery = /*#__PURE__*/function () {
1680
2035
  )
1681
2036
  /*: ParseQuery*/
1682
2037
  {
1683
- var _this8 = this;
1684
-
1685
2038
  if (key && (0, _typeof2.default)(key) === 'object') {
1686
2039
  var _context15;
1687
2040
 
@@ -1690,7 +2043,7 @@ var ParseQuery = /*#__PURE__*/function () {
1690
2043
  k = _ref5[0],
1691
2044
  val = _ref5[1];
1692
2045
 
1693
- return _this8.notEqualTo(k, val);
2046
+ return this.notEqualTo(k, val);
1694
2047
  });
1695
2048
  return this;
1696
2049
  }
@@ -1875,15 +2228,13 @@ var ParseQuery = /*#__PURE__*/function () {
1875
2228
  )
1876
2229
  /*: ParseQuery*/
1877
2230
  {
1878
- var _this = this;
1879
-
1880
2231
  if (!(0, _isArray.default)(values)) {
1881
2232
  values = [values];
1882
2233
  }
1883
2234
 
1884
2235
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
1885
2236
  return {
1886
- $regex: _this._regexStartWith(value)
2237
+ $regex: this._regexStartWith(value)
1887
2238
  };
1888
2239
  });
1889
2240
  return this.containsAll(key, regexObject);
@@ -2784,11 +3135,11 @@ var ParseQuery = /*#__PURE__*/function () {
2784
3135
  }, {
2785
3136
  key: "subscribe",
2786
3137
  value: function () {
2787
- var _subscribe = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(sessionToken
3138
+ var _subscribe = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(sessionToken
2788
3139
  /*:: ?: string*/
2789
3140
  ) {
2790
3141
  var currentUser, liveQueryClient, subscription;
2791
- return _regenerator.default.wrap(function (_context22) {
3142
+ return _regeneratorRuntime().wrap(function (_context22) {
2792
3143
  while (1) {
2793
3144
  switch (_context22.prev = _context22.next) {
2794
3145
  case 0:
@@ -2917,8 +3268,6 @@ var ParseQuery = /*#__PURE__*/function () {
2917
3268
  value: function ()
2918
3269
  /*: ParseQuery*/
2919
3270
  {
2920
- var _this14 = this;
2921
-
2922
3271
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
2923
3272
  this._xhrRequest.task._aborted = true;
2924
3273
 
@@ -2932,7 +3281,7 @@ var ParseQuery = /*#__PURE__*/function () {
2932
3281
  }
2933
3282
 
2934
3283
  return this._xhrRequest.onchange = function () {
2935
- return _this14.cancel();
3284
+ return this.cancel();
2936
3285
  };
2937
3286
  }
2938
3287
  }, {