parse 4.0.0-beta.1 → 4.0.1-beta.1
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 +188 -374
- package/dist/parse.min.js +7 -6
- package/dist/parse.weapp.js +188 -374
- package/dist/parse.weapp.min.js +7 -6
- package/lib/browser/Analytics.js +0 -7
- package/lib/browser/AnonymousUtils.js +0 -7
- package/lib/browser/Cloud.js +0 -7
- package/lib/browser/CoreManager.js +1 -8
- package/lib/browser/EventEmitter.js +0 -7
- package/lib/browser/FacebookUtils.js +0 -7
- package/lib/browser/InstallationController.js +0 -7
- package/lib/browser/LocalDatastoreUtils.js +0 -7
- package/lib/browser/OfflineQuery.js +27 -8
- package/lib/browser/Parse.js +0 -9
- package/lib/browser/ParseACL.js +0 -7
- package/lib/browser/ParseConfig.js +0 -7
- package/lib/browser/ParseError.js +0 -9
- package/lib/browser/ParseGeoPoint.js +0 -7
- package/lib/browser/ParseObject.js +158 -126
- package/lib/browser/ParsePolygon.js +0 -7
- package/lib/browser/ParseRelation.js +0 -7
- package/lib/browser/ParseSchema.js +0 -7
- package/lib/browser/Push.js +0 -7
- package/lib/browser/RESTController.js +0 -7
- package/lib/browser/SingleInstanceStateController.js +0 -7
- 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 +0 -7
- package/lib/browser/arrayContainsObject.js +0 -7
- package/lib/browser/canBeSerialized.js +0 -7
- package/lib/browser/decode.js +0 -7
- package/lib/browser/encode.js +0 -7
- package/lib/browser/equals.js +0 -9
- package/lib/browser/escape.js +0 -7
- package/lib/browser/isRevocableSession.js +0 -7
- package/lib/browser/parseDate.js +0 -7
- package/lib/browser/unique.js +0 -7
- package/lib/browser/unsavedChildren.js +0 -7
- package/lib/node/Analytics.js +0 -7
- package/lib/node/AnonymousUtils.js +0 -7
- package/lib/node/Cloud.js +0 -7
- 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 +0 -10
- package/lib/node/LiveQuerySubscription.js +0 -10
- 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/OfflineQuery.js +8 -0
- 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 +0 -7
- 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 +40 -29
- package/lib/node/ParseOp.js +0 -7
- package/lib/node/ParsePolygon.js +0 -7
- package/lib/node/ParseQuery.js +0 -7
- 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/react-native/CoreManager.js +2 -2
- package/lib/react-native/EventuallyQueue.js +169 -676
- package/lib/react-native/LiveQueryClient.js +3 -46
- 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 +24 -60
- 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 +263 -897
- 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/weapp/Analytics.js +0 -7
- package/lib/weapp/AnonymousUtils.js +0 -7
- package/lib/weapp/Cloud.js +0 -7
- package/lib/weapp/CoreManager.js +1 -8
- package/lib/weapp/EventEmitter.js +0 -7
- package/lib/weapp/FacebookUtils.js +0 -7
- package/lib/weapp/InstallationController.js +0 -7
- package/lib/weapp/LocalDatastoreUtils.js +0 -7
- package/lib/weapp/OfflineQuery.js +27 -8
- package/lib/weapp/Parse.js +0 -9
- package/lib/weapp/ParseACL.js +0 -7
- package/lib/weapp/ParseConfig.js +0 -7
- package/lib/weapp/ParseError.js +0 -9
- package/lib/weapp/ParseGeoPoint.js +0 -7
- package/lib/weapp/ParseObject.js +158 -126
- package/lib/weapp/ParsePolygon.js +0 -7
- package/lib/weapp/ParseRelation.js +0 -7
- package/lib/weapp/ParseSchema.js +0 -7
- package/lib/weapp/Push.js +0 -7
- package/lib/weapp/RESTController.js +0 -7
- package/lib/weapp/SingleInstanceStateController.js +0 -7
- 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 +0 -7
- package/lib/weapp/arrayContainsObject.js +0 -7
- package/lib/weapp/canBeSerialized.js +0 -7
- package/lib/weapp/decode.js +0 -7
- package/lib/weapp/encode.js +0 -7
- package/lib/weapp/equals.js +0 -9
- package/lib/weapp/escape.js +0 -7
- package/lib/weapp/isRevocableSession.js +0 -7
- package/lib/weapp/parseDate.js +0 -7
- package/lib/weapp/unique.js +0 -7
- package/lib/weapp/unsavedChildren.js +0 -7
- package/package.json +9 -9
- package/PATENTS +0 -37
package/lib/weapp/ParseObject.js
CHANGED
|
@@ -52,6 +52,8 @@ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable
|
|
|
52
52
|
|
|
53
53
|
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
54
54
|
|
|
55
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
56
|
+
|
|
55
57
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/define-property"));
|
|
56
58
|
|
|
57
59
|
var _create = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/create"));
|
|
@@ -231,12 +233,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
function _unsupportedIterableToArray(o, minLen) {
|
|
234
|
-
var
|
|
236
|
+
var _context21;
|
|
235
237
|
|
|
236
238
|
if (!o) return;
|
|
237
239
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
238
240
|
|
|
239
|
-
var n = _sliceInstanceProperty(
|
|
241
|
+
var n = _sliceInstanceProperty(_context21 = Object.prototype.toString.call(o)).call(_context21, 8, -1);
|
|
240
242
|
|
|
241
243
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
242
244
|
if (n === "Map" || n === "Set") return _Array$from(o);
|
|
@@ -368,9 +370,9 @@ function _regeneratorRuntime() {
|
|
|
368
370
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create2(IteratorPrototype);
|
|
369
371
|
|
|
370
372
|
function defineIteratorMethods(prototype) {
|
|
371
|
-
var
|
|
373
|
+
var _context19;
|
|
372
374
|
|
|
373
|
-
_forEachInstanceProperty2(
|
|
375
|
+
_forEachInstanceProperty2(_context19 = ["next", "throw", "return"]).call(_context19, function (method) {
|
|
374
376
|
define(prototype, method, function (arg) {
|
|
375
377
|
return this._invoke(method, arg);
|
|
376
378
|
});
|
|
@@ -518,9 +520,9 @@ function _regeneratorRuntime() {
|
|
|
518
520
|
}, exports.values = values, Context.prototype = {
|
|
519
521
|
constructor: Context,
|
|
520
522
|
reset: function (skipTempReset) {
|
|
521
|
-
var
|
|
523
|
+
var _context20;
|
|
522
524
|
|
|
523
|
-
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(
|
|
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) {
|
|
524
526
|
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);
|
|
525
527
|
}
|
|
526
528
|
},
|
|
@@ -627,12 +629,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
627
629
|
|
|
628
630
|
function _objectSpread(target) {
|
|
629
631
|
for (var i = 1; i < arguments.length; i++) {
|
|
630
|
-
var
|
|
632
|
+
var _context17, _context18;
|
|
631
633
|
|
|
632
634
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
633
|
-
i % 2 ? _forEachInstanceProperty2(
|
|
635
|
+
i % 2 ? _forEachInstanceProperty2(_context17 = ownKeys(Object(source), !0)).call(_context17, function (key) {
|
|
634
636
|
(0, _defineProperty3.default)(target, key, source[key]);
|
|
635
|
-
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(
|
|
637
|
+
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(_context18 = ownKeys(Object(source))).call(_context18, function (key) {
|
|
636
638
|
_Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key));
|
|
637
639
|
});
|
|
638
640
|
}
|
|
@@ -3303,8 +3305,6 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3303
3305
|
|
|
3304
3306
|
if (this.hasOwnProperty('__super__') && this.__super__) {
|
|
3305
3307
|
parentProto = this.prototype;
|
|
3306
|
-
} else if (classMap[adjustedClassName]) {
|
|
3307
|
-
parentProto = classMap[adjustedClassName].prototype;
|
|
3308
3308
|
}
|
|
3309
3309
|
|
|
3310
3310
|
var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
|
|
@@ -3315,6 +3315,22 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3315
3315
|
this.initialize.apply(this, arguments);
|
|
3316
3316
|
}
|
|
3317
3317
|
|
|
3318
|
+
if (this._initializers) {
|
|
3319
|
+
var _iterator2 = _createForOfIteratorHelper(this._initializers),
|
|
3320
|
+
_step2;
|
|
3321
|
+
|
|
3322
|
+
try {
|
|
3323
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
3324
|
+
var initializer = _step2.value;
|
|
3325
|
+
initializer.apply(this, arguments);
|
|
3326
|
+
}
|
|
3327
|
+
} catch (err) {
|
|
3328
|
+
_iterator2.e(err);
|
|
3329
|
+
} finally {
|
|
3330
|
+
_iterator2.f();
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3318
3334
|
if (attributes && (0, _typeof2.default)(attributes) === 'object') {
|
|
3319
3335
|
if (!this.set(attributes || {}, options)) {
|
|
3320
3336
|
throw new Error("Can't create an invalid Parse Object");
|
|
@@ -3322,19 +3338,44 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3322
3338
|
}
|
|
3323
3339
|
};
|
|
3324
3340
|
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3341
|
+
if (classMap[adjustedClassName]) {
|
|
3342
|
+
ParseObjectSubclass = classMap[adjustedClassName];
|
|
3343
|
+
} else {
|
|
3344
|
+
ParseObjectSubclass.extend = function (name, protoProps, classProps) {
|
|
3345
|
+
if (typeof name === 'string') {
|
|
3346
|
+
return ParseObject.extend.call(ParseObjectSubclass, name, protoProps, classProps);
|
|
3347
|
+
}
|
|
3348
|
+
|
|
3349
|
+
return ParseObject.extend.call(ParseObjectSubclass, adjustedClassName, name, protoProps);
|
|
3350
|
+
};
|
|
3351
|
+
|
|
3352
|
+
ParseObjectSubclass.createWithoutData = ParseObject.createWithoutData;
|
|
3353
|
+
ParseObjectSubclass.className = adjustedClassName;
|
|
3354
|
+
ParseObjectSubclass.__super__ = parentProto;
|
|
3355
|
+
ParseObjectSubclass.prototype = (0, _create.default)(parentProto, {
|
|
3356
|
+
constructor: {
|
|
3357
|
+
value: ParseObjectSubclass,
|
|
3358
|
+
enumerable: false,
|
|
3359
|
+
writable: true,
|
|
3360
|
+
configurable: true
|
|
3361
|
+
}
|
|
3362
|
+
});
|
|
3363
|
+
}
|
|
3335
3364
|
|
|
3336
3365
|
if (protoProps) {
|
|
3337
3366
|
for (var prop in protoProps) {
|
|
3367
|
+
if (prop === 'initialize') {
|
|
3368
|
+
var _context9;
|
|
3369
|
+
|
|
3370
|
+
(0, _defineProperty2.default)(ParseObjectSubclass.prototype, '_initializers', {
|
|
3371
|
+
value: (0, _concat.default)(_context9 = []).call(_context9, (0, _toConsumableArray2.default)(ParseObjectSubclass.prototype._initializers || []), [protoProps[prop]]),
|
|
3372
|
+
enumerable: false,
|
|
3373
|
+
writable: true,
|
|
3374
|
+
configurable: true
|
|
3375
|
+
});
|
|
3376
|
+
continue;
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3338
3379
|
if (prop !== 'className') {
|
|
3339
3380
|
(0, _defineProperty2.default)(ParseObjectSubclass.prototype, prop, {
|
|
3340
3381
|
value: protoProps[prop],
|
|
@@ -3359,15 +3400,6 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
3359
3400
|
}
|
|
3360
3401
|
}
|
|
3361
3402
|
|
|
3362
|
-
ParseObjectSubclass.extend = function (name, protoProps, classProps) {
|
|
3363
|
-
if (typeof name === 'string') {
|
|
3364
|
-
return ParseObject.extend.call(ParseObjectSubclass, name, protoProps, classProps);
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
return ParseObject.extend.call(ParseObjectSubclass, adjustedClassName, name, protoProps);
|
|
3368
|
-
};
|
|
3369
|
-
|
|
3370
|
-
ParseObjectSubclass.createWithoutData = ParseObject.createWithoutData;
|
|
3371
3403
|
classMap[adjustedClassName] = ParseObjectSubclass;
|
|
3372
3404
|
return ParseObjectSubclass;
|
|
3373
3405
|
}
|
|
@@ -3648,11 +3680,11 @@ var DefaultController = {
|
|
|
3648
3680
|
query._limit = ids.length;
|
|
3649
3681
|
return (0, _find.default)(query).call(query, options).then( /*#__PURE__*/function () {
|
|
3650
3682
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
|
|
3651
|
-
var idMap, i, obj, _i, _obj, id,
|
|
3683
|
+
var idMap, i, obj, _i, _obj, id, _iterator3, _step3, object;
|
|
3652
3684
|
|
|
3653
|
-
return _regeneratorRuntime().wrap(function _callee6$(
|
|
3685
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context10) {
|
|
3654
3686
|
while (1) {
|
|
3655
|
-
switch (
|
|
3687
|
+
switch (_context10.prev = _context10.next) {
|
|
3656
3688
|
case 0:
|
|
3657
3689
|
idMap = {};
|
|
3658
3690
|
(0, _forEach.default)(objects).call(objects, function (o) {
|
|
@@ -3662,27 +3694,27 @@ var DefaultController = {
|
|
|
3662
3694
|
|
|
3663
3695
|
case 3:
|
|
3664
3696
|
if (!(i < objs.length)) {
|
|
3665
|
-
|
|
3697
|
+
_context10.next = 11;
|
|
3666
3698
|
break;
|
|
3667
3699
|
}
|
|
3668
3700
|
|
|
3669
3701
|
obj = objs[i];
|
|
3670
3702
|
|
|
3671
3703
|
if (!(!obj || !obj.id || !idMap[obj.id])) {
|
|
3672
|
-
|
|
3704
|
+
_context10.next = 8;
|
|
3673
3705
|
break;
|
|
3674
3706
|
}
|
|
3675
3707
|
|
|
3676
3708
|
if (!forceFetch) {
|
|
3677
|
-
|
|
3709
|
+
_context10.next = 8;
|
|
3678
3710
|
break;
|
|
3679
3711
|
}
|
|
3680
3712
|
|
|
3681
|
-
return
|
|
3713
|
+
return _context10.abrupt("return", _promise.default.reject(new _ParseError.default(_ParseError.default.OBJECT_NOT_FOUND, 'All objects must exist on the server.')));
|
|
3682
3714
|
|
|
3683
3715
|
case 8:
|
|
3684
3716
|
i++;
|
|
3685
|
-
|
|
3717
|
+
_context10.next = 3;
|
|
3686
3718
|
break;
|
|
3687
3719
|
|
|
3688
3720
|
case 11:
|
|
@@ -3701,48 +3733,48 @@ var DefaultController = {
|
|
|
3701
3733
|
}
|
|
3702
3734
|
}
|
|
3703
3735
|
|
|
3704
|
-
|
|
3705
|
-
|
|
3736
|
+
_iterator3 = _createForOfIteratorHelper(results);
|
|
3737
|
+
_context10.prev = 13;
|
|
3706
3738
|
|
|
3707
|
-
|
|
3739
|
+
_iterator3.s();
|
|
3708
3740
|
|
|
3709
3741
|
case 15:
|
|
3710
|
-
if ((
|
|
3711
|
-
|
|
3742
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
3743
|
+
_context10.next = 21;
|
|
3712
3744
|
break;
|
|
3713
3745
|
}
|
|
3714
3746
|
|
|
3715
|
-
object =
|
|
3716
|
-
|
|
3747
|
+
object = _step3.value;
|
|
3748
|
+
_context10.next = 19;
|
|
3717
3749
|
return localDatastore._updateObjectIfPinned(object);
|
|
3718
3750
|
|
|
3719
3751
|
case 19:
|
|
3720
|
-
|
|
3752
|
+
_context10.next = 15;
|
|
3721
3753
|
break;
|
|
3722
3754
|
|
|
3723
3755
|
case 21:
|
|
3724
|
-
|
|
3756
|
+
_context10.next = 26;
|
|
3725
3757
|
break;
|
|
3726
3758
|
|
|
3727
3759
|
case 23:
|
|
3728
|
-
|
|
3729
|
-
|
|
3760
|
+
_context10.prev = 23;
|
|
3761
|
+
_context10.t0 = _context10["catch"](13);
|
|
3730
3762
|
|
|
3731
|
-
|
|
3763
|
+
_iterator3.e(_context10.t0);
|
|
3732
3764
|
|
|
3733
3765
|
case 26:
|
|
3734
|
-
|
|
3766
|
+
_context10.prev = 26;
|
|
3735
3767
|
|
|
3736
|
-
|
|
3768
|
+
_iterator3.f();
|
|
3737
3769
|
|
|
3738
|
-
return
|
|
3770
|
+
return _context10.finish(26);
|
|
3739
3771
|
|
|
3740
3772
|
case 29:
|
|
3741
|
-
return
|
|
3773
|
+
return _context10.abrupt("return", _promise.default.resolve(results));
|
|
3742
3774
|
|
|
3743
3775
|
case 30:
|
|
3744
3776
|
case "end":
|
|
3745
|
-
return
|
|
3777
|
+
return _context10.stop();
|
|
3746
3778
|
}
|
|
3747
3779
|
}
|
|
3748
3780
|
}, _callee6, null, [[13, 23, 26, 29]]);
|
|
@@ -3767,9 +3799,9 @@ var DefaultController = {
|
|
|
3767
3799
|
|
|
3768
3800
|
return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
|
|
3769
3801
|
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
|
|
3770
|
-
return _regeneratorRuntime().wrap(function _callee7$(
|
|
3802
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context11) {
|
|
3771
3803
|
while (1) {
|
|
3772
|
-
switch (
|
|
3804
|
+
switch (_context11.prev = _context11.next) {
|
|
3773
3805
|
case 0:
|
|
3774
3806
|
target._clearPendingOps();
|
|
3775
3807
|
|
|
@@ -3777,15 +3809,15 @@ var DefaultController = {
|
|
|
3777
3809
|
|
|
3778
3810
|
target._finishFetch(response);
|
|
3779
3811
|
|
|
3780
|
-
|
|
3812
|
+
_context11.next = 5;
|
|
3781
3813
|
return localDatastore._updateObjectIfPinned(target);
|
|
3782
3814
|
|
|
3783
3815
|
case 5:
|
|
3784
|
-
return
|
|
3816
|
+
return _context11.abrupt("return", target);
|
|
3785
3817
|
|
|
3786
3818
|
case 6:
|
|
3787
3819
|
case "end":
|
|
3788
|
-
return
|
|
3820
|
+
return _context11.stop();
|
|
3789
3821
|
}
|
|
3790
3822
|
}
|
|
3791
3823
|
}, _callee7);
|
|
@@ -3808,25 +3840,25 @@ var DefaultController = {
|
|
|
3808
3840
|
{
|
|
3809
3841
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
3810
3842
|
var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
|
|
3811
|
-
return _regeneratorRuntime().wrap(function _callee10$(
|
|
3843
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context14) {
|
|
3812
3844
|
while (1) {
|
|
3813
|
-
switch (
|
|
3845
|
+
switch (_context14.prev = _context14.next) {
|
|
3814
3846
|
case 0:
|
|
3815
3847
|
batchSize = options && options.batchSize ? options.batchSize : _CoreManager.default.get('REQUEST_BATCH_SIZE');
|
|
3816
3848
|
localDatastore = _CoreManager.default.getLocalDatastore();
|
|
3817
3849
|
RESTController = _CoreManager.default.getRESTController();
|
|
3818
3850
|
|
|
3819
3851
|
if (!(0, _isArray.default)(target)) {
|
|
3820
|
-
|
|
3852
|
+
_context14.next = 15;
|
|
3821
3853
|
break;
|
|
3822
3854
|
}
|
|
3823
3855
|
|
|
3824
3856
|
if (!(target.length < 1)) {
|
|
3825
|
-
|
|
3857
|
+
_context14.next = 6;
|
|
3826
3858
|
break;
|
|
3827
3859
|
}
|
|
3828
3860
|
|
|
3829
|
-
return
|
|
3861
|
+
return _context14.abrupt("return", _promise.default.resolve([]));
|
|
3830
3862
|
|
|
3831
3863
|
case 6:
|
|
3832
3864
|
batches = [[]];
|
|
@@ -3870,65 +3902,65 @@ var DefaultController = {
|
|
|
3870
3902
|
});
|
|
3871
3903
|
});
|
|
3872
3904
|
});
|
|
3873
|
-
return
|
|
3874
|
-
var aggregate,
|
|
3905
|
+
return _context14.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
3906
|
+
var aggregate, _iterator4, _step4, object;
|
|
3875
3907
|
|
|
3876
|
-
return _regeneratorRuntime().wrap(function _callee8$(
|
|
3908
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context12) {
|
|
3877
3909
|
while (1) {
|
|
3878
|
-
switch (
|
|
3910
|
+
switch (_context12.prev = _context12.next) {
|
|
3879
3911
|
case 0:
|
|
3880
3912
|
if (!errors.length) {
|
|
3881
|
-
|
|
3913
|
+
_context12.next = 4;
|
|
3882
3914
|
break;
|
|
3883
3915
|
}
|
|
3884
3916
|
|
|
3885
3917
|
aggregate = new _ParseError.default(_ParseError.default.AGGREGATE_ERROR);
|
|
3886
3918
|
aggregate.errors = errors;
|
|
3887
|
-
return
|
|
3919
|
+
return _context12.abrupt("return", _promise.default.reject(aggregate));
|
|
3888
3920
|
|
|
3889
3921
|
case 4:
|
|
3890
|
-
|
|
3891
|
-
|
|
3922
|
+
_iterator4 = _createForOfIteratorHelper(target);
|
|
3923
|
+
_context12.prev = 5;
|
|
3892
3924
|
|
|
3893
|
-
|
|
3925
|
+
_iterator4.s();
|
|
3894
3926
|
|
|
3895
3927
|
case 7:
|
|
3896
|
-
if ((
|
|
3897
|
-
|
|
3928
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
3929
|
+
_context12.next = 13;
|
|
3898
3930
|
break;
|
|
3899
3931
|
}
|
|
3900
3932
|
|
|
3901
|
-
object =
|
|
3902
|
-
|
|
3933
|
+
object = _step4.value;
|
|
3934
|
+
_context12.next = 11;
|
|
3903
3935
|
return localDatastore._destroyObjectIfPinned(object);
|
|
3904
3936
|
|
|
3905
3937
|
case 11:
|
|
3906
|
-
|
|
3938
|
+
_context12.next = 7;
|
|
3907
3939
|
break;
|
|
3908
3940
|
|
|
3909
3941
|
case 13:
|
|
3910
|
-
|
|
3942
|
+
_context12.next = 18;
|
|
3911
3943
|
break;
|
|
3912
3944
|
|
|
3913
3945
|
case 15:
|
|
3914
|
-
|
|
3915
|
-
|
|
3946
|
+
_context12.prev = 15;
|
|
3947
|
+
_context12.t0 = _context12["catch"](5);
|
|
3916
3948
|
|
|
3917
|
-
|
|
3949
|
+
_iterator4.e(_context12.t0);
|
|
3918
3950
|
|
|
3919
3951
|
case 18:
|
|
3920
|
-
|
|
3952
|
+
_context12.prev = 18;
|
|
3921
3953
|
|
|
3922
|
-
|
|
3954
|
+
_iterator4.f();
|
|
3923
3955
|
|
|
3924
|
-
return
|
|
3956
|
+
return _context12.finish(18);
|
|
3925
3957
|
|
|
3926
3958
|
case 21:
|
|
3927
|
-
return
|
|
3959
|
+
return _context12.abrupt("return", _promise.default.resolve(target));
|
|
3928
3960
|
|
|
3929
3961
|
case 22:
|
|
3930
3962
|
case "end":
|
|
3931
|
-
return
|
|
3963
|
+
return _context12.stop();
|
|
3932
3964
|
}
|
|
3933
3965
|
}
|
|
3934
3966
|
}, _callee8, null, [[5, 15, 18, 21]]);
|
|
@@ -3936,35 +3968,35 @@ var DefaultController = {
|
|
|
3936
3968
|
|
|
3937
3969
|
case 15:
|
|
3938
3970
|
if (!(target instanceof ParseObject)) {
|
|
3939
|
-
|
|
3971
|
+
_context14.next = 17;
|
|
3940
3972
|
break;
|
|
3941
3973
|
}
|
|
3942
3974
|
|
|
3943
|
-
return
|
|
3944
|
-
return _regeneratorRuntime().wrap(function _callee9$(
|
|
3975
|
+
return _context14.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
3976
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context13) {
|
|
3945
3977
|
while (1) {
|
|
3946
|
-
switch (
|
|
3978
|
+
switch (_context13.prev = _context13.next) {
|
|
3947
3979
|
case 0:
|
|
3948
|
-
|
|
3980
|
+
_context13.next = 2;
|
|
3949
3981
|
return localDatastore._destroyObjectIfPinned(target);
|
|
3950
3982
|
|
|
3951
3983
|
case 2:
|
|
3952
|
-
return
|
|
3984
|
+
return _context13.abrupt("return", _promise.default.resolve(target));
|
|
3953
3985
|
|
|
3954
3986
|
case 3:
|
|
3955
3987
|
case "end":
|
|
3956
|
-
return
|
|
3988
|
+
return _context13.stop();
|
|
3957
3989
|
}
|
|
3958
3990
|
}
|
|
3959
3991
|
}, _callee9);
|
|
3960
3992
|
}))));
|
|
3961
3993
|
|
|
3962
3994
|
case 17:
|
|
3963
|
-
return
|
|
3995
|
+
return _context14.abrupt("return", _promise.default.resolve(target));
|
|
3964
3996
|
|
|
3965
3997
|
case 18:
|
|
3966
3998
|
case "end":
|
|
3967
|
-
return
|
|
3999
|
+
return _context14.stop();
|
|
3968
4000
|
}
|
|
3969
4001
|
}
|
|
3970
4002
|
}, _callee10);
|
|
@@ -4091,66 +4123,66 @@ var DefaultController = {
|
|
|
4091
4123
|
});
|
|
4092
4124
|
return (0, _promiseUtils.when)(batchTasks);
|
|
4093
4125
|
}).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
4094
|
-
var
|
|
4126
|
+
var _iterator5, _step5, object;
|
|
4095
4127
|
|
|
4096
|
-
return _regeneratorRuntime().wrap(function _callee11$(
|
|
4128
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context15) {
|
|
4097
4129
|
while (1) {
|
|
4098
|
-
switch (
|
|
4130
|
+
switch (_context15.prev = _context15.next) {
|
|
4099
4131
|
case 0:
|
|
4100
4132
|
if (!objectError) {
|
|
4101
|
-
|
|
4133
|
+
_context15.next = 2;
|
|
4102
4134
|
break;
|
|
4103
4135
|
}
|
|
4104
4136
|
|
|
4105
|
-
return
|
|
4137
|
+
return _context15.abrupt("return", _promise.default.reject(objectError));
|
|
4106
4138
|
|
|
4107
4139
|
case 2:
|
|
4108
|
-
|
|
4109
|
-
|
|
4140
|
+
_iterator5 = _createForOfIteratorHelper(target);
|
|
4141
|
+
_context15.prev = 3;
|
|
4110
4142
|
|
|
4111
|
-
|
|
4143
|
+
_iterator5.s();
|
|
4112
4144
|
|
|
4113
4145
|
case 5:
|
|
4114
|
-
if ((
|
|
4115
|
-
|
|
4146
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
4147
|
+
_context15.next = 13;
|
|
4116
4148
|
break;
|
|
4117
4149
|
}
|
|
4118
4150
|
|
|
4119
|
-
object =
|
|
4120
|
-
|
|
4151
|
+
object = _step5.value;
|
|
4152
|
+
_context15.next = 9;
|
|
4121
4153
|
return localDatastore._updateLocalIdForObject(mapIdForPin[object.id], object);
|
|
4122
4154
|
|
|
4123
4155
|
case 9:
|
|
4124
|
-
|
|
4156
|
+
_context15.next = 11;
|
|
4125
4157
|
return localDatastore._updateObjectIfPinned(object);
|
|
4126
4158
|
|
|
4127
4159
|
case 11:
|
|
4128
|
-
|
|
4160
|
+
_context15.next = 5;
|
|
4129
4161
|
break;
|
|
4130
4162
|
|
|
4131
4163
|
case 13:
|
|
4132
|
-
|
|
4164
|
+
_context15.next = 18;
|
|
4133
4165
|
break;
|
|
4134
4166
|
|
|
4135
4167
|
case 15:
|
|
4136
|
-
|
|
4137
|
-
|
|
4168
|
+
_context15.prev = 15;
|
|
4169
|
+
_context15.t0 = _context15["catch"](3);
|
|
4138
4170
|
|
|
4139
|
-
|
|
4171
|
+
_iterator5.e(_context15.t0);
|
|
4140
4172
|
|
|
4141
4173
|
case 18:
|
|
4142
|
-
|
|
4174
|
+
_context15.prev = 18;
|
|
4143
4175
|
|
|
4144
|
-
|
|
4176
|
+
_iterator5.f();
|
|
4145
4177
|
|
|
4146
|
-
return
|
|
4178
|
+
return _context15.finish(18);
|
|
4147
4179
|
|
|
4148
4180
|
case 21:
|
|
4149
|
-
return
|
|
4181
|
+
return _context15.abrupt("return", _promise.default.resolve(target));
|
|
4150
4182
|
|
|
4151
4183
|
case 22:
|
|
4152
4184
|
case "end":
|
|
4153
|
-
return
|
|
4185
|
+
return _context15.stop();
|
|
4154
4186
|
}
|
|
4155
4187
|
}
|
|
4156
4188
|
}, _callee11, null, [[3, 15, 18, 21]]);
|
|
@@ -4185,23 +4217,23 @@ var DefaultController = {
|
|
|
4185
4217
|
|
|
4186
4218
|
stateController.pushPendingState(target._getStateIdentifier());
|
|
4187
4219
|
return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
4188
|
-
return _regeneratorRuntime().wrap(function _callee12$(
|
|
4220
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context16) {
|
|
4189
4221
|
while (1) {
|
|
4190
|
-
switch (
|
|
4222
|
+
switch (_context16.prev = _context16.next) {
|
|
4191
4223
|
case 0:
|
|
4192
|
-
|
|
4224
|
+
_context16.next = 2;
|
|
4193
4225
|
return localDatastore._updateLocalIdForObject(localId, target);
|
|
4194
4226
|
|
|
4195
4227
|
case 2:
|
|
4196
|
-
|
|
4228
|
+
_context16.next = 4;
|
|
4197
4229
|
return localDatastore._updateObjectIfPinned(target);
|
|
4198
4230
|
|
|
4199
4231
|
case 4:
|
|
4200
|
-
return
|
|
4232
|
+
return _context16.abrupt("return", target);
|
|
4201
4233
|
|
|
4202
4234
|
case 5:
|
|
4203
4235
|
case "end":
|
|
4204
|
-
return
|
|
4236
|
+
return _context16.stop();
|
|
4205
4237
|
}
|
|
4206
4238
|
}
|
|
4207
4239
|
}, _callee12);
|
|
@@ -20,13 +20,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
|
|
|
20
20
|
|
|
21
21
|
var _ParseGeoPoint = _interopRequireDefault(require("./ParseGeoPoint"));
|
|
22
22
|
/**
|
|
23
|
-
* Copyright (c) 2015-present, Parse, LLC.
|
|
24
|
-
* All rights reserved.
|
|
25
|
-
*
|
|
26
|
-
* This source code is licensed under the BSD-style license found in the
|
|
27
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
28
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
29
|
-
*
|
|
30
23
|
* @flow
|
|
31
24
|
*/
|
|
32
25
|
|
|
@@ -24,13 +24,6 @@ var _ParseObject = _interopRequireDefault(require("./ParseObject"));
|
|
|
24
24
|
|
|
25
25
|
var _ParseQuery = _interopRequireDefault(require("./ParseQuery"));
|
|
26
26
|
/**
|
|
27
|
-
* Copyright (c) 2015-present, Parse, LLC.
|
|
28
|
-
* All rights reserved.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the BSD-style license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
32
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
33
|
-
*
|
|
34
27
|
* @flow
|
|
35
28
|
*/
|
|
36
29
|
|
package/lib/weapp/ParseSchema.js
CHANGED
|
@@ -24,13 +24,6 @@ var _ParseObject = _interopRequireDefault(require("./ParseObject"));
|
|
|
24
24
|
|
|
25
25
|
var _ParseCLP = _interopRequireDefault(require("./ParseCLP"));
|
|
26
26
|
/**
|
|
27
|
-
* Copyright (c) 2015-present, Parse, LLC.
|
|
28
|
-
* All rights reserved.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the BSD-style license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
32
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
33
|
-
*
|
|
34
27
|
* @flow
|
|
35
28
|
*/
|
|
36
29
|
|
package/lib/weapp/Push.js
CHANGED
|
@@ -17,13 +17,6 @@ var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
|
17
17
|
|
|
18
18
|
var _ParseQuery = _interopRequireDefault(require("./ParseQuery"));
|
|
19
19
|
/**
|
|
20
|
-
* Copyright (c) 2015-present, Parse, LLC.
|
|
21
|
-
* All rights reserved.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the BSD-style license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
25
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
26
|
-
*
|
|
27
20
|
* @flow
|
|
28
21
|
*/
|
|
29
22
|
|
|
@@ -65,13 +65,6 @@ function _objectSpread(target) {
|
|
|
65
65
|
return target;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Copyright (c) 2015-present, Parse, LLC.
|
|
69
|
-
* All rights reserved.
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the BSD-style license found in the
|
|
72
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
73
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
74
|
-
*
|
|
75
68
|
* @flow
|
|
76
69
|
*/
|
|
77
70
|
|