parse 3.3.2-alpha.1 → 3.4.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
@@ -2,13 +2,17 @@
2
2
 
3
3
  ---
4
4
 
5
- [![Build Status CI](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Amaster)
5
+ [![Build Status CI alpha](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=alpha)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Aalpha)
6
+ [![Build Status CI release](https://github.com/parse-community/Parse-SDK-JS/workflows/ci/badge.svg?branch=release)](https://github.com/parse-community/Parse-SDK-JS/actions?query=workflow%3Aci+branch%3Arelease)
6
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)
7
- [![Coverage](http://codecov.io/github/parse-community/Parse-SDK-JS/coverage.svg?branch=master)](http://codecov.io/github/parse-community/Parse-SDK-JS?branch=master)
8
+ [![Coverage](http://codecov.io/github/parse-community/Parse-SDK-JS/coverage.svg?branch=alpha)](http://codecov.io/github/parse-community/Parse-SDK-JS?branch=alpha)
9
+
10
+ [![Node Version](https://img.shields.io/badge/nodejs-12,_14,_15-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
11
+ [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
8
12
 
9
13
  [![npm latest version](https://img.shields.io/npm/v/parse/latest.svg)](https://www.npmjs.com/package/parse)
14
+ [![npm alpha version](https://img.shields.io/npm/v/parse/alpha.svg)](https://www.npmjs.com/package/parse)
10
15
  <!-- [![npm beta version](https://img.shields.io/npm/v/parse/beta.svg)](https://www.npmjs.com/package/parse) -->
11
- <!-- [![npm alpha version](https://img.shields.io/npm/v/parse/alpha.svg)](https://www.npmjs.com/package/parse) -->
12
16
 
13
17
  [![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
14
18
  [![Sponsors on Open Collective](https://opencollective.com/parse-server/sponsors/badge.svg)][open-collective-link]
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.3.2-alpha.1
2
+ * Parse JavaScript SDK v3.4.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
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "3.3.2-alpha.1",
702
+ VERSION: 'js' + "3.4.0-alpha.1",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -5619,8 +5619,6 @@ var Parse = {
5619
5619
  }
5620
5620
 
5621
5621
  Parse._initialize(applicationId, javaScriptKey);
5622
-
5623
- _EventuallyQueue.default.poll();
5624
5622
  },
5625
5623
  _initialize: function (applicationId
5626
5624
  /*: string*/
@@ -5875,14 +5873,32 @@ Parse._getInstallationId = function () {
5875
5873
  };
5876
5874
  /**
5877
5875
  * Enable pinning in your application.
5878
- * This must be called before your application can use pinning.
5876
+ * This must be called after `Parse.initialize` in your application.
5879
5877
  *
5878
+ * @param [polling] Allow pinging the server /health endpoint. Default true
5879
+ * @param [ms] Milliseconds to ping the server. Default 2000ms
5880
5880
  * @static
5881
5881
  */
5882
5882
 
5883
5883
 
5884
5884
  Parse.enableLocalDatastore = function () {
5885
- Parse.LocalDatastore.isEnabled = true;
5885
+ var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
5886
+ var ms
5887
+ /*: number*/
5888
+ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
5889
+
5890
+ if (!Parse.applicationId) {
5891
+ console.log("'enableLocalDataStore' must be called after 'initialize'");
5892
+ return;
5893
+ }
5894
+
5895
+ if (!Parse.LocalDatastore.isEnabled) {
5896
+ Parse.LocalDatastore.isEnabled = true;
5897
+
5898
+ if (polling) {
5899
+ _EventuallyQueue.default.poll(ms);
5900
+ }
5901
+ }
5886
5902
  };
5887
5903
  /**
5888
5904
  * Flag that indicates whether Local Datastore is enabled.