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.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.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,
|
|
@@ -7346,13 +7346,11 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7346
7346
|
});
|
|
7347
7347
|
exports.default = void 0;
|
|
7348
7348
|
var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
7349
|
+
var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
7349
7350
|
var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
|
|
7350
7351
|
var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
7351
7352
|
var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
|
|
7352
7353
|
var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7353
|
-
/**
|
|
7354
|
-
* @flow
|
|
7355
|
-
*/
|
|
7356
7354
|
/**
|
|
7357
7355
|
* Creates a new GeoPoint with any of the following forms:<br>
|
|
7358
7356
|
* <pre>
|
|
@@ -7455,7 +7453,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7455
7453
|
}
|
|
7456
7454
|
}, {
|
|
7457
7455
|
key: "equals",
|
|
7458
|
-
value: function (other /*:
|
|
7456
|
+
value: function (other /*: any*/) /*: boolean*/{
|
|
7459
7457
|
return other instanceof ParseGeoPoint && this.latitude === other.latitude && this.longitude === other.longitude;
|
|
7460
7458
|
}
|
|
7461
7459
|
|
|
@@ -7531,14 +7529,20 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7531
7529
|
/**
|
|
7532
7530
|
* Creates a GeoPoint with the user's current location, if available.
|
|
7533
7531
|
*
|
|
7532
|
+
* @param {object} options The options.
|
|
7533
|
+
* @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.
|
|
7534
|
+
* @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.
|
|
7535
|
+
* @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.
|
|
7534
7536
|
* @static
|
|
7535
|
-
* @returns {Parse.GeoPoint} User's current location
|
|
7537
|
+
* @returns {Promise<Parse.GeoPoint>} User's current location
|
|
7536
7538
|
*/
|
|
7537
7539
|
}, {
|
|
7538
7540
|
key: "current",
|
|
7539
|
-
value: function () {
|
|
7540
|
-
return
|
|
7541
|
-
|
|
7541
|
+
value: function (options) /*: Promise<ParseGeoPoint>*/{
|
|
7542
|
+
return new _promise.default(function (resolve, reject) {
|
|
7543
|
+
navigator.geolocation.getCurrentPosition(function (location) {
|
|
7544
|
+
resolve(new ParseGeoPoint(location.coords.latitude, location.coords.longitude));
|
|
7545
|
+
}, reject, options);
|
|
7542
7546
|
});
|
|
7543
7547
|
}
|
|
7544
7548
|
}]);
|
|
@@ -7546,7 +7550,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
|
|
|
7546
7550
|
}();
|
|
7547
7551
|
var _default = ParseGeoPoint;
|
|
7548
7552
|
exports.default = _default;
|
|
7549
|
-
},{"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@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/typeof":130}],26:[function(_dereq_,module,exports){
|
|
7553
|
+
},{"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/promise":95,"@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/typeof":130}],26:[function(_dereq_,module,exports){
|
|
7550
7554
|
"use strict";
|
|
7551
7555
|
|
|
7552
7556
|
var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|