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.weapp.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":59,"@babel/runtime-corejs3/core-js-stable/instance/for-each":65,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"_process":130}],5:[function(_dereq_,module,exports){
|
|
723
|
+
},{"@babel/runtime-corejs3/core-js-stable/instance/concat":59,"@babel/runtime-corejs3/core-js-stable/instance/for-each":65,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"_process":130}],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":620}],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":26,"./ParseQuery":29,"./Storage":39,"@babel/runtime-corejs3/core-js-stable/instance/find":64,"@babel/runtime-corejs3/core-js-stable/instance/find-index":63,"@babel/runtime-corejs3/core-js-stable/instance/splice":73,"@babel/runtime-corejs3/core-js-stable/json/stringify":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/set-interval":93,"@babel/runtime-corejs3/helpers/asyncToGenerator":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"@babel/runtime-corejs3/helpers/toConsumableArray":123,"@babel/runtime-corejs3/regenerator":129}],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");
|
|
@@ -2406,7 +2421,12 @@ var _Array$from2 = _dereq_("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
|
2406
2421
|
var _Symbol = _dereq_("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
2407
2422
|
var _getIteratorMethod = _dereq_("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
2408
2423
|
var _Array$isArray2 = _dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
2424
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
2409
2425
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
2426
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
2427
|
+
value: true
|
|
2428
|
+
});
|
|
2429
|
+
exports.default = void 0;
|
|
2410
2430
|
var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
|
|
2411
2431
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
2412
2432
|
var _set = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/set"));
|
|
@@ -3100,9 +3120,11 @@ var LocalDatastore = {
|
|
|
3100
3120
|
}
|
|
3101
3121
|
};
|
|
3102
3122
|
module.exports = LocalDatastore;
|
|
3123
|
+
var _default = LocalDatastore;
|
|
3124
|
+
exports.default = _default;
|
|
3103
3125
|
_CoreManager.default.setLocalDatastoreController(_dereq_('./LocalDatastoreController'));
|
|
3104
3126
|
_CoreManager.default.setLocalDatastore(LocalDatastore);
|
|
3105
|
-
},{"./CoreManager":4,"./LocalDatastoreController":13,"./LocalDatastoreUtils":14,"./ParseQuery":29,"@babel/runtime-corejs3/core-js-stable/array/from":56,"@babel/runtime-corejs3/core-js-stable/array/is-array":57,"@babel/runtime-corejs3/core-js-stable/instance/concat":59,"@babel/runtime-corejs3/core-js-stable/instance/filter":62,"@babel/runtime-corejs3/core-js-stable/instance/find":64,"@babel/runtime-corejs3/core-js-stable/instance/includes":66,"@babel/runtime-corejs3/core-js-stable/instance/keys":68,"@babel/runtime-corejs3/core-js-stable/instance/map":69,"@babel/runtime-corejs3/core-js-stable/instance/slice":71,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":74,"@babel/runtime-corejs3/core-js-stable/object/keys":89,"@babel/runtime-corejs3/core-js-stable/promise":91,"@babel/runtime-corejs3/core-js-stable/set":95,"@babel/runtime-corejs3/core-js-stable/symbol":96,"@babel/runtime-corejs3/core-js/get-iterator-method":98,"@babel/runtime-corejs3/helpers/asyncToGenerator":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"@babel/runtime-corejs3/helpers/slicedToArray":121,"@babel/runtime-corejs3/helpers/toConsumableArray":123,"@babel/runtime-corejs3/regenerator":129}],13:[function(_dereq_,module,exports){
|
|
3127
|
+
},{"./CoreManager":4,"./LocalDatastoreController":13,"./LocalDatastoreUtils":14,"./ParseQuery":29,"@babel/runtime-corejs3/core-js-stable/array/from":56,"@babel/runtime-corejs3/core-js-stable/array/is-array":57,"@babel/runtime-corejs3/core-js-stable/instance/concat":59,"@babel/runtime-corejs3/core-js-stable/instance/filter":62,"@babel/runtime-corejs3/core-js-stable/instance/find":64,"@babel/runtime-corejs3/core-js-stable/instance/includes":66,"@babel/runtime-corejs3/core-js-stable/instance/keys":68,"@babel/runtime-corejs3/core-js-stable/instance/map":69,"@babel/runtime-corejs3/core-js-stable/instance/slice":71,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":74,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/object/keys":89,"@babel/runtime-corejs3/core-js-stable/promise":91,"@babel/runtime-corejs3/core-js-stable/set":95,"@babel/runtime-corejs3/core-js-stable/symbol":96,"@babel/runtime-corejs3/core-js/get-iterator-method":98,"@babel/runtime-corejs3/helpers/asyncToGenerator":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"@babel/runtime-corejs3/helpers/slicedToArray":121,"@babel/runtime-corejs3/helpers/toConsumableArray":123,"@babel/runtime-corejs3/regenerator":129}],13:[function(_dereq_,module,exports){
|
|
3106
3128
|
"use strict";
|
|
3107
3129
|
|
|
3108
3130
|
var _sliceInstanceProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
@@ -4230,15 +4252,43 @@ var _WeakMap = _dereq_("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
|
4230
4252
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4231
4253
|
var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4232
4254
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4255
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
4256
|
+
value: true
|
|
4257
|
+
});
|
|
4258
|
+
exports.default = void 0;
|
|
4233
4259
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
4234
|
-
var
|
|
4235
|
-
var
|
|
4236
|
-
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
4260
|
+
var _decode2 = _interopRequireDefault(_dereq_("./decode"));
|
|
4261
|
+
var _encode2 = _interopRequireDefault(_dereq_("./encode"));
|
|
4237
4262
|
var _CryptoController = _interopRequireDefault(_dereq_("./CryptoController"));
|
|
4238
4263
|
var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
|
|
4239
4264
|
var _InstallationController = _interopRequireDefault(_dereq_("./InstallationController"));
|
|
4240
4265
|
var ParseOp = _interopRequireWildcard(_dereq_("./ParseOp"));
|
|
4241
4266
|
var _RESTController = _interopRequireDefault(_dereq_("./RESTController"));
|
|
4267
|
+
var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
|
|
4268
|
+
var Analytics = _interopRequireWildcard(_dereq_("./Analytics"));
|
|
4269
|
+
var _AnonymousUtils = _interopRequireDefault(_dereq_("./AnonymousUtils"));
|
|
4270
|
+
var Cloud = _interopRequireWildcard(_dereq_("./Cloud"));
|
|
4271
|
+
var _ParseCLP = _interopRequireDefault(_dereq_("./ParseCLP"));
|
|
4272
|
+
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
4273
|
+
var _ParseConfig = _interopRequireDefault(_dereq_("./ParseConfig"));
|
|
4274
|
+
var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
|
|
4275
|
+
var _FacebookUtils = _interopRequireDefault(_dereq_("./FacebookUtils"));
|
|
4276
|
+
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
4277
|
+
var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
|
|
4278
|
+
var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
|
|
4279
|
+
var _ParseInstallation = _interopRequireDefault(_dereq_("./ParseInstallation"));
|
|
4280
|
+
var _LocalDatastore = _interopRequireDefault(_dereq_("./LocalDatastore"));
|
|
4281
|
+
var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
4282
|
+
var Push = _interopRequireWildcard(_dereq_("./Push"));
|
|
4283
|
+
var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
|
|
4284
|
+
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
4285
|
+
var _ParseRole = _interopRequireDefault(_dereq_("./ParseRole"));
|
|
4286
|
+
var _ParseSchema = _interopRequireDefault(_dereq_("./ParseSchema"));
|
|
4287
|
+
var _ParseSession = _interopRequireDefault(_dereq_("./ParseSession"));
|
|
4288
|
+
var _Storage = _interopRequireDefault(_dereq_("./Storage"));
|
|
4289
|
+
var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
|
|
4290
|
+
var _ParseLiveQuery = _interopRequireDefault(_dereq_("./ParseLiveQuery"));
|
|
4291
|
+
var _LiveQueryClient = _interopRequireDefault(_dereq_("./LiveQueryClient"));
|
|
4242
4292
|
function _getRequireWildcardCache(nodeInterop) {
|
|
4243
4293
|
if (typeof _WeakMap !== "function") return null;
|
|
4244
4294
|
var cacheBabelInterop = new _WeakMap();
|
|
@@ -4284,8 +4334,47 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
4284
4334
|
* @global
|
|
4285
4335
|
* @class
|
|
4286
4336
|
* @hideconstructor
|
|
4287
|
-
|
|
4288
|
-
|
|
4337
|
+
*/
|
|
4338
|
+
|
|
4339
|
+
var Parse /*: ParseType*/ = {
|
|
4340
|
+
ACL: _ParseACL.default,
|
|
4341
|
+
Analytics: Analytics,
|
|
4342
|
+
AnonymousUtils: _AnonymousUtils.default,
|
|
4343
|
+
Cloud: Cloud,
|
|
4344
|
+
CLP: _ParseCLP.default,
|
|
4345
|
+
CoreManager: _CoreManager.default,
|
|
4346
|
+
Config: _ParseConfig.default,
|
|
4347
|
+
Error: _ParseError.default,
|
|
4348
|
+
EventuallyQueue: _EventuallyQueue.default,
|
|
4349
|
+
FacebookUtils: _FacebookUtils.default,
|
|
4350
|
+
File: _ParseFile.default,
|
|
4351
|
+
GeoPoint: _ParseGeoPoint.default,
|
|
4352
|
+
Polygon: _ParsePolygon.default,
|
|
4353
|
+
Installation: _ParseInstallation.default,
|
|
4354
|
+
LocalDatastore: _LocalDatastore.default,
|
|
4355
|
+
Object: _ParseObject.default,
|
|
4356
|
+
Op: {
|
|
4357
|
+
Set: ParseOp.SetOp,
|
|
4358
|
+
Unset: ParseOp.UnsetOp,
|
|
4359
|
+
Increment: ParseOp.IncrementOp,
|
|
4360
|
+
Add: ParseOp.AddOp,
|
|
4361
|
+
Remove: ParseOp.RemoveOp,
|
|
4362
|
+
AddUnique: ParseOp.AddUniqueOp,
|
|
4363
|
+
Relation: ParseOp.RelationOp
|
|
4364
|
+
},
|
|
4365
|
+
Push: Push,
|
|
4366
|
+
Query: _ParseQuery.default,
|
|
4367
|
+
Relation: _ParseRelation.default,
|
|
4368
|
+
Role: _ParseRole.default,
|
|
4369
|
+
Schema: _ParseSchema.default,
|
|
4370
|
+
Session: _ParseSession.default,
|
|
4371
|
+
Storage: _Storage.default,
|
|
4372
|
+
User: _ParseUser.default,
|
|
4373
|
+
LiveQuery: _ParseLiveQuery.default,
|
|
4374
|
+
LiveQueryClient: _LiveQueryClient.default,
|
|
4375
|
+
IndexedDB: undefined,
|
|
4376
|
+
Hooks: undefined,
|
|
4377
|
+
Parse: undefined,
|
|
4289
4378
|
/**
|
|
4290
4379
|
* Call this method first to set up your authentication tokens for Parse.
|
|
4291
4380
|
*
|
|
@@ -4297,7 +4386,7 @@ var Parse = {
|
|
|
4297
4386
|
initialize: function (applicationId /*: string*/, javaScriptKey /*: string*/) {
|
|
4298
4387
|
Parse._initialize(applicationId, javaScriptKey);
|
|
4299
4388
|
},
|
|
4300
|
-
_initialize: function (applicationId /*: string*/, javaScriptKey /*: string*/, masterKey
|
|
4389
|
+
_initialize: function (applicationId /*: string*/, javaScriptKey /*: string*/, masterKey /*:: ?: string*/) {
|
|
4301
4390
|
_CoreManager.default.set('APPLICATION_ID', applicationId);
|
|
4302
4391
|
_CoreManager.default.set('JAVASCRIPT_KEY', javaScriptKey);
|
|
4303
4392
|
_CoreManager.default.set('MASTER_KEY', masterKey);
|
|
@@ -4404,10 +4493,10 @@ var Parse = {
|
|
|
4404
4493
|
return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
|
|
4405
4494
|
},
|
|
4406
4495
|
/**
|
|
4407
|
-
* @member {
|
|
4496
|
+
* @member {boolean} Parse.encryptedUser
|
|
4408
4497
|
* @static
|
|
4409
4498
|
*/
|
|
4410
|
-
set encryptedUser(value) {
|
|
4499
|
+
set encryptedUser(value /*: boolean*/) {
|
|
4411
4500
|
_CoreManager.default.set('ENCRYPTED_USER', value);
|
|
4412
4501
|
},
|
|
4413
4502
|
get encryptedUser() {
|
|
@@ -4442,140 +4531,105 @@ var Parse = {
|
|
|
4442
4531
|
},
|
|
4443
4532
|
get allowCustomObjectId() {
|
|
4444
4533
|
return _CoreManager.default.get('ALLOW_CUSTOM_OBJECT_ID');
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
Parse.AnonymousUtils = _dereq_('./AnonymousUtils').default;
|
|
4450
|
-
Parse.Cloud = _dereq_('./Cloud');
|
|
4451
|
-
Parse.CLP = _dereq_('./ParseCLP').default;
|
|
4452
|
-
Parse.CoreManager = _dereq_('./CoreManager');
|
|
4453
|
-
Parse.Config = _dereq_('./ParseConfig').default;
|
|
4454
|
-
Parse.Error = _dereq_('./ParseError').default;
|
|
4455
|
-
Parse.EventuallyQueue = _EventuallyQueue.default;
|
|
4456
|
-
Parse.FacebookUtils = _dereq_('./FacebookUtils').default;
|
|
4457
|
-
Parse.File = _dereq_('./ParseFile').default;
|
|
4458
|
-
Parse.GeoPoint = _dereq_('./ParseGeoPoint').default;
|
|
4459
|
-
Parse.Polygon = _dereq_('./ParsePolygon').default;
|
|
4460
|
-
Parse.Installation = _dereq_('./ParseInstallation').default;
|
|
4461
|
-
Parse.LocalDatastore = _dereq_('./LocalDatastore');
|
|
4462
|
-
Parse.Object = _dereq_('./ParseObject').default;
|
|
4463
|
-
Parse.Op = {
|
|
4464
|
-
Set: ParseOp.SetOp,
|
|
4465
|
-
Unset: ParseOp.UnsetOp,
|
|
4466
|
-
Increment: ParseOp.IncrementOp,
|
|
4467
|
-
Add: ParseOp.AddOp,
|
|
4468
|
-
Remove: ParseOp.RemoveOp,
|
|
4469
|
-
AddUnique: ParseOp.AddUniqueOp,
|
|
4470
|
-
Relation: ParseOp.RelationOp
|
|
4471
|
-
};
|
|
4472
|
-
Parse.Push = _dereq_('./Push');
|
|
4473
|
-
Parse.Query = _dereq_('./ParseQuery').default;
|
|
4474
|
-
Parse.Relation = _dereq_('./ParseRelation').default;
|
|
4475
|
-
Parse.Role = _dereq_('./ParseRole').default;
|
|
4476
|
-
Parse.Schema = _dereq_('./ParseSchema').default;
|
|
4477
|
-
Parse.Session = _dereq_('./ParseSession').default;
|
|
4478
|
-
Parse.Storage = _dereq_('./Storage');
|
|
4479
|
-
Parse.User = _dereq_('./ParseUser').default;
|
|
4480
|
-
Parse.LiveQuery = _dereq_('./ParseLiveQuery').default;
|
|
4481
|
-
Parse.LiveQueryClient = _dereq_('./LiveQueryClient').default;
|
|
4482
|
-
Parse._request = function () {
|
|
4483
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4484
|
-
args[_key] = arguments[_key];
|
|
4485
|
-
}
|
|
4486
|
-
return _CoreManager.default.getRESTController().request.apply(null, args);
|
|
4487
|
-
};
|
|
4488
|
-
Parse._ajax = function () {
|
|
4489
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
4490
|
-
args[_key2] = arguments[_key2];
|
|
4491
|
-
}
|
|
4492
|
-
return _CoreManager.default.getRESTController().ajax.apply(null, args);
|
|
4493
|
-
};
|
|
4494
|
-
// We attempt to match the signatures of the legacy versions of these methods
|
|
4495
|
-
Parse._decode = function (_, value) {
|
|
4496
|
-
return (0, _decode.default)(value);
|
|
4497
|
-
};
|
|
4498
|
-
Parse._encode = function (value, _, disallowObjects) {
|
|
4499
|
-
return (0, _encode.default)(value, disallowObjects);
|
|
4500
|
-
};
|
|
4501
|
-
Parse._getInstallationId = function () {
|
|
4502
|
-
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
4503
|
-
};
|
|
4504
|
-
/**
|
|
4505
|
-
* Enable pinning in your application.
|
|
4506
|
-
* This must be called after `Parse.initialize` in your application.
|
|
4507
|
-
*
|
|
4508
|
-
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
4509
|
-
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
4510
|
-
* @static
|
|
4511
|
-
*/
|
|
4512
|
-
Parse.enableLocalDatastore = function () {
|
|
4513
|
-
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4514
|
-
var ms /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
4515
|
-
if (!Parse.applicationId) {
|
|
4516
|
-
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
4517
|
-
return;
|
|
4518
|
-
}
|
|
4519
|
-
if (!Parse.LocalDatastore.isEnabled) {
|
|
4520
|
-
Parse.LocalDatastore.isEnabled = true;
|
|
4521
|
-
if (polling) {
|
|
4522
|
-
_EventuallyQueue.default.poll(ms);
|
|
4534
|
+
},
|
|
4535
|
+
_request: function () {
|
|
4536
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4537
|
+
args[_key] = arguments[_key];
|
|
4523
4538
|
}
|
|
4539
|
+
return _CoreManager.default.getRESTController().request.apply(null, args);
|
|
4540
|
+
},
|
|
4541
|
+
_ajax: function () {
|
|
4542
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
4543
|
+
args[_key2] = arguments[_key2];
|
|
4544
|
+
}
|
|
4545
|
+
return _CoreManager.default.getRESTController().ajax.apply(null, args);
|
|
4546
|
+
},
|
|
4547
|
+
// We attempt to match the signatures of the legacy versions of these methods
|
|
4548
|
+
_decode: function (_, value) {
|
|
4549
|
+
return (0, _decode2.default)(value);
|
|
4550
|
+
},
|
|
4551
|
+
_encode: function (value, _, disallowObjects) {
|
|
4552
|
+
return (0, _encode2.default)(value, disallowObjects);
|
|
4553
|
+
},
|
|
4554
|
+
_getInstallationId: function () {
|
|
4555
|
+
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
4556
|
+
},
|
|
4557
|
+
/**
|
|
4558
|
+
* Enable pinning in your application.
|
|
4559
|
+
* This must be called after `Parse.initialize` in your application.
|
|
4560
|
+
*
|
|
4561
|
+
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
4562
|
+
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
4563
|
+
* @static
|
|
4564
|
+
*/
|
|
4565
|
+
enableLocalDatastore: function () {
|
|
4566
|
+
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4567
|
+
var ms /*: number*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
4568
|
+
if (!this.applicationId) {
|
|
4569
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
4570
|
+
return;
|
|
4571
|
+
}
|
|
4572
|
+
if (!this.LocalDatastore.isEnabled) {
|
|
4573
|
+
this.LocalDatastore.isEnabled = true;
|
|
4574
|
+
if (polling) {
|
|
4575
|
+
_EventuallyQueue.default.poll(ms);
|
|
4576
|
+
}
|
|
4577
|
+
}
|
|
4578
|
+
},
|
|
4579
|
+
/**
|
|
4580
|
+
* Flag that indicates whether Local Datastore is enabled.
|
|
4581
|
+
*
|
|
4582
|
+
* @static
|
|
4583
|
+
* @returns {boolean}
|
|
4584
|
+
*/
|
|
4585
|
+
isLocalDatastoreEnabled: function () {
|
|
4586
|
+
return this.LocalDatastore.isEnabled;
|
|
4587
|
+
},
|
|
4588
|
+
/**
|
|
4589
|
+
* Gets all contents from Local Datastore
|
|
4590
|
+
*
|
|
4591
|
+
* <pre>
|
|
4592
|
+
* await Parse.dumpLocalDatastore();
|
|
4593
|
+
* </pre>
|
|
4594
|
+
*
|
|
4595
|
+
* @static
|
|
4596
|
+
* @returns {object}
|
|
4597
|
+
*/
|
|
4598
|
+
dumpLocalDatastore: function () {
|
|
4599
|
+
if (!this.LocalDatastore.isEnabled) {
|
|
4600
|
+
console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
|
|
4601
|
+
return _promise.default.resolve({});
|
|
4602
|
+
} else {
|
|
4603
|
+
return Parse.LocalDatastore._getAllContents();
|
|
4604
|
+
}
|
|
4605
|
+
},
|
|
4606
|
+
/**
|
|
4607
|
+
* Enable the current user encryption.
|
|
4608
|
+
* This must be called before login any user.
|
|
4609
|
+
*
|
|
4610
|
+
* @static
|
|
4611
|
+
*/
|
|
4612
|
+
enableEncryptedUser: function () {
|
|
4613
|
+
this.encryptedUser = true;
|
|
4614
|
+
},
|
|
4615
|
+
/**
|
|
4616
|
+
* Flag that indicates whether Encrypted User is enabled.
|
|
4617
|
+
*
|
|
4618
|
+
* @static
|
|
4619
|
+
* @returns {boolean}
|
|
4620
|
+
*/
|
|
4621
|
+
isEncryptedUserEnabled: function () {
|
|
4622
|
+
return this.encryptedUser;
|
|
4524
4623
|
}
|
|
4525
4624
|
};
|
|
4526
|
-
/**
|
|
4527
|
-
* Flag that indicates whether Local Datastore is enabled.
|
|
4528
|
-
*
|
|
4529
|
-
* @static
|
|
4530
|
-
* @returns {boolean}
|
|
4531
|
-
*/
|
|
4532
|
-
Parse.isLocalDatastoreEnabled = function () {
|
|
4533
|
-
return Parse.LocalDatastore.isEnabled;
|
|
4534
|
-
};
|
|
4535
|
-
/**
|
|
4536
|
-
* Gets all contents from Local Datastore
|
|
4537
|
-
*
|
|
4538
|
-
* <pre>
|
|
4539
|
-
* await Parse.dumpLocalDatastore();
|
|
4540
|
-
* </pre>
|
|
4541
|
-
*
|
|
4542
|
-
* @static
|
|
4543
|
-
* @returns {object}
|
|
4544
|
-
*/
|
|
4545
|
-
Parse.dumpLocalDatastore = function () {
|
|
4546
|
-
if (!Parse.LocalDatastore.isEnabled) {
|
|
4547
|
-
console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
|
|
4548
|
-
return _promise.default.resolve({});
|
|
4549
|
-
} else {
|
|
4550
|
-
return Parse.LocalDatastore._getAllContents();
|
|
4551
|
-
}
|
|
4552
|
-
};
|
|
4553
|
-
|
|
4554
|
-
/**
|
|
4555
|
-
* Enable the current user encryption.
|
|
4556
|
-
* This must be called before login any user.
|
|
4557
|
-
*
|
|
4558
|
-
* @static
|
|
4559
|
-
*/
|
|
4560
|
-
Parse.enableEncryptedUser = function () {
|
|
4561
|
-
Parse.encryptedUser = true;
|
|
4562
|
-
};
|
|
4563
|
-
|
|
4564
|
-
/**
|
|
4565
|
-
* Flag that indicates whether Encrypted User is enabled.
|
|
4566
|
-
*
|
|
4567
|
-
* @static
|
|
4568
|
-
* @returns {boolean}
|
|
4569
|
-
*/
|
|
4570
|
-
Parse.isEncryptedUserEnabled = function () {
|
|
4571
|
-
return Parse.encryptedUser;
|
|
4572
|
-
};
|
|
4573
4625
|
_CoreManager.default.setCryptoController(_CryptoController.default);
|
|
4574
4626
|
_CoreManager.default.setInstallationController(_InstallationController.default);
|
|
4575
4627
|
_CoreManager.default.setRESTController(_RESTController.default);
|
|
4576
4628
|
// For legacy requires, of the form `var Parse = require('parse').Parse`
|
|
4577
4629
|
Parse.Parse = Parse;
|
|
4578
4630
|
module.exports = Parse;
|
|
4631
|
+
var _default = Parse;
|
|
4632
|
+
exports.default = _default;
|
|
4579
4633
|
},{"./Analytics":1,"./AnonymousUtils":2,"./Cloud":3,"./CoreManager":4,"./CryptoController":5,"./EventuallyQueue":7,"./FacebookUtils":8,"./InstallationController":9,"./LiveQueryClient":10,"./LocalDatastore":12,"./ParseACL":18,"./ParseCLP":19,"./ParseConfig":20,"./ParseError":21,"./ParseFile":22,"./ParseGeoPoint":23,"./ParseInstallation":24,"./ParseLiveQuery":25,"./ParseObject":26,"./ParseOp":27,"./ParsePolygon":28,"./ParseQuery":29,"./ParseRelation":30,"./ParseRole":31,"./ParseSchema":32,"./ParseSession":33,"./ParseUser":34,"./Push":35,"./RESTController":36,"./Storage":39,"./decode":46,"./encode":47,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":85,"@babel/runtime-corejs3/core-js-stable/promise":91,"@babel/runtime-corejs3/core-js-stable/weak-map":97,"@babel/runtime-corejs3/helpers/interopRequireDefault":111,"@babel/runtime-corejs3/helpers/typeof":126}],18:[function(_dereq_,module,exports){
|
|
4580
4634
|
"use strict";
|
|
4581
4635
|
|
|
@@ -12426,21 +12480,16 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12426
12480
|
}, {
|
|
12427
12481
|
key: "eachBatch",
|
|
12428
12482
|
value: function (callback /*: (objs: Array<ParseObject>) => Promise<*>*/, options /*:: ?: BatchOptions*/) /*: Promise<void>*/{
|
|
12429
|
-
var _context8;
|
|
12430
12483
|
options = options || {};
|
|
12431
12484
|
if (this._order || this._skip || this._limit >= 0) {
|
|
12432
12485
|
return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
|
|
12433
12486
|
}
|
|
12434
12487
|
var query = new ParseQuery(this.className);
|
|
12435
12488
|
query._limit = options.batchSize || 100;
|
|
12436
|
-
query._include = (0,
|
|
12437
|
-
|
|
12438
|
-
});
|
|
12489
|
+
query._include = (0, _toConsumableArray2.default)(this._include);
|
|
12490
|
+
query._exclude = (0, _toConsumableArray2.default)(this._exclude);
|
|
12439
12491
|
if (this._select) {
|
|
12440
|
-
|
|
12441
|
-
query._select = (0, _map2.default)(_context9 = this._select).call(_context9, function (s) {
|
|
12442
|
-
return s;
|
|
12443
|
-
});
|
|
12492
|
+
query._select = (0, _toConsumableArray2.default)(this._select);
|
|
12444
12493
|
}
|
|
12445
12494
|
query._hint = this._hint;
|
|
12446
12495
|
query._where = {};
|
|
@@ -12480,39 +12529,39 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12480
12529
|
return !finished;
|
|
12481
12530
|
}, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
12482
12531
|
var _yield$Promise$all, _yield$Promise$all2, results;
|
|
12483
|
-
return _regenerator.default.wrap(function (
|
|
12484
|
-
while (1) switch (
|
|
12532
|
+
return _regenerator.default.wrap(function (_context8) {
|
|
12533
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
12485
12534
|
case 0:
|
|
12486
|
-
|
|
12535
|
+
_context8.next = 2;
|
|
12487
12536
|
return _promise.default.all([(0, _find.default)(query).call(query, findOptions), _promise.default.resolve(previousResults.length > 0 && callback(previousResults))]);
|
|
12488
12537
|
case 2:
|
|
12489
|
-
_yield$Promise$all =
|
|
12538
|
+
_yield$Promise$all = _context8.sent;
|
|
12490
12539
|
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 1);
|
|
12491
12540
|
results = _yield$Promise$all2[0];
|
|
12492
12541
|
if (!(results.length >= query._limit)) {
|
|
12493
|
-
|
|
12542
|
+
_context8.next = 10;
|
|
12494
12543
|
break;
|
|
12495
12544
|
}
|
|
12496
12545
|
query.greaterThan('objectId', results[results.length - 1].id);
|
|
12497
12546
|
previousResults = results;
|
|
12498
|
-
|
|
12547
|
+
_context8.next = 17;
|
|
12499
12548
|
break;
|
|
12500
12549
|
case 10:
|
|
12501
12550
|
if (!(results.length > 0)) {
|
|
12502
|
-
|
|
12551
|
+
_context8.next = 16;
|
|
12503
12552
|
break;
|
|
12504
12553
|
}
|
|
12505
|
-
|
|
12554
|
+
_context8.next = 13;
|
|
12506
12555
|
return _promise.default.resolve(callback(results));
|
|
12507
12556
|
case 13:
|
|
12508
12557
|
finished = true;
|
|
12509
|
-
|
|
12558
|
+
_context8.next = 17;
|
|
12510
12559
|
break;
|
|
12511
12560
|
case 16:
|
|
12512
12561
|
finished = true;
|
|
12513
12562
|
case 17:
|
|
12514
12563
|
case "end":
|
|
12515
|
-
return
|
|
12564
|
+
return _context8.stop();
|
|
12516
12565
|
}
|
|
12517
12566
|
}, _callee3);
|
|
12518
12567
|
})));
|
|
@@ -12613,12 +12662,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12613
12662
|
var _map = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(callback /*: (currentObject: ParseObject, index: number, query: ParseQuery) => any*/, options /*:: ?: BatchOptions*/) {
|
|
12614
12663
|
var _this5 = this;
|
|
12615
12664
|
var array, index;
|
|
12616
|
-
return _regenerator.default.wrap(function (
|
|
12617
|
-
while (1) switch (
|
|
12665
|
+
return _regenerator.default.wrap(function (_context9) {
|
|
12666
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
12618
12667
|
case 0:
|
|
12619
12668
|
array = [];
|
|
12620
12669
|
index = 0;
|
|
12621
|
-
|
|
12670
|
+
_context9.next = 4;
|
|
12622
12671
|
return this.each(function (object) {
|
|
12623
12672
|
return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
|
|
12624
12673
|
array.push(result);
|
|
@@ -12626,10 +12675,10 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12626
12675
|
});
|
|
12627
12676
|
}, options);
|
|
12628
12677
|
case 4:
|
|
12629
|
-
return
|
|
12678
|
+
return _context9.abrupt("return", array);
|
|
12630
12679
|
case 5:
|
|
12631
12680
|
case "end":
|
|
12632
|
-
return
|
|
12681
|
+
return _context9.stop();
|
|
12633
12682
|
}
|
|
12634
12683
|
}, _callee4, this);
|
|
12635
12684
|
}));
|
|
@@ -12666,12 +12715,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12666
12715
|
value: function () {
|
|
12667
12716
|
var _reduce = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(callback /*: (accumulator: any, currentObject: ParseObject, index: number) => any*/, initialValue /*: any*/, options /*:: ?: BatchOptions*/) {
|
|
12668
12717
|
var accumulator, index;
|
|
12669
|
-
return _regenerator.default.wrap(function (
|
|
12670
|
-
while (1) switch (
|
|
12718
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
12719
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
12671
12720
|
case 0:
|
|
12672
12721
|
accumulator = initialValue;
|
|
12673
12722
|
index = 0;
|
|
12674
|
-
|
|
12723
|
+
_context10.next = 4;
|
|
12675
12724
|
return this.each(function (object) {
|
|
12676
12725
|
// If no initial value was given, we take the first object from the query
|
|
12677
12726
|
// as the initial value and don't call the callback with it.
|
|
@@ -12687,15 +12736,15 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12687
12736
|
}, options);
|
|
12688
12737
|
case 4:
|
|
12689
12738
|
if (!(index === 0 && initialValue === undefined)) {
|
|
12690
|
-
|
|
12739
|
+
_context10.next = 6;
|
|
12691
12740
|
break;
|
|
12692
12741
|
}
|
|
12693
12742
|
throw new TypeError('Reducing empty query result set with no initial value');
|
|
12694
12743
|
case 6:
|
|
12695
|
-
return
|
|
12744
|
+
return _context10.abrupt("return", accumulator);
|
|
12696
12745
|
case 7:
|
|
12697
12746
|
case "end":
|
|
12698
|
-
return
|
|
12747
|
+
return _context10.stop();
|
|
12699
12748
|
}
|
|
12700
12749
|
}, _callee5, this);
|
|
12701
12750
|
}));
|
|
@@ -12732,12 +12781,12 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12732
12781
|
var _filter = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(callback /*: (currentObject: ParseObject, index: number, query: ParseQuery) => boolean*/, options /*:: ?: BatchOptions*/) {
|
|
12733
12782
|
var _this6 = this;
|
|
12734
12783
|
var array, index;
|
|
12735
|
-
return _regenerator.default.wrap(function (
|
|
12736
|
-
while (1) switch (
|
|
12784
|
+
return _regenerator.default.wrap(function (_context11) {
|
|
12785
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
12737
12786
|
case 0:
|
|
12738
12787
|
array = [];
|
|
12739
12788
|
index = 0;
|
|
12740
|
-
|
|
12789
|
+
_context11.next = 4;
|
|
12741
12790
|
return this.each(function (object) {
|
|
12742
12791
|
return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
|
|
12743
12792
|
if (flag) {
|
|
@@ -12747,10 +12796,10 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12747
12796
|
});
|
|
12748
12797
|
}, options);
|
|
12749
12798
|
case 4:
|
|
12750
|
-
return
|
|
12799
|
+
return _context11.abrupt("return", array);
|
|
12751
12800
|
case 5:
|
|
12752
12801
|
case "end":
|
|
12753
|
-
return
|
|
12802
|
+
return _context11.stop();
|
|
12754
12803
|
}
|
|
12755
12804
|
}, _callee6, this);
|
|
12756
12805
|
}));
|
|
@@ -12773,8 +12822,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12773
12822
|
value: function (key /*: string | { [key: string]: any }*/, value /*: ?mixed*/) /*: ParseQuery*/{
|
|
12774
12823
|
var _this7 = this;
|
|
12775
12824
|
if (key && (0, _typeof2.default)(key) === 'object') {
|
|
12776
|
-
var
|
|
12777
|
-
(0, _forEach.default)(
|
|
12825
|
+
var _context12;
|
|
12826
|
+
(0, _forEach.default)(_context12 = (0, _entries.default)(key)).call(_context12, function (_ref2) {
|
|
12778
12827
|
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
12779
12828
|
k = _ref3[0],
|
|
12780
12829
|
val = _ref3[1];
|
|
@@ -12802,8 +12851,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
12802
12851
|
value: function (key /*: string | { [key: string]: any }*/, value /*: ?mixed*/) /*: ParseQuery*/{
|
|
12803
12852
|
var _this8 = this;
|
|
12804
12853
|
if (key && (0, _typeof2.default)(key) === 'object') {
|
|
12805
|
-
var
|
|
12806
|
-
(0, _forEach.default)(
|
|
12854
|
+
var _context13;
|
|
12855
|
+
(0, _forEach.default)(_context13 = (0, _entries.default)(key)).call(_context13, function (_ref4) {
|
|
12807
12856
|
var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
|
|
12808
12857
|
k = _ref5[0],
|
|
12809
12858
|
val = _ref5[1];
|
|
@@ -13392,11 +13441,11 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13392
13441
|
keys[_key6] = arguments[_key6];
|
|
13393
13442
|
}
|
|
13394
13443
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13395
|
-
var
|
|
13444
|
+
var _context14;
|
|
13396
13445
|
if ((0, _isArray.default)(key)) {
|
|
13397
13446
|
key = key.join();
|
|
13398
13447
|
}
|
|
13399
|
-
_this9._order = (0, _concat.default)(
|
|
13448
|
+
_this9._order = (0, _concat.default)(_context14 = _this9._order).call(_context14, key.replace(/\s/g, '').split(','));
|
|
13400
13449
|
});
|
|
13401
13450
|
return this;
|
|
13402
13451
|
}
|
|
@@ -13437,11 +13486,11 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13437
13486
|
keys[_key8] = arguments[_key8];
|
|
13438
13487
|
}
|
|
13439
13488
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13440
|
-
var
|
|
13489
|
+
var _context15, _context16;
|
|
13441
13490
|
if ((0, _isArray.default)(key)) {
|
|
13442
13491
|
key = key.join();
|
|
13443
13492
|
}
|
|
13444
|
-
_this10._order = (0, _concat.default)(
|
|
13493
|
+
_this10._order = (0, _concat.default)(_context15 = _this10._order).call(_context15, (0, _map2.default)(_context16 = key.replace(/\s/g, '').split(',')).call(_context16, function (k) {
|
|
13445
13494
|
return '-' + k;
|
|
13446
13495
|
}));
|
|
13447
13496
|
});
|
|
@@ -13523,8 +13572,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13523
13572
|
}
|
|
13524
13573
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13525
13574
|
if ((0, _isArray.default)(key)) {
|
|
13526
|
-
var
|
|
13527
|
-
_this11._include = (0, _concat.default)(
|
|
13575
|
+
var _context17;
|
|
13576
|
+
_this11._include = (0, _concat.default)(_context17 = _this11._include).call(_context17, key);
|
|
13528
13577
|
} else {
|
|
13529
13578
|
_this11._include.push(key);
|
|
13530
13579
|
}
|
|
@@ -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
|
-
_this12._select = (0, _concat.default)(
|
|
13617
|
+
var _context18;
|
|
13618
|
+
_this12._select = (0, _concat.default)(_context18 = _this12._select).call(_context18, key);
|
|
13570
13619
|
} else {
|
|
13571
13620
|
_this12._select.push(key);
|
|
13572
13621
|
}
|
|
@@ -13592,8 +13641,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13592
13641
|
}
|
|
13593
13642
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13594
13643
|
if ((0, _isArray.default)(key)) {
|
|
13595
|
-
var
|
|
13596
|
-
_this13._exclude = (0, _concat.default)(
|
|
13644
|
+
var _context19;
|
|
13645
|
+
_this13._exclude = (0, _concat.default)(_context19 = _this13._exclude).call(_context19, key);
|
|
13597
13646
|
} else {
|
|
13598
13647
|
_this13._exclude.push(key);
|
|
13599
13648
|
}
|
|
@@ -13618,8 +13667,8 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13618
13667
|
}
|
|
13619
13668
|
(0, _forEach.default)(keys).call(keys, function (key) {
|
|
13620
13669
|
if ((0, _isArray.default)(key)) {
|
|
13621
|
-
var
|
|
13622
|
-
_this14._watch = (0, _concat.default)(
|
|
13670
|
+
var _context20;
|
|
13671
|
+
_this14._watch = (0, _concat.default)(_context20 = _this14._watch).call(_context20, key);
|
|
13623
13672
|
} else {
|
|
13624
13673
|
_this14._watch.push(key);
|
|
13625
13674
|
}
|
|
@@ -13656,30 +13705,30 @@ var ParseQuery = /*#__PURE__*/function () {
|
|
|
13656
13705
|
value: function () {
|
|
13657
13706
|
var _subscribe = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(sessionToken /*:: ?: string*/) {
|
|
13658
13707
|
var currentUser, liveQueryClient, subscription;
|
|
13659
|
-
return _regenerator.default.wrap(function (
|
|
13660
|
-
while (1) switch (
|
|
13708
|
+
return _regenerator.default.wrap(function (_context21) {
|
|
13709
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
13661
13710
|
case 0:
|
|
13662
|
-
|
|
13711
|
+
_context21.next = 2;
|
|
13663
13712
|
return _CoreManager.default.getUserController().currentUserAsync();
|
|
13664
13713
|
case 2:
|
|
13665
|
-
currentUser =
|
|
13714
|
+
currentUser = _context21.sent;
|
|
13666
13715
|
if (!sessionToken) {
|
|
13667
13716
|
sessionToken = currentUser ? currentUser.getSessionToken() : undefined;
|
|
13668
13717
|
}
|
|
13669
|
-
|
|
13718
|
+
_context21.next = 6;
|
|
13670
13719
|
return _CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient();
|
|
13671
13720
|
case 6:
|
|
13672
|
-
liveQueryClient =
|
|
13721
|
+
liveQueryClient = _context21.sent;
|
|
13673
13722
|
if (liveQueryClient.shouldOpen()) {
|
|
13674
13723
|
liveQueryClient.open();
|
|
13675
13724
|
}
|
|
13676
13725
|
subscription = liveQueryClient.subscribe(this, sessionToken);
|
|
13677
|
-
return
|
|
13726
|
+
return _context21.abrupt("return", subscription.subscribePromise.then(function () {
|
|
13678
13727
|
return subscription;
|
|
13679
13728
|
}));
|
|
13680
13729
|
case 10:
|
|
13681
13730
|
case "end":
|
|
13682
|
-
return
|
|
13731
|
+
return _context21.stop();
|
|
13683
13732
|
}
|
|
13684
13733
|
}, _callee7, this);
|
|
13685
13734
|
}));
|
|
@@ -14782,11 +14831,7 @@ function _isNativeReflectConstruct() {
|
|
|
14782
14831
|
} catch (e) {
|
|
14783
14832
|
return false;
|
|
14784
14833
|
}
|
|
14785
|
-
}
|
|
14786
|
-
* @flow
|
|
14787
|
-
*/
|
|
14788
|
-
/*:: import type { AttributeMap } from './ObjectStateMutations';*/
|
|
14789
|
-
/*:: import type { RequestOptions, FullOptions } from './RESTController';*/
|
|
14834
|
+
}
|
|
14790
14835
|
/**
|
|
14791
14836
|
* <p>A Parse.Session object is a local representation of a revocable session.
|
|
14792
14837
|
* This class is a subclass of a Parse.Object, and retains the same
|
|
@@ -14801,7 +14846,7 @@ var ParseSession = /*#__PURE__*/function (_ParseObject) {
|
|
|
14801
14846
|
/**
|
|
14802
14847
|
* @param {object} attributes The initial set of data to store in the user.
|
|
14803
14848
|
*/
|
|
14804
|
-
function ParseSession(attributes
|
|
14849
|
+
function ParseSession(attributes /*:: ?: any*/) {
|
|
14805
14850
|
var _this;
|
|
14806
14851
|
(0, _classCallCheck2.default)(this, ParseSession);
|
|
14807
14852
|
_this = _super.call(this, '_Session');
|
|
@@ -15780,6 +15825,40 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15780
15825
|
return user.logIn(options);
|
|
15781
15826
|
}
|
|
15782
15827
|
|
|
15828
|
+
/**
|
|
15829
|
+
* Logs in a user with a username (or email) and password, and authData. On success, this
|
|
15830
|
+
* saves the session to disk, so you can retrieve the currently logged in
|
|
15831
|
+
* user using <code>current</code>.
|
|
15832
|
+
*
|
|
15833
|
+
* @param {string} username The username (or email) to log in with.
|
|
15834
|
+
* @param {string} password The password to log in with.
|
|
15835
|
+
* @param {object} authData The authData to log in with.
|
|
15836
|
+
* @param {object} options
|
|
15837
|
+
* @static
|
|
15838
|
+
* @returns {Promise} A promise that is fulfilled with the user when
|
|
15839
|
+
* the login completes.
|
|
15840
|
+
*/
|
|
15841
|
+
}, {
|
|
15842
|
+
key: "logInWithAdditionalAuth",
|
|
15843
|
+
value: function (username /*: string*/, password /*: string*/, authData /*: AuthData*/, options /*:: ?: FullOptions*/) {
|
|
15844
|
+
if (typeof username !== 'string') {
|
|
15845
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Username must be a string.'));
|
|
15846
|
+
}
|
|
15847
|
+
if (typeof password !== 'string') {
|
|
15848
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
|
|
15849
|
+
}
|
|
15850
|
+
if (Object.prototype.toString.call(authData) !== '[object Object]') {
|
|
15851
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Auth must be an object.'));
|
|
15852
|
+
}
|
|
15853
|
+
var user = new this();
|
|
15854
|
+
user._finishFetch({
|
|
15855
|
+
username: username,
|
|
15856
|
+
password: password,
|
|
15857
|
+
authData: authData
|
|
15858
|
+
});
|
|
15859
|
+
return user.logIn(options);
|
|
15860
|
+
}
|
|
15861
|
+
|
|
15783
15862
|
/**
|
|
15784
15863
|
* Logs in a user with an objectId. On success, this saves the session
|
|
15785
15864
|
* to disk, so you can retrieve the currently logged in user using
|
|
@@ -16229,7 +16308,8 @@ var DefaultController = {
|
|
|
16229
16308
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
16230
16309
|
var auth = {
|
|
16231
16310
|
username: user.get('username'),
|
|
16232
|
-
password: user.get('password')
|
|
16311
|
+
password: user.get('password'),
|
|
16312
|
+
authData: user.get('authData')
|
|
16233
16313
|
};
|
|
16234
16314
|
return RESTController.request(options.usePost ? 'POST' : 'GET', 'login', auth, options).then(function (response) {
|
|
16235
16315
|
user._migrateId(response.objectId);
|
|
@@ -17068,7 +17148,12 @@ module.exports = /*#__PURE__*/function () {
|
|
|
17068
17148
|
},{"@babel/runtime-corejs3/helpers/classCallCheck":104,"@babel/runtime-corejs3/helpers/createClass":106,"@babel/runtime-corejs3/helpers/interopRequireDefault":111}],39:[function(_dereq_,module,exports){
|
|
17069
17149
|
"use strict";
|
|
17070
17150
|
|
|
17151
|
+
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
17071
17152
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
17153
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
17154
|
+
value: true
|
|
17155
|
+
});
|
|
17156
|
+
exports.default = void 0;
|
|
17072
17157
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
17073
17158
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
17074
17159
|
/**
|
|
@@ -17156,8 +17241,10 @@ var Storage = {
|
|
|
17156
17241
|
}
|
|
17157
17242
|
};
|
|
17158
17243
|
module.exports = Storage;
|
|
17244
|
+
var _default = Storage;
|
|
17245
|
+
exports.default = _default;
|
|
17159
17246
|
_CoreManager.default.setStorageController(_dereq_('./StorageController.weapp'));
|
|
17160
|
-
},{"./CoreManager":4,"./StorageController.weapp":40,"@babel/runtime-corejs3/core-js-stable/promise":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":111}],40:[function(_dereq_,module,exports){
|
|
17247
|
+
},{"./CoreManager":4,"./StorageController.weapp":40,"@babel/runtime-corejs3/core-js-stable/object/define-property":82,"@babel/runtime-corejs3/core-js-stable/promise":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":111}],40:[function(_dereq_,module,exports){
|
|
17161
17248
|
"use strict";
|
|
17162
17249
|
|
|
17163
17250
|
var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
|