parse 5.1.0 → 5.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +140 -88
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +141 -89
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +10 -10
- package/lib/browser/ParseInstallation.js +103 -9
- package/lib/browser/ParseObject.js +5 -5
- package/lib/browser/arrayContainsObject.js +0 -4
- package/lib/browser/canBeSerialized.js +0 -4
- package/lib/browser/decode.js +0 -7
- package/lib/browser/encode.js +3 -7
- package/lib/browser/equals.js +1 -1
- package/lib/browser/escape.js +0 -4
- package/lib/browser/isRevocableSession.js +0 -4
- package/lib/browser/parseDate.js +1 -5
- package/lib/browser/promiseUtils.js +11 -10
- package/lib/browser/unique.js +1 -5
- package/lib/browser/unsavedChildren.js +0 -8
- package/lib/browser/uuid.js +2 -2
- package/lib/node/CoreManager.js +10 -10
- package/lib/node/ParseInstallation.js +46 -2
- package/lib/node/ParseObject.js +5 -5
- package/lib/node/arrayContainsObject.js +0 -4
- package/lib/node/canBeSerialized.js +0 -4
- package/lib/node/decode.js +0 -7
- package/lib/node/encode.js +3 -7
- package/lib/node/equals.js +1 -1
- package/lib/node/escape.js +0 -4
- package/lib/node/isRevocableSession.js +0 -4
- package/lib/node/parseDate.js +1 -5
- package/lib/node/promiseUtils.js +11 -10
- package/lib/node/unique.js +1 -5
- package/lib/node/unsavedChildren.js +0 -8
- package/lib/node/uuid.js +2 -2
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseInstallation.js +51 -3
- package/lib/react-native/ParseObject.js +2 -2
- package/lib/react-native/decode.js +0 -1
- package/lib/react-native/promiseUtils.js +5 -4
- package/lib/react-native/uuid.js +1 -2
- package/lib/weapp/CoreManager.js +10 -10
- package/lib/weapp/ParseInstallation.js +103 -9
- package/lib/weapp/ParseObject.js +5 -5
- package/lib/weapp/arrayContainsObject.js +0 -4
- package/lib/weapp/canBeSerialized.js +0 -4
- package/lib/weapp/decode.js +0 -7
- package/lib/weapp/encode.js +3 -7
- package/lib/weapp/equals.js +1 -1
- package/lib/weapp/escape.js +0 -4
- package/lib/weapp/isRevocableSession.js +0 -4
- package/lib/weapp/parseDate.js +1 -5
- package/lib/weapp/promiseUtils.js +11 -10
- package/lib/weapp/unique.js +1 -5
- package/lib/weapp/unsavedChildren.js +0 -8
- package/lib/weapp/uuid.js +3 -3
- package/package.json +1 -1
package/dist/parse.weapp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v5.1.
|
|
2
|
+
* Parse JavaScript SDK v5.1.1-alpha.1
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -397,7 +397,7 @@ var config /*: Config & { [key: string]: any }*/ = {
|
|
|
397
397
|
SERVER_AUTH_TOKEN: null,
|
|
398
398
|
LIVEQUERY_SERVER_URL: null,
|
|
399
399
|
ENCRYPTED_KEY: null,
|
|
400
|
-
VERSION: 'js' + "5.1.
|
|
400
|
+
VERSION: 'js' + "5.1.1-alpha.1",
|
|
401
401
|
APPLICATION_ID: null,
|
|
402
402
|
JAVASCRIPT_KEY: null,
|
|
403
403
|
MASTER_KEY: null,
|
|
@@ -600,34 +600,34 @@ var CoreManager = {
|
|
|
600
600
|
getHooksController: function () /*: HooksController*/{
|
|
601
601
|
return config['HooksController'];
|
|
602
602
|
},
|
|
603
|
-
setParseOp: function (op /*:
|
|
603
|
+
setParseOp: function (op /*: any*/) {
|
|
604
604
|
config['ParseOp'] = op;
|
|
605
605
|
},
|
|
606
606
|
getParseOp: function () {
|
|
607
607
|
return config['ParseOp'];
|
|
608
608
|
},
|
|
609
|
-
setParseObject: function (object /*:
|
|
609
|
+
setParseObject: function (object /*: any*/) {
|
|
610
610
|
config['ParseObject'] = object;
|
|
611
611
|
},
|
|
612
|
-
getParseObject: function ()
|
|
612
|
+
getParseObject: function () {
|
|
613
613
|
return config['ParseObject'];
|
|
614
614
|
},
|
|
615
|
-
setParseQuery: function (query /*:
|
|
615
|
+
setParseQuery: function (query /*: any*/) {
|
|
616
616
|
config['ParseQuery'] = query;
|
|
617
617
|
},
|
|
618
|
-
getParseQuery: function ()
|
|
618
|
+
getParseQuery: function () {
|
|
619
619
|
return config['ParseQuery'];
|
|
620
620
|
},
|
|
621
|
-
setParseRole: function (role /*:
|
|
621
|
+
setParseRole: function (role /*: any*/) {
|
|
622
622
|
config['ParseRole'] = role;
|
|
623
623
|
},
|
|
624
|
-
getParseRole: function ()
|
|
624
|
+
getParseRole: function () {
|
|
625
625
|
return config['ParseRole'];
|
|
626
626
|
},
|
|
627
|
-
setParseUser: function (user /*:
|
|
627
|
+
setParseUser: function (user /*: any*/) {
|
|
628
628
|
config['ParseUser'] = user;
|
|
629
629
|
},
|
|
630
|
-
getParseUser: function ()
|
|
630
|
+
getParseUser: function () {
|
|
631
631
|
return config['ParseUser'];
|
|
632
632
|
}
|
|
633
633
|
};
|
|
@@ -7560,7 +7560,9 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7560
7560
|
value: true
|
|
7561
7561
|
});
|
|
7562
7562
|
exports.default = void 0;
|
|
7563
|
+
var _entries = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
|
7563
7564
|
var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
|
|
7565
|
+
var _slicedToArray2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
7564
7566
|
var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
7565
7567
|
var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
|
|
7566
7568
|
var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
@@ -7570,6 +7572,7 @@ var _inherits2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/
|
|
|
7570
7572
|
var _possibleConstructorReturn2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
7571
7573
|
var _getPrototypeOf2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
7572
7574
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
7575
|
+
var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
|
|
7573
7576
|
var _ParseObject2 = _interopRequireDefault(_dereq_("./ParseObject"));
|
|
7574
7577
|
function _createSuper(Derived) {
|
|
7575
7578
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
@@ -7808,16 +7811,17 @@ var ParseInstallation = /*#__PURE__*/function (_ParseObject) {
|
|
|
7808
7811
|
* @static
|
|
7809
7812
|
*/
|
|
7810
7813
|
}, {
|
|
7811
|
-
key: "
|
|
7814
|
+
key: "fetch",
|
|
7812
7815
|
value:
|
|
7813
7816
|
/**
|
|
7814
|
-
* Wrap the default
|
|
7817
|
+
* Wrap the default fetch behavior with functionality to update local storage.
|
|
7818
|
+
* If the installation is deleted on the server, retry the fetch as a save operation.
|
|
7815
7819
|
*
|
|
7816
7820
|
* @param {...any} args
|
|
7817
7821
|
* @returns {Promise}
|
|
7818
7822
|
*/
|
|
7819
7823
|
function () {
|
|
7820
|
-
var
|
|
7824
|
+
var _fetch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
7821
7825
|
var _len,
|
|
7822
7826
|
args,
|
|
7823
7827
|
_key,
|
|
@@ -7828,24 +7832,114 @@ var ParseInstallation = /*#__PURE__*/function (_ParseObject) {
|
|
|
7828
7832
|
for (_len = _args.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7829
7833
|
args[_key] = _args[_key];
|
|
7830
7834
|
}
|
|
7831
|
-
_context.
|
|
7835
|
+
_context.prev = 1;
|
|
7836
|
+
_context.next = 4;
|
|
7837
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(ParseInstallation.prototype), "fetch", this).apply(this, args);
|
|
7838
|
+
case 4:
|
|
7839
|
+
_context.next = 15;
|
|
7840
|
+
break;
|
|
7841
|
+
case 6:
|
|
7842
|
+
_context.prev = 6;
|
|
7843
|
+
_context.t0 = _context["catch"](1);
|
|
7844
|
+
if (!(_context.t0.code !== _ParseError.default.OBJECT_NOT_FOUND)) {
|
|
7845
|
+
_context.next = 10;
|
|
7846
|
+
break;
|
|
7847
|
+
}
|
|
7848
|
+
throw _context.t0;
|
|
7849
|
+
case 10:
|
|
7850
|
+
// The installation was deleted from the server.
|
|
7851
|
+
// We always want fetch to succeed.
|
|
7852
|
+
delete this.id;
|
|
7853
|
+
this._getId(); // Generate localId
|
|
7854
|
+
this._markAllFieldsDirty();
|
|
7855
|
+
_context.next = 15;
|
|
7832
7856
|
return (0, _get2.default)((0, _getPrototypeOf2.default)(ParseInstallation.prototype), "save", this).apply(this, args);
|
|
7833
|
-
case
|
|
7834
|
-
_context.next =
|
|
7857
|
+
case 15:
|
|
7858
|
+
_context.next = 17;
|
|
7835
7859
|
return _CoreManager.default.getInstallationController().updateInstallationOnDisk(this);
|
|
7836
|
-
case
|
|
7860
|
+
case 17:
|
|
7837
7861
|
return _context.abrupt("return", this);
|
|
7838
|
-
case
|
|
7862
|
+
case 18:
|
|
7839
7863
|
case "end":
|
|
7840
7864
|
return _context.stop();
|
|
7841
7865
|
}
|
|
7842
|
-
}, _callee, this);
|
|
7866
|
+
}, _callee, this, [[1, 6]]);
|
|
7867
|
+
}));
|
|
7868
|
+
function fetch() {
|
|
7869
|
+
return _fetch.apply(this, arguments);
|
|
7870
|
+
}
|
|
7871
|
+
return fetch;
|
|
7872
|
+
}()
|
|
7873
|
+
/**
|
|
7874
|
+
* Wrap the default save behavior with functionality to update the local storage.
|
|
7875
|
+
* If the installation is deleted on the server, retry saving a new installation.
|
|
7876
|
+
*
|
|
7877
|
+
* @param {...any} args
|
|
7878
|
+
* @returns {Promise}
|
|
7879
|
+
*/
|
|
7880
|
+
}, {
|
|
7881
|
+
key: "save",
|
|
7882
|
+
value: function () {
|
|
7883
|
+
var _save = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
7884
|
+
var _len2,
|
|
7885
|
+
args,
|
|
7886
|
+
_key2,
|
|
7887
|
+
_args2 = arguments;
|
|
7888
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
7889
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
7890
|
+
case 0:
|
|
7891
|
+
for (_len2 = _args2.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
7892
|
+
args[_key2] = _args2[_key2];
|
|
7893
|
+
}
|
|
7894
|
+
_context2.prev = 1;
|
|
7895
|
+
_context2.next = 4;
|
|
7896
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(ParseInstallation.prototype), "save", this).apply(this, args);
|
|
7897
|
+
case 4:
|
|
7898
|
+
_context2.next = 15;
|
|
7899
|
+
break;
|
|
7900
|
+
case 6:
|
|
7901
|
+
_context2.prev = 6;
|
|
7902
|
+
_context2.t0 = _context2["catch"](1);
|
|
7903
|
+
if (!(_context2.t0.code !== _ParseError.default.OBJECT_NOT_FOUND)) {
|
|
7904
|
+
_context2.next = 10;
|
|
7905
|
+
break;
|
|
7906
|
+
}
|
|
7907
|
+
throw _context2.t0;
|
|
7908
|
+
case 10:
|
|
7909
|
+
// The installation was deleted from the server.
|
|
7910
|
+
// We always want save to succeed.
|
|
7911
|
+
delete this.id;
|
|
7912
|
+
this._getId(); // Generate localId
|
|
7913
|
+
this._markAllFieldsDirty();
|
|
7914
|
+
_context2.next = 15;
|
|
7915
|
+
return (0, _get2.default)((0, _getPrototypeOf2.default)(ParseInstallation.prototype), "save", this).apply(this, args);
|
|
7916
|
+
case 15:
|
|
7917
|
+
_context2.next = 17;
|
|
7918
|
+
return _CoreManager.default.getInstallationController().updateInstallationOnDisk(this);
|
|
7919
|
+
case 17:
|
|
7920
|
+
return _context2.abrupt("return", this);
|
|
7921
|
+
case 18:
|
|
7922
|
+
case "end":
|
|
7923
|
+
return _context2.stop();
|
|
7924
|
+
}
|
|
7925
|
+
}, _callee2, this, [[1, 6]]);
|
|
7843
7926
|
}));
|
|
7844
7927
|
function save() {
|
|
7845
7928
|
return _save.apply(this, arguments);
|
|
7846
7929
|
}
|
|
7847
7930
|
return save;
|
|
7848
7931
|
}()
|
|
7932
|
+
}, {
|
|
7933
|
+
key: "_markAllFieldsDirty",
|
|
7934
|
+
value: function () {
|
|
7935
|
+
for (var _i = 0, _Object$entries = (0, _entries.default)(this.attributes); _i < _Object$entries.length; _i++) {
|
|
7936
|
+
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
7937
|
+
key = _Object$entries$_i[0],
|
|
7938
|
+
value = _Object$entries$_i[1];
|
|
7939
|
+
this.set(key, value);
|
|
7940
|
+
}
|
|
7941
|
+
}
|
|
7942
|
+
|
|
7849
7943
|
/**
|
|
7850
7944
|
* Get the current Parse.Installation from disk. If doesn't exists, create an new installation.
|
|
7851
7945
|
*
|
|
@@ -7874,7 +7968,7 @@ _ParseObject2.default.registerSubclass('_Installation', ParseInstallation);
|
|
|
7874
7968
|
module.exports = ParseInstallation;
|
|
7875
7969
|
var _default = ParseInstallation;
|
|
7876
7970
|
exports.default = _default;
|
|
7877
|
-
},{"./CoreManager":4,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/get":112,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],27:[function(_dereq_,module,exports){
|
|
7971
|
+
},{"./CoreManager":4,"./ParseError":23,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/entries":87,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/get":112,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122,"@babel/runtime-corejs3/helpers/slicedToArray":125,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],27:[function(_dereq_,module,exports){
|
|
7878
7972
|
"use strict";
|
|
7879
7973
|
|
|
7880
7974
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -10940,7 +11034,7 @@ var DefaultController = {
|
|
|
10940
11034
|
}, _callee10);
|
|
10941
11035
|
}))();
|
|
10942
11036
|
},
|
|
10943
|
-
save: function (target /*: ParseObject | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject> | ParseFile>*/{
|
|
11037
|
+
save: function (target /*: ParseObject | null | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject> | ParseFile>*/{
|
|
10944
11038
|
var batchSize = options && options.batchSize ? options.batchSize : _CoreManager.default.get('REQUEST_BATCH_SIZE');
|
|
10945
11039
|
var localDatastore = _CoreManager.default.getLocalDatastore();
|
|
10946
11040
|
var mapIdForPin = {};
|
|
@@ -10993,11 +11087,11 @@ var DefaultController = {
|
|
|
10993
11087
|
|
|
10994
11088
|
// Queue up tasks for each object in the batch.
|
|
10995
11089
|
// When every task is ready, the API request will execute
|
|
10996
|
-
var batchReturned =
|
|
10997
|
-
var batchReady = [];
|
|
10998
|
-
var batchTasks = [];
|
|
11090
|
+
var batchReturned = (0, _promiseUtils.resolvingPromise)();
|
|
11091
|
+
var batchReady /*: ReturnType<typeof resolvingPromise<void>>[]*/ = [];
|
|
11092
|
+
var batchTasks /*: Promise<void>[]*/ = [];
|
|
10999
11093
|
(0, _forEach.default)(batch).call(batch, function (obj, index) {
|
|
11000
|
-
var ready =
|
|
11094
|
+
var ready = (0, _promiseUtils.resolvingPromise)();
|
|
11001
11095
|
batchReady.push(ready);
|
|
11002
11096
|
var task = function task() {
|
|
11003
11097
|
ready.resolve();
|
|
@@ -18187,10 +18281,6 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
18187
18281
|
exports.default = arrayContainsObject;
|
|
18188
18282
|
var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
18189
18283
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
18190
|
-
/**
|
|
18191
|
-
* @flow
|
|
18192
|
-
*/
|
|
18193
|
-
/*:: import type ParseObject from './ParseObject';*/
|
|
18194
18284
|
function arrayContainsObject(array /*: Array<any>*/, object /*: ParseObject*/) /*: boolean*/{
|
|
18195
18285
|
if ((0, _indexOf.default)(array).call(array, object) > -1) {
|
|
18196
18286
|
return true;
|
|
@@ -18217,10 +18307,6 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
|
|
|
18217
18307
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
18218
18308
|
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
18219
18309
|
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
18220
|
-
/**
|
|
18221
|
-
* @flow
|
|
18222
|
-
*/
|
|
18223
|
-
/*:: import type ParseObject from './ParseObject';*/
|
|
18224
18310
|
function canBeSerialized(obj /*: ParseObject*/) /*: boolean*/{
|
|
18225
18311
|
var ParseObject = _CoreManager.default.getParseObject();
|
|
18226
18312
|
if (!(obj instanceof ParseObject)) {
|
|
@@ -18280,17 +18366,10 @@ var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
|
|
|
18280
18366
|
var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
18281
18367
|
var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
|
|
18282
18368
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
18283
|
-
var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
|
|
18284
18369
|
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
18285
18370
|
var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
|
|
18286
18371
|
var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
|
|
18287
18372
|
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
18288
|
-
/**
|
|
18289
|
-
* @flow
|
|
18290
|
-
*/
|
|
18291
|
-
|
|
18292
|
-
// eslint-disable-line no-unused-vars
|
|
18293
|
-
|
|
18294
18373
|
function decode(value /*: any*/) /*: any*/{
|
|
18295
18374
|
if (value === null || (0, _typeof2.default)(value) !== 'object' || value instanceof Date) {
|
|
18296
18375
|
return value;
|
|
@@ -18341,7 +18420,7 @@ function decode(value /*: any*/) /*: any*/{
|
|
|
18341
18420
|
}
|
|
18342
18421
|
return copy;
|
|
18343
18422
|
}
|
|
18344
|
-
},{"./CoreManager":4,"./
|
|
18423
|
+
},{"./CoreManager":4,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],51:[function(_dereq_,module,exports){
|
|
18345
18424
|
"use strict";
|
|
18346
18425
|
|
|
18347
18426
|
var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
@@ -18363,11 +18442,7 @@ var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
|
18363
18442
|
var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
|
|
18364
18443
|
var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
|
|
18365
18444
|
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
18366
|
-
|
|
18367
|
-
* @flow
|
|
18368
|
-
*/
|
|
18369
|
-
|
|
18370
|
-
function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers /*: boolean*/, seen /*: Array<mixed>*/, offline /*: boolean*/) /*: any*/{
|
|
18445
|
+
function encode(value /*: any*/, disallowObjects /*: boolean*/, forcePointers /*: boolean*/, seen /*: Array<any>*/, offline /*: boolean*/) /*: any*/{
|
|
18371
18446
|
var ParseObject = _CoreManager.default.getParseObject();
|
|
18372
18447
|
if (value instanceof ParseObject) {
|
|
18373
18448
|
if (disallowObjects) {
|
|
@@ -18401,7 +18476,7 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
|
|
|
18401
18476
|
}
|
|
18402
18477
|
return {
|
|
18403
18478
|
__type: 'Date',
|
|
18404
|
-
iso: value
|
|
18479
|
+
iso: value.toJSON()
|
|
18405
18480
|
};
|
|
18406
18481
|
}
|
|
18407
18482
|
if (Object.prototype.toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
|
|
@@ -18421,7 +18496,7 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
|
|
|
18421
18496
|
}
|
|
18422
18497
|
return value;
|
|
18423
18498
|
}
|
|
18424
|
-
function _default(value /*:
|
|
18499
|
+
function _default(value /*: any*/, disallowObjects /*:: ?: boolean*/, forcePointers /*:: ?: boolean*/, seen /*:: ?: Array<any>*/, offline /*:: ?: boolean*/) /*: any*/{
|
|
18425
18500
|
return encode(value, !!disallowObjects, !!forcePointers, seen || [], offline);
|
|
18426
18501
|
}
|
|
18427
18502
|
},{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@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/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":78,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],52:[function(_dereq_,module,exports){
|
|
@@ -18440,7 +18515,7 @@ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
|
18440
18515
|
var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
|
|
18441
18516
|
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
18442
18517
|
var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
|
|
18443
|
-
function equals(a
|
|
18518
|
+
function equals(a /*: any*/, b /*: any*/) /*: boolean*/{
|
|
18444
18519
|
var toString = Object.prototype.toString;
|
|
18445
18520
|
if (toString.call(a) === '[object Date]' || toString.call(b) === '[object Date]') {
|
|
18446
18521
|
var dateA = new Date(a);
|
|
@@ -18495,10 +18570,6 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
18495
18570
|
value: true
|
|
18496
18571
|
});
|
|
18497
18572
|
exports.default = escape;
|
|
18498
|
-
/*
|
|
18499
|
-
* @flow
|
|
18500
|
-
*/
|
|
18501
|
-
|
|
18502
18573
|
var encoded = {
|
|
18503
18574
|
'&': '&',
|
|
18504
18575
|
'<': '<',
|
|
@@ -18522,10 +18593,6 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
18522
18593
|
});
|
|
18523
18594
|
exports.default = isRevocableSession;
|
|
18524
18595
|
var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
18525
|
-
/**
|
|
18526
|
-
* @flow
|
|
18527
|
-
*/
|
|
18528
|
-
|
|
18529
18596
|
function isRevocableSession(token /*: string*/) /*: boolean*/{
|
|
18530
18597
|
return (0, _indexOf.default)(token).call(token, 'r:') > -1;
|
|
18531
18598
|
}
|
|
@@ -18539,11 +18606,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
18539
18606
|
});
|
|
18540
18607
|
exports.default = parseDate;
|
|
18541
18608
|
var _parseInt2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
|
18542
|
-
|
|
18543
|
-
* @flow
|
|
18544
|
-
*/
|
|
18545
|
-
|
|
18546
|
-
function parseDate(iso8601 /*: string*/) /*: ?Date*/{
|
|
18609
|
+
function parseDate(iso8601 /*: string*/) /*: Date | null*/{
|
|
18547
18610
|
var regexp = new RegExp('^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})' + 'T' + '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})' + '(.([0-9]+))?' + 'Z$');
|
|
18548
18611
|
var match = regexp.exec(iso8601);
|
|
18549
18612
|
if (!match) {
|
|
@@ -18572,18 +18635,19 @@ exports.when = when;
|
|
|
18572
18635
|
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
18573
18636
|
var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
18574
18637
|
// Create Deferred Promise
|
|
18575
|
-
function resolvingPromise() {
|
|
18576
|
-
var res
|
|
18577
|
-
var rej
|
|
18638
|
+
function resolvingPromise /*:: <T = any>*/() {
|
|
18639
|
+
var res /*: (value: T) => void*/;
|
|
18640
|
+
var rej /*: (error: T) => void*/;
|
|
18578
18641
|
var promise = new _promise.default(function (resolve, reject) {
|
|
18579
18642
|
res = resolve;
|
|
18580
18643
|
rej = reject;
|
|
18581
18644
|
});
|
|
18582
|
-
promise
|
|
18583
|
-
|
|
18584
|
-
|
|
18645
|
+
var defer /*: typeof promise & { resolve: (res: T) => void, reject: (err: any) => void }*/ = promise;
|
|
18646
|
+
defer.resolve = res;
|
|
18647
|
+
defer.reject = rej;
|
|
18648
|
+
return defer;
|
|
18585
18649
|
}
|
|
18586
|
-
function when(promises) {
|
|
18650
|
+
function when(promises /*: any*/) {
|
|
18587
18651
|
var objects;
|
|
18588
18652
|
var arrayArgument = (0, _isArray.default)(promises);
|
|
18589
18653
|
if (arrayArgument) {
|
|
@@ -18601,7 +18665,7 @@ function when(promises) {
|
|
|
18601
18665
|
if (total === 0) {
|
|
18602
18666
|
return _promise.default.resolve(returnValue);
|
|
18603
18667
|
}
|
|
18604
|
-
var promise =
|
|
18668
|
+
var promise = resolvingPromise();
|
|
18605
18669
|
var resolveOne = function () {
|
|
18606
18670
|
total--;
|
|
18607
18671
|
if (total <= 0) {
|
|
@@ -18612,7 +18676,7 @@ function when(promises) {
|
|
|
18612
18676
|
}
|
|
18613
18677
|
}
|
|
18614
18678
|
};
|
|
18615
|
-
var chain = function (object
|
|
18679
|
+
var chain = function (object /*: Promise<any>*/, index /*: number*/) {
|
|
18616
18680
|
if (object && typeof object.then === 'function') {
|
|
18617
18681
|
object.then(function (result) {
|
|
18618
18682
|
results[index] = result;
|
|
@@ -18632,7 +18696,7 @@ function when(promises) {
|
|
|
18632
18696
|
}
|
|
18633
18697
|
return promise;
|
|
18634
18698
|
}
|
|
18635
|
-
function continueWhile(test
|
|
18699
|
+
function continueWhile(test /*: () => any*/, emitter /*: () => Promise<any>*/) {
|
|
18636
18700
|
if (test()) {
|
|
18637
18701
|
return emitter().then(function () {
|
|
18638
18702
|
return continueWhile(test, emitter);
|
|
@@ -18653,12 +18717,8 @@ var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
|
|
|
18653
18717
|
var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
18654
18718
|
var _arrayContainsObject = _interopRequireDefault(_dereq_("./arrayContainsObject"));
|
|
18655
18719
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
18656
|
-
/**
|
|
18657
|
-
* @flow
|
|
18658
|
-
*/
|
|
18659
|
-
|
|
18660
18720
|
function unique /*:: <T>*/(arr /*: Array<T>*/) /*: Array<T>*/{
|
|
18661
|
-
var uniques = [];
|
|
18721
|
+
var uniques /*: T[]*/ = [];
|
|
18662
18722
|
(0, _forEach.default)(arr).call(arr, function (value) {
|
|
18663
18723
|
var ParseObject = _CoreManager.default.getParseObject();
|
|
18664
18724
|
if (value instanceof ParseObject) {
|
|
@@ -18690,14 +18750,6 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
|
|
|
18690
18750
|
var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
|
|
18691
18751
|
var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
|
|
18692
18752
|
var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
|
|
18693
|
-
/**
|
|
18694
|
-
* @flow
|
|
18695
|
-
*/
|
|
18696
|
-
/*:: import type ParseObject from './ParseObject';*/
|
|
18697
|
-
/*:: type EncounterMap = {
|
|
18698
|
-
objects: { [identifier: string]: ParseObject | boolean },
|
|
18699
|
-
files: Array<ParseFile>,
|
|
18700
|
-
};*/
|
|
18701
18753
|
/**
|
|
18702
18754
|
* Return an array of unsaved children, which are either Parse Objects or Files.
|
|
18703
18755
|
* If it encounters any dirty Objects without Ids, it will throw an exception.
|
|
@@ -18777,8 +18829,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
18777
18829
|
});
|
|
18778
18830
|
exports.default = void 0;
|
|
18779
18831
|
var _uuid = _dereq_("uuid");
|
|
18780
|
-
var uuid
|
|
18781
|
-
uuid = function () {
|
|
18832
|
+
var uuid = function () {
|
|
18782
18833
|
var s /*: string[]*/ = [];
|
|
18783
18834
|
var hexDigits = '0123456789abcdef';
|
|
18784
18835
|
for (var i = 0; i < 36; i++) {
|
|
@@ -18788,7 +18839,8 @@ uuid = function () {
|
|
|
18788
18839
|
s[19] = hexDigits.substr(Number(s[19]) & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
|
|
18789
18840
|
s[8] = s[13] = s[18] = s[23] = '-';
|
|
18790
18841
|
return s.join('');
|
|
18791
|
-
}
|
|
18842
|
+
} /*: () => string*/;
|
|
18843
|
+
|
|
18792
18844
|
module.exports = uuid;
|
|
18793
18845
|
var _default = uuid;
|
|
18794
18846
|
exports.default = _default;
|