parse 4.0.0-alpha.7 → 4.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +167 -25
- package/NOTICE +10 -0
- package/README.md +1 -3
- package/dist/parse.js +3942 -6528
- package/dist/parse.min.js +7 -6
- package/dist/parse.weapp.js +3103 -6459
- package/dist/parse.weapp.min.js +7 -6
- package/lib/browser/Analytics.js +4 -11
- package/lib/browser/AnonymousUtils.js +2 -9
- package/lib/browser/Cloud.js +4 -11
- package/lib/browser/CloudCode.js +0 -1
- package/lib/browser/CoreManager.js +3 -10
- package/lib/browser/EventEmitter.js +0 -7
- package/lib/browser/EventuallyQueue.js +282 -668
- package/lib/browser/FacebookUtils.js +2 -9
- package/lib/browser/InstallationController.js +0 -7
- package/lib/browser/LiveQueryClient.js +35 -26
- package/lib/browser/LiveQuerySubscription.js +5 -4
- package/lib/browser/LocalDatastore.js +472 -864
- package/lib/browser/LocalDatastoreController.js +161 -547
- package/lib/browser/LocalDatastoreController.react-native.js +156 -537
- package/lib/browser/LocalDatastoreUtils.js +2 -9
- package/lib/browser/ObjectStateMutations.js +25 -25
- package/lib/browser/OfflineQuery.js +31 -33
- package/lib/browser/Parse.js +4 -13
- package/lib/browser/ParseACL.js +9 -16
- package/lib/browser/ParseCLP.js +46 -48
- package/lib/browser/ParseConfig.js +6 -13
- package/lib/browser/ParseError.js +2 -11
- package/lib/browser/ParseFile.js +107 -482
- package/lib/browser/ParseGeoPoint.js +4 -11
- package/lib/browser/ParseHooks.js +2 -2
- package/lib/browser/ParseInstallation.js +2 -2
- package/lib/browser/ParseLiveQuery.js +104 -480
- package/lib/browser/ParseObject.js +549 -935
- package/lib/browser/ParseOp.js +11 -11
- package/lib/browser/ParsePolygon.js +5 -12
- package/lib/browser/ParseQuery.js +365 -758
- package/lib/browser/ParseRelation.js +2 -9
- package/lib/browser/ParseRole.js +2 -2
- package/lib/browser/ParseSchema.js +2 -9
- package/lib/browser/ParseSession.js +2 -2
- package/lib/browser/ParseUser.js +221 -607
- package/lib/browser/Push.js +2 -9
- package/lib/browser/RESTController.js +12 -19
- package/lib/browser/SingleInstanceStateController.js +4 -11
- package/lib/browser/Storage.js +0 -7
- package/lib/browser/StorageController.browser.js +0 -7
- package/lib/browser/StorageController.default.js +0 -7
- package/lib/browser/StorageController.react-native.js +0 -7
- package/lib/browser/StorageController.weapp.js +0 -7
- package/lib/browser/TaskQueue.js +0 -7
- package/lib/browser/UniqueInstanceStateController.js +8 -15
- package/lib/browser/arrayContainsObject.js +2 -9
- package/lib/browser/canBeSerialized.js +2 -9
- package/lib/browser/decode.js +4 -11
- package/lib/browser/encode.js +8 -15
- package/lib/browser/equals.js +4 -13
- package/lib/browser/escape.js +0 -7
- package/lib/browser/isRevocableSession.js +2 -9
- package/lib/browser/parseDate.js +2 -9
- package/lib/browser/promiseUtils.js +4 -4
- package/lib/browser/unique.js +4 -11
- package/lib/browser/unsavedChildren.js +6 -13
- package/lib/browser/uuid.js +5 -1
- package/lib/node/Analytics.js +0 -7
- package/lib/node/AnonymousUtils.js +0 -7
- package/lib/node/Cloud.js +0 -7
- package/lib/node/CloudCode.js +0 -1
- package/lib/node/CoreManager.js +1 -8
- package/lib/node/EventEmitter.js +0 -7
- package/lib/node/FacebookUtils.js +0 -7
- package/lib/node/InstallationController.js +0 -7
- package/lib/node/LiveQueryClient.js +18 -17
- package/lib/node/LiveQuerySubscription.js +2 -11
- package/lib/node/LocalDatastore.js +0 -7
- package/lib/node/LocalDatastoreController.js +0 -7
- package/lib/node/LocalDatastoreController.react-native.js +0 -7
- package/lib/node/LocalDatastoreUtils.js +0 -7
- package/lib/node/ObjectStateMutations.js +0 -7
- package/lib/node/Parse.js +0 -9
- package/lib/node/ParseACL.js +0 -7
- package/lib/node/ParseCLP.js +0 -7
- package/lib/node/ParseConfig.js +0 -7
- package/lib/node/ParseError.js +0 -9
- package/lib/node/ParseFile.js +7 -12
- package/lib/node/ParseGeoPoint.js +0 -7
- package/lib/node/ParseInstallation.js +0 -7
- package/lib/node/ParseLiveQuery.js +0 -7
- package/lib/node/ParseObject.js +10 -14
- package/lib/node/ParseOp.js +0 -7
- package/lib/node/ParsePolygon.js +0 -7
- package/lib/node/ParseQuery.js +3 -18
- package/lib/node/ParseRelation.js +0 -7
- package/lib/node/ParseRole.js +0 -7
- package/lib/node/ParseSchema.js +0 -7
- package/lib/node/ParseSession.js +0 -7
- package/lib/node/ParseUser.js +0 -7
- package/lib/node/Push.js +0 -7
- package/lib/node/RESTController.js +0 -7
- package/lib/node/SingleInstanceStateController.js +0 -7
- package/lib/node/Storage.js +0 -7
- package/lib/node/StorageController.browser.js +0 -7
- package/lib/node/StorageController.default.js +0 -7
- package/lib/node/StorageController.react-native.js +0 -7
- package/lib/node/StorageController.weapp.js +0 -7
- package/lib/node/TaskQueue.js +0 -7
- package/lib/node/UniqueInstanceStateController.js +0 -7
- package/lib/node/arrayContainsObject.js +0 -7
- package/lib/node/canBeSerialized.js +0 -7
- package/lib/node/decode.js +0 -7
- package/lib/node/encode.js +0 -7
- package/lib/node/equals.js +0 -9
- package/lib/node/escape.js +0 -7
- package/lib/node/isRevocableSession.js +0 -7
- package/lib/node/parseDate.js +0 -7
- package/lib/node/unique.js +0 -7
- package/lib/node/unsavedChildren.js +0 -7
- package/lib/node/uuid.js +7 -1
- package/lib/react-native/CoreManager.js +2 -2
- package/lib/react-native/EventuallyQueue.js +169 -676
- package/lib/react-native/LiveQueryClient.js +16 -50
- package/lib/react-native/LiveQuerySubscription.js +3 -2
- package/lib/react-native/LocalDatastore.js +303 -863
- package/lib/react-native/LocalDatastoreController.js +75 -535
- package/lib/react-native/LocalDatastoreController.react-native.js +95 -503
- package/lib/react-native/ObjectStateMutations.js +2 -31
- package/lib/react-native/OfflineQuery.js +17 -63
- package/lib/react-native/ParseCLP.js +55 -129
- package/lib/react-native/ParseFile.js +63 -468
- package/lib/react-native/ParseLiveQuery.js +60 -455
- package/lib/react-native/ParseObject.js +225 -878
- package/lib/react-native/ParseQuery.js +207 -643
- package/lib/react-native/ParseSchema.js +3 -3
- package/lib/react-native/ParseUser.js +118 -573
- package/lib/react-native/RESTController.js +1 -29
- package/lib/react-native/uuid.js +5 -1
- package/lib/weapp/Analytics.js +4 -11
- package/lib/weapp/AnonymousUtils.js +2 -9
- package/lib/weapp/Cloud.js +4 -11
- package/lib/weapp/CloudCode.js +0 -1
- package/lib/weapp/CoreManager.js +3 -10
- package/lib/weapp/EventEmitter.js +0 -7
- package/lib/weapp/EventuallyQueue.js +282 -668
- package/lib/weapp/FacebookUtils.js +2 -9
- package/lib/weapp/InstallationController.js +0 -7
- package/lib/weapp/LiveQueryClient.js +35 -26
- package/lib/weapp/LiveQuerySubscription.js +5 -4
- package/lib/weapp/LocalDatastore.js +472 -864
- package/lib/weapp/LocalDatastoreController.js +161 -547
- package/lib/weapp/LocalDatastoreController.react-native.js +156 -537
- package/lib/weapp/LocalDatastoreUtils.js +2 -9
- package/lib/weapp/ObjectStateMutations.js +25 -25
- package/lib/weapp/OfflineQuery.js +31 -33
- package/lib/weapp/Parse.js +4 -13
- package/lib/weapp/ParseACL.js +9 -16
- package/lib/weapp/ParseCLP.js +46 -48
- package/lib/weapp/ParseConfig.js +6 -13
- package/lib/weapp/ParseError.js +2 -11
- package/lib/weapp/ParseFile.js +107 -482
- package/lib/weapp/ParseGeoPoint.js +4 -11
- package/lib/weapp/ParseHooks.js +2 -2
- package/lib/weapp/ParseInstallation.js +2 -2
- package/lib/weapp/ParseLiveQuery.js +104 -480
- package/lib/weapp/ParseObject.js +549 -935
- package/lib/weapp/ParseOp.js +11 -11
- package/lib/weapp/ParsePolygon.js +5 -12
- package/lib/weapp/ParseQuery.js +365 -758
- package/lib/weapp/ParseRelation.js +2 -9
- package/lib/weapp/ParseRole.js +2 -2
- package/lib/weapp/ParseSchema.js +2 -9
- package/lib/weapp/ParseSession.js +2 -2
- package/lib/weapp/ParseUser.js +221 -607
- package/lib/weapp/Push.js +2 -9
- package/lib/weapp/RESTController.js +12 -19
- package/lib/weapp/SingleInstanceStateController.js +4 -11
- package/lib/weapp/Storage.js +0 -7
- package/lib/weapp/StorageController.browser.js +0 -7
- package/lib/weapp/StorageController.default.js +0 -7
- package/lib/weapp/StorageController.react-native.js +0 -7
- package/lib/weapp/StorageController.weapp.js +0 -7
- package/lib/weapp/TaskQueue.js +0 -7
- package/lib/weapp/UniqueInstanceStateController.js +8 -15
- package/lib/weapp/arrayContainsObject.js +2 -9
- package/lib/weapp/canBeSerialized.js +2 -9
- package/lib/weapp/decode.js +4 -11
- package/lib/weapp/encode.js +8 -15
- package/lib/weapp/equals.js +4 -13
- package/lib/weapp/escape.js +0 -7
- package/lib/weapp/isRevocableSession.js +2 -9
- package/lib/weapp/parseDate.js +2 -9
- package/lib/weapp/promiseUtils.js +4 -4
- package/lib/weapp/unique.js +4 -11
- package/lib/weapp/unsavedChildren.js +6 -13
- package/lib/weapp/uuid.js +2 -0
- package/package.json +24 -24
- package/PATENTS +0 -37
|
@@ -1,46 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
-
|
|
7
|
-
var _Array$isArray2 = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
8
|
-
|
|
9
|
-
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
10
|
-
|
|
11
|
-
var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
12
|
-
|
|
13
|
-
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
3
|
+
var _typeof3 = require("@babel/runtime-corejs3/helpers/typeof");
|
|
14
4
|
|
|
15
|
-
var
|
|
5
|
+
var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
16
6
|
|
|
17
|
-
var
|
|
7
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
18
8
|
|
|
19
|
-
var
|
|
9
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
20
10
|
|
|
21
|
-
var
|
|
11
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
22
12
|
|
|
23
|
-
var
|
|
13
|
+
var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
24
14
|
|
|
25
|
-
var _Object$
|
|
15
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
26
16
|
|
|
27
|
-
var
|
|
17
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
28
18
|
|
|
29
19
|
var _Object$defineProperty2 = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
30
20
|
|
|
31
|
-
var
|
|
21
|
+
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
32
22
|
|
|
33
|
-
var
|
|
23
|
+
var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
34
24
|
|
|
35
|
-
var
|
|
25
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
36
26
|
|
|
37
|
-
var
|
|
27
|
+
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
38
28
|
|
|
39
|
-
var
|
|
29
|
+
var _Array$isArray2 = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
40
30
|
|
|
41
|
-
var
|
|
31
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
42
32
|
|
|
43
|
-
var
|
|
33
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
44
34
|
|
|
45
35
|
_Object$defineProperty2(exports, "__esModule", {
|
|
46
36
|
value: true
|
|
@@ -48,45 +38,47 @@ _Object$defineProperty2(exports, "__esModule", {
|
|
|
48
38
|
|
|
49
39
|
exports.default = void 0;
|
|
50
40
|
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
41
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
54
42
|
|
|
55
43
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
56
44
|
|
|
57
|
-
var
|
|
45
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
58
46
|
|
|
59
|
-
var
|
|
47
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
|
|
60
48
|
|
|
61
|
-
var
|
|
49
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
62
50
|
|
|
63
|
-
var
|
|
51
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
64
52
|
|
|
65
|
-
var
|
|
53
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
66
54
|
|
|
67
|
-
var
|
|
55
|
+
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
68
56
|
|
|
69
|
-
var
|
|
57
|
+
var _freeze = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/freeze"));
|
|
70
58
|
|
|
71
|
-
var
|
|
59
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
60
|
+
|
|
61
|
+
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
72
62
|
|
|
73
63
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
74
64
|
|
|
75
|
-
var
|
|
65
|
+
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
76
66
|
|
|
77
|
-
var
|
|
67
|
+
var _getPrototypeOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of"));
|
|
78
68
|
|
|
79
|
-
var
|
|
69
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
80
70
|
|
|
81
|
-
var
|
|
71
|
+
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
82
72
|
|
|
83
|
-
var
|
|
73
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
84
74
|
|
|
85
|
-
var
|
|
75
|
+
var _create = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/create"));
|
|
86
76
|
|
|
87
|
-
var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs3/
|
|
77
|
+
var _defineProperty3 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
|
88
78
|
|
|
89
|
-
var
|
|
79
|
+
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
80
|
+
|
|
81
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
90
82
|
|
|
91
83
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
92
84
|
|
|
@@ -233,12 +225,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
233
225
|
}
|
|
234
226
|
|
|
235
227
|
function _unsupportedIterableToArray(o, minLen) {
|
|
236
|
-
var
|
|
228
|
+
var _context19;
|
|
237
229
|
|
|
238
230
|
if (!o) return;
|
|
239
231
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
240
232
|
|
|
241
|
-
var n = _sliceInstanceProperty(
|
|
233
|
+
var n = _sliceInstanceProperty(_context19 = Object.prototype.toString.call(o)).call(_context19, 8, -1);
|
|
242
234
|
|
|
243
235
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
244
236
|
if (n === "Map" || n === "Set") return _Array$from(o);
|
|
@@ -248,371 +240,11 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
248
240
|
function _arrayLikeToArray(arr, len) {
|
|
249
241
|
if (len == null || len > arr.length) len = arr.length;
|
|
250
242
|
|
|
251
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
252
|
-
arr2[i] = arr[i];
|
|
253
|
-
}
|
|
243
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
254
244
|
|
|
255
245
|
return arr2;
|
|
256
246
|
}
|
|
257
247
|
|
|
258
|
-
function _regeneratorRuntime() {
|
|
259
|
-
"use strict";
|
|
260
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
261
|
-
|
|
262
|
-
_regeneratorRuntime = function () {
|
|
263
|
-
return exports;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
var exports = {},
|
|
267
|
-
Op = Object.prototype,
|
|
268
|
-
hasOwn = Op.hasOwnProperty,
|
|
269
|
-
$Symbol = "function" == typeof _Symbol ? _Symbol : {},
|
|
270
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
271
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
272
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
273
|
-
|
|
274
|
-
function define(obj, key, value) {
|
|
275
|
-
return _Object$defineProperty2(obj, key, {
|
|
276
|
-
value: value,
|
|
277
|
-
enumerable: !0,
|
|
278
|
-
configurable: !0,
|
|
279
|
-
writable: !0
|
|
280
|
-
}), obj[key];
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
try {
|
|
284
|
-
define({}, "");
|
|
285
|
-
} catch (err) {
|
|
286
|
-
define = function (obj, key, value) {
|
|
287
|
-
return obj[key] = value;
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
292
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
293
|
-
generator = _Object$create2(protoGenerator.prototype),
|
|
294
|
-
context = new Context(tryLocsList || []);
|
|
295
|
-
|
|
296
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
297
|
-
var state = "suspendedStart";
|
|
298
|
-
return function (method, arg) {
|
|
299
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
300
|
-
|
|
301
|
-
if ("completed" === state) {
|
|
302
|
-
if ("throw" === method) throw arg;
|
|
303
|
-
return doneResult();
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
for (context.method = method, context.arg = arg;;) {
|
|
307
|
-
var delegate = context.delegate;
|
|
308
|
-
|
|
309
|
-
if (delegate) {
|
|
310
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
311
|
-
|
|
312
|
-
if (delegateResult) {
|
|
313
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
314
|
-
return delegateResult;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
319
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
320
|
-
context.dispatchException(context.arg);
|
|
321
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
322
|
-
state = "executing";
|
|
323
|
-
var record = tryCatch(innerFn, self, context);
|
|
324
|
-
|
|
325
|
-
if ("normal" === record.type) {
|
|
326
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
327
|
-
return {
|
|
328
|
-
value: record.arg,
|
|
329
|
-
done: context.done
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
}(innerFn, self, context), generator;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function tryCatch(fn, obj, arg) {
|
|
340
|
-
try {
|
|
341
|
-
return {
|
|
342
|
-
type: "normal",
|
|
343
|
-
arg: fn.call(obj, arg)
|
|
344
|
-
};
|
|
345
|
-
} catch (err) {
|
|
346
|
-
return {
|
|
347
|
-
type: "throw",
|
|
348
|
-
arg: err
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
exports.wrap = wrap;
|
|
354
|
-
var ContinueSentinel = {};
|
|
355
|
-
|
|
356
|
-
function Generator() {}
|
|
357
|
-
|
|
358
|
-
function GeneratorFunction() {}
|
|
359
|
-
|
|
360
|
-
function GeneratorFunctionPrototype() {}
|
|
361
|
-
|
|
362
|
-
var IteratorPrototype = {};
|
|
363
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
364
|
-
return this;
|
|
365
|
-
});
|
|
366
|
-
var getProto = _Object$getPrototypeOf2,
|
|
367
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
368
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
369
|
-
|
|
370
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create2(IteratorPrototype);
|
|
371
|
-
|
|
372
|
-
function defineIteratorMethods(prototype) {
|
|
373
|
-
var _context19;
|
|
374
|
-
|
|
375
|
-
_forEachInstanceProperty2(_context19 = ["next", "throw", "return"]).call(_context19, function (method) {
|
|
376
|
-
define(prototype, method, function (arg) {
|
|
377
|
-
return this._invoke(method, arg);
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
383
|
-
function invoke(method, arg, resolve, reject) {
|
|
384
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
385
|
-
|
|
386
|
-
if ("throw" !== record.type) {
|
|
387
|
-
var result = record.arg,
|
|
388
|
-
value = result.value;
|
|
389
|
-
return value && "object" == _typeof3(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
390
|
-
invoke("next", value, resolve, reject);
|
|
391
|
-
}, function (err) {
|
|
392
|
-
invoke("throw", err, resolve, reject);
|
|
393
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
394
|
-
result.value = unwrapped, resolve(result);
|
|
395
|
-
}, function (error) {
|
|
396
|
-
return invoke("throw", error, resolve, reject);
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
reject(record.arg);
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
var previousPromise;
|
|
404
|
-
|
|
405
|
-
this._invoke = function (method, arg) {
|
|
406
|
-
function callInvokeWithMethodAndArg() {
|
|
407
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
408
|
-
invoke(method, arg, resolve, reject);
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
417
|
-
var method = delegate.iterator[context.method];
|
|
418
|
-
|
|
419
|
-
if (undefined === method) {
|
|
420
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
421
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
422
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
return ContinueSentinel;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
429
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
430
|
-
var info = record.arg;
|
|
431
|
-
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);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
function pushTryEntry(locs) {
|
|
435
|
-
var entry = {
|
|
436
|
-
tryLoc: locs[0]
|
|
437
|
-
};
|
|
438
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
function resetTryEntry(entry) {
|
|
442
|
-
var record = entry.completion || {};
|
|
443
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
function Context(tryLocsList) {
|
|
447
|
-
this.tryEntries = [{
|
|
448
|
-
tryLoc: "root"
|
|
449
|
-
}], _forEachInstanceProperty2(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
function values(iterable) {
|
|
453
|
-
if (iterable) {
|
|
454
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
455
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
456
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
457
|
-
|
|
458
|
-
if (!isNaN(iterable.length)) {
|
|
459
|
-
var i = -1,
|
|
460
|
-
next = function next() {
|
|
461
|
-
for (; ++i < iterable.length;) {
|
|
462
|
-
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
return next.value = undefined, next.done = !0, next;
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
return next.next = next;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
return {
|
|
473
|
-
next: doneResult
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
function doneResult() {
|
|
478
|
-
return {
|
|
479
|
-
value: undefined,
|
|
480
|
-
done: !0
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
485
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
486
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
487
|
-
}, exports.mark = function (genFun) {
|
|
488
|
-
return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create2(Gp), genFun;
|
|
489
|
-
}, exports.awrap = function (arg) {
|
|
490
|
-
return {
|
|
491
|
-
__await: arg
|
|
492
|
-
};
|
|
493
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
494
|
-
return this;
|
|
495
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
496
|
-
void 0 === PromiseImpl && (PromiseImpl = _Promise2);
|
|
497
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
498
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
499
|
-
return result.done ? result.value : iter.next();
|
|
500
|
-
});
|
|
501
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
502
|
-
return this;
|
|
503
|
-
}), define(Gp, "toString", function () {
|
|
504
|
-
return "[object Generator]";
|
|
505
|
-
}), exports.keys = function (object) {
|
|
506
|
-
var keys = [];
|
|
507
|
-
|
|
508
|
-
for (var key in object) {
|
|
509
|
-
keys.push(key);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
return _reverseInstanceProperty(keys).call(keys), function next() {
|
|
513
|
-
for (; keys.length;) {
|
|
514
|
-
var key = keys.pop();
|
|
515
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
return next.done = !0, next;
|
|
519
|
-
};
|
|
520
|
-
}, exports.values = values, Context.prototype = {
|
|
521
|
-
constructor: Context,
|
|
522
|
-
reset: function (skipTempReset) {
|
|
523
|
-
var _context20;
|
|
524
|
-
|
|
525
|
-
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(_context20 = this.tryEntries).call(_context20, resetTryEntry), !skipTempReset) for (var name in this) {
|
|
526
|
-
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
|
-
stop: function () {
|
|
530
|
-
this.done = !0;
|
|
531
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
532
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
533
|
-
return this.rval;
|
|
534
|
-
},
|
|
535
|
-
dispatchException: function (exception) {
|
|
536
|
-
if (this.done) throw exception;
|
|
537
|
-
var context = this;
|
|
538
|
-
|
|
539
|
-
function handle(loc, caught) {
|
|
540
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
544
|
-
var entry = this.tryEntries[i],
|
|
545
|
-
record = entry.completion;
|
|
546
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
547
|
-
|
|
548
|
-
if (entry.tryLoc <= this.prev) {
|
|
549
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
550
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
551
|
-
|
|
552
|
-
if (hasCatch && hasFinally) {
|
|
553
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
554
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
555
|
-
} else if (hasCatch) {
|
|
556
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
557
|
-
} else {
|
|
558
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
559
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
abrupt: function (type, arg) {
|
|
565
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
566
|
-
var entry = this.tryEntries[i];
|
|
567
|
-
|
|
568
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
569
|
-
var finallyEntry = entry;
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
575
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
576
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
577
|
-
},
|
|
578
|
-
complete: function (record, afterLoc) {
|
|
579
|
-
if ("throw" === record.type) throw record.arg;
|
|
580
|
-
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;
|
|
581
|
-
},
|
|
582
|
-
finish: function (finallyLoc) {
|
|
583
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
584
|
-
var entry = this.tryEntries[i];
|
|
585
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
catch: function (tryLoc) {
|
|
589
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
590
|
-
var entry = this.tryEntries[i];
|
|
591
|
-
|
|
592
|
-
if (entry.tryLoc === tryLoc) {
|
|
593
|
-
var record = entry.completion;
|
|
594
|
-
|
|
595
|
-
if ("throw" === record.type) {
|
|
596
|
-
var thrown = record.arg;
|
|
597
|
-
resetTryEntry(entry);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
return thrown;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
throw new Error("illegal catch attempt");
|
|
605
|
-
},
|
|
606
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
607
|
-
return this.delegate = {
|
|
608
|
-
iterator: values(iterable),
|
|
609
|
-
resultName: resultName,
|
|
610
|
-
nextLoc: nextLoc
|
|
611
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
612
|
-
}
|
|
613
|
-
}, exports;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
248
|
function ownKeys(object, enumerableOnly) {
|
|
617
249
|
var keys = _Object$keys2(object);
|
|
618
250
|
|
|
@@ -633,7 +265,7 @@ function _objectSpread(target) {
|
|
|
633
265
|
|
|
634
266
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
635
267
|
i % 2 ? _forEachInstanceProperty2(_context17 = ownKeys(Object(source), !0)).call(_context17, function (key) {
|
|
636
|
-
(0,
|
|
268
|
+
(0, _defineProperty2.default)(target, key, source[key]);
|
|
637
269
|
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(_context18 = ownKeys(Object(source))).call(_context18, function (key) {
|
|
638
270
|
_Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key));
|
|
639
271
|
});
|
|
@@ -721,10 +353,10 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
721
353
|
/*:: ?: { ignoreValidation: boolean }*/
|
|
722
354
|
) {
|
|
723
355
|
(0, _classCallCheck2.default)(this, ParseObject);
|
|
724
|
-
(0,
|
|
725
|
-
(0,
|
|
726
|
-
(0,
|
|
727
|
-
(0,
|
|
356
|
+
(0, _defineProperty2.default)(this, "id", void 0);
|
|
357
|
+
(0, _defineProperty2.default)(this, "_localId", void 0);
|
|
358
|
+
(0, _defineProperty2.default)(this, "_objCount", void 0);
|
|
359
|
+
(0, _defineProperty2.default)(this, "className", void 0); // Enable legacy initializers
|
|
728
360
|
|
|
729
361
|
if (typeof this.initialize === 'function') {
|
|
730
362
|
this.initialize.apply(this, arguments);
|
|
@@ -743,9 +375,9 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
743
375
|
this.className = className.className;
|
|
744
376
|
toSet = {};
|
|
745
377
|
|
|
746
|
-
for (var
|
|
747
|
-
if (
|
|
748
|
-
toSet[
|
|
378
|
+
for (var _attr2 in className) {
|
|
379
|
+
if (_attr2 !== 'className') {
|
|
380
|
+
toSet[_attr2] = className[_attr2];
|
|
749
381
|
}
|
|
750
382
|
}
|
|
751
383
|
|
|
@@ -768,7 +400,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
768
400
|
(0, _createClass2.default)(ParseObject, [{
|
|
769
401
|
key: "attributes",
|
|
770
402
|
get:
|
|
771
|
-
|
|
403
|
+
/* Prototype getters / setters */
|
|
772
404
|
function ()
|
|
773
405
|
/*: AttributeMap*/
|
|
774
406
|
{
|
|
@@ -804,7 +436,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
804
436
|
{
|
|
805
437
|
return this._getServerData().updatedAt;
|
|
806
438
|
}
|
|
807
|
-
|
|
439
|
+
/* Private methods */
|
|
808
440
|
|
|
809
441
|
/**
|
|
810
442
|
* Returns a local or server Id used uniquely identify this object
|
|
@@ -871,8 +503,8 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
871
503
|
|
|
872
504
|
var unset = {};
|
|
873
505
|
|
|
874
|
-
for (var
|
|
875
|
-
unset[
|
|
506
|
+
for (var _attr4 in serverData) {
|
|
507
|
+
unset[_attr4] = undefined;
|
|
876
508
|
}
|
|
877
509
|
|
|
878
510
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
@@ -918,8 +550,8 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
918
550
|
var objectCache = stateController.getObjectCache(this._getStateIdentifier());
|
|
919
551
|
var dirty = {};
|
|
920
552
|
|
|
921
|
-
for (var
|
|
922
|
-
var val = attributes[
|
|
553
|
+
for (var _attr6 in attributes) {
|
|
554
|
+
var val = attributes[_attr6];
|
|
923
555
|
|
|
924
556
|
if (val && (0, _typeof2.default)(val) === 'object' && !(val instanceof ParseObject) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
|
|
925
557
|
// Due to the way browsers construct maps, the key order will not change
|
|
@@ -928,13 +560,13 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
928
560
|
var json = (0, _encode.default)(val, false, true);
|
|
929
561
|
var stringified = (0, _stringify.default)(json);
|
|
930
562
|
|
|
931
|
-
if (objectCache[
|
|
932
|
-
dirty[
|
|
563
|
+
if (objectCache[_attr6] !== stringified) {
|
|
564
|
+
dirty[_attr6] = val;
|
|
933
565
|
}
|
|
934
566
|
} catch (e) {
|
|
935
567
|
// Error occurred, possibly by a nested unsaved pointer in a mutable container
|
|
936
568
|
// No matter how it happened, it indicates a change in the attribute
|
|
937
|
-
dirty[
|
|
569
|
+
dirty[_attr6] = val;
|
|
938
570
|
}
|
|
939
571
|
}
|
|
940
572
|
}
|
|
@@ -1041,14 +673,14 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1041
673
|
stateController.initializeState(this._getStateIdentifier());
|
|
1042
674
|
var decoded = {};
|
|
1043
675
|
|
|
1044
|
-
for (var
|
|
1045
|
-
if (
|
|
1046
|
-
decoded[
|
|
1047
|
-
} else if (
|
|
1048
|
-
decoded[
|
|
676
|
+
for (var _attr8 in serverData) {
|
|
677
|
+
if (_attr8 === 'ACL') {
|
|
678
|
+
decoded[_attr8] = new _ParseACL.default(serverData[_attr8]);
|
|
679
|
+
} else if (_attr8 !== 'objectId') {
|
|
680
|
+
decoded[_attr8] = (0, _decode.default)(serverData[_attr8]);
|
|
1049
681
|
|
|
1050
|
-
if (decoded[
|
|
1051
|
-
decoded[
|
|
682
|
+
if (decoded[_attr8] instanceof _ParseRelation.default) {
|
|
683
|
+
decoded[_attr8]._ensureParentAndKey(this, _attr8);
|
|
1052
684
|
}
|
|
1053
685
|
}
|
|
1054
686
|
}
|
|
@@ -1166,7 +798,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1166
798
|
}, {
|
|
1167
799
|
key: "initialize",
|
|
1168
800
|
value:
|
|
1169
|
-
|
|
801
|
+
/* Public methods */
|
|
1170
802
|
function () {// NOOP
|
|
1171
803
|
}
|
|
1172
804
|
/**
|
|
@@ -1191,18 +823,18 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1191
823
|
var json = {};
|
|
1192
824
|
var attrs = this.attributes;
|
|
1193
825
|
|
|
1194
|
-
for (var
|
|
1195
|
-
if ((
|
|
1196
|
-
json[
|
|
826
|
+
for (var _attr10 in attrs) {
|
|
827
|
+
if ((_attr10 === 'createdAt' || _attr10 === 'updatedAt') && attrs[_attr10].toJSON) {
|
|
828
|
+
json[_attr10] = attrs[_attr10].toJSON();
|
|
1197
829
|
} else {
|
|
1198
|
-
json[
|
|
830
|
+
json[_attr10] = (0, _encode.default)(attrs[_attr10], false, false, seen, offline);
|
|
1199
831
|
}
|
|
1200
832
|
}
|
|
1201
833
|
|
|
1202
834
|
var pending = this._getPendingOps();
|
|
1203
835
|
|
|
1204
|
-
for (var
|
|
1205
|
-
json[
|
|
836
|
+
for (var _attr12 in pending[0]) {
|
|
837
|
+
json[_attr12] = pending[0][_attr12].toJSON(offline);
|
|
1206
838
|
}
|
|
1207
839
|
|
|
1208
840
|
if (this.id) {
|
|
@@ -1295,15 +927,15 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1295
927
|
var keys = {};
|
|
1296
928
|
|
|
1297
929
|
for (var i = 0; i < pendingOps.length; i++) {
|
|
1298
|
-
for (var
|
|
1299
|
-
keys[
|
|
930
|
+
for (var _attr14 in pendingOps[i]) {
|
|
931
|
+
keys[_attr14] = true;
|
|
1300
932
|
}
|
|
1301
933
|
}
|
|
1302
934
|
|
|
1303
935
|
var dirtyObjects = this._getDirtyObjectAttributes();
|
|
1304
936
|
|
|
1305
|
-
for (var
|
|
1306
|
-
keys[
|
|
937
|
+
for (var _attr16 in dirtyObjects) {
|
|
938
|
+
keys[_attr16] = true;
|
|
1307
939
|
}
|
|
1308
940
|
|
|
1309
941
|
return (0, _keys.default)(keys);
|
|
@@ -1559,11 +1191,11 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1559
1191
|
|
|
1560
1192
|
var newValues = {};
|
|
1561
1193
|
|
|
1562
|
-
for (var
|
|
1563
|
-
if (newOps[
|
|
1564
|
-
newValues[
|
|
1565
|
-
} else if (!(newOps[
|
|
1566
|
-
newValues[
|
|
1194
|
+
for (var _attr18 in newOps) {
|
|
1195
|
+
if (newOps[_attr18] instanceof _ParseOp.RelationOp) {
|
|
1196
|
+
newValues[_attr18] = newOps[_attr18].applyTo(currentAttributes[_attr18], this, _attr18);
|
|
1197
|
+
} else if (!(newOps[_attr18] instanceof _ParseOp.UnsetOp)) {
|
|
1198
|
+
newValues[_attr18] = newOps[_attr18].applyTo(currentAttributes[_attr18]);
|
|
1567
1199
|
}
|
|
1568
1200
|
} // Validate changes
|
|
1569
1201
|
|
|
@@ -1587,10 +1219,10 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1587
1219
|
|
|
1588
1220
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
1589
1221
|
|
|
1590
|
-
for (var
|
|
1591
|
-
var nextOp = newOps[
|
|
1222
|
+
for (var _attr20 in newOps) {
|
|
1223
|
+
var nextOp = newOps[_attr20].mergeWith(pendingOps[last][_attr20]);
|
|
1592
1224
|
|
|
1593
|
-
stateController.setPendingOp(this._getStateIdentifier(),
|
|
1225
|
+
stateController.setPendingOp(this._getStateIdentifier(), _attr20, nextOp);
|
|
1594
1226
|
}
|
|
1595
1227
|
|
|
1596
1228
|
return this;
|
|
@@ -1802,7 +1434,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1802
1434
|
* object.op("x") would return an instance of Parse.Op.Increment.
|
|
1803
1435
|
*
|
|
1804
1436
|
* @param attr {String} The key.
|
|
1805
|
-
* @returns {Parse.Op} The operation, or undefined if none.
|
|
1437
|
+
* @returns {Parse.Op | undefined} The operation, or undefined if none.
|
|
1806
1438
|
*/
|
|
1807
1439
|
|
|
1808
1440
|
}, {
|
|
@@ -1938,53 +1570,51 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1938
1570
|
}, {
|
|
1939
1571
|
key: "exists",
|
|
1940
1572
|
value: function () {
|
|
1941
|
-
var _exists = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
1573
|
+
var _exists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options
|
|
1942
1574
|
/*:: ?: RequestOptions*/
|
|
1943
1575
|
) {
|
|
1944
1576
|
var query;
|
|
1945
|
-
return
|
|
1946
|
-
while (1) {
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
}
|
|
1577
|
+
return _regenerator.default.wrap(function (_context) {
|
|
1578
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1579
|
+
case 0:
|
|
1580
|
+
if (this.id) {
|
|
1581
|
+
_context.next = 2;
|
|
1582
|
+
break;
|
|
1583
|
+
}
|
|
1953
1584
|
|
|
1954
|
-
|
|
1585
|
+
return _context.abrupt("return", false);
|
|
1955
1586
|
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1587
|
+
case 2:
|
|
1588
|
+
_context.prev = 2;
|
|
1589
|
+
query = new _ParseQuery.default(this.className);
|
|
1590
|
+
_context.next = 6;
|
|
1591
|
+
return query.get(this.id, options);
|
|
1961
1592
|
|
|
1962
|
-
|
|
1963
|
-
|
|
1593
|
+
case 6:
|
|
1594
|
+
return _context.abrupt("return", true);
|
|
1964
1595
|
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1596
|
+
case 9:
|
|
1597
|
+
_context.prev = 9;
|
|
1598
|
+
_context.t0 = _context["catch"](2);
|
|
1968
1599
|
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1600
|
+
if (!(_context.t0.code === _ParseError.default.OBJECT_NOT_FOUND)) {
|
|
1601
|
+
_context.next = 13;
|
|
1602
|
+
break;
|
|
1603
|
+
}
|
|
1973
1604
|
|
|
1974
|
-
|
|
1605
|
+
return _context.abrupt("return", false);
|
|
1975
1606
|
|
|
1976
|
-
|
|
1977
|
-
|
|
1607
|
+
case 13:
|
|
1608
|
+
throw _context.t0;
|
|
1978
1609
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
}
|
|
1610
|
+
case 14:
|
|
1611
|
+
case "end":
|
|
1612
|
+
return _context.stop();
|
|
1983
1613
|
}
|
|
1984
1614
|
}, _callee, this, [[2, 9]]);
|
|
1985
1615
|
}));
|
|
1986
1616
|
|
|
1987
|
-
function exists(
|
|
1617
|
+
function exists() {
|
|
1988
1618
|
return _exists.apply(this, arguments);
|
|
1989
1619
|
}
|
|
1990
1620
|
|
|
@@ -1998,7 +1628,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1998
1628
|
|
|
1999
1629
|
}, {
|
|
2000
1630
|
key: "isValid",
|
|
2001
|
-
value: function
|
|
1631
|
+
value: function ()
|
|
2002
1632
|
/*: boolean*/
|
|
2003
1633
|
{
|
|
2004
1634
|
return !this.validate(this.attributes);
|
|
@@ -2016,7 +1646,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2016
1646
|
|
|
2017
1647
|
}, {
|
|
2018
1648
|
key: "validate",
|
|
2019
|
-
value: function
|
|
1649
|
+
value: function (attrs
|
|
2020
1650
|
/*: AttributeMap*/
|
|
2021
1651
|
)
|
|
2022
1652
|
/*: ParseError | boolean*/
|
|
@@ -2025,8 +1655,8 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2025
1655
|
return new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'ACL must be a Parse ACL.');
|
|
2026
1656
|
}
|
|
2027
1657
|
|
|
2028
|
-
for (var
|
|
2029
|
-
if (!/^[A-Za-z][0-9A-Za-z_.]*$/.test(
|
|
1658
|
+
for (var _key2 in attrs) {
|
|
1659
|
+
if (!/^[A-Za-z][0-9A-Za-z_.]*$/.test(_key2)) {
|
|
2030
1660
|
return new _ParseError.default(_ParseError.default.INVALID_KEY_NAME);
|
|
2031
1661
|
}
|
|
2032
1662
|
}
|
|
@@ -2042,7 +1672,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2042
1672
|
|
|
2043
1673
|
}, {
|
|
2044
1674
|
key: "getACL",
|
|
2045
|
-
value: function
|
|
1675
|
+
value: function ()
|
|
2046
1676
|
/*: ?ParseACL*/
|
|
2047
1677
|
{
|
|
2048
1678
|
var acl = this.get('ACL');
|
|
@@ -2064,7 +1694,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2064
1694
|
|
|
2065
1695
|
}, {
|
|
2066
1696
|
key: "setACL",
|
|
2067
|
-
value: function
|
|
1697
|
+
value: function (acl
|
|
2068
1698
|
/*: ParseACL*/
|
|
2069
1699
|
, options
|
|
2070
1700
|
/*:: ?: mixed*/
|
|
@@ -2081,13 +1711,13 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2081
1711
|
|
|
2082
1712
|
}, {
|
|
2083
1713
|
key: "revert",
|
|
2084
|
-
value: function
|
|
1714
|
+
value: function ()
|
|
2085
1715
|
/*: void*/
|
|
2086
1716
|
{
|
|
2087
1717
|
var keysToRevert;
|
|
2088
1718
|
|
|
2089
|
-
for (var _len = arguments.length, keys = new Array(_len),
|
|
2090
|
-
keys[
|
|
1719
|
+
for (var _len = arguments.length, keys = new Array(_len), _key3 = 0; _key3 < _len; _key3++) {
|
|
1720
|
+
keys[_key3] = arguments[_key3];
|
|
2091
1721
|
}
|
|
2092
1722
|
|
|
2093
1723
|
if (keys.length) {
|
|
@@ -2098,10 +1728,10 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2098
1728
|
|
|
2099
1729
|
try {
|
|
2100
1730
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2101
|
-
var
|
|
1731
|
+
var _key4 = _step.value;
|
|
2102
1732
|
|
|
2103
|
-
if (typeof
|
|
2104
|
-
keysToRevert.push(
|
|
1733
|
+
if (typeof _key4 === 'string') {
|
|
1734
|
+
keysToRevert.push(_key4);
|
|
2105
1735
|
} else {
|
|
2106
1736
|
throw new Error('Parse.Object#revert expects either no, or a list of string, arguments.');
|
|
2107
1737
|
}
|
|
@@ -2123,7 +1753,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2123
1753
|
|
|
2124
1754
|
}, {
|
|
2125
1755
|
key: "clear",
|
|
2126
|
-
value: function
|
|
1756
|
+
value: function ()
|
|
2127
1757
|
/*: ParseObject | boolean*/
|
|
2128
1758
|
{
|
|
2129
1759
|
var attributes = this.attributes;
|
|
@@ -2134,9 +1764,9 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2134
1764
|
readonly = (0, _concat.default)(readonly).call(readonly, this.constructor.readOnlyAttributes());
|
|
2135
1765
|
}
|
|
2136
1766
|
|
|
2137
|
-
for (var
|
|
2138
|
-
if ((0, _indexOf.default)(readonly).call(readonly,
|
|
2139
|
-
erasable[
|
|
1767
|
+
for (var _attr22 in attributes) {
|
|
1768
|
+
if ((0, _indexOf.default)(readonly).call(readonly, _attr22) < 0) {
|
|
1769
|
+
erasable[_attr22] = true;
|
|
2140
1770
|
}
|
|
2141
1771
|
}
|
|
2142
1772
|
|
|
@@ -2164,7 +1794,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2164
1794
|
|
|
2165
1795
|
}, {
|
|
2166
1796
|
key: "fetch",
|
|
2167
|
-
value: function
|
|
1797
|
+
value: function (options
|
|
2168
1798
|
/*: RequestOptions*/
|
|
2169
1799
|
)
|
|
2170
1800
|
/*: Promise*/
|
|
@@ -2229,7 +1859,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2229
1859
|
|
|
2230
1860
|
}, {
|
|
2231
1861
|
key: "fetchWithInclude",
|
|
2232
|
-
value: function
|
|
1862
|
+
value: function (keys
|
|
2233
1863
|
/*: String | Array<string | Array<string>>*/
|
|
2234
1864
|
, options
|
|
2235
1865
|
/*: RequestOptions*/
|
|
@@ -2268,48 +1898,46 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2268
1898
|
}, {
|
|
2269
1899
|
key: "saveEventually",
|
|
2270
1900
|
value: function () {
|
|
2271
|
-
var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
1901
|
+
var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options
|
|
2272
1902
|
/*: SaveOptions*/
|
|
2273
1903
|
) {
|
|
2274
|
-
return
|
|
2275
|
-
while (1) {
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
return this.save(null, options);
|
|
1904
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
1905
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1906
|
+
case 0:
|
|
1907
|
+
_context4.prev = 0;
|
|
1908
|
+
_context4.next = 3;
|
|
1909
|
+
return this.save(null, options);
|
|
2281
1910
|
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
1911
|
+
case 3:
|
|
1912
|
+
_context4.next = 11;
|
|
1913
|
+
break;
|
|
2285
1914
|
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
1915
|
+
case 5:
|
|
1916
|
+
_context4.prev = 5;
|
|
1917
|
+
_context4.t0 = _context4["catch"](0);
|
|
2289
1918
|
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
1919
|
+
if (!(_context4.t0.message === 'XMLHttpRequest failed: "Unable to connect to the Parse API"')) {
|
|
1920
|
+
_context4.next = 11;
|
|
1921
|
+
break;
|
|
1922
|
+
}
|
|
2294
1923
|
|
|
2295
|
-
|
|
2296
|
-
|
|
1924
|
+
_context4.next = 10;
|
|
1925
|
+
return _EventuallyQueue.default.save(this, options);
|
|
2297
1926
|
|
|
2298
|
-
|
|
2299
|
-
|
|
1927
|
+
case 10:
|
|
1928
|
+
_EventuallyQueue.default.poll();
|
|
2300
1929
|
|
|
2301
|
-
|
|
2302
|
-
|
|
1930
|
+
case 11:
|
|
1931
|
+
return _context4.abrupt("return", this);
|
|
2303
1932
|
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
}
|
|
1933
|
+
case 12:
|
|
1934
|
+
case "end":
|
|
1935
|
+
return _context4.stop();
|
|
2308
1936
|
}
|
|
2309
1937
|
}, _callee2, this, [[0, 5]]);
|
|
2310
1938
|
}));
|
|
2311
1939
|
|
|
2312
|
-
function saveEventually(
|
|
1940
|
+
function saveEventually() {
|
|
2313
1941
|
return _saveEventually.apply(this, arguments);
|
|
2314
1942
|
}
|
|
2315
1943
|
|
|
@@ -2381,7 +2009,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2381
2009
|
|
|
2382
2010
|
}, {
|
|
2383
2011
|
key: "save",
|
|
2384
|
-
value: function
|
|
2012
|
+
value: function (arg1
|
|
2385
2013
|
/*: ?string | { [attr: string]: mixed }*/
|
|
2386
2014
|
, arg2
|
|
2387
2015
|
/*: SaveOptions | mixed*/
|
|
@@ -2469,48 +2097,46 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2469
2097
|
}, {
|
|
2470
2098
|
key: "destroyEventually",
|
|
2471
2099
|
value: function () {
|
|
2472
|
-
var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
2100
|
+
var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(options
|
|
2473
2101
|
/*: RequestOptions*/
|
|
2474
2102
|
) {
|
|
2475
|
-
return
|
|
2476
|
-
while (1) {
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
return this.destroy(options);
|
|
2103
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
2104
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
2105
|
+
case 0:
|
|
2106
|
+
_context5.prev = 0;
|
|
2107
|
+
_context5.next = 3;
|
|
2108
|
+
return this.destroy(options);
|
|
2482
2109
|
|
|
2483
|
-
|
|
2110
|
+
case 3:
|
|
2111
|
+
_context5.next = 11;
|
|
2112
|
+
break;
|
|
2113
|
+
|
|
2114
|
+
case 5:
|
|
2115
|
+
_context5.prev = 5;
|
|
2116
|
+
_context5.t0 = _context5["catch"](0);
|
|
2117
|
+
|
|
2118
|
+
if (!(_context5.t0.message === 'XMLHttpRequest failed: "Unable to connect to the Parse API"')) {
|
|
2484
2119
|
_context5.next = 11;
|
|
2485
2120
|
break;
|
|
2121
|
+
}
|
|
2486
2122
|
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
_context5.t0 = _context5["catch"](0);
|
|
2490
|
-
|
|
2491
|
-
if (!(_context5.t0.message === 'XMLHttpRequest failed: "Unable to connect to the Parse API"')) {
|
|
2492
|
-
_context5.next = 11;
|
|
2493
|
-
break;
|
|
2494
|
-
}
|
|
2123
|
+
_context5.next = 10;
|
|
2124
|
+
return _EventuallyQueue.default.destroy(this, options);
|
|
2495
2125
|
|
|
2496
|
-
|
|
2497
|
-
|
|
2126
|
+
case 10:
|
|
2127
|
+
_EventuallyQueue.default.poll();
|
|
2498
2128
|
|
|
2499
|
-
|
|
2500
|
-
|
|
2129
|
+
case 11:
|
|
2130
|
+
return _context5.abrupt("return", this);
|
|
2501
2131
|
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
case 12:
|
|
2506
|
-
case "end":
|
|
2507
|
-
return _context5.stop();
|
|
2508
|
-
}
|
|
2132
|
+
case 12:
|
|
2133
|
+
case "end":
|
|
2134
|
+
return _context5.stop();
|
|
2509
2135
|
}
|
|
2510
2136
|
}, _callee3, this, [[0, 5]]);
|
|
2511
2137
|
}));
|
|
2512
2138
|
|
|
2513
|
-
function destroyEventually(
|
|
2139
|
+
function destroyEventually() {
|
|
2514
2140
|
return _destroyEventually.apply(this, arguments);
|
|
2515
2141
|
}
|
|
2516
2142
|
|
|
@@ -2533,7 +2159,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2533
2159
|
|
|
2534
2160
|
}, {
|
|
2535
2161
|
key: "destroy",
|
|
2536
|
-
value: function
|
|
2162
|
+
value: function (options
|
|
2537
2163
|
/*: RequestOptions*/
|
|
2538
2164
|
)
|
|
2539
2165
|
/*: Promise*/
|
|
@@ -2578,7 +2204,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2578
2204
|
|
|
2579
2205
|
}, {
|
|
2580
2206
|
key: "pin",
|
|
2581
|
-
value: function
|
|
2207
|
+
value: function ()
|
|
2582
2208
|
/*: Promise<void>*/
|
|
2583
2209
|
{
|
|
2584
2210
|
return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
|
|
@@ -2596,7 +2222,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2596
2222
|
|
|
2597
2223
|
}, {
|
|
2598
2224
|
key: "unPin",
|
|
2599
|
-
value: function
|
|
2225
|
+
value: function ()
|
|
2600
2226
|
/*: Promise<void>*/
|
|
2601
2227
|
{
|
|
2602
2228
|
return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
|
|
@@ -2614,34 +2240,32 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2614
2240
|
}, {
|
|
2615
2241
|
key: "isPinned",
|
|
2616
2242
|
value: function () {
|
|
2617
|
-
var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
2243
|
+
var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
2618
2244
|
var localDatastore, objectKey, pin;
|
|
2619
|
-
return
|
|
2620
|
-
while (1) {
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
2245
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
2246
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
2247
|
+
case 0:
|
|
2248
|
+
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
2624
2249
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2250
|
+
if (localDatastore.isEnabled) {
|
|
2251
|
+
_context6.next = 3;
|
|
2252
|
+
break;
|
|
2253
|
+
}
|
|
2629
2254
|
|
|
2630
|
-
|
|
2255
|
+
return _context6.abrupt("return", _promise.default.reject('Parse.enableLocalDatastore() must be called first'));
|
|
2631
2256
|
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2257
|
+
case 3:
|
|
2258
|
+
objectKey = localDatastore.getKeyForObject(this);
|
|
2259
|
+
_context6.next = 6;
|
|
2260
|
+
return localDatastore.fromPinWithName(objectKey);
|
|
2636
2261
|
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2262
|
+
case 6:
|
|
2263
|
+
pin = _context6.sent;
|
|
2264
|
+
return _context6.abrupt("return", pin.length > 0);
|
|
2640
2265
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
}
|
|
2266
|
+
case 8:
|
|
2267
|
+
case "end":
|
|
2268
|
+
return _context6.stop();
|
|
2645
2269
|
}
|
|
2646
2270
|
}, _callee4, this);
|
|
2647
2271
|
}));
|
|
@@ -2671,7 +2295,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2671
2295
|
|
|
2672
2296
|
}, {
|
|
2673
2297
|
key: "pinWithName",
|
|
2674
|
-
value: function
|
|
2298
|
+
value: function (name
|
|
2675
2299
|
/*: string*/
|
|
2676
2300
|
)
|
|
2677
2301
|
/*: Promise<void>*/
|
|
@@ -2691,7 +2315,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2691
2315
|
|
|
2692
2316
|
}, {
|
|
2693
2317
|
key: "unPinWithName",
|
|
2694
|
-
value: function
|
|
2318
|
+
value: function (name
|
|
2695
2319
|
/*: string*/
|
|
2696
2320
|
)
|
|
2697
2321
|
/*: Promise<void>*/
|
|
@@ -2714,47 +2338,45 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2714
2338
|
}, {
|
|
2715
2339
|
key: "fetchFromLocalDatastore",
|
|
2716
2340
|
value: function () {
|
|
2717
|
-
var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
2341
|
+
var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
2718
2342
|
var localDatastore, objectKey, pinned, result;
|
|
2719
|
-
return
|
|
2720
|
-
while (1) {
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
2343
|
+
return _regenerator.default.wrap(function (_context7) {
|
|
2344
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
2345
|
+
case 0:
|
|
2346
|
+
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
2724
2347
|
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2348
|
+
if (localDatastore.isEnabled) {
|
|
2349
|
+
_context7.next = 3;
|
|
2350
|
+
break;
|
|
2351
|
+
}
|
|
2729
2352
|
|
|
2730
|
-
|
|
2353
|
+
throw new Error('Parse.enableLocalDatastore() must be called first');
|
|
2731
2354
|
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2355
|
+
case 3:
|
|
2356
|
+
objectKey = localDatastore.getKeyForObject(this);
|
|
2357
|
+
_context7.next = 6;
|
|
2358
|
+
return localDatastore._serializeObject(objectKey);
|
|
2736
2359
|
|
|
2737
|
-
|
|
2738
|
-
|
|
2360
|
+
case 6:
|
|
2361
|
+
pinned = _context7.sent;
|
|
2739
2362
|
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2363
|
+
if (pinned) {
|
|
2364
|
+
_context7.next = 9;
|
|
2365
|
+
break;
|
|
2366
|
+
}
|
|
2744
2367
|
|
|
2745
|
-
|
|
2368
|
+
throw new Error('Cannot fetch an unsaved ParseObject');
|
|
2746
2369
|
|
|
2747
|
-
|
|
2748
|
-
|
|
2370
|
+
case 9:
|
|
2371
|
+
result = ParseObject.fromJSON(pinned);
|
|
2749
2372
|
|
|
2750
|
-
|
|
2373
|
+
this._finishFetch(result.toJSON());
|
|
2751
2374
|
|
|
2752
|
-
|
|
2375
|
+
return _context7.abrupt("return", this);
|
|
2753
2376
|
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
}
|
|
2377
|
+
case 12:
|
|
2378
|
+
case "end":
|
|
2379
|
+
return _context7.stop();
|
|
2758
2380
|
}
|
|
2759
2381
|
}, _callee5, this);
|
|
2760
2382
|
}));
|
|
@@ -2765,16 +2387,16 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2765
2387
|
|
|
2766
2388
|
return fetchFromLocalDatastore;
|
|
2767
2389
|
}()
|
|
2768
|
-
|
|
2390
|
+
/* Static methods */
|
|
2769
2391
|
|
|
2770
2392
|
}], [{
|
|
2771
2393
|
key: "_getClassMap",
|
|
2772
|
-
value: function
|
|
2394
|
+
value: function () {
|
|
2773
2395
|
return classMap;
|
|
2774
2396
|
}
|
|
2775
2397
|
}, {
|
|
2776
2398
|
key: "_clearAllState",
|
|
2777
|
-
value: function
|
|
2399
|
+
value: function () {
|
|
2778
2400
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
2779
2401
|
|
|
2780
2402
|
stateController.clearAllState();
|
|
@@ -2808,7 +2430,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2808
2430
|
|
|
2809
2431
|
}, {
|
|
2810
2432
|
key: "fetchAll",
|
|
2811
|
-
value: function
|
|
2433
|
+
value: function (list
|
|
2812
2434
|
/*: Array<ParseObject>*/
|
|
2813
2435
|
) {
|
|
2814
2436
|
var options
|
|
@@ -2862,7 +2484,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2862
2484
|
|
|
2863
2485
|
}, {
|
|
2864
2486
|
key: "fetchAllWithInclude",
|
|
2865
|
-
value: function
|
|
2487
|
+
value: function (list
|
|
2866
2488
|
/*: Array<ParseObject>*/
|
|
2867
2489
|
, keys
|
|
2868
2490
|
/*: String | Array<string | Array<string>>*/
|
|
@@ -2906,7 +2528,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2906
2528
|
|
|
2907
2529
|
}, {
|
|
2908
2530
|
key: "fetchAllIfNeededWithInclude",
|
|
2909
|
-
value: function
|
|
2531
|
+
value: function (list
|
|
2910
2532
|
/*: Array<ParseObject>*/
|
|
2911
2533
|
, keys
|
|
2912
2534
|
/*: String | Array<string | Array<string>>*/
|
|
@@ -2938,7 +2560,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2938
2560
|
|
|
2939
2561
|
}, {
|
|
2940
2562
|
key: "fetchAllIfNeeded",
|
|
2941
|
-
value: function
|
|
2563
|
+
value: function (list
|
|
2942
2564
|
/*: Array<ParseObject>*/
|
|
2943
2565
|
, options) {
|
|
2944
2566
|
options = options || {};
|
|
@@ -2960,7 +2582,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
2960
2582
|
}
|
|
2961
2583
|
}, {
|
|
2962
2584
|
key: "handleIncludeOptions",
|
|
2963
|
-
value: function
|
|
2585
|
+
value: function (options) {
|
|
2964
2586
|
var include = [];
|
|
2965
2587
|
|
|
2966
2588
|
if ((0, _isArray.default)(options.include)) {
|
|
@@ -3028,7 +2650,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3028
2650
|
|
|
3029
2651
|
}, {
|
|
3030
2652
|
key: "destroyAll",
|
|
3031
|
-
value: function
|
|
2653
|
+
value: function (list
|
|
3032
2654
|
/*: Array<ParseObject>*/
|
|
3033
2655
|
) {
|
|
3034
2656
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -3073,7 +2695,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3073
2695
|
|
|
3074
2696
|
}, {
|
|
3075
2697
|
key: "saveAll",
|
|
3076
|
-
value: function
|
|
2698
|
+
value: function (list
|
|
3077
2699
|
/*: Array<ParseObject>*/
|
|
3078
2700
|
) {
|
|
3079
2701
|
var options
|
|
@@ -3116,7 +2738,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3116
2738
|
|
|
3117
2739
|
}, {
|
|
3118
2740
|
key: "createWithoutData",
|
|
3119
|
-
value: function
|
|
2741
|
+
value: function (id
|
|
3120
2742
|
/*: string*/
|
|
3121
2743
|
) {
|
|
3122
2744
|
var obj = new this();
|
|
@@ -3136,7 +2758,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3136
2758
|
|
|
3137
2759
|
}, {
|
|
3138
2760
|
key: "fromJSON",
|
|
3139
|
-
value: function
|
|
2761
|
+
value: function (json
|
|
3140
2762
|
/*: any*/
|
|
3141
2763
|
, override
|
|
3142
2764
|
/*:: ?: boolean*/
|
|
@@ -3151,12 +2773,12 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3151
2773
|
var o = constructor ? new constructor(json.className) : new ParseObject(json.className);
|
|
3152
2774
|
var otherAttributes = {};
|
|
3153
2775
|
|
|
3154
|
-
for (var
|
|
3155
|
-
if (
|
|
3156
|
-
otherAttributes[
|
|
2776
|
+
for (var _attr24 in json) {
|
|
2777
|
+
if (_attr24 !== 'className' && _attr24 !== '__type') {
|
|
2778
|
+
otherAttributes[_attr24] = json[_attr24];
|
|
3157
2779
|
|
|
3158
2780
|
if (dirty) {
|
|
3159
|
-
o.set(
|
|
2781
|
+
o.set(_attr24, json[_attr24]);
|
|
3160
2782
|
}
|
|
3161
2783
|
}
|
|
3162
2784
|
}
|
|
@@ -3200,7 +2822,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3200
2822
|
|
|
3201
2823
|
}, {
|
|
3202
2824
|
key: "registerSubclass",
|
|
3203
|
-
value: function
|
|
2825
|
+
value: function (className
|
|
3204
2826
|
/*: string*/
|
|
3205
2827
|
, constructor
|
|
3206
2828
|
/*: any*/
|
|
@@ -3231,7 +2853,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3231
2853
|
|
|
3232
2854
|
}, {
|
|
3233
2855
|
key: "unregisterSubclass",
|
|
3234
|
-
value: function
|
|
2856
|
+
value: function (className
|
|
3235
2857
|
/*: string*/
|
|
3236
2858
|
) {
|
|
3237
2859
|
if (typeof className !== 'string') {
|
|
@@ -3280,7 +2902,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3280
2902
|
|
|
3281
2903
|
}, {
|
|
3282
2904
|
key: "extend",
|
|
3283
|
-
value: function
|
|
2905
|
+
value: function (className
|
|
3284
2906
|
/*: any*/
|
|
3285
2907
|
, protoProps
|
|
3286
2908
|
/*: any*/
|
|
@@ -3307,7 +2929,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3307
2929
|
parentProto = this.prototype;
|
|
3308
2930
|
}
|
|
3309
2931
|
|
|
3310
|
-
var ParseObjectSubclass = function
|
|
2932
|
+
var ParseObjectSubclass = function (attributes, options) {
|
|
3311
2933
|
this.className = adjustedClassName;
|
|
3312
2934
|
this._objCount = objectCount++; // Enable legacy initializers
|
|
3313
2935
|
|
|
@@ -3367,7 +2989,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3367
2989
|
if (prop === 'initialize') {
|
|
3368
2990
|
var _context9;
|
|
3369
2991
|
|
|
3370
|
-
(0,
|
|
2992
|
+
(0, _defineProperty3.default)(ParseObjectSubclass.prototype, '_initializers', {
|
|
3371
2993
|
value: (0, _concat.default)(_context9 = []).call(_context9, (0, _toConsumableArray2.default)(ParseObjectSubclass.prototype._initializers || []), [protoProps[prop]]),
|
|
3372
2994
|
enumerable: false,
|
|
3373
2995
|
writable: true,
|
|
@@ -3377,7 +2999,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3377
2999
|
}
|
|
3378
3000
|
|
|
3379
3001
|
if (prop !== 'className') {
|
|
3380
|
-
(0,
|
|
3002
|
+
(0, _defineProperty3.default)(ParseObjectSubclass.prototype, prop, {
|
|
3381
3003
|
value: protoProps[prop],
|
|
3382
3004
|
enumerable: false,
|
|
3383
3005
|
writable: true,
|
|
@@ -3388,10 +3010,10 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3388
3010
|
}
|
|
3389
3011
|
|
|
3390
3012
|
if (classProps) {
|
|
3391
|
-
for (var
|
|
3392
|
-
if (
|
|
3393
|
-
(0,
|
|
3394
|
-
value: classProps[
|
|
3013
|
+
for (var _prop2 in classProps) {
|
|
3014
|
+
if (_prop2 !== 'className') {
|
|
3015
|
+
(0, _defineProperty3.default)(ParseObjectSubclass, _prop2, {
|
|
3016
|
+
value: classProps[_prop2],
|
|
3395
3017
|
enumerable: false,
|
|
3396
3018
|
writable: true,
|
|
3397
3019
|
configurable: true
|
|
@@ -3414,7 +3036,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3414
3036
|
|
|
3415
3037
|
}, {
|
|
3416
3038
|
key: "enableSingleInstance",
|
|
3417
|
-
value: function
|
|
3039
|
+
value: function () {
|
|
3418
3040
|
singleInstance = true;
|
|
3419
3041
|
|
|
3420
3042
|
_CoreManager.default.setObjectStateController(SingleInstanceStateController);
|
|
@@ -3430,7 +3052,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3430
3052
|
|
|
3431
3053
|
}, {
|
|
3432
3054
|
key: "disableSingleInstance",
|
|
3433
|
-
value: function
|
|
3055
|
+
value: function () {
|
|
3434
3056
|
singleInstance = false;
|
|
3435
3057
|
|
|
3436
3058
|
_CoreManager.default.setObjectStateController(UniqueInstanceStateController);
|
|
@@ -3456,7 +3078,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3456
3078
|
|
|
3457
3079
|
}, {
|
|
3458
3080
|
key: "pinAll",
|
|
3459
|
-
value: function
|
|
3081
|
+
value: function (objects
|
|
3460
3082
|
/*: Array<ParseObject>*/
|
|
3461
3083
|
)
|
|
3462
3084
|
/*: Promise<void>*/
|
|
@@ -3490,7 +3112,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3490
3112
|
|
|
3491
3113
|
}, {
|
|
3492
3114
|
key: "pinAllWithName",
|
|
3493
|
-
value: function
|
|
3115
|
+
value: function (name
|
|
3494
3116
|
/*: string*/
|
|
3495
3117
|
, objects
|
|
3496
3118
|
/*: Array<ParseObject>*/
|
|
@@ -3520,7 +3142,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3520
3142
|
|
|
3521
3143
|
}, {
|
|
3522
3144
|
key: "unPinAll",
|
|
3523
|
-
value: function
|
|
3145
|
+
value: function (objects
|
|
3524
3146
|
/*: Array<ParseObject>*/
|
|
3525
3147
|
)
|
|
3526
3148
|
/*: Promise<void>*/
|
|
@@ -3548,7 +3170,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3548
3170
|
|
|
3549
3171
|
}, {
|
|
3550
3172
|
key: "unPinAllWithName",
|
|
3551
|
-
value: function
|
|
3173
|
+
value: function (name
|
|
3552
3174
|
/*: string*/
|
|
3553
3175
|
, objects
|
|
3554
3176
|
/*: Array<ParseObject>*/
|
|
@@ -3576,7 +3198,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3576
3198
|
|
|
3577
3199
|
}, {
|
|
3578
3200
|
key: "unPinAllObjects",
|
|
3579
|
-
value: function
|
|
3201
|
+
value: function ()
|
|
3580
3202
|
/*: Promise<void>*/
|
|
3581
3203
|
{
|
|
3582
3204
|
var localDatastore = _CoreManager.default.getLocalDatastore();
|
|
@@ -3602,7 +3224,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3602
3224
|
|
|
3603
3225
|
}, {
|
|
3604
3226
|
key: "unPinAllObjectsWithName",
|
|
3605
|
-
value: function
|
|
3227
|
+
value: function (name
|
|
3606
3228
|
/*: string*/
|
|
3607
3229
|
)
|
|
3608
3230
|
/*: Promise<void>*/
|
|
@@ -3620,7 +3242,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3620
3242
|
}();
|
|
3621
3243
|
|
|
3622
3244
|
var DefaultController = {
|
|
3623
|
-
fetch: function
|
|
3245
|
+
fetch: function (target
|
|
3624
3246
|
/*: ParseObject | Array<ParseObject>*/
|
|
3625
3247
|
, forceFetch
|
|
3626
3248
|
/*: boolean*/
|
|
@@ -3679,108 +3301,106 @@ var DefaultController = {
|
|
|
3679
3301
|
|
|
3680
3302
|
query._limit = ids.length;
|
|
3681
3303
|
return (0, _find.default)(query).call(query, options).then( /*#__PURE__*/function () {
|
|
3682
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
3683
|
-
var idMap, i, obj,
|
|
3684
|
-
|
|
3685
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context10) {
|
|
3686
|
-
while (1) {
|
|
3687
|
-
switch (_context10.prev = _context10.next) {
|
|
3688
|
-
case 0:
|
|
3689
|
-
idMap = {};
|
|
3690
|
-
(0, _forEach.default)(objects).call(objects, function (o) {
|
|
3691
|
-
idMap[o.id] = o;
|
|
3692
|
-
});
|
|
3693
|
-
i = 0;
|
|
3694
|
-
|
|
3695
|
-
case 3:
|
|
3696
|
-
if (!(i < objs.length)) {
|
|
3697
|
-
_context10.next = 11;
|
|
3698
|
-
break;
|
|
3699
|
-
}
|
|
3304
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(objects) {
|
|
3305
|
+
var idMap, i, obj, _i2, _obj, id, _iterator3, _step3, object;
|
|
3700
3306
|
|
|
3701
|
-
|
|
3307
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
3308
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
3309
|
+
case 0:
|
|
3310
|
+
idMap = {};
|
|
3311
|
+
(0, _forEach.default)(objects).call(objects, function (o) {
|
|
3312
|
+
idMap[o.id] = o;
|
|
3313
|
+
});
|
|
3314
|
+
i = 0;
|
|
3702
3315
|
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3316
|
+
case 3:
|
|
3317
|
+
if (!(i < objs.length)) {
|
|
3318
|
+
_context10.next = 11;
|
|
3319
|
+
break;
|
|
3320
|
+
}
|
|
3707
3321
|
|
|
3708
|
-
|
|
3709
|
-
_context10.next = 8;
|
|
3710
|
-
break;
|
|
3711
|
-
}
|
|
3322
|
+
obj = objs[i];
|
|
3712
3323
|
|
|
3713
|
-
|
|
3324
|
+
if (!(!obj || !obj.id || !idMap[obj.id])) {
|
|
3325
|
+
_context10.next = 8;
|
|
3326
|
+
break;
|
|
3327
|
+
}
|
|
3714
3328
|
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
_context10.next = 3;
|
|
3329
|
+
if (!forceFetch) {
|
|
3330
|
+
_context10.next = 8;
|
|
3718
3331
|
break;
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
return _context10.abrupt("return", _promise.default.reject(new _ParseError.default(_ParseError.default.OBJECT_NOT_FOUND, 'All objects must exist on the server.')));
|
|
3719
3335
|
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
_obj = results[_i];
|
|
3336
|
+
case 8:
|
|
3337
|
+
i++;
|
|
3338
|
+
_context10.next = 3;
|
|
3339
|
+
break;
|
|
3725
3340
|
|
|
3726
|
-
|
|
3727
|
-
|
|
3341
|
+
case 11:
|
|
3342
|
+
if (!singleInstance) {
|
|
3343
|
+
// If single instance objects are disabled, we need to replace the
|
|
3344
|
+
for (_i2 = 0; _i2 < results.length; _i2++) {
|
|
3345
|
+
_obj = results[_i2];
|
|
3728
3346
|
|
|
3729
|
-
|
|
3347
|
+
if (_obj && _obj.id && idMap[_obj.id]) {
|
|
3348
|
+
id = _obj.id;
|
|
3730
3349
|
|
|
3731
|
-
|
|
3732
|
-
|
|
3350
|
+
_obj._finishFetch(idMap[id].toJSON());
|
|
3351
|
+
|
|
3352
|
+
results[_i2] = idMap[id];
|
|
3733
3353
|
}
|
|
3734
3354
|
}
|
|
3355
|
+
}
|
|
3735
3356
|
|
|
3736
|
-
|
|
3737
|
-
|
|
3357
|
+
_iterator3 = _createForOfIteratorHelper(results);
|
|
3358
|
+
_context10.prev = 13;
|
|
3738
3359
|
|
|
3739
|
-
|
|
3360
|
+
_iterator3.s();
|
|
3740
3361
|
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3362
|
+
case 15:
|
|
3363
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
3364
|
+
_context10.next = 21;
|
|
3365
|
+
break;
|
|
3366
|
+
}
|
|
3746
3367
|
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3368
|
+
object = _step3.value;
|
|
3369
|
+
_context10.next = 19;
|
|
3370
|
+
return localDatastore._updateObjectIfPinned(object);
|
|
3750
3371
|
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3372
|
+
case 19:
|
|
3373
|
+
_context10.next = 15;
|
|
3374
|
+
break;
|
|
3754
3375
|
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3376
|
+
case 21:
|
|
3377
|
+
_context10.next = 26;
|
|
3378
|
+
break;
|
|
3758
3379
|
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3380
|
+
case 23:
|
|
3381
|
+
_context10.prev = 23;
|
|
3382
|
+
_context10.t0 = _context10["catch"](13);
|
|
3762
3383
|
|
|
3763
|
-
|
|
3384
|
+
_iterator3.e(_context10.t0);
|
|
3764
3385
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3386
|
+
case 26:
|
|
3387
|
+
_context10.prev = 26;
|
|
3767
3388
|
|
|
3768
|
-
|
|
3389
|
+
_iterator3.f();
|
|
3769
3390
|
|
|
3770
|
-
|
|
3391
|
+
return _context10.finish(26);
|
|
3771
3392
|
|
|
3772
|
-
|
|
3773
|
-
|
|
3393
|
+
case 29:
|
|
3394
|
+
return _context10.abrupt("return", _promise.default.resolve(results));
|
|
3774
3395
|
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
}
|
|
3396
|
+
case 30:
|
|
3397
|
+
case "end":
|
|
3398
|
+
return _context10.stop();
|
|
3779
3399
|
}
|
|
3780
3400
|
}, _callee6, null, [[13, 23, 26, 29]]);
|
|
3781
3401
|
}));
|
|
3782
3402
|
|
|
3783
|
-
return function (
|
|
3403
|
+
return function () {
|
|
3784
3404
|
return _ref.apply(this, arguments);
|
|
3785
3405
|
};
|
|
3786
3406
|
}());
|
|
@@ -3798,32 +3418,30 @@ var DefaultController = {
|
|
|
3798
3418
|
}
|
|
3799
3419
|
|
|
3800
3420
|
return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
|
|
3801
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
3802
|
-
return
|
|
3803
|
-
while (1) {
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
target._clearPendingOps();
|
|
3421
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(response) {
|
|
3422
|
+
return _regenerator.default.wrap(function (_context11) {
|
|
3423
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
3424
|
+
case 0:
|
|
3425
|
+
target._clearPendingOps();
|
|
3807
3426
|
|
|
3808
|
-
|
|
3427
|
+
target._clearServerData();
|
|
3809
3428
|
|
|
3810
|
-
|
|
3429
|
+
target._finishFetch(response);
|
|
3811
3430
|
|
|
3812
|
-
|
|
3813
|
-
|
|
3431
|
+
_context11.next = 5;
|
|
3432
|
+
return localDatastore._updateObjectIfPinned(target);
|
|
3814
3433
|
|
|
3815
|
-
|
|
3816
|
-
|
|
3434
|
+
case 5:
|
|
3435
|
+
return _context11.abrupt("return", target);
|
|
3817
3436
|
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
}
|
|
3437
|
+
case 6:
|
|
3438
|
+
case "end":
|
|
3439
|
+
return _context11.stop();
|
|
3822
3440
|
}
|
|
3823
3441
|
}, _callee7);
|
|
3824
3442
|
}));
|
|
3825
3443
|
|
|
3826
|
-
return function (
|
|
3444
|
+
return function () {
|
|
3827
3445
|
return _ref2.apply(this, arguments);
|
|
3828
3446
|
};
|
|
3829
3447
|
}());
|
|
@@ -3831,178 +3449,172 @@ var DefaultController = {
|
|
|
3831
3449
|
|
|
3832
3450
|
return _promise.default.resolve();
|
|
3833
3451
|
},
|
|
3834
|
-
destroy: function
|
|
3452
|
+
destroy: function (target
|
|
3835
3453
|
/*: ParseObject | Array<ParseObject>*/
|
|
3836
3454
|
, options
|
|
3837
3455
|
/*: RequestOptions*/
|
|
3838
3456
|
)
|
|
3839
3457
|
/*: Promise<Array<void> | ParseObject>*/
|
|
3840
3458
|
{
|
|
3841
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
3459
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
3842
3460
|
var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
|
|
3843
|
-
return
|
|
3844
|
-
while (1) {
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
}
|
|
3855
|
-
|
|
3856
|
-
if (!(target.length < 1)) {
|
|
3857
|
-
_context14.next = 6;
|
|
3858
|
-
break;
|
|
3859
|
-
}
|
|
3461
|
+
return _regenerator.default.wrap(function (_context14) {
|
|
3462
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
3463
|
+
case 0:
|
|
3464
|
+
batchSize = options && options.batchSize ? options.batchSize : _CoreManager.default.get('REQUEST_BATCH_SIZE');
|
|
3465
|
+
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
3466
|
+
RESTController = _CoreManager.default.getRESTController();
|
|
3467
|
+
|
|
3468
|
+
if (!(0, _isArray.default)(target)) {
|
|
3469
|
+
_context14.next = 15;
|
|
3470
|
+
break;
|
|
3471
|
+
}
|
|
3860
3472
|
|
|
3861
|
-
|
|
3473
|
+
if (!(target.length < 1)) {
|
|
3474
|
+
_context14.next = 6;
|
|
3475
|
+
break;
|
|
3476
|
+
}
|
|
3862
3477
|
|
|
3863
|
-
|
|
3864
|
-
batches = [[]];
|
|
3865
|
-
(0, _forEach.default)(target).call(target, function (obj) {
|
|
3866
|
-
if (!obj.id) {
|
|
3867
|
-
return;
|
|
3868
|
-
}
|
|
3478
|
+
return _context14.abrupt("return", _promise.default.resolve([]));
|
|
3869
3479
|
|
|
3870
|
-
|
|
3480
|
+
case 6:
|
|
3481
|
+
batches = [[]];
|
|
3482
|
+
(0, _forEach.default)(target).call(target, function (obj) {
|
|
3483
|
+
if (!obj.id) {
|
|
3484
|
+
return;
|
|
3485
|
+
}
|
|
3871
3486
|
|
|
3872
|
-
|
|
3873
|
-
batches.push([]);
|
|
3874
|
-
}
|
|
3875
|
-
});
|
|
3487
|
+
batches[batches.length - 1].push(obj);
|
|
3876
3488
|
|
|
3877
|
-
if (batches[batches.length - 1].length
|
|
3878
|
-
|
|
3879
|
-
batches.pop();
|
|
3489
|
+
if (batches[batches.length - 1].length >= batchSize) {
|
|
3490
|
+
batches.push([]);
|
|
3880
3491
|
}
|
|
3492
|
+
});
|
|
3881
3493
|
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3494
|
+
if (batches[batches.length - 1].length === 0) {
|
|
3495
|
+
// If the last batch is empty, remove it
|
|
3496
|
+
batches.pop();
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
deleteCompleted = _promise.default.resolve();
|
|
3500
|
+
errors = [];
|
|
3501
|
+
(0, _forEach.default)(batches).call(batches, function (batch) {
|
|
3502
|
+
deleteCompleted = deleteCompleted.then(function () {
|
|
3503
|
+
return RESTController.request('POST', 'batch', {
|
|
3504
|
+
requests: (0, _map.default)(batch).call(batch, function (obj) {
|
|
3505
|
+
return {
|
|
3506
|
+
method: 'DELETE',
|
|
3507
|
+
path: getServerUrlPath() + 'classes/' + obj.className + '/' + obj._getId(),
|
|
3508
|
+
body: {}
|
|
3509
|
+
};
|
|
3510
|
+
})
|
|
3511
|
+
}, options).then(function (results) {
|
|
3512
|
+
for (var i = 0; i < results.length; i++) {
|
|
3513
|
+
if (results[i] && results[i].hasOwnProperty('error')) {
|
|
3514
|
+
var err = new _ParseError.default(results[i].error.code, results[i].error.error);
|
|
3515
|
+
err.object = batch[i];
|
|
3516
|
+
errors.push(err);
|
|
3901
3517
|
}
|
|
3902
|
-
}
|
|
3518
|
+
}
|
|
3903
3519
|
});
|
|
3904
3520
|
});
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3521
|
+
});
|
|
3522
|
+
return _context14.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
3523
|
+
var aggregate, _iterator4, _step4, object;
|
|
3524
|
+
|
|
3525
|
+
return _regenerator.default.wrap(function (_context12) {
|
|
3526
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
3527
|
+
case 0:
|
|
3528
|
+
if (!errors.length) {
|
|
3529
|
+
_context12.next = 4;
|
|
3530
|
+
break;
|
|
3531
|
+
}
|
|
3916
3532
|
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3533
|
+
aggregate = new _ParseError.default(_ParseError.default.AGGREGATE_ERROR);
|
|
3534
|
+
aggregate.errors = errors;
|
|
3535
|
+
return _context12.abrupt("return", _promise.default.reject(aggregate));
|
|
3920
3536
|
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3537
|
+
case 4:
|
|
3538
|
+
_iterator4 = _createForOfIteratorHelper(target);
|
|
3539
|
+
_context12.prev = 5;
|
|
3924
3540
|
|
|
3925
|
-
|
|
3541
|
+
_iterator4.s();
|
|
3926
3542
|
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3543
|
+
case 7:
|
|
3544
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
3545
|
+
_context12.next = 13;
|
|
3546
|
+
break;
|
|
3547
|
+
}
|
|
3932
3548
|
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3549
|
+
object = _step4.value;
|
|
3550
|
+
_context12.next = 11;
|
|
3551
|
+
return localDatastore._destroyObjectIfPinned(object);
|
|
3936
3552
|
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3553
|
+
case 11:
|
|
3554
|
+
_context12.next = 7;
|
|
3555
|
+
break;
|
|
3940
3556
|
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3557
|
+
case 13:
|
|
3558
|
+
_context12.next = 18;
|
|
3559
|
+
break;
|
|
3944
3560
|
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3561
|
+
case 15:
|
|
3562
|
+
_context12.prev = 15;
|
|
3563
|
+
_context12.t0 = _context12["catch"](5);
|
|
3948
3564
|
|
|
3949
|
-
|
|
3565
|
+
_iterator4.e(_context12.t0);
|
|
3950
3566
|
|
|
3951
|
-
|
|
3952
|
-
|
|
3567
|
+
case 18:
|
|
3568
|
+
_context12.prev = 18;
|
|
3953
3569
|
|
|
3954
|
-
|
|
3570
|
+
_iterator4.f();
|
|
3955
3571
|
|
|
3956
|
-
|
|
3572
|
+
return _context12.finish(18);
|
|
3957
3573
|
|
|
3958
|
-
|
|
3959
|
-
|
|
3574
|
+
case 21:
|
|
3575
|
+
return _context12.abrupt("return", _promise.default.resolve(target));
|
|
3960
3576
|
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
}))));
|
|
3577
|
+
case 22:
|
|
3578
|
+
case "end":
|
|
3579
|
+
return _context12.stop();
|
|
3580
|
+
}
|
|
3581
|
+
}, _callee8, null, [[5, 15, 18, 21]]);
|
|
3582
|
+
}))));
|
|
3968
3583
|
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3584
|
+
case 15:
|
|
3585
|
+
if (!(target instanceof ParseObject)) {
|
|
3586
|
+
_context14.next = 17;
|
|
3587
|
+
break;
|
|
3588
|
+
}
|
|
3974
3589
|
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
return localDatastore._destroyObjectIfPinned(target);
|
|
3590
|
+
return _context14.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
3591
|
+
return _regenerator.default.wrap(function (_context13) {
|
|
3592
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
3593
|
+
case 0:
|
|
3594
|
+
_context13.next = 2;
|
|
3595
|
+
return localDatastore._destroyObjectIfPinned(target);
|
|
3982
3596
|
|
|
3983
|
-
|
|
3984
|
-
|
|
3597
|
+
case 2:
|
|
3598
|
+
return _context13.abrupt("return", _promise.default.resolve(target));
|
|
3985
3599
|
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
}))));
|
|
3600
|
+
case 3:
|
|
3601
|
+
case "end":
|
|
3602
|
+
return _context13.stop();
|
|
3603
|
+
}
|
|
3604
|
+
}, _callee9);
|
|
3605
|
+
}))));
|
|
3993
3606
|
|
|
3994
|
-
|
|
3995
|
-
|
|
3607
|
+
case 17:
|
|
3608
|
+
return _context14.abrupt("return", _promise.default.resolve(target));
|
|
3996
3609
|
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
}
|
|
3610
|
+
case 18:
|
|
3611
|
+
case "end":
|
|
3612
|
+
return _context14.stop();
|
|
4001
3613
|
}
|
|
4002
3614
|
}, _callee10);
|
|
4003
3615
|
}))();
|
|
4004
3616
|
},
|
|
4005
|
-
save: function
|
|
3617
|
+
save: function (target
|
|
4006
3618
|
/*: ParseObject | Array<ParseObject | ParseFile>*/
|
|
4007
3619
|
, options
|
|
4008
3620
|
/*: RequestOptions*/
|
|
@@ -4122,70 +3734,74 @@ var DefaultController = {
|
|
|
4122
3734
|
batchReturned.reject(new _ParseError.default(_ParseError.default.INCORRECT_TYPE, error.message));
|
|
4123
3735
|
});
|
|
4124
3736
|
return (0, _promiseUtils.when)(batchTasks);
|
|
4125
|
-
}).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
3737
|
+
}).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
4126
3738
|
var _iterator5, _step5, object;
|
|
4127
3739
|
|
|
4128
|
-
return
|
|
4129
|
-
while (1) {
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
}
|
|
3740
|
+
return _regenerator.default.wrap(function _callee11$(_context15) {
|
|
3741
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
3742
|
+
case 0:
|
|
3743
|
+
if (!objectError) {
|
|
3744
|
+
_context15.next = 2;
|
|
3745
|
+
break;
|
|
3746
|
+
}
|
|
4136
3747
|
|
|
4137
|
-
|
|
3748
|
+
return _context15.abrupt("return", _promise.default.reject(objectError));
|
|
4138
3749
|
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
3750
|
+
case 2:
|
|
3751
|
+
_iterator5 = _createForOfIteratorHelper(target);
|
|
3752
|
+
_context15.prev = 3;
|
|
4142
3753
|
|
|
4143
|
-
|
|
3754
|
+
_iterator5.s();
|
|
4144
3755
|
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
object = _step5.value;
|
|
4152
|
-
_context15.next = 9;
|
|
4153
|
-
return localDatastore._updateLocalIdForObject(mapIdForPin[object.id], object);
|
|
3756
|
+
case 5:
|
|
3757
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
3758
|
+
_context15.next = 14;
|
|
3759
|
+
break;
|
|
3760
|
+
}
|
|
4154
3761
|
|
|
4155
|
-
|
|
4156
|
-
_context15.next = 11;
|
|
4157
|
-
return localDatastore._updateObjectIfPinned(object);
|
|
3762
|
+
object = _step5.value;
|
|
4158
3763
|
|
|
4159
|
-
|
|
4160
|
-
_context15.next =
|
|
3764
|
+
if (!(object instanceof ParseObject)) {
|
|
3765
|
+
_context15.next = 12;
|
|
4161
3766
|
break;
|
|
3767
|
+
}
|
|
4162
3768
|
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
break;
|
|
3769
|
+
_context15.next = 10;
|
|
3770
|
+
return localDatastore._updateLocalIdForObject(mapIdForPin[object.id], object);
|
|
4166
3771
|
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
3772
|
+
case 10:
|
|
3773
|
+
_context15.next = 12;
|
|
3774
|
+
return localDatastore._updateObjectIfPinned(object);
|
|
4170
3775
|
|
|
4171
|
-
|
|
3776
|
+
case 12:
|
|
3777
|
+
_context15.next = 5;
|
|
3778
|
+
break;
|
|
4172
3779
|
|
|
4173
|
-
|
|
4174
|
-
|
|
3780
|
+
case 14:
|
|
3781
|
+
_context15.next = 19;
|
|
3782
|
+
break;
|
|
4175
3783
|
|
|
4176
|
-
|
|
3784
|
+
case 16:
|
|
3785
|
+
_context15.prev = 16;
|
|
3786
|
+
_context15.t0 = _context15["catch"](3);
|
|
4177
3787
|
|
|
4178
|
-
|
|
3788
|
+
_iterator5.e(_context15.t0);
|
|
4179
3789
|
|
|
4180
|
-
|
|
4181
|
-
|
|
3790
|
+
case 19:
|
|
3791
|
+
_context15.prev = 19;
|
|
4182
3792
|
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
3793
|
+
_iterator5.f();
|
|
3794
|
+
|
|
3795
|
+
return _context15.finish(19);
|
|
3796
|
+
|
|
3797
|
+
case 22:
|
|
3798
|
+
return _context15.abrupt("return", _promise.default.resolve(target));
|
|
3799
|
+
|
|
3800
|
+
case 23:
|
|
3801
|
+
case "end":
|
|
3802
|
+
return _context15.stop();
|
|
4187
3803
|
}
|
|
4188
|
-
}, _callee11, null, [[3,
|
|
3804
|
+
}, _callee11, null, [[3, 16, 19, 22]]);
|
|
4189
3805
|
})));
|
|
4190
3806
|
});
|
|
4191
3807
|
} else if (target instanceof ParseObject) {
|
|
@@ -4216,25 +3832,23 @@ var DefaultController = {
|
|
|
4216
3832
|
};
|
|
4217
3833
|
|
|
4218
3834
|
stateController.pushPendingState(target._getStateIdentifier());
|
|
4219
|
-
return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
4220
|
-
return
|
|
4221
|
-
while (1) {
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
return localDatastore._updateLocalIdForObject(localId, target);
|
|
3835
|
+
return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
3836
|
+
return _regenerator.default.wrap(function _callee12$(_context16) {
|
|
3837
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
3838
|
+
case 0:
|
|
3839
|
+
_context16.next = 2;
|
|
3840
|
+
return localDatastore._updateLocalIdForObject(localId, target);
|
|
4226
3841
|
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
3842
|
+
case 2:
|
|
3843
|
+
_context16.next = 4;
|
|
3844
|
+
return localDatastore._updateObjectIfPinned(target);
|
|
4230
3845
|
|
|
4231
|
-
|
|
4232
|
-
|
|
3846
|
+
case 4:
|
|
3847
|
+
return _context16.abrupt("return", target);
|
|
4233
3848
|
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
}
|
|
3849
|
+
case 5:
|
|
3850
|
+
case "end":
|
|
3851
|
+
return _context16.stop();
|
|
4238
3852
|
}
|
|
4239
3853
|
}, _callee12);
|
|
4240
3854
|
})), function (error) {
|