parse 6.0.0-alpha.1 → 6.0.0

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)
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v6.0.0-alpha.1
2
+ * Parse JavaScript SDK v6.0.0
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.1",
357
+ VERSION: 'js' + "6.0.0",
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
  },
@@ -6125,7 +6114,7 @@ function remove(hook) {
6125
6114
  }
6126
6115
  const DefaultController = {
6127
6116
  get(type, functionName, triggerName) {
6128
- let url = '/hooks/' + type;
6117
+ let url = 'hooks/' + type;
6129
6118
  if (functionName) {
6130
6119
  url += '/' + functionName;
6131
6120
  if (triggerName) {
@@ -6137,9 +6126,9 @@ const DefaultController = {
6137
6126
  create(hook) {
6138
6127
  let url;
6139
6128
  if (hook.functionName && hook.url) {
6140
- url = '/hooks/functions';
6129
+ url = 'hooks/functions';
6141
6130
  } else if (hook.className && hook.triggerName && hook.url) {
6142
- url = '/hooks/triggers';
6131
+ url = 'hooks/triggers';
6143
6132
  } else {
6144
6133
  return _promise.default.reject({
6145
6134
  error: 'invalid hook declaration',
@@ -6151,10 +6140,10 @@ const DefaultController = {
6151
6140
  remove(hook) {
6152
6141
  let url;
6153
6142
  if (hook.functionName) {
6154
- url = '/hooks/functions/' + hook.functionName;
6143
+ url = 'hooks/functions/' + hook.functionName;
6155
6144
  delete hook.functionName;
6156
6145
  } else if (hook.className && hook.triggerName) {
6157
- url = '/hooks/triggers/' + hook.className + '/' + hook.triggerName;
6146
+ url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
6158
6147
  delete hook.className;
6159
6148
  delete hook.triggerName;
6160
6149
  } else {
@@ -6170,10 +6159,10 @@ const DefaultController = {
6170
6159
  update(hook) {
6171
6160
  let url;
6172
6161
  if (hook.functionName && hook.url) {
6173
- url = '/hooks/functions/' + hook.functionName;
6162
+ url = 'hooks/functions/' + hook.functionName;
6174
6163
  delete hook.functionName;
6175
6164
  } else if (hook.className && hook.triggerName && hook.url) {
6176
- url = '/hooks/triggers/' + hook.className + '/' + hook.triggerName;
6165
+ url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
6177
6166
  delete hook.className;
6178
6167
  delete hook.triggerName;
6179
6168
  } else {