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 +7 -3
- package/dist/parse.js +22 -6
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +22 -6
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +20 -4
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +18 -5
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/Parse.js +15 -3
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +20 -4
- package/package.json +1 -1
package/lib/browser/Parse.js
CHANGED
|
@@ -116,8 +116,6 @@ var Parse = {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
Parse._initialize(applicationId, javaScriptKey);
|
|
119
|
-
|
|
120
|
-
_EventuallyQueue.default.poll();
|
|
121
119
|
},
|
|
122
120
|
_initialize: function (applicationId
|
|
123
121
|
/*: string*/
|
|
@@ -372,14 +370,32 @@ Parse._getInstallationId = function () {
|
|
|
372
370
|
};
|
|
373
371
|
/**
|
|
374
372
|
* Enable pinning in your application.
|
|
375
|
-
* This must be called
|
|
373
|
+
* This must be called after `Parse.initialize` in your application.
|
|
376
374
|
*
|
|
375
|
+
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
376
|
+
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
377
377
|
* @static
|
|
378
378
|
*/
|
|
379
379
|
|
|
380
380
|
|
|
381
381
|
Parse.enableLocalDatastore = function () {
|
|
382
|
-
|
|
382
|
+
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
383
|
+
var ms
|
|
384
|
+
/*: number*/
|
|
385
|
+
= arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
386
|
+
|
|
387
|
+
if (!Parse.applicationId) {
|
|
388
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (!Parse.LocalDatastore.isEnabled) {
|
|
393
|
+
Parse.LocalDatastore.isEnabled = true;
|
|
394
|
+
|
|
395
|
+
if (polling) {
|
|
396
|
+
_EventuallyQueue.default.poll(ms);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
383
399
|
};
|
|
384
400
|
/**
|
|
385
401
|
* Flag that indicates whether Local Datastore is enabled.
|
package/lib/node/CoreManager.js
CHANGED
package/lib/node/Parse.js
CHANGED
|
@@ -105,8 +105,6 @@ const Parse = {
|
|
|
105
105
|
/*: string*/
|
|
106
106
|
) {
|
|
107
107
|
Parse._initialize(applicationId, javaScriptKey);
|
|
108
|
-
|
|
109
|
-
_EventuallyQueue.default.poll();
|
|
110
108
|
},
|
|
111
109
|
|
|
112
110
|
_initialize(applicationId
|
|
@@ -354,14 +352,29 @@ Parse._getInstallationId = function () {
|
|
|
354
352
|
};
|
|
355
353
|
/**
|
|
356
354
|
* Enable pinning in your application.
|
|
357
|
-
* This must be called
|
|
355
|
+
* This must be called after `Parse.initialize` in your application.
|
|
358
356
|
*
|
|
357
|
+
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
358
|
+
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
359
359
|
* @static
|
|
360
360
|
*/
|
|
361
361
|
|
|
362
362
|
|
|
363
|
-
Parse.enableLocalDatastore = function (
|
|
364
|
-
|
|
363
|
+
Parse.enableLocalDatastore = function (polling = true, ms
|
|
364
|
+
/*: number*/
|
|
365
|
+
= 2000) {
|
|
366
|
+
if (!Parse.applicationId) {
|
|
367
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if (!Parse.LocalDatastore.isEnabled) {
|
|
372
|
+
Parse.LocalDatastore.isEnabled = true;
|
|
373
|
+
|
|
374
|
+
if (polling) {
|
|
375
|
+
_EventuallyQueue.default.poll(ms);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
365
378
|
};
|
|
366
379
|
/**
|
|
367
380
|
* Flag that indicates whether Local Datastore is enabled.
|
|
@@ -69,8 +69,6 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
69
69
|
var Parse = {
|
|
70
70
|
initialize: function (applicationId, javaScriptKey) {
|
|
71
71
|
Parse._initialize(applicationId, javaScriptKey);
|
|
72
|
-
|
|
73
|
-
_EventuallyQueue.default.poll();
|
|
74
72
|
},
|
|
75
73
|
_initialize: function (applicationId, javaScriptKey, masterKey) {
|
|
76
74
|
_CoreManager.default.set('APPLICATION_ID', applicationId);
|
|
@@ -246,7 +244,21 @@ Parse._getInstallationId = function () {
|
|
|
246
244
|
};
|
|
247
245
|
|
|
248
246
|
Parse.enableLocalDatastore = function () {
|
|
249
|
-
|
|
247
|
+
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
248
|
+
var ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
249
|
+
|
|
250
|
+
if (!Parse.applicationId) {
|
|
251
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (!Parse.LocalDatastore.isEnabled) {
|
|
256
|
+
Parse.LocalDatastore.isEnabled = true;
|
|
257
|
+
|
|
258
|
+
if (polling) {
|
|
259
|
+
_EventuallyQueue.default.poll(ms);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
250
262
|
};
|
|
251
263
|
|
|
252
264
|
Parse.isLocalDatastoreEnabled = function () {
|
package/lib/weapp/CoreManager.js
CHANGED
package/lib/weapp/Parse.js
CHANGED
|
@@ -110,8 +110,6 @@ var Parse = {
|
|
|
110
110
|
/*: string*/
|
|
111
111
|
) {
|
|
112
112
|
Parse._initialize(applicationId, javaScriptKey);
|
|
113
|
-
|
|
114
|
-
_EventuallyQueue.default.poll();
|
|
115
113
|
},
|
|
116
114
|
_initialize: function (applicationId
|
|
117
115
|
/*: string*/
|
|
@@ -366,14 +364,32 @@ Parse._getInstallationId = function () {
|
|
|
366
364
|
};
|
|
367
365
|
/**
|
|
368
366
|
* Enable pinning in your application.
|
|
369
|
-
* This must be called
|
|
367
|
+
* This must be called after `Parse.initialize` in your application.
|
|
370
368
|
*
|
|
369
|
+
* @param [polling] Allow pinging the server /health endpoint. Default true
|
|
370
|
+
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
371
371
|
* @static
|
|
372
372
|
*/
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
Parse.enableLocalDatastore = function () {
|
|
376
|
-
|
|
376
|
+
var polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
377
|
+
var ms
|
|
378
|
+
/*: number*/
|
|
379
|
+
= arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
380
|
+
|
|
381
|
+
if (!Parse.applicationId) {
|
|
382
|
+
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
if (!Parse.LocalDatastore.isEnabled) {
|
|
387
|
+
Parse.LocalDatastore.isEnabled = true;
|
|
388
|
+
|
|
389
|
+
if (polling) {
|
|
390
|
+
_EventuallyQueue.default.poll(ms);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
377
393
|
};
|
|
378
394
|
/**
|
|
379
395
|
* Flag that indicates whether Local Datastore is enabled.
|