parse 6.0.0-alpha.2 → 6.1.0-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/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  ---
4
4
 
5
5
  [![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/actions/workflows/ci.yml/badge.svg?branch=alpha&subject=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
6
- [![Build Status CI beta](https://github.com/parse-community/Parse-SDK-JS/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Abeta)
7
6
  [![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/actions/workflows/ci.yml/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)
8
7
  [![Snyk Badge](https://snyk.io/test/github/parse-community/Parse-SDK-JS/badge.svg)](https://snyk.io/test/github/parse-community/Parse-SDK-JS)
9
8
  [![Coverage](https://codecov.io/gh/parse-community/Parse-SDK-JS/branch/alpha/graph/badge.svg)](https://codecov.io/gh/parse-community/Parse-SDK-JS)
@@ -12,7 +11,6 @@
12
11
  [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
13
12
 
14
13
  [![npm latest version](https://img.shields.io/npm/v/parse/latest.svg)](https://www.npmjs.com/package/parse)
15
- [![npm beta version](https://img.shields.io/npm/v/parse/beta.svg)](https://www.npmjs.com/package/parse)
16
14
  [![npm alpha version](https://img.shields.io/npm/v/parse/alpha.svg)](https://www.npmjs.com/package/parse)
17
15
 
18
16
  [![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v6.0.0-alpha.2
2
+ * Parse JavaScript SDK v6.1.0-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
@@ -354,7 +354,7 @@ const config = {
354
354
  SERVER_AUTH_TOKEN: null,
355
355
  LIVEQUERY_SERVER_URL: null,
356
356
  ENCRYPTED_KEY: null,
357
- VERSION: 'js' + "6.0.0-alpha.2",
357
+ VERSION: 'js' + "6.1.0-alpha.1",
358
358
  APPLICATION_ID: null,
359
359
  JAVASCRIPT_KEY: null,
360
360
  MASTER_KEY: null,
@@ -3323,8 +3323,8 @@ _Object$defineProperty(exports, "__esModule", {
3323
3323
  });
3324
3324
  exports.default = void 0;
3325
3325
  var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
3326
- var _decode2 = _interopRequireDefault(_dereq_("./decode"));
3327
- var _encode2 = _interopRequireDefault(_dereq_("./encode"));
3326
+ var _decode = _interopRequireDefault(_dereq_("./decode"));
3327
+ var _encode = _interopRequireDefault(_dereq_("./encode"));
3328
3328
  var _CryptoController = _interopRequireDefault(_dereq_("./CryptoController"));
3329
3329
  var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
3330
3330
  var _IndexedDBStorageController = _interopRequireDefault(_dereq_("./IndexedDBStorageController"));
@@ -3385,20 +3385,11 @@ function _interopRequireWildcard(e, r) {
3385
3385
  }
3386
3386
  return n.default = e, t && t.set(e, n), n;
3387
3387
  }
3388
- /**
3389
- * Contains all Parse API classes and functions.
3390
- *
3391
- * @static
3392
- * @global
3393
- * @class
3394
- * @hideconstructor
3395
- */
3396
-
3397
3388
  const Parse = {
3398
3389
  ACL: _ParseACL.default,
3399
- Analytics: Analytics,
3390
+ Analytics,
3400
3391
  AnonymousUtils: _AnonymousUtils.default,
3401
- Cloud: Cloud,
3392
+ Cloud,
3402
3393
  CLP: _ParseCLP.default,
3403
3394
  CoreManager: _CoreManager.default,
3404
3395
  Config: _ParseConfig.default,
@@ -3419,7 +3410,7 @@ const Parse = {
3419
3410
  AddUnique: ParseOp.AddUniqueOp,
3420
3411
  Relation: ParseOp.RelationOp
3421
3412
  },
3422
- Push: Push,
3413
+ Push,
3423
3414
  Query: _ParseQuery.default,
3424
3415
  Relation: _ParseRelation.default,
3425
3416
  Role: _ParseRole.default,
@@ -3634,10 +3625,10 @@ const Parse = {
3634
3625
  },
3635
3626
  // We attempt to match the signatures of the legacy versions of these methods
3636
3627
  _decode(_, value) {
3637
- return (0, _decode2.default)(value);
3628
+ return (0, _decode.default)(value);
3638
3629
  },
3639
3630
  _encode(value, _, disallowObjects) {
3640
- return (0, _encode2.default)(value, disallowObjects);
3631
+ return (0, _encode.default)(value, disallowObjects);
3641
3632
  },
3642
3633
  _getInstallationId() {
3643
3634
  return _CoreManager.default.getInstallationController().currentInstallationId();
@@ -3650,17 +3641,15 @@ const Parse = {
3650
3641
  * @param [ms] Milliseconds to ping the server. Default 2000ms
3651
3642
  * @static
3652
3643
  */
3653
- enableLocalDatastore() {
3654
- let polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
3655
- let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
3644
+ enableLocalDatastore(polling, ms) {
3656
3645
  if (!this.applicationId) {
3657
3646
  console.log("'enableLocalDataStore' must be called after 'initialize'");
3658
3647
  return;
3659
3648
  }
3660
3649
  if (!this.LocalDatastore.isEnabled) {
3661
3650
  this.LocalDatastore.isEnabled = true;
3662
- if (polling) {
3663
- _CoreManager.default.getEventuallyQueue().poll(ms);
3651
+ if (polling || typeof polling === 'undefined') {
3652
+ _CoreManager.default.getEventuallyQueue().poll(ms || 2000);
3664
3653
  }
3665
3654
  }
3666
3655
  },
@@ -7681,8 +7670,8 @@ class ParseObject {
7681
7670
  return new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'ACL must be a Parse ACL.');
7682
7671
  }
7683
7672
  for (const key in attrs) {
7684
- if (!/^[A-Za-z][0-9A-Za-z_.]*$/.test(key)) {
7685
- return new _ParseError.default(_ParseError.default.INVALID_KEY_NAME, `Invalid key name: "${key}"`);
7673
+ if (!/^[A-Za-z_][0-9A-Za-z_.]*$/.test(key)) {
7674
+ return new _ParseError.default(_ParseError.default.INVALID_KEY_NAME, `Invalid key name: ${key}`);
7686
7675
  }
7687
7676
  }
7688
7677
  return false;