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.
@@ -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,
@@ -3322,8 +3322,8 @@ _Object$defineProperty(exports, "__esModule", {
3322
3322
  });
3323
3323
  exports.default = void 0;
3324
3324
  var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
3325
- var _decode2 = _interopRequireDefault(_dereq_("./decode"));
3326
- var _encode2 = _interopRequireDefault(_dereq_("./encode"));
3325
+ var _decode = _interopRequireDefault(_dereq_("./decode"));
3326
+ var _encode = _interopRequireDefault(_dereq_("./encode"));
3327
3327
  var _CryptoController = _interopRequireDefault(_dereq_("./CryptoController"));
3328
3328
  var _EventuallyQueue = _interopRequireDefault(_dereq_("./EventuallyQueue"));
3329
3329
  var _IndexedDBStorageController = _interopRequireDefault(_dereq_("./IndexedDBStorageController"));
@@ -3384,20 +3384,11 @@ function _interopRequireWildcard(e, r) {
3384
3384
  }
3385
3385
  return n.default = e, t && t.set(e, n), n;
3386
3386
  }
3387
- /**
3388
- * Contains all Parse API classes and functions.
3389
- *
3390
- * @static
3391
- * @global
3392
- * @class
3393
- * @hideconstructor
3394
- */
3395
-
3396
3387
  const Parse = {
3397
3388
  ACL: _ParseACL.default,
3398
- Analytics: Analytics,
3389
+ Analytics,
3399
3390
  AnonymousUtils: _AnonymousUtils.default,
3400
- Cloud: Cloud,
3391
+ Cloud,
3401
3392
  CLP: _ParseCLP.default,
3402
3393
  CoreManager: _CoreManager.default,
3403
3394
  Config: _ParseConfig.default,
@@ -3418,7 +3409,7 @@ const Parse = {
3418
3409
  AddUnique: ParseOp.AddUniqueOp,
3419
3410
  Relation: ParseOp.RelationOp
3420
3411
  },
3421
- Push: Push,
3412
+ Push,
3422
3413
  Query: _ParseQuery.default,
3423
3414
  Relation: _ParseRelation.default,
3424
3415
  Role: _ParseRole.default,
@@ -3629,10 +3620,10 @@ const Parse = {
3629
3620
  },
3630
3621
  // We attempt to match the signatures of the legacy versions of these methods
3631
3622
  _decode(_, value) {
3632
- return (0, _decode2.default)(value);
3623
+ return (0, _decode.default)(value);
3633
3624
  },
3634
3625
  _encode(value, _, disallowObjects) {
3635
- return (0, _encode2.default)(value, disallowObjects);
3626
+ return (0, _encode.default)(value, disallowObjects);
3636
3627
  },
3637
3628
  _getInstallationId() {
3638
3629
  return _CoreManager.default.getInstallationController().currentInstallationId();
@@ -3645,17 +3636,15 @@ const Parse = {
3645
3636
  * @param [ms] Milliseconds to ping the server. Default 2000ms
3646
3637
  * @static
3647
3638
  */
3648
- enableLocalDatastore() {
3649
- let polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
3650
- let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
3639
+ enableLocalDatastore(polling, ms) {
3651
3640
  if (!this.applicationId) {
3652
3641
  console.log("'enableLocalDataStore' must be called after 'initialize'");
3653
3642
  return;
3654
3643
  }
3655
3644
  if (!this.LocalDatastore.isEnabled) {
3656
3645
  this.LocalDatastore.isEnabled = true;
3657
- if (polling) {
3658
- _CoreManager.default.getEventuallyQueue().poll(ms);
3646
+ if (polling || typeof polling === 'undefined') {
3647
+ _CoreManager.default.getEventuallyQueue().poll(ms || 2000);
3659
3648
  }
3660
3649
  }
3661
3650
  },
@@ -6120,7 +6109,7 @@ function remove(hook) {
6120
6109
  }
6121
6110
  const DefaultController = {
6122
6111
  get(type, functionName, triggerName) {
6123
- let url = '/hooks/' + type;
6112
+ let url = 'hooks/' + type;
6124
6113
  if (functionName) {
6125
6114
  url += '/' + functionName;
6126
6115
  if (triggerName) {
@@ -6132,9 +6121,9 @@ const DefaultController = {
6132
6121
  create(hook) {
6133
6122
  let url;
6134
6123
  if (hook.functionName && hook.url) {
6135
- url = '/hooks/functions';
6124
+ url = 'hooks/functions';
6136
6125
  } else if (hook.className && hook.triggerName && hook.url) {
6137
- url = '/hooks/triggers';
6126
+ url = 'hooks/triggers';
6138
6127
  } else {
6139
6128
  return _promise.default.reject({
6140
6129
  error: 'invalid hook declaration',
@@ -6146,10 +6135,10 @@ const DefaultController = {
6146
6135
  remove(hook) {
6147
6136
  let url;
6148
6137
  if (hook.functionName) {
6149
- url = '/hooks/functions/' + hook.functionName;
6138
+ url = 'hooks/functions/' + hook.functionName;
6150
6139
  delete hook.functionName;
6151
6140
  } else if (hook.className && hook.triggerName) {
6152
- url = '/hooks/triggers/' + hook.className + '/' + hook.triggerName;
6141
+ url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
6153
6142
  delete hook.className;
6154
6143
  delete hook.triggerName;
6155
6144
  } else {
@@ -6165,10 +6154,10 @@ const DefaultController = {
6165
6154
  update(hook) {
6166
6155
  let url;
6167
6156
  if (hook.functionName && hook.url) {
6168
- url = '/hooks/functions/' + hook.functionName;
6157
+ url = 'hooks/functions/' + hook.functionName;
6169
6158
  delete hook.functionName;
6170
6159
  } else if (hook.className && hook.triggerName && hook.url) {
6171
- url = '/hooks/triggers/' + hook.className + '/' + hook.triggerName;
6160
+ url = 'hooks/triggers/' + hook.className + '/' + hook.triggerName;
6172
6161
  delete hook.className;
6173
6162
  delete hook.triggerName;
6174
6163
  } else {