parse 5.1.0-alpha.4 → 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.
- package/dist/parse.js +39 -14
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +39 -14
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +14 -2
- package/lib/browser/Parse.js +12 -2
- package/lib/browser/ParseObject.js +4 -5
- package/lib/browser/RESTController.js +6 -2
- package/lib/node/CoreManager.js +14 -2
- package/lib/node/Parse.js +12 -2
- package/lib/node/ParseObject.js +4 -5
- package/lib/node/RESTController.js +5 -2
- package/lib/react-native/CoreManager.js +8 -1
- package/lib/react-native/Parse.js +8 -2
- package/lib/react-native/ParseObject.js +4 -5
- package/lib/react-native/RESTController.js +5 -2
- package/lib/weapp/CoreManager.js +14 -2
- package/lib/weapp/Parse.js +12 -2
- package/lib/weapp/ParseObject.js +4 -5
- package/lib/weapp/RESTController.js +6 -2
- package/package.json +1 -1
package/dist/parse.weapp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v5.1.0-alpha.
|
|
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.
|
|
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
|
-
|
|
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
|
|
9314
|
+
return _CoreManager.default.getEventuallyQueue().save(this, options);
|
|
9294
9315
|
case 10:
|
|
9295
|
-
|
|
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
|
|
9483
|
+
return _CoreManager.default.getEventuallyQueue().destroy(this, options);
|
|
9463
9484
|
case 10:
|
|
9464
|
-
|
|
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,"./
|
|
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");
|
|
@@ -16820,6 +16841,7 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
|
|
|
16820
16841
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
16821
16842
|
var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
16822
16843
|
var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
16844
|
+
var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
16823
16845
|
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
16824
16846
|
var _setTimeout2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/set-timeout"));
|
|
16825
16847
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
@@ -16945,11 +16967,14 @@ var RESTController = {
|
|
|
16945
16967
|
var response;
|
|
16946
16968
|
try {
|
|
16947
16969
|
response = JSON.parse(xhr.responseText);
|
|
16970
|
+
var availableHeaders = typeof xhr.getAllResponseHeaders === 'function' ? xhr.getAllResponseHeaders() : "";
|
|
16948
16971
|
headers = {};
|
|
16949
|
-
if (typeof xhr.getResponseHeader === 'function' &&
|
|
16972
|
+
if (typeof xhr.getResponseHeader === 'function' && (availableHeaders === null || availableHeaders === void 0 ? void 0 : (0, _indexOf.default)(availableHeaders).call(availableHeaders, 'access-control-expose-headers')) >= 0) {
|
|
16950
16973
|
var responseHeaders = xhr.getResponseHeader('access-control-expose-headers').split(', ');
|
|
16951
16974
|
(0, _forEach.default)(responseHeaders).call(responseHeaders, function (header) {
|
|
16952
|
-
|
|
16975
|
+
if ((0, _indexOf.default)(availableHeaders).call(availableHeaders, header.toLowerCase()) >= 0) {
|
|
16976
|
+
headers[header] = xhr.getResponseHeader(header.toLowerCase());
|
|
16977
|
+
}
|
|
16953
16978
|
});
|
|
16954
16979
|
}
|
|
16955
16980
|
} catch (e) {
|
|
@@ -17153,7 +17178,7 @@ var RESTController = {
|
|
|
17153
17178
|
};
|
|
17154
17179
|
module.exports = RESTController;
|
|
17155
17180
|
}).call(this)}).call(this,_dereq_('_process'))
|
|
17156
|
-
},{"./CoreManager":4,"./ParseError":23,"./Xhr.weapp":47,"./promiseUtils":56,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@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/json/stringify":80,"@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/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/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/set-timeout":98,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130,"_process":134}],39:[function(_dereq_,module,exports){
|
|
17181
|
+
},{"./CoreManager":4,"./ParseError":23,"./Xhr.weapp":47,"./promiseUtils":56,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@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/json/stringify":80,"@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/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/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/set-timeout":98,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130,"_process":134}],39:[function(_dereq_,module,exports){
|
|
17157
17182
|
"use strict";
|
|
17158
17183
|
|
|
17159
17184
|
var _typeof = _dereq_("@babel/runtime-corejs3/helpers/typeof");
|