parse 5.1.0-alpha.10 → 5.1.0-alpha.11
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 +15 -11
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +15 -11
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseGeoPoint.js +12 -8
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseGeoPoint.js +11 -11
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseGeoPoint.js +5 -3
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseGeoPoint.js +12 -8
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v5.1.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v5.1.0-alpha.11
|
|
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.0-alpha.
|
|
400
|
+
VERSION: 'js' + "5.1.0-alpha.11",
|
|
401
401
|
APPLICATION_ID: null,
|
|
402
402
|
JAVASCRIPT_KEY: null,
|
|
403
403
|
MASTER_KEY: null,
|
|
@@ -7353,13 +7353,11 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7353
7353
|
});
|
|
7354
7354
|
exports.default = void 0;
|
|
7355
7355
|
var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
7356
|
+
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
7356
7357
|
var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
|
|
7357
7358
|
var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
7358
7359
|
var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
|
|
7359
7360
|
var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7360
|
-
/**
|
|
7361
|
-
* @flow
|
|
7362
|
-
*/
|
|
7363
7361
|
/**
|
|
7364
7362
|
* Creates a new GeoPoint with any of the following forms:<br>
|
|
7365
7363
|
* <pre>
|
|
@@ -7462,7 +7460,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7462
7460
|
}
|
|
7463
7461
|
}, {
|
|
7464
7462
|
key: "equals",
|
|
7465
|
-
value: function (other /*:
|
|
7463
|
+
value: function (other /*: any*/) /*: boolean*/{
|
|
7466
7464
|
return other instanceof ParseGeoPoint && this.latitude === other.latitude && this.longitude === other.longitude;
|
|
7467
7465
|
}
|
|
7468
7466
|
|
|
@@ -7538,14 +7536,20 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7538
7536
|
/**
|
|
7539
7537
|
* Creates a GeoPoint with the user's current location, if available.
|
|
7540
7538
|
*
|
|
7539
|
+
* @param {object} options The options.
|
|
7540
|
+
* @param {boolean} [options.enableHighAccuracy=false] A boolean value that indicates the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. Default: false.
|
|
7541
|
+
* @param {number} [options.timeout=Infinity] A positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. The default value is Infinity, meaning that getCurrentPosition() won't return until the position is available.
|
|
7542
|
+
* @param {number} [options.maximumAge=0] A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age. Default: 0.
|
|
7541
7543
|
* @static
|
|
7542
|
-
* @returns {Parse.GeoPoint} User's current location
|
|
7544
|
+
* @returns {Promise<Parse.GeoPoint>} User's current location
|
|
7543
7545
|
*/
|
|
7544
7546
|
}, {
|
|
7545
7547
|
key: "current",
|
|
7546
|
-
value: function () {
|
|
7547
|
-
return
|
|
7548
|
-
|
|
7548
|
+
value: function (options) /*: Promise<ParseGeoPoint>*/{
|
|
7549
|
+
return new _promise.default(function (resolve, reject) {
|
|
7550
|
+
navigator.geolocation.getCurrentPosition(function (location) {
|
|
7551
|
+
resolve(new ParseGeoPoint(location.coords.latitude, location.coords.longitude));
|
|
7552
|
+
}, reject, options);
|
|
7549
7553
|
});
|
|
7550
7554
|
}
|
|
7551
7555
|
}]);
|
|
@@ -7553,7 +7557,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7553
7557
|
}();
|
|
7554
7558
|
var _default = ParseGeoPoint;
|
|
7555
7559
|
exports.default = _default;
|
|
7556
|
-
},{"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],26:[function(_dereq_,module,exports){
|
|
7560
|
+
},{"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],26:[function(_dereq_,module,exports){
|
|
7557
7561
|
"use strict";
|
|
7558
7562
|
|
|
7559
7563
|
var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|