parse 4.2.0-alpha.3 → 4.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +293 -206
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +292 -205
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +11 -3
- package/lib/browser/EventuallyQueue.js +8 -1
- package/lib/browser/LocalDatastore.js +7 -0
- package/lib/browser/Parse.js +167 -135
- package/lib/browser/ParseQuery.js +53 -58
- package/lib/browser/ParseSession.js +2 -6
- package/lib/browser/ParseUser.js +36 -1
- package/lib/browser/Storage.js +7 -0
- package/lib/node/CoreManager.js +10 -3
- package/lib/node/EventuallyQueue.js +7 -1
- package/lib/node/LocalDatastore.js +6 -0
- package/lib/node/Parse.js +158 -126
- package/lib/node/ParseQuery.js +3 -6
- package/lib/node/ParseSession.js +1 -6
- package/lib/node/ParseUser.js +34 -1
- package/lib/node/Storage.js +6 -0
- package/lib/react-native/CoreManager.js +10 -3
- package/lib/react-native/EventuallyQueue.js +7 -1
- package/lib/react-native/LocalDatastore.js +6 -0
- package/lib/react-native/Parse.js +123 -90
- package/lib/react-native/ParseQuery.js +3 -6
- package/lib/react-native/ParseUser.js +22 -1
- package/lib/react-native/Storage.js +6 -0
- package/lib/weapp/CoreManager.js +11 -3
- package/lib/weapp/EventuallyQueue.js +8 -1
- package/lib/weapp/LocalDatastore.js +7 -0
- package/lib/weapp/Parse.js +166 -134
- package/lib/weapp/ParseQuery.js +53 -58
- package/lib/weapp/ParseSession.js +2 -6
- package/lib/weapp/ParseUser.js +36 -1
- package/lib/weapp/Storage.js +7 -0
- package/package.json +11 -7
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v4.2.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v4.2.0-alpha.5
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -351,7 +351,12 @@ _CoreManager.default.setCloudController(DefaultController);
|
|
|
351
351
|
(function (process){(function (){
|
|
352
352
|
"use strict";
|
|
353
353
|
|
|
354
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
354
355
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
356
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
357
|
+
value: true
|
|
358
|
+
});
|
|
359
|
+
exports.default = void 0;
|
|
355
360
|
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
356
361
|
var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
357
362
|
/*
|
|
@@ -533,7 +538,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
533
538
|
SERVER_AUTH_TOKEN: null,
|
|
534
539
|
LIVEQUERY_SERVER_URL: null,
|
|
535
540
|
ENCRYPTED_KEY: null,
|
|
536
|
-
VERSION: 'js' + "4.2.0-alpha.
|
|
541
|
+
VERSION: 'js' + "4.2.0-alpha.5",
|
|
537
542
|
APPLICATION_ID: null,
|
|
538
543
|
JAVASCRIPT_KEY: null,
|
|
539
544
|
MASTER_KEY: null,
|
|
@@ -552,7 +557,7 @@ function requireMethods(name /*: string*/, methods /*: Array<string>*/, controll
|
|
|
552
557
|
}
|
|
553
558
|
});
|
|
554
559
|
}
|
|
555
|
-
|
|
560
|
+
var CoreManager = {
|
|
556
561
|
get: function (key /*: string*/) /*: any*/{
|
|
557
562
|
if (config.hasOwnProperty(key)) {
|
|
558
563
|
return config[key];
|
|
@@ -711,8 +716,11 @@ module.exports = {
|
|
|
711
716
|
return config['HooksController'];
|
|
712
717
|
}
|
|
713
718
|
};
|
|
719
|
+
module.exports = CoreManager;
|
|
720
|
+
var _default = CoreManager;
|
|
721
|
+
exports.default = _default;
|
|
714
722
|
}).call(this)}).call(this,_dereq_('_process'))
|
|
715
|
-
},{"@babel/runtime-corejs3/core-js-stable/instance/concat":58,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"_process":129}],5:[function(_dereq_,module,exports){
|
|
723
|
+
},{"@babel/runtime-corejs3/core-js-stable/instance/concat":58,"@babel/runtime-corejs3/core-js-stable/instance/for-each":64,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"_process":129}],5:[function(_dereq_,module,exports){
|
|
716
724
|
"use strict";
|
|
717
725
|
|
|
718
726
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
@@ -744,7 +752,12 @@ var EventEmitter;
|
|
|
744
752
|
},{"events":619}],7:[function(_dereq_,module,exports){
|
|
745
753
|
"use strict";
|
|
746
754
|
|
|
755
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
747
756
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
757
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
758
|
+
value: true
|
|
759
|
+
});
|
|
760
|
+
exports.default = void 0;
|
|
748
761
|
var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
749
762
|
var _splice = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
750
763
|
var _findIndex = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
|
|
@@ -1294,7 +1307,9 @@ var EventuallyQueue = {
|
|
|
1294
1307
|
}
|
|
1295
1308
|
};
|
|
1296
1309
|
module.exports = EventuallyQueue;
|
|
1297
|
-
|
|
1310
|
+
var _default = EventuallyQueue;
|
|
1311
|
+
exports.default = _default;
|
|
1312
|
+
},{"./CoreManager":4,"./ParseObject":27,"./ParseQuery":30,"./Storage":39,"@babel/runtime-corejs3/core-js-stable/instance/find":63,"@babel/runtime-corejs3/core-js-stable/instance/find-index":62,"@babel/runtime-corejs3/core-js-stable/instance/splice":72,"@babel/runtime-corejs3/core-js-stable/json/stringify":75,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/set-interval":92,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/toConsumableArray":122,"@babel/runtime-corejs3/regenerator":128}],8:[function(_dereq_,module,exports){
|
|
1298
1313
|
"use strict";
|
|
1299
1314
|
|
|
1300
1315
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -2441,7 +2456,12 @@ var _Array$from2 = _dereq_("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
|
2441
2456
|
var _Symbol = _dereq_("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
2442
2457
|
var _getIteratorMethod = _dereq_("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
2443
2458
|
var _Array$isArray2 = _dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
2459
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
2444
2460
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
2461
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
2462
|
+
value: true
|
|
2463
|
+
});
|
|
2464
|
+
exports.default = void 0;
|
|
2445
2465
|
var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
|
|
2446
2466
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
2447
2467
|
var _set = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/set"));
|
|
@@ -3135,9 +3155,11 @@ var LocalDatastore = {
|
|
|
3135
3155
|
}
|
|
3136
3156
|
};
|
|
3137
3157
|
module.exports = LocalDatastore;
|
|
3158
|
+
var _default = LocalDatastore;
|
|
3159
|
+
exports.default = _default;
|
|
3138
3160
|
_CoreManager.default.setLocalDatastoreController(_dereq_('./LocalDatastoreController'));
|
|
3139
3161
|
_CoreManager.default.setLocalDatastore(LocalDatastore);
|
|
3140
|
-
},{"./CoreManager":4,"./LocalDatastoreController":14,"./LocalDatastoreUtils":15,"./ParseQuery":30,"@babel/runtime-corejs3/core-js-stable/array/from":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":56,"@babel/runtime-corejs3/core-js-stable/instance/concat":58,"@babel/runtime-corejs3/core-js-stable/instance/filter":61,"@babel/runtime-corejs3/core-js-stable/instance/find":63,"@babel/runtime-corejs3/core-js-stable/instance/includes":65,"@babel/runtime-corejs3/core-js-stable/instance/keys":67,"@babel/runtime-corejs3/core-js-stable/instance/map":68,"@babel/runtime-corejs3/core-js-stable/instance/slice":70,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":73,"@babel/runtime-corejs3/core-js-stable/object/keys":88,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/core-js-stable/set":94,"@babel/runtime-corejs3/core-js-stable/symbol":95,"@babel/runtime-corejs3/core-js/get-iterator-method":97,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/slicedToArray":120,"@babel/runtime-corejs3/helpers/toConsumableArray":122,"@babel/runtime-corejs3/regenerator":128}],14:[function(_dereq_,module,exports){
|
|
3162
|
+
},{"./CoreManager":4,"./LocalDatastoreController":14,"./LocalDatastoreUtils":15,"./ParseQuery":30,"@babel/runtime-corejs3/core-js-stable/array/from":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":56,"@babel/runtime-corejs3/core-js-stable/instance/concat":58,"@babel/runtime-corejs3/core-js-stable/instance/filter":61,"@babel/runtime-corejs3/core-js-stable/instance/find":63,"@babel/runtime-corejs3/core-js-stable/instance/includes":65,"@babel/runtime-corejs3/core-js-stable/instance/keys":67,"@babel/runtime-corejs3/core-js-stable/instance/map":68,"@babel/runtime-corejs3/core-js-stable/instance/slice":70,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":73,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/object/keys":88,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/core-js-stable/set":94,"@babel/runtime-corejs3/core-js-stable/symbol":95,"@babel/runtime-corejs3/core-js/get-iterator-method":97,"@babel/runtime-corejs3/helpers/asyncToGenerator":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/slicedToArray":120,"@babel/runtime-corejs3/helpers/toConsumableArray":122,"@babel/runtime-corejs3/regenerator":128}],14:[function(_dereq_,module,exports){
|
|
3141
3163
|
"use strict";
|
|
3142
3164
|
|
|
3143
3165
|
var _sliceInstanceProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
@@ -4266,15 +4288,43 @@ var _WeakMap = _dereq_("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
|
4266
4288
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4267
4289
|
var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4268
4290
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4291
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
4292
|
+
value: true
|
|
4293
|
+
});
|
|
4294
|
+
exports.default = void 0;
|
|
4269
4295
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
4270
|
-
var
|
|
4271
|
-
var
|
|
4272
|
-
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
4296
|
+
var _decode2 = _interopRequireDefault(_dereq_("./decode"));
|
|
4297
|
+
var _encode2 = _interopRequireDefault(_dereq_("./encode"));
|
|
4273
4298
|
var _CryptoController = _interopRequireDefault(_dereq_("./CryptoController"));
|
|
4274
4299
|
var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
|
|
4275
4300
|
var _InstallationController = _interopRequireDefault(_dereq_("./InstallationController"));
|
|
4276
4301
|
var ParseOp = _interopRequireWildcard(_dereq_("./ParseOp"));
|
|
4277
4302
|
var _RESTController = _interopRequireDefault(_dereq_("./RESTController"));
|
|
4303
|
+
var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
|
|
4304
|
+
var Analytics = _interopRequireWildcard(_dereq_("./Analytics"));
|
|
4305
|
+
var _AnonymousUtils = _interopRequireDefault(_dereq_("./AnonymousUtils"));
|
|
4306
|
+
var Cloud = _interopRequireWildcard(_dereq_("./Cloud"));
|
|
4307
|
+
var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
|
|
4308
|
+
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
4309
|
+
var _ParseConfig = _interopRequireDefault(_dereq_("./ParseConfig"));
|
|
4310
|
+
var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
|
|
4311
|
+
var _FacebookUtils = _interopRequireDefault(_dereq_("./FacebookUtils"));
|
|
4312
|
+
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
4313
|
+
var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
|
|
4314
|
+
var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
|
|
4315
|
+
var _ParseInstallation = _interopRequireDefault(_dereq_("./ParseInstallation"));
|
|
4316
|
+
var _LocalDatastore = _interopRequireDefault(_dereq_("./LocalDatastore"));
|
|
4317
|
+
var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
4318
|
+
var Push = _interopRequireWildcard(_dereq_("./Push"));
|
|
4319
|
+
var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
|
|
4320
|
+
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
4321
|
+
var _ParseRole = _interopRequireDefault(_dereq_("./ParseRole"));
|
|
4322
|
+
var _ParseSchema = _interopRequireDefault(_dereq_("./ParseSchema"));
|
|
4323
|
+
var _ParseSession = _interopRequireDefault(_dereq_("./ParseSession"));
|
|
4324
|
+
var _Storage = _interopRequireDefault(_dereq_("./Storage"));
|
|
4325
|
+
var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
|
|
4326
|
+
var _ParseLiveQuery = _interopRequireDefault(_dereq_("./ParseLiveQuery"));
|
|
4327
|
+
var _LiveQueryClient = _interopRequireDefault(_dereq_("./LiveQueryClient"));
|
|
4278
4328
|
function _getRequireWildcardCache(nodeInterop) {
|
|
4279
4329
|
if (typeof _WeakMap !== "function") return null;
|
|
4280
4330
|
var cacheBabelInterop = new _WeakMap();
|
|
@@ -4320,8 +4370,47 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
4320
4370
|
* @global
|
|
4321
4371
|
* @class
|
|
4322
4372
|
* @hideconstructor
|
|
4323
|
-
|
|
4324
|
-
|
|
4373
|
+
*/
|
|
4374
|
+
|
|
4375
|
+
var Parse /*: ParseType*/ = {
|
|
4376
|
+
ACL: _ParseACL.default,
|
|
4377
|
+
Analytics: Analytics,
|
|
4378
|
+
AnonymousUtils: _AnonymousUtils.default,
|
|
4379
|
+
Cloud: Cloud,
|
|
4380
|
+
CLP: _ParseCLP.default,
|
|
4381
|
+
CoreManager: _CoreManager.default,
|
|
4382
|
+
Config: _ParseConfig.default,
|
|
4383
|
+
Error: _ParseError.default,
|
|
4384
|
+
EventuallyQueue: _EventuallyQueue.default,
|
|
4385
|
+
FacebookUtils: _FacebookUtils.default,
|
|
4386
|
+
File: _ParseFile.default,
|
|
4387
|
+
GeoPoint: _ParseGeoPoint.default,
|
|
4388
|
+
Polygon: _ParsePolygon.default,
|
|
4389
|
+
Installation: _ParseInstallation.default,
|
|
4390
|
+
LocalDatastore: _LocalDatastore.default,
|
|
4391
|
+
Object: _ParseObject.default,
|
|
4392
|
+
Op: {
|
|
4393
|
+
Set: ParseOp.SetOp,
|
|
4394
|
+
Unset: ParseOp.UnsetOp,
|
|
4395
|
+
Increment: ParseOp.IncrementOp,
|
|
4396
|
+
Add: ParseOp.AddOp,
|
|
4397
|
+
Remove: ParseOp.RemoveOp,
|
|
4398
|
+
AddUnique: ParseOp.AddUniqueOp,
|
|
4399
|
+
Relation: ParseOp.RelationOp
|
|
4400
|
+
},
|
|
4401
|
+
Push: Push,
|
|
4402
|
+
Query: _ParseQuery.default,
|
|
4403
|
+
Relation: _ParseRelation.default,
|
|
4404
|
+
Role: _ParseRole.default,
|
|
4405
|
+
Schema: _ParseSchema.default,
|
|
4406
|
+
Session: _ParseSession.default,
|
|
4407
|
+
Storage: _Storage.default,
|
|
4408
|
+
User: _ParseUser.default,
|
|
4409
|
+
LiveQuery: _ParseLiveQuery.default,
|
|
4410
|
+
LiveQueryClient: _LiveQueryClient.default,
|
|
4411
|
+
IndexedDB: undefined,
|
|
4412
|
+
Hooks: undefined,
|
|
4413
|
+
Parse: undefined,
|
|
4325
4414
|
/**
|
|
4326
4415
|
* Call this method first to set up your authentication tokens for Parse.
|
|
4327
4416
|
*
|
|
@@ -4339,7 +4428,7 @@ var Parse = {
|
|
|
4339
4428
|
|
|
4340
4429
|
Parse._initialize(applicationId, javaScriptKey);
|
|
4341
4430
|
},
|
|
4342
|
-
_initialize: function (applicationId /*: string*/, javaScriptKey /*: string*/, masterKey
|
|
4431
|
+
_initialize: function (applicationId /*: string*/, javaScriptKey /*: string*/, masterKey /*:: ?: string*/) {
|
|
4343
4432
|
_CoreManager.default.set('APPLICATION_ID', applicationId);
|
|
4344
4433
|
_CoreManager.default.set('JAVASCRIPT_KEY', javaScriptKey);
|
|
4345
4434
|
_CoreManager.default.set('MASTER_KEY', masterKey);
|
|
@@ -4446,10 +4535,10 @@ var Parse = {
|
|
|
4446
4535
|
return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
|
|
4447
4536
|
},
|
|
4448
4537
|
/**
|
|
4449
|
-
* @member {
|
|
4538
|
+
* @member {boolean} Parse.encryptedUser
|
|
4450
4539
|
* @static
|
|
4451
4540
|
*/
|
|
4452
|
-
set encryptedUser(value) {
|
|
4541
|
+
set encryptedUser(value /*: boolean*/) {
|
|
4453
4542
|
_CoreManager.default.set('ENCRYPTED_USER', value);
|
|
4454
4543
|
},
|
|
4455
4544
|
get encryptedUser() {
|
|
@@ -4484,141 +4573,106 @@ var Parse = {
|
|
|
4484
4573
|
},
|
|
4485
4574
|
get allowCustomObjectId() {
|
|
4486
4575
|
return _CoreManager.default.get('ALLOW_CUSTOM_OBJECT_ID');
|
|
4487
|
-
}
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
Parse.AnonymousUtils = _dereq_('./AnonymousUtils').default;
|
|
4492
|
-
Parse.Cloud = _dereq_('./Cloud');
|
|
4493
|
-
Parse.CLP = _dereq_('./ParseCLP').default;
|
|
4494
|
-
Parse.CoreManager = _dereq_('./CoreManager');
|
|
4495
|
-
Parse.Config = _dereq_('./ParseConfig').default;
|
|
4496
|
-
Parse.Error = _dereq_('./ParseError').default;
|
|
4497
|
-
Parse.EventuallyQueue = _EventuallyQueue.default;
|
|
4498
|
-
Parse.FacebookUtils = _dereq_('./FacebookUtils').default;
|
|
4499
|
-
Parse.File = _dereq_('./ParseFile').default;
|
|
4500
|
-
Parse.GeoPoint = _dereq_('./ParseGeoPoint').default;
|
|
4501
|
-
Parse.Polygon = _dereq_('./ParsePolygon').default;
|
|
4502
|
-
Parse.Installation = _dereq_('./ParseInstallation').default;
|
|
4503
|
-
Parse.LocalDatastore = _dereq_('./LocalDatastore');
|
|
4504
|
-
Parse.Object = _dereq_('./ParseObject').default;
|
|
4505
|
-
Parse.Op = {
|
|
4506
|
-
Set: ParseOp.SetOp,
|
|
4507
|
-
Unset: ParseOp.UnsetOp,
|
|
4508
|
-
Increment: ParseOp.IncrementOp,
|
|
4509
|
-
Add: ParseOp.AddOp,
|
|
4510
|
-
Remove: ParseOp.RemoveOp,
|
|
4511
|
-
AddUnique: ParseOp.AddUniqueOp,
|
|
4512
|
-
Relation: ParseOp.RelationOp
|
|
4513
|
-
};
|
|
4514
|
-
Parse.Push = _dereq_('./Push');
|
|
4515
|
-
Parse.Query = _dereq_('./ParseQuery').default;
|
|
4516
|
-
Parse.Relation = _dereq_('./ParseRelation').default;
|
|
4517
|
-
Parse.Role = _dereq_('./ParseRole').default;
|
|
4518
|
-
Parse.Schema = _dereq_('./ParseSchema').default;
|
|
4519
|
-
Parse.Session = _dereq_('./ParseSession').default;
|
|
4520
|
-
Parse.Storage = _dereq_('./Storage');
|
|
4521
|
-
Parse.User = _dereq_('./ParseUser').default;
|
|
4522
|
-
Parse.LiveQuery = _dereq_('./ParseLiveQuery').default;
|
|
4523
|
-
Parse.LiveQueryClient = _dereq_('./LiveQueryClient').default;
|
|
4524
|
-
Parse.IndexedDB = _dereq_('./IndexedDBStorageController');
|
|
4525
|
-
Parse._request = function () {
|
|
4526
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4527
|
-
args[_key] = arguments[_key];
|
|
4528
|
-
}
|
|
4529
|
-
return _CoreManager.default.getRESTController().request.apply(null, args);
|
|
4530
|
-
};
|
|
4531
|
-
Parse._ajax = function () {
|
|
4532
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
4533
|
-
args[_key2] = arguments[_key2];
|
|
4534
|
-
}
|
|
4535
|
-
return _CoreManager.default.getRESTController().ajax.apply(null, args);
|
|
4536
|
-
};
|
|
4537
|
-
// We attempt to match the signatures of the legacy versions of these methods
|
|
4538
|
-
Parse._decode = function (_, value) {
|
|
4539
|
-
return (0, _decode.default)(value);
|
|
4540
|
-
};
|
|
4541
|
-
Parse._encode = function (value, _, disallowObjects) {
|
|
4542
|
-
return (0, _encode.default)(value, disallowObjects);
|
|
4543
|
-
};
|
|
4544
|
-
Parse._getInstallationId = function () {
|
|
4545
|
-
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
4546
|
-
};
|
|
4547
|
-
/**
|
|
4548
|
-
* Enable pinning in your application.
|
|
4549
|
-
* This must be called after `Parse.initialize` in your application.
|
|
4550
|
-
*
|
|
4551
|
-
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
4552
|
-
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
4553
|
-
* @static
|
|
4554
|
-
*/
|
|
4555
|
-
Parse.enableLocalDatastore = function () {
|
|
4556
|
-
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4557
|
-
var ms /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
4558
|
-
if (!Parse.applicationId) {
|
|
4559
|
-
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
4560
|
-
return;
|
|
4561
|
-
}
|
|
4562
|
-
if (!Parse.LocalDatastore.isEnabled) {
|
|
4563
|
-
Parse.LocalDatastore.isEnabled = true;
|
|
4564
|
-
if (polling) {
|
|
4565
|
-
_EventuallyQueue.default.poll(ms);
|
|
4576
|
+
},
|
|
4577
|
+
_request: function () {
|
|
4578
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4579
|
+
args[_key] = arguments[_key];
|
|
4566
4580
|
}
|
|
4581
|
+
return _CoreManager.default.getRESTController().request.apply(null, args);
|
|
4582
|
+
},
|
|
4583
|
+
_ajax: function () {
|
|
4584
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
4585
|
+
args[_key2] = arguments[_key2];
|
|
4586
|
+
}
|
|
4587
|
+
return _CoreManager.default.getRESTController().ajax.apply(null, args);
|
|
4588
|
+
},
|
|
4589
|
+
// We attempt to match the signatures of the legacy versions of these methods
|
|
4590
|
+
_decode: function (_, value) {
|
|
4591
|
+
return (0, _decode2.default)(value);
|
|
4592
|
+
},
|
|
4593
|
+
_encode: function (value, _, disallowObjects) {
|
|
4594
|
+
return (0, _encode2.default)(value, disallowObjects);
|
|
4595
|
+
},
|
|
4596
|
+
_getInstallationId: function () {
|
|
4597
|
+
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
4598
|
+
},
|
|
4599
|
+
/**
|
|
4600
|
+
* Enable pinning in your application.
|
|
4601
|
+
* This must be called after `Parse.initialize` in your application.
|
|
4602
|
+
*
|
|
4603
|
+
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
4604
|
+
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
4605
|
+
* @static
|
|
4606
|
+
*/
|
|
4607
|
+
enableLocalDatastore: function () {
|
|
4608
|
+
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4609
|
+
var ms /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
4610
|
+
if (!this.applicationId) {
|
|
4611
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
4612
|
+
return;
|
|
4613
|
+
}
|
|
4614
|
+
if (!this.LocalDatastore.isEnabled) {
|
|
4615
|
+
this.LocalDatastore.isEnabled = true;
|
|
4616
|
+
if (polling) {
|
|
4617
|
+
_EventuallyQueue.default.poll(ms);
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
},
|
|
4621
|
+
/**
|
|
4622
|
+
* Flag that indicates whether Local Datastore is enabled.
|
|
4623
|
+
*
|
|
4624
|
+
* @static
|
|
4625
|
+
* @returns {boolean}
|
|
4626
|
+
*/
|
|
4627
|
+
isLocalDatastoreEnabled: function () {
|
|
4628
|
+
return this.LocalDatastore.isEnabled;
|
|
4629
|
+
},
|
|
4630
|
+
/**
|
|
4631
|
+
* Gets all contents from Local Datastore
|
|
4632
|
+
*
|
|
4633
|
+
* <pre>
|
|
4634
|
+
* await Parse.dumpLocalDatastore();
|
|
4635
|
+
* </pre>
|
|
4636
|
+
*
|
|
4637
|
+
* @static
|
|
4638
|
+
* @returns {object}
|
|
4639
|
+
*/
|
|
4640
|
+
dumpLocalDatastore: function () {
|
|
4641
|
+
if (!this.LocalDatastore.isEnabled) {
|
|
4642
|
+
console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
|
|
4643
|
+
return _promise.default.resolve({});
|
|
4644
|
+
} else {
|
|
4645
|
+
return Parse.LocalDatastore._getAllContents();
|
|
4646
|
+
}
|
|
4647
|
+
},
|
|
4648
|
+
/**
|
|
4649
|
+
* Enable the current user encryption.
|
|
4650
|
+
* This must be called before login any user.
|
|
4651
|
+
*
|
|
4652
|
+
* @static
|
|
4653
|
+
*/
|
|
4654
|
+
enableEncryptedUser: function () {
|
|
4655
|
+
this.encryptedUser = true;
|
|
4656
|
+
},
|
|
4657
|
+
/**
|
|
4658
|
+
* Flag that indicates whether Encrypted User is enabled.
|
|
4659
|
+
*
|
|
4660
|
+
* @static
|
|
4661
|
+
* @returns {boolean}
|
|
4662
|
+
*/
|
|
4663
|
+
isEncryptedUserEnabled: function () {
|
|
4664
|
+
return this.encryptedUser;
|
|
4567
4665
|
}
|
|
4568
4666
|
};
|
|
4569
|
-
|
|
4570
|
-
* Flag that indicates whether Local Datastore is enabled.
|
|
4571
|
-
*
|
|
4572
|
-
* @static
|
|
4573
|
-
* @returns {boolean}
|
|
4574
|
-
*/
|
|
4575
|
-
Parse.isLocalDatastoreEnabled = function () {
|
|
4576
|
-
return Parse.LocalDatastore.isEnabled;
|
|
4577
|
-
};
|
|
4578
|
-
/**
|
|
4579
|
-
* Gets all contents from Local Datastore
|
|
4580
|
-
*
|
|
4581
|
-
* <pre>
|
|
4582
|
-
* await Parse.dumpLocalDatastore();
|
|
4583
|
-
* </pre>
|
|
4584
|
-
*
|
|
4585
|
-
* @static
|
|
4586
|
-
* @returns {object}
|
|
4587
|
-
*/
|
|
4588
|
-
Parse.dumpLocalDatastore = function () {
|
|
4589
|
-
if (!Parse.LocalDatastore.isEnabled) {
|
|
4590
|
-
console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
|
|
4591
|
-
return _promise.default.resolve({});
|
|
4592
|
-
} else {
|
|
4593
|
-
return Parse.LocalDatastore._getAllContents();
|
|
4594
|
-
}
|
|
4595
|
-
};
|
|
4596
|
-
|
|
4597
|
-
/**
|
|
4598
|
-
* Enable the current user encryption.
|
|
4599
|
-
* This must be called before login any user.
|
|
4600
|
-
*
|
|
4601
|
-
* @static
|
|
4602
|
-
*/
|
|
4603
|
-
Parse.enableEncryptedUser = function () {
|
|
4604
|
-
Parse.encryptedUser = true;
|
|
4605
|
-
};
|
|
4606
|
-
|
|
4607
|
-
/**
|
|
4608
|
-
* Flag that indicates whether Encrypted User is enabled.
|
|
4609
|
-
*
|
|
4610
|
-
* @static
|
|
4611
|
-
* @returns {boolean}
|
|
4612
|
-
*/
|
|
4613
|
-
Parse.isEncryptedUserEnabled = function () {
|
|
4614
|
-
return Parse.encryptedUser;
|
|
4615
|
-
};
|
|
4667
|
+
Parse.IndexedDB = _dereq_('./IndexedDBStorageController');
|
|
4616
4668
|
_CoreManager.default.setCryptoController(_CryptoController.default);
|
|
4617
4669
|
_CoreManager.default.setInstallationController(_InstallationController.default);
|
|
4618
4670
|
_CoreManager.default.setRESTController(_RESTController.default);
|
|
4619
4671
|
// For legacy requires, of the form `var Parse = require('parse').Parse`
|
|
4620
4672
|
Parse.Parse = Parse;
|
|
4621
4673
|
module.exports = Parse;
|
|
4674
|
+
var _default = Parse;
|
|
4675
|
+
exports.default = _default;
|
|
4622
4676
|
}).call(this)}).call(this,_dereq_('_process'))
|
|
4623
4677
|
},{"./Analytics":1,"./AnonymousUtils":2,"./Cloud":3,"./CoreManager":4,"./CryptoController":5,"./EventuallyQueue":7,"./FacebookUtils":8,"./IndexedDBStorageController":9,"./InstallationController":10,"./LiveQueryClient":11,"./LocalDatastore":13,"./ParseACL":19,"./ParseCLP":20,"./ParseConfig":21,"./ParseError":22,"./ParseFile":23,"./ParseGeoPoint":24,"./ParseInstallation":25,"./ParseLiveQuery":26,"./ParseObject":27,"./ParseOp":28,"./ParsePolygon":29,"./ParseQuery":30,"./ParseRelation":31,"./ParseRole":32,"./ParseSchema":33,"./ParseSession":34,"./ParseUser":35,"./Push":36,"./RESTController":37,"./Storage":39,"./decode":45,"./encode":46,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":84,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/core-js-stable/weak-map":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":110,"@babel/runtime-corejs3/helpers/typeof":125,"_process":129}],19:[function(_dereq_,module,exports){
|
|
4624
4678
|
"use strict";
|
|
@@ -12468,21 +12522,16 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12468
12522
|
}, {
|
|
12469
12523
|
key: "eachBatch",
|
|
12470
12524
|
value: function (callback /*: (objs: Array<ParseObject>) => Promise<*>*/, options /*:: ?: BatchOptions*/) /*: Promise<void>*/{
|
|
12471
|
-
var _context8;
|
|
12472
12525
|
options = options || {};
|
|
12473
12526
|
if (this._order || this._skip || this._limit >= 0) {
|
|
12474
12527
|
return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
|
|
12475
12528
|
}
|
|
12476
12529
|
var query = new ParseQuery(this.className);
|
|
12477
12530
|
query._limit = options.batchSize || 100;
|
|
12478
|
-
query._include = (0,
|
|
12479
|
-
|
|
12480
|
-
});
|
|
12531
|
+
query._include = (0, _toConsumableArray2.default)(this._include);
|
|
12532
|
+
query._exclude = (0, _toConsumableArray2.default)(this._exclude);
|
|
12481
12533
|
if (this._select) {
|
|
12482
|
-
|
|
12483
|
-
query._select = (0, _map2.default)(_context9 = this._select).call(_context9, function (s) {
|
|
12484
|
-
return s;
|
|
12485
|
-
});
|
|
12534
|
+
query._select = (0, _toConsumableArray2.default)(this._select);
|
|
12486
12535
|
}
|
|
12487
12536
|
query._hint = this._hint;
|
|
12488
12537
|
query._where = {};
|
|
@@ -12522,39 +12571,39 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12522
12571
|
return !finished;
|
|
12523
12572
|
}, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
12524
12573
|
var _yield$Promise$all, _yield$Promise$all2, results;
|
|
12525
|
-
return _regenerator.default.wrap(function (
|
|
12526
|
-
while (1) switch (
|
|
12574
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
12575
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
12527
12576
|
case 0:
|
|
12528
|
-
|
|
12577
|
+
_context8.next = 2;
|
|
12529
12578
|
return _promise.default.all([(0, _find.default)(query).call(query, findOptions), _promise.default.resolve(previousResults.length > 0 && callback(previousResults))]);
|
|
12530
12579
|
case 2:
|
|
12531
|
-
_yield$Promise$all =
|
|
12580
|
+
_yield$Promise$all = _context8.sent;
|
|
12532
12581
|
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 1);
|
|
12533
12582
|
results = _yield$Promise$all2[0];
|
|
12534
12583
|
if (!(results.length >= query._limit)) {
|
|
12535
|
-
|
|
12584
|
+
_context8.next = 10;
|
|
12536
12585
|
break;
|
|
12537
12586
|
}
|
|
12538
12587
|
query.greaterThan('objectId', results[results.length - 1].id);
|
|
12539
12588
|
previousResults = results;
|
|
12540
|
-
|
|
12589
|
+
_context8.next = 17;
|
|
12541
12590
|
break;
|
|
12542
12591
|
case 10:
|
|
12543
12592
|
if (!(results.length > 0)) {
|
|
12544
|
-
|
|
12593
|
+
_context8.next = 16;
|
|
12545
12594
|
break;
|
|
12546
12595
|
}
|
|
12547
|
-
|
|
12596
|
+
_context8.next = 13;
|
|
12548
12597
|
return _promise.default.resolve(callback(results));
|
|
12549
12598
|
case 13:
|
|
12550
12599
|
finished = true;
|
|
12551
|
-
|
|
12600
|
+
_context8.next = 17;
|
|
12552
12601
|
break;
|
|
12553
12602
|
case 16:
|
|
12554
12603
|
finished = true;
|
|
12555
12604
|
case 17:
|
|
12556
12605
|
case "end":
|
|
12557
|
-
return
|
|
12606
|
+
return _context8.stop();
|
|
12558
12607
|
}
|
|
12559
12608
|
}, _callee3);
|
|
12560
12609
|
})));
|
|
@@ -12655,12 +12704,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12655
12704
|
var _map = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(callback /*: (currentObject: ParseObject, index: number, query: ParseQuery) => any*/, options /*:: ?: BatchOptions*/) {
|
|
12656
12705
|
var _this5 = this;
|
|
12657
12706
|
var array, index;
|
|
12658
|
-
return _regenerator.default.wrap(function (
|
|
12659
|
-
while (1) switch (
|
|
12707
|
+
return _regenerator.default.wrap(function (_context9) {
|
|
12708
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
12660
12709
|
case 0:
|
|
12661
12710
|
array = [];
|
|
12662
12711
|
index = 0;
|
|
12663
|
-
|
|
12712
|
+
_context9.next = 4;
|
|
12664
12713
|
return this.each(function (object) {
|
|
12665
12714
|
return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
|
|
12666
12715
|
array.push(result);
|
|
@@ -12668,10 +12717,10 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12668
12717
|
});
|
|
12669
12718
|
}, options);
|
|
12670
12719
|
case 4:
|
|
12671
|
-
return
|
|
12720
|
+
return _context9.abrupt("return", array);
|
|
12672
12721
|
case 5:
|
|
12673
12722
|
case "end":
|
|
12674
|
-
return
|
|
12723
|
+
return _context9.stop();
|
|
12675
12724
|
}
|
|
12676
12725
|
}, _callee4, this);
|
|
12677
12726
|
}));
|
|
@@ -12708,12 +12757,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12708
12757
|
value: function () {
|
|
12709
12758
|
var _reduce = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(callback /*: (accumulator: any, currentObject: ParseObject, index: number) => any*/, initialValue /*: any*/, options /*:: ?: BatchOptions*/) {
|
|
12710
12759
|
var accumulator, index;
|
|
12711
|
-
return _regenerator.default.wrap(function (
|
|
12712
|
-
while (1) switch (
|
|
12760
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
12761
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
12713
12762
|
case 0:
|
|
12714
12763
|
accumulator = initialValue;
|
|
12715
12764
|
index = 0;
|
|
12716
|
-
|
|
12765
|
+
_context10.next = 4;
|
|
12717
12766
|
return this.each(function (object) {
|
|
12718
12767
|
// If no initial value was given, we take the first object from the query
|
|
12719
12768
|
// as the initial value and don't call the callback with it.
|
|
@@ -12729,15 +12778,15 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12729
12778
|
}, options);
|
|
12730
12779
|
case 4:
|
|
12731
12780
|
if (!(index === 0 && initialValue === undefined)) {
|
|
12732
|
-
|
|
12781
|
+
_context10.next = 6;
|
|
12733
12782
|
break;
|
|
12734
12783
|
}
|
|
12735
12784
|
throw new TypeError('Reducing empty query result set with no initial value');
|
|
12736
12785
|
case 6:
|
|
12737
|
-
return
|
|
12786
|
+
return _context10.abrupt("return", accumulator);
|
|
12738
12787
|
case 7:
|
|
12739
12788
|
case "end":
|
|
12740
|
-
return
|
|
12789
|
+
return _context10.stop();
|
|
12741
12790
|
}
|
|
12742
12791
|
}, _callee5, this);
|
|
12743
12792
|
}));
|
|
@@ -12774,12 +12823,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12774
12823
|
var _filter = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(callback /*: (currentObject: ParseObject, index: number, query: ParseQuery) => boolean*/, options /*:: ?: BatchOptions*/) {
|
|
12775
12824
|
var _this6 = this;
|
|
12776
12825
|
var array, index;
|
|
12777
|
-
return _regenerator.default.wrap(function (
|
|
12778
|
-
while (1) switch (
|
|
12826
|
+
return _regenerator.default.wrap(function (_context11) {
|
|
12827
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
12779
12828
|
case 0:
|
|
12780
12829
|
array = [];
|
|
12781
12830
|
index = 0;
|
|
12782
|
-
|
|
12831
|
+
_context11.next = 4;
|
|
12783
12832
|
return this.each(function (object) {
|
|
12784
12833
|
return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
|
|
12785
12834
|
if (flag) {
|
|
@@ -12789,10 +12838,10 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12789
12838
|
});
|
|
12790
12839
|
}, options);
|
|
12791
12840
|
case 4:
|
|
12792
|
-
return
|
|
12841
|
+
return _context11.abrupt("return", array);
|
|
12793
12842
|
case 5:
|
|
12794
12843
|
case "end":
|
|
12795
|
-
return
|
|
12844
|
+
return _context11.stop();
|
|
12796
12845
|
}
|
|
12797
12846
|
}, _callee6, this);
|
|
12798
12847
|
}));
|
|
@@ -12815,8 +12864,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12815
12864
|
value: function (key /*: string | { [key: string]: any }*/, value /*: ?mixed*/) /*: ParseQuery*/{
|
|
12816
12865
|
var _this7 = this;
|
|
12817
12866
|
if (key && (0, _typeof2.default)(key) === 'object') {
|
|
12818
|
-
var
|
|
12819
|
-
(0, _forEach.default)(
|
|
12867
|
+
var _context12;
|
|
12868
|
+
(0, _forEach.default)(_context12 = (0, _entries.default)(key)).call(_context12, function (_ref2) {
|
|
12820
12869
|
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
12821
12870
|
k = _ref3[0],
|
|
12822
12871
|
val = _ref3[1];
|
|
@@ -12844,8 +12893,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12844
12893
|
value: function (key /*: string | { [key: string]: any }*/, value /*: ?mixed*/) /*: ParseQuery*/{
|
|
12845
12894
|
var _this8 = this;
|
|
12846
12895
|
if (key && (0, _typeof2.default)(key) === 'object') {
|
|
12847
|
-
var
|
|
12848
|
-
(0, _forEach.default)(
|
|
12896
|
+
var _context13;
|
|
12897
|
+
(0, _forEach.default)(_context13 = (0, _entries.default)(key)).call(_context13, function (_ref4) {
|
|
12849
12898
|
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
|
12850
12899
|
k = _ref5[0],
|
|
12851
12900
|
val = _ref5[1];
|
|
@@ -13434,11 +13483,11 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13434
13483
|
keys[_key6] = arguments[_key6];
|
|
13435
13484
|
}
|
|
13436
13485
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13437
|
-
var
|
|
13486
|
+
var _context14;
|
|
13438
13487
|
if ((0, _isArray.default)(key)) {
|
|
13439
13488
|
key = key.join();
|
|
13440
13489
|
}
|
|
13441
|
-
_this9._order = (0, _concat.default)(
|
|
13490
|
+
_this9._order = (0, _concat.default)(_context14 = _this9._order).call(_context14, key.replace(/\s/g, '').split(','));
|
|
13442
13491
|
});
|
|
13443
13492
|
return this;
|
|
13444
13493
|
}
|
|
@@ -13479,11 +13528,11 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13479
13528
|
keys[_key8] = arguments[_key8];
|
|
13480
13529
|
}
|
|
13481
13530
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13482
|
-
var
|
|
13531
|
+
var _context15, _context16;
|
|
13483
13532
|
if ((0, _isArray.default)(key)) {
|
|
13484
13533
|
key = key.join();
|
|
13485
13534
|
}
|
|
13486
|
-
_this10._order = (0, _concat.default)(
|
|
13535
|
+
_this10._order = (0, _concat.default)(_context15 = _this10._order).call(_context15, (0, _map2.default)(_context16 = key.replace(/\s/g, '').split(',')).call(_context16, function (k) {
|
|
13487
13536
|
return '-' + k;
|
|
13488
13537
|
}));
|
|
13489
13538
|
});
|
|
@@ -13565,8 +13614,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13565
13614
|
}
|
|
13566
13615
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13567
13616
|
if ((0, _isArray.default)(key)) {
|
|
13568
|
-
var
|
|
13569
|
-
_this11._include = (0, _concat.default)(
|
|
13617
|
+
var _context17;
|
|
13618
|
+
_this11._include = (0, _concat.default)(_context17 = _this11._include).call(_context17, key);
|
|
13570
13619
|
} else {
|
|
13571
13620
|
_this11._include.push(key);
|
|
13572
13621
|
}
|
|
@@ -13607,8 +13656,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13607
13656
|
}
|
|
13608
13657
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13609
13658
|
if ((0, _isArray.default)(key)) {
|
|
13610
|
-
var
|
|
13611
|
-
_this12._select = (0, _concat.default)(
|
|
13659
|
+
var _context18;
|
|
13660
|
+
_this12._select = (0, _concat.default)(_context18 = _this12._select).call(_context18, key);
|
|
13612
13661
|
} else {
|
|
13613
13662
|
_this12._select.push(key);
|
|
13614
13663
|
}
|
|
@@ -13634,8 +13683,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13634
13683
|
}
|
|
13635
13684
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13636
13685
|
if ((0, _isArray.default)(key)) {
|
|
13637
|
-
var
|
|
13638
|
-
_this13._exclude = (0, _concat.default)(
|
|
13686
|
+
var _context19;
|
|
13687
|
+
_this13._exclude = (0, _concat.default)(_context19 = _this13._exclude).call(_context19, key);
|
|
13639
13688
|
} else {
|
|
13640
13689
|
_this13._exclude.push(key);
|
|
13641
13690
|
}
|
|
@@ -13660,8 +13709,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13660
13709
|
}
|
|
13661
13710
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13662
13711
|
if ((0, _isArray.default)(key)) {
|
|
13663
|
-
var
|
|
13664
|
-
_this14._watch = (0, _concat.default)(
|
|
13712
|
+
var _context20;
|
|
13713
|
+
_this14._watch = (0, _concat.default)(_context20 = _this14._watch).call(_context20, key);
|
|
13665
13714
|
} else {
|
|
13666
13715
|
_this14._watch.push(key);
|
|
13667
13716
|
}
|
|
@@ -13698,30 +13747,30 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13698
13747
|
value: function () {
|
|
13699
13748
|
var _subscribe = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(sessionToken /*:: ?: string*/) {
|
|
13700
13749
|
var currentUser, liveQueryClient, subscription;
|
|
13701
|
-
return _regenerator.default.wrap(function (
|
|
13702
|
-
while (1) switch (
|
|
13750
|
+
return _regenerator.default.wrap(function (_context21) {
|
|
13751
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
13703
13752
|
case 0:
|
|
13704
|
-
|
|
13753
|
+
_context21.next = 2;
|
|
13705
13754
|
return _CoreManager.default.getUserController().currentUserAsync();
|
|
13706
13755
|
case 2:
|
|
13707
|
-
currentUser =
|
|
13756
|
+
currentUser = _context21.sent;
|
|
13708
13757
|
if (!sessionToken) {
|
|
13709
13758
|
sessionToken = currentUser ? currentUser.getSessionToken() : undefined;
|
|
13710
13759
|
}
|
|
13711
|
-
|
|
13760
|
+
_context21.next = 6;
|
|
13712
13761
|
return _CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient();
|
|
13713
13762
|
case 6:
|
|
13714
|
-
liveQueryClient =
|
|
13763
|
+
liveQueryClient = _context21.sent;
|
|
13715
13764
|
if (liveQueryClient.shouldOpen()) {
|
|
13716
13765
|
liveQueryClient.open();
|
|
13717
13766
|
}
|
|
13718
13767
|
subscription = liveQueryClient.subscribe(this, sessionToken);
|
|
13719
|
-
return
|
|
13768
|
+
return _context21.abrupt("return", subscription.subscribePromise.then(function () {
|
|
13720
13769
|
return subscription;
|
|
13721
13770
|
}));
|
|
13722
13771
|
case 10:
|
|
13723
13772
|
case "end":
|
|
13724
|
-
return
|
|
13773
|
+
return _context21.stop();
|
|
13725
13774
|
}
|
|
13726
13775
|
}, _callee7, this);
|
|
13727
13776
|
}));
|
|
@@ -14824,11 +14873,7 @@ function _isNativeReflectConstruct() {
|
|
|
14824
14873
|
} catch (e) {
|
|
14825
14874
|
return false;
|
|
14826
14875
|
}
|
|
14827
|
-
}
|
|
14828
|
-
* @flow
|
|
14829
|
-
*/
|
|
14830
|
-
/*:: import type { AttributeMap } from './ObjectStateMutations';*/
|
|
14831
|
-
/*:: import type { RequestOptions, FullOptions } from './RESTController';*/
|
|
14876
|
+
}
|
|
14832
14877
|
/**
|
|
14833
14878
|
* <p>A Parse.Session object is a local representation of a revocable session.
|
|
14834
14879
|
* This class is a subclass of a Parse.Object, and retains the same
|
|
@@ -14843,7 +14888,7 @@ var ParseSession = /*#__PURE__*/function (_ParseObject) {
|
|
|
14843
14888
|
/**
|
|
14844
14889
|
* @param {object} attributes The initial set of data to store in the user.
|
|
14845
14890
|
*/
|
|
14846
|
-
function ParseSession(attributes
|
|
14891
|
+
function ParseSession(attributes /*:: ?: any*/) {
|
|
14847
14892
|
var _this;
|
|
14848
14893
|
(0, _classCallCheck2.default)(this, ParseSession);
|
|
14849
14894
|
_this = _super.call(this, '_Session');
|
|
@@ -15822,6 +15867,40 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15822
15867
|
return user.logIn(options);
|
|
15823
15868
|
}
|
|
15824
15869
|
|
|
15870
|
+
/**
|
|
15871
|
+
* Logs in a user with a username (or email) and password, and authData. On success, this
|
|
15872
|
+
* saves the session to disk, so you can retrieve the currently logged in
|
|
15873
|
+
* user using <code>current</code>.
|
|
15874
|
+
*
|
|
15875
|
+
* @param {string} username The username (or email) to log in with.
|
|
15876
|
+
* @param {string} password The password to log in with.
|
|
15877
|
+
* @param {object} authData The authData to log in with.
|
|
15878
|
+
* @param {object} options
|
|
15879
|
+
* @static
|
|
15880
|
+
* @returns {Promise} A promise that is fulfilled with the user when
|
|
15881
|
+
* the login completes.
|
|
15882
|
+
*/
|
|
15883
|
+
}, {
|
|
15884
|
+
key: "logInWithAdditionalAuth",
|
|
15885
|
+
value: function (username /*: string*/, password /*: string*/, authData /*: AuthData*/, options /*:: ?: FullOptions*/) {
|
|
15886
|
+
if (typeof username !== 'string') {
|
|
15887
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Username must be a string.'));
|
|
15888
|
+
}
|
|
15889
|
+
if (typeof password !== 'string') {
|
|
15890
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
|
|
15891
|
+
}
|
|
15892
|
+
if (Object.prototype.toString.call(authData) !== '[object Object]') {
|
|
15893
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Auth must be an object.'));
|
|
15894
|
+
}
|
|
15895
|
+
var user = new this();
|
|
15896
|
+
user._finishFetch({
|
|
15897
|
+
username: username,
|
|
15898
|
+
password: password,
|
|
15899
|
+
authData: authData
|
|
15900
|
+
});
|
|
15901
|
+
return user.logIn(options);
|
|
15902
|
+
}
|
|
15903
|
+
|
|
15825
15904
|
/**
|
|
15826
15905
|
* Logs in a user with an objectId. On success, this saves the session
|
|
15827
15906
|
* to disk, so you can retrieve the currently logged in user using
|
|
@@ -16271,7 +16350,8 @@ var DefaultController = {
|
|
|
16271
16350
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
16272
16351
|
var auth = {
|
|
16273
16352
|
username: user.get('username'),
|
|
16274
|
-
password: user.get('password')
|
|
16353
|
+
password: user.get('password'),
|
|
16354
|
+
authData: user.get('authData')
|
|
16275
16355
|
};
|
|
16276
16356
|
return RESTController.request(options.usePost ? 'POST' : 'GET', 'login', auth, options).then(function (response) {
|
|
16277
16357
|
user._migrateId(response.objectId);
|
|
@@ -17064,7 +17144,12 @@ function duplicateState(source /*: { id: string }*/, dest /*: { id: string }*/)
|
|
|
17064
17144
|
},{"./ObjectStateMutations":16,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":84,"@babel/runtime-corejs3/core-js-stable/weak-map":96,"@babel/runtime-corejs3/helpers/typeof":125}],39:[function(_dereq_,module,exports){
|
|
17065
17145
|
"use strict";
|
|
17066
17146
|
|
|
17147
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
17067
17148
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
17149
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
17150
|
+
value: true
|
|
17151
|
+
});
|
|
17152
|
+
exports.default = void 0;
|
|
17068
17153
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
17069
17154
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
17070
17155
|
/**
|
|
@@ -17152,8 +17237,10 @@ var Storage = {
|
|
|
17152
17237
|
}
|
|
17153
17238
|
};
|
|
17154
17239
|
module.exports = Storage;
|
|
17240
|
+
var _default = Storage;
|
|
17241
|
+
exports.default = _default;
|
|
17155
17242
|
_CoreManager.default.setStorageController(_dereq_('./StorageController.browser'));
|
|
17156
|
-
},{"./CoreManager":4,"./StorageController.browser":40,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/helpers/interopRequireDefault":110}],40:[function(_dereq_,module,exports){
|
|
17243
|
+
},{"./CoreManager":4,"./StorageController.browser":40,"@babel/runtime-corejs3/core-js-stable/object/define-property":81,"@babel/runtime-corejs3/core-js-stable/promise":90,"@babel/runtime-corejs3/helpers/interopRequireDefault":110}],40:[function(_dereq_,module,exports){
|
|
17157
17244
|
"use strict";
|
|
17158
17245
|
|
|
17159
17246
|
/**
|