parse 5.1.0-alpha.5 → 5.1.0-alpha.6

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.1.0-alpha.5
2
+ * Parse JavaScript SDK v5.1.0-alpha.6
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -385,7 +385,7 @@ var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-sta
385
385
  /*:: import type ParseFile from './ParseFile';*/
386
386
  /*:: import type { FileSource } from './ParseFile';*/
387
387
  /*:: import type { Op } from './ParseOp';*/
388
- /*:: import type ParseObject from './ParseObject';*/
388
+ /*:: import type ParseObject, {SaveOptions} from './ParseObject';*/
389
389
  /*:: import type { QueryJSON } from './ParseQuery';*/
390
390
  /*:: import type ParseUser from './ParseUser';*/
391
391
  /*:: import type { AuthData } from './ParseUser';*/
@@ -451,6 +451,11 @@ var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-sta
451
451
  find: (className: string, params: QueryJSON, options: RequestOptions) => Promise,
452
452
  aggregate: (className: string, params: any, options: RequestOptions) => Promise,
453
453
  };*/
454
+ /*:: type EventuallyQueue = {
455
+ save: (object: ParseObject, serverOptions: SaveOptions) => Promise,
456
+ destroy: (object: ParseObject, serverOptions: RequestOptions) => Promise,
457
+ poll: (ms: number) => void
458
+ };*/
454
459
  /*:: type RESTController = {
455
460
  request: (method: string, path: string, data: mixed, options: RequestOptions) => Promise,
456
461
  ajax: (method: string, url: string, data: any, headers?: any, options: FullOptions) => Promise,
@@ -557,7 +562,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
557
562
  SERVER_AUTH_TOKEN: null,
558
563
  LIVEQUERY_SERVER_URL: null,
559
564
  ENCRYPTED_KEY: null,
560
- VERSION: 'js' + "5.1.0-alpha.5",
565
+ VERSION: 'js' + "5.1.0-alpha.6",
561
566
  APPLICATION_ID: null,
562
567
  JAVASCRIPT_KEY: null,
563
568
  MASTER_KEY: null,
@@ -682,6 +687,13 @@ var CoreManager = {
682
687
  getRESTController: function () /*: RESTController*/{
683
688
  return config['RESTController'];
684
689
  },
690
+ setEventuallyQueue: function (controller /*: EventuallyQueue*/) {
691
+ requireMethods('EventuallyQueue', ['poll', 'save', 'destroy'], controller);
692
+ config['EventuallyQueue'] = controller;
693
+ },
694
+ getEventuallyQueue: function () /*: EventuallyQueue*/{
695
+ return config['EventuallyQueue'];
696
+ },
685
697
  setSchemaController: function (controller /*: SchemaController*/) {
686
698
  requireMethods('SchemaController', ['get', 'create', 'update', 'delete', 'send', 'purge'], controller);
687
699
  config['SchemaController'] = controller;
@@ -4384,7 +4396,6 @@ var Parse /*: ParseType*/ = {
4384
4396
  CoreManager: _CoreManager.default,
4385
4397
  Config: _ParseConfig.default,
4386
4398
  Error: _ParseError.default,
4387
- EventuallyQueue: _EventuallyQueue.default,
4388
4399
  FacebookUtils: _FacebookUtils.default,
4389
4400
  File: _ParseFile.default,
4390
4401
  GeoPoint: _ParseGeoPoint.default,
@@ -4413,6 +4424,16 @@ var Parse /*: ParseType*/ = {
4413
4424
  IndexedDB: undefined,
4414
4425
  Hooks: undefined,
4415
4426
  Parse: undefined,
4427
+ /**
4428
+ * @member {EventuallyQueue} Parse.EventuallyQueue
4429
+ * @static
4430
+ */
4431
+ set EventuallyQueue(queue /*: EventuallyQueue*/) {
4432
+ _CoreManager.default.setEventuallyQueue(queue);
4433
+ },
4434
+ get EventuallyQueue() {
4435
+ return _CoreManager.default.getEventuallyQueue();
4436
+ },
4416
4437
  /**
4417
4438
  * Call this method first to set up your authentication tokens for Parse.
4418
4439
  *
@@ -4435,6 +4456,7 @@ var Parse /*: ParseType*/ = {
4435
4456
  _CoreManager.default.setIfNeeded('LocalDatastoreController', _LocalDatastoreController.default);
4436
4457
  _CoreManager.default.setIfNeeded('StorageController', _StorageController.default);
4437
4458
  _CoreManager.default.setIfNeeded('WebSocketController', _WebSocketController.default);
4459
+ _CoreManager.default.setIfNeeded('EventuallyQueue', _EventuallyQueue.default);
4438
4460
  },
4439
4461
  /**
4440
4462
  * Call this method to set your AsyncStorage engine
@@ -4626,7 +4648,7 @@ var Parse /*: ParseType*/ = {
4626
4648
  if (!this.LocalDatastore.isEnabled) {
4627
4649
  this.LocalDatastore.isEnabled = true;
4628
4650
  if (polling) {
4629
- _EventuallyQueue.default.poll(ms);
4651
+ _CoreManager.default.getEventuallyQueue().poll(ms);
4630
4652
  }
4631
4653
  }
4632
4654
  },
@@ -7858,7 +7880,6 @@ var _canBeSerialized = _interopRequireDefault(_dereq_("./canBeSerialized"));
7858
7880
  var _decode = _interopRequireDefault(_dereq_("./decode"));
7859
7881
  var _encode = _interopRequireDefault(_dereq_("./encode"));
7860
7882
  var _escape2 = _interopRequireDefault(_dereq_("./escape"));
7861
- var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
7862
7883
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
7863
7884
  var _parseDate = _interopRequireDefault(_dereq_("./parseDate"));
7864
7885
  var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
@@ -9290,9 +9311,9 @@ var ParseObject = /*#__PURE__*/function () {
9290
9311
  break;
9291
9312
  }
9292
9313
  _context4.next = 10;
9293
- return _EventuallyQueue.default.save(this, options);
9314
+ return _CoreManager.default.getEventuallyQueue().save(this, options);
9294
9315
  case 10:
9295
- _EventuallyQueue.default.poll();
9316
+ _CoreManager.default.getEventuallyQueue().poll();
9296
9317
  case 11:
9297
9318
  return _context4.abrupt("return", this);
9298
9319
  case 12:
@@ -9459,9 +9480,9 @@ var ParseObject = /*#__PURE__*/function () {
9459
9480
  break;
9460
9481
  }
9461
9482
  _context5.next = 10;
9462
- return _EventuallyQueue.default.destroy(this, options);
9483
+ return _CoreManager.default.getEventuallyQueue().destroy(this, options);
9463
9484
  case 10:
9464
- _EventuallyQueue.default.poll();
9485
+ _CoreManager.default.getEventuallyQueue().poll();
9465
9486
  case 11:
9466
9487
  return _context5.abrupt("return", this);
9467
9488
  case 12:
@@ -10860,7 +10881,7 @@ var DefaultController = {
10860
10881
  _CoreManager.default.setObjectController(DefaultController);
10861
10882
  var _default = ParseObject;
10862
10883
  exports.default = _default;
10863
- },{"./CoreManager":4,"./EventuallyQueue":7,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseQuery":31,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":45,"./canBeSerialized":49,"./decode":50,"./encode":51,"./escape":53,"./parseDate":55,"./promiseUtils":56,"./unique":57,"./unsavedChildren":58,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/array/from":60,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/find":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/slice":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/create":84,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/freeze":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":92,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/symbol":100,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/toConsumableArray":127,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],29:[function(_dereq_,module,exports){
10884
+ },{"./CoreManager":4,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseQuery":31,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":45,"./canBeSerialized":49,"./decode":50,"./encode":51,"./escape":53,"./parseDate":55,"./promiseUtils":56,"./unique":57,"./unsavedChildren":58,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/array/from":60,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/find":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/slice":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/create":84,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/freeze":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":92,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/symbol":100,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/toConsumableArray":127,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],29:[function(_dereq_,module,exports){
10864
10885
  "use strict";
10865
10886
 
10866
10887
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");