parse 5.2.0-alpha.1 → 5.2.0-alpha.2
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/dist/parse.js +10102 -15029
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +10093 -15165
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/Analytics.js +7 -11
- package/lib/browser/AnonymousUtils.js +17 -22
- package/lib/browser/Cloud.js +23 -41
- package/lib/browser/CoreManager.js +71 -79
- package/lib/browser/CryptoController.js +14 -9
- package/lib/browser/EventEmitter.js +9 -2
- package/lib/browser/EventuallyQueue.js +156 -357
- package/lib/browser/FacebookUtils.js +23 -28
- package/lib/browser/IndexedDBStorageController.js +18 -14
- package/lib/browser/InstallationController.js +55 -121
- package/lib/browser/LiveQueryClient.js +308 -484
- package/lib/browser/LiveQuerySubscription.js +25 -28
- package/lib/browser/LocalDatastore.js +258 -624
- package/lib/browser/LocalDatastoreController.default.js +42 -226
- package/lib/browser/LocalDatastoreController.js +11 -1
- package/lib/browser/LocalDatastoreController.react-native.js +66 -160
- package/lib/browser/LocalDatastoreUtils.js +4 -7
- package/lib/browser/ObjectStateMutations.js +54 -96
- package/lib/browser/OfflineQuery.js +106 -198
- package/lib/browser/Parse.js +44 -60
- package/lib/browser/ParseACL.js +242 -288
- package/lib/browser/ParseCLP.js +372 -572
- package/lib/browser/ParseConfig.js +115 -138
- package/lib/browser/ParseError.js +85 -182
- package/lib/browser/ParseFile.js +294 -438
- package/lib/browser/ParseGeoPoint.js +121 -146
- package/lib/browser/ParseHooks.js +23 -25
- package/lib/browser/ParseInstallation.js +225 -367
- package/lib/browser/ParseLiveQuery.js +74 -148
- package/lib/browser/ParseObject.js +2014 -2621
- package/lib/browser/ParseOp.js +343 -484
- package/lib/browser/ParsePolygon.js +101 -120
- package/lib/browser/ParseQuery.js +1708 -2052
- package/lib/browser/ParseRelation.js +99 -118
- package/lib/browser/ParseRole.js +88 -140
- package/lib/browser/ParseSchema.js +372 -434
- package/lib/browser/ParseSession.js +62 -110
- package/lib/browser/ParseUser.js +941 -1284
- package/lib/browser/Push.js +15 -38
- package/lib/browser/RESTController.js +85 -124
- package/lib/browser/SingleInstanceStateController.js +57 -86
- package/lib/browser/Socket.weapp.js +50 -33
- package/lib/browser/Storage.js +23 -28
- package/lib/browser/StorageController.browser.js +16 -13
- package/lib/browser/StorageController.default.js +15 -14
- package/lib/browser/StorageController.js +14 -1
- package/lib/browser/StorageController.react-native.js +31 -30
- package/lib/browser/StorageController.weapp.js +19 -13
- package/lib/browser/TaskQueue.js +31 -43
- package/lib/browser/UniqueInstanceStateController.js +65 -86
- package/lib/browser/WebSocketController.js +11 -4
- package/lib/browser/Xhr.weapp.js +90 -78
- package/lib/browser/arrayContainsObject.js +3 -3
- package/lib/browser/canBeSerialized.js +10 -11
- package/lib/browser/decode.js +11 -11
- package/lib/browser/encode.js +11 -11
- package/lib/browser/equals.js +9 -10
- package/lib/browser/escape.js +2 -2
- package/lib/browser/isRevocableSession.js +1 -1
- package/lib/browser/parseDate.js +10 -10
- package/lib/browser/promiseUtils.js +19 -19
- package/lib/browser/unique.js +4 -4
- package/lib/browser/unsavedChildren.js +20 -21
- package/lib/browser/uuid.js +2 -4
- package/lib/node/Analytics.js +2 -6
- package/lib/node/AnonymousUtils.js +7 -12
- package/lib/node/Cloud.js +8 -8
- package/lib/node/CoreManager.js +59 -67
- package/lib/node/CryptoController.js +8 -3
- package/lib/node/EventEmitter.js +7 -1
- package/lib/node/EventuallyQueue.js +17 -36
- package/lib/node/FacebookUtils.js +1 -5
- package/lib/node/IndexedDBStorageController.js +14 -10
- package/lib/node/InstallationController.js +9 -10
- package/lib/node/LiveQueryClient.js +12 -14
- package/lib/node/LiveQuerySubscription.js +3 -4
- package/lib/node/LocalDatastore.js +20 -20
- package/lib/node/LocalDatastoreController.default.js +8 -9
- package/lib/node/LocalDatastoreController.js +14 -1
- package/lib/node/LocalDatastoreController.react-native.js +25 -21
- package/lib/node/LocalDatastoreUtils.js +4 -7
- package/lib/node/ObjectStateMutations.js +9 -19
- package/lib/node/OfflineQuery.js +37 -23
- package/lib/node/Parse.js +33 -47
- package/lib/node/ParseACL.js +18 -27
- package/lib/node/ParseCLP.js +35 -37
- package/lib/node/ParseConfig.js +7 -14
- package/lib/node/ParseError.js +457 -458
- package/lib/node/ParseFile.js +24 -44
- package/lib/node/ParseGeoPoint.js +16 -17
- package/lib/node/ParseHooks.js +13 -15
- package/lib/node/ParseInstallation.js +7 -8
- package/lib/node/ParseLiveQuery.js +6 -11
- package/lib/node/ParseObject.js +139 -170
- package/lib/node/ParseOp.js +32 -44
- package/lib/node/ParsePolygon.js +11 -17
- package/lib/node/ParseQuery.js +97 -120
- package/lib/node/ParseRelation.js +7 -16
- package/lib/node/ParseRole.js +7 -8
- package/lib/node/ParseSchema.js +26 -39
- package/lib/node/ParseSession.js +7 -8
- package/lib/node/ParseUser.js +73 -84
- package/lib/node/Push.js +4 -9
- package/lib/node/RESTController.js +21 -33
- package/lib/node/SingleInstanceStateController.js +41 -69
- package/lib/node/Socket.weapp.js +23 -2
- package/lib/node/Storage.js +11 -16
- package/lib/node/StorageController.browser.js +10 -8
- package/lib/node/StorageController.default.js +9 -9
- package/lib/node/StorageController.js +16 -1
- package/lib/node/StorageController.react-native.js +17 -17
- package/lib/node/StorageController.weapp.js +14 -8
- package/lib/node/TaskQueue.js +2 -3
- package/lib/node/UniqueInstanceStateController.js +40 -60
- package/lib/node/WebSocketController.js +15 -2
- package/lib/node/Xhr.weapp.js +11 -2
- package/lib/node/arrayContainsObject.js +1 -1
- package/lib/node/canBeSerialized.js +2 -2
- package/lib/node/decode.js +1 -1
- package/lib/node/encode.js +2 -2
- package/lib/node/equals.js +1 -1
- package/lib/node/escape.js +1 -1
- package/lib/node/isRevocableSession.js +1 -1
- package/lib/node/parseDate.js +1 -1
- package/lib/node/promiseUtils.js +7 -7
- package/lib/node/unique.js +2 -2
- package/lib/node/unsavedChildren.js +2 -2
- package/lib/node/uuid.js +2 -4
- package/lib/react-native/Analytics.js +2 -2
- package/lib/react-native/AnonymousUtils.js +3 -4
- package/lib/react-native/CoreManager.js +2 -3
- package/lib/react-native/CryptoController.js +6 -1
- package/lib/react-native/EventEmitter.js +6 -1
- package/lib/react-native/EventuallyQueue.js +1 -2
- package/lib/react-native/FacebookUtils.js +1 -2
- package/lib/react-native/IndexedDBStorageController.js +11 -5
- package/lib/react-native/InstallationController.js +1 -2
- package/lib/react-native/LiveQueryClient.js +2 -4
- package/lib/react-native/LiveQuerySubscription.js +2 -4
- package/lib/react-native/LocalDatastore.js +3 -3
- package/lib/react-native/LocalDatastoreController.default.js +1 -2
- package/lib/react-native/LocalDatastoreController.js +11 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +11 -12
- package/lib/react-native/LocalDatastoreUtils.js +3 -6
- package/lib/react-native/OfflineQuery.js +25 -20
- package/lib/react-native/Parse.js +24 -38
- package/lib/react-native/ParseACL.js +4 -6
- package/lib/react-native/ParseCLP.js +2 -4
- package/lib/react-native/ParseConfig.js +4 -6
- package/lib/react-native/ParseError.js +13 -31
- package/lib/react-native/ParseFile.js +3 -4
- package/lib/react-native/ParseGeoPoint.js +2 -4
- package/lib/react-native/ParseInstallation.js +13 -30
- package/lib/react-native/ParseLiveQuery.js +2 -4
- package/lib/react-native/ParseObject.js +77 -87
- package/lib/react-native/ParseOp.js +41 -79
- package/lib/react-native/ParsePolygon.js +2 -4
- package/lib/react-native/ParseQuery.js +43 -45
- package/lib/react-native/ParseRelation.js +2 -4
- package/lib/react-native/ParseRole.js +13 -30
- package/lib/react-native/ParseSchema.js +3 -5
- package/lib/react-native/ParseSession.js +12 -29
- package/lib/react-native/ParseUser.js +24 -49
- package/lib/react-native/RESTController.js +10 -4
- package/lib/react-native/SingleInstanceStateController.js +23 -37
- package/lib/react-native/Socket.weapp.js +9 -4
- package/lib/react-native/Storage.js +1 -2
- package/lib/react-native/StorageController.browser.js +6 -1
- package/lib/react-native/StorageController.default.js +6 -1
- package/lib/react-native/StorageController.js +13 -1
- package/lib/react-native/StorageController.react-native.js +11 -6
- package/lib/react-native/StorageController.weapp.js +6 -1
- package/lib/react-native/TaskQueue.js +2 -4
- package/lib/react-native/UniqueInstanceStateController.js +23 -37
- package/lib/react-native/WebSocketController.js +9 -1
- package/lib/react-native/Xhr.weapp.js +9 -4
- package/lib/react-native/unsavedChildren.js +3 -3
- package/lib/react-native/uuid.js +1 -2
- package/lib/weapp/Analytics.js +7 -11
- package/lib/weapp/AnonymousUtils.js +17 -22
- package/lib/weapp/Cloud.js +23 -41
- package/lib/weapp/CoreManager.js +71 -79
- package/lib/weapp/CryptoController.js +14 -9
- package/lib/weapp/EventEmitter.js +9 -2
- package/lib/weapp/EventuallyQueue.js +156 -357
- package/lib/weapp/FacebookUtils.js +23 -28
- package/lib/weapp/IndexedDBStorageController.js +18 -14
- package/lib/weapp/InstallationController.js +55 -121
- package/lib/weapp/LiveQueryClient.js +308 -484
- package/lib/weapp/LiveQuerySubscription.js +25 -28
- package/lib/weapp/LocalDatastore.js +258 -624
- package/lib/weapp/LocalDatastoreController.default.js +42 -226
- package/lib/weapp/LocalDatastoreController.js +11 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +66 -160
- package/lib/weapp/LocalDatastoreUtils.js +4 -7
- package/lib/weapp/ObjectStateMutations.js +54 -96
- package/lib/weapp/OfflineQuery.js +106 -198
- package/lib/weapp/Parse.js +44 -59
- package/lib/weapp/ParseACL.js +242 -288
- package/lib/weapp/ParseCLP.js +372 -572
- package/lib/weapp/ParseConfig.js +115 -138
- package/lib/weapp/ParseError.js +85 -182
- package/lib/weapp/ParseFile.js +295 -440
- package/lib/weapp/ParseGeoPoint.js +121 -146
- package/lib/weapp/ParseHooks.js +23 -25
- package/lib/weapp/ParseInstallation.js +225 -367
- package/lib/weapp/ParseLiveQuery.js +74 -148
- package/lib/weapp/ParseObject.js +2014 -2621
- package/lib/weapp/ParseOp.js +343 -484
- package/lib/weapp/ParsePolygon.js +101 -120
- package/lib/weapp/ParseQuery.js +1708 -2052
- package/lib/weapp/ParseRelation.js +99 -118
- package/lib/weapp/ParseRole.js +88 -140
- package/lib/weapp/ParseSchema.js +372 -434
- package/lib/weapp/ParseSession.js +62 -110
- package/lib/weapp/ParseUser.js +941 -1284
- package/lib/weapp/Push.js +15 -38
- package/lib/weapp/RESTController.js +86 -125
- package/lib/weapp/SingleInstanceStateController.js +57 -86
- package/lib/weapp/Socket.weapp.js +50 -33
- package/lib/weapp/Storage.js +23 -28
- package/lib/weapp/StorageController.browser.js +16 -13
- package/lib/weapp/StorageController.default.js +15 -14
- package/lib/weapp/StorageController.js +14 -1
- package/lib/weapp/StorageController.react-native.js +31 -30
- package/lib/weapp/StorageController.weapp.js +19 -13
- package/lib/weapp/TaskQueue.js +31 -43
- package/lib/weapp/UniqueInstanceStateController.js +65 -86
- package/lib/weapp/WebSocketController.js +11 -4
- package/lib/weapp/Xhr.weapp.js +90 -78
- package/lib/weapp/arrayContainsObject.js +3 -3
- package/lib/weapp/canBeSerialized.js +10 -11
- package/lib/weapp/decode.js +11 -11
- package/lib/weapp/encode.js +11 -11
- package/lib/weapp/equals.js +9 -10
- package/lib/weapp/escape.js +2 -2
- package/lib/weapp/isRevocableSession.js +1 -1
- package/lib/weapp/parseDate.js +10 -10
- package/lib/weapp/promiseUtils.js +19 -19
- package/lib/weapp/unique.js +4 -4
- package/lib/weapp/unsavedChildren.js +20 -21
- package/lib/weapp/uuid.js +6 -8
- package/package.json +19 -25
package/lib/weapp/Parse.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
3
|
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
5
4
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
5
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
@@ -29,6 +28,7 @@ var _ParseConfig = _interopRequireDefault(require("./ParseConfig"));
|
|
|
29
28
|
var _ParseError = _interopRequireDefault(require("./ParseError"));
|
|
30
29
|
var _FacebookUtils = _interopRequireDefault(require("./FacebookUtils"));
|
|
31
30
|
var _ParseFile = _interopRequireDefault(require("./ParseFile"));
|
|
31
|
+
var Hooks = _interopRequireWildcard(require("./ParseHooks"));
|
|
32
32
|
var _ParseGeoPoint = _interopRequireDefault(require("./ParseGeoPoint"));
|
|
33
33
|
var _ParsePolygon = _interopRequireDefault(require("./ParsePolygon"));
|
|
34
34
|
var _ParseInstallation = _interopRequireDefault(require("./ParseInstallation"));
|
|
@@ -47,43 +47,29 @@ var _LiveQueryClient = _interopRequireDefault(require("./LiveQueryClient"));
|
|
|
47
47
|
var _LocalDatastoreController = _interopRequireDefault(require("./LocalDatastoreController"));
|
|
48
48
|
var _StorageController = _interopRequireDefault(require("./StorageController"));
|
|
49
49
|
var _WebSocketController = _interopRequireDefault(require("./WebSocketController"));
|
|
50
|
-
function _getRequireWildcardCache(
|
|
51
|
-
if (typeof _WeakMap
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
return (_getRequireWildcardCache = function (
|
|
55
|
-
return
|
|
56
|
-
})(
|
|
50
|
+
function _getRequireWildcardCache(e) {
|
|
51
|
+
if ("function" != typeof _WeakMap) return null;
|
|
52
|
+
var r = new _WeakMap(),
|
|
53
|
+
t = new _WeakMap();
|
|
54
|
+
return (_getRequireWildcardCache = function (e) {
|
|
55
|
+
return e ? t : r;
|
|
56
|
+
})(e);
|
|
57
57
|
}
|
|
58
|
-
function _interopRequireWildcard(
|
|
59
|
-
if (!
|
|
60
|
-
|
|
58
|
+
function _interopRequireWildcard(e, r) {
|
|
59
|
+
if (!r && e && e.__esModule) return e;
|
|
60
|
+
if (null === e || "object" != typeof e && "function" != typeof e) return {
|
|
61
|
+
default: e
|
|
62
|
+
};
|
|
63
|
+
var t = _getRequireWildcardCache(r);
|
|
64
|
+
if (t && t.has(e)) return t.get(e);
|
|
65
|
+
var n = {
|
|
66
|
+
__proto__: null
|
|
67
|
+
};
|
|
68
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
69
|
+
var i = _Object$defineProperty && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(e, u) : null;
|
|
70
|
+
i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u];
|
|
61
71
|
}
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
default: obj
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
68
|
-
if (cache && cache.has(obj)) {
|
|
69
|
-
return cache.get(obj);
|
|
70
|
-
}
|
|
71
|
-
var newObj = {};
|
|
72
|
-
for (var key in obj) {
|
|
73
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
74
|
-
var desc = _Object$defineProperty && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null;
|
|
75
|
-
if (desc && (desc.get || desc.set)) {
|
|
76
|
-
_Object$defineProperty(newObj, key, desc);
|
|
77
|
-
} else {
|
|
78
|
-
newObj[key] = obj[key];
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
newObj.default = obj;
|
|
83
|
-
if (cache) {
|
|
84
|
-
cache.set(obj, newObj);
|
|
85
|
-
}
|
|
86
|
-
return newObj;
|
|
72
|
+
return n.default = e, t && t.set(e, n), n;
|
|
87
73
|
}
|
|
88
74
|
/**
|
|
89
75
|
* Contains all Parse API classes and functions.
|
|
@@ -94,7 +80,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
94
80
|
* @hideconstructor
|
|
95
81
|
*/
|
|
96
82
|
|
|
97
|
-
|
|
83
|
+
const Parse = {
|
|
98
84
|
ACL: _ParseACL.default,
|
|
99
85
|
Analytics: Analytics,
|
|
100
86
|
AnonymousUtils: _AnonymousUtils.default,
|
|
@@ -135,7 +121,7 @@ var Parse /*: ParseType*/ = {
|
|
|
135
121
|
* @member {EventuallyQueue} Parse.EventuallyQueue
|
|
136
122
|
* @static
|
|
137
123
|
*/
|
|
138
|
-
set EventuallyQueue(queue
|
|
124
|
+
set EventuallyQueue(queue) {
|
|
139
125
|
_CoreManager.default.setEventuallyQueue(queue);
|
|
140
126
|
},
|
|
141
127
|
get EventuallyQueue() {
|
|
@@ -149,10 +135,10 @@ var Parse /*: ParseType*/ = {
|
|
|
149
135
|
* @param {string} [masterKey] Your Parse Master Key. (Node.js only!)
|
|
150
136
|
* @static
|
|
151
137
|
*/
|
|
152
|
-
initialize
|
|
138
|
+
initialize(applicationId, javaScriptKey) {
|
|
153
139
|
Parse._initialize(applicationId, javaScriptKey);
|
|
154
140
|
},
|
|
155
|
-
_initialize
|
|
141
|
+
_initialize(applicationId, javaScriptKey, masterKey) {
|
|
156
142
|
_CoreManager.default.set('APPLICATION_ID', applicationId);
|
|
157
143
|
_CoreManager.default.set('JAVASCRIPT_KEY', javaScriptKey);
|
|
158
144
|
_CoreManager.default.set('MASTER_KEY', masterKey);
|
|
@@ -174,7 +160,7 @@ var Parse /*: ParseType*/ = {
|
|
|
174
160
|
* @param {AsyncStorage} storage a react native async storage.
|
|
175
161
|
* @static
|
|
176
162
|
*/
|
|
177
|
-
setAsyncStorage
|
|
163
|
+
setAsyncStorage(storage) {
|
|
178
164
|
_CoreManager.default.setAsyncStorage(storage);
|
|
179
165
|
},
|
|
180
166
|
/**
|
|
@@ -184,7 +170,7 @@ var Parse /*: ParseType*/ = {
|
|
|
184
170
|
* @param {LocalDatastoreController} controller a data storage.
|
|
185
171
|
* @static
|
|
186
172
|
*/
|
|
187
|
-
setLocalDatastoreController
|
|
173
|
+
setLocalDatastoreController(controller) {
|
|
188
174
|
_CoreManager.default.setLocalDatastoreController(controller);
|
|
189
175
|
},
|
|
190
176
|
/**
|
|
@@ -193,7 +179,7 @@ var Parse /*: ParseType*/ = {
|
|
|
193
179
|
* @returns {Promise}
|
|
194
180
|
* @static
|
|
195
181
|
*/
|
|
196
|
-
getServerHealth
|
|
182
|
+
getServerHealth() {
|
|
197
183
|
return _CoreManager.default.getRESTController().request('GET', 'health');
|
|
198
184
|
},
|
|
199
185
|
/**
|
|
@@ -260,7 +246,7 @@ var Parse /*: ParseType*/ = {
|
|
|
260
246
|
* @member {ParseLiveQuery} Parse.LiveQuery
|
|
261
247
|
* @static
|
|
262
248
|
*/
|
|
263
|
-
set LiveQuery(liveQuery
|
|
249
|
+
set LiveQuery(liveQuery) {
|
|
264
250
|
_CoreManager.default.setLiveQuery(liveQuery);
|
|
265
251
|
},
|
|
266
252
|
get LiveQuery() {
|
|
@@ -280,7 +266,7 @@ var Parse /*: ParseType*/ = {
|
|
|
280
266
|
* @member {boolean} Parse.encryptedUser
|
|
281
267
|
* @static
|
|
282
268
|
*/
|
|
283
|
-
set encryptedUser(value
|
|
269
|
+
set encryptedUser(value) {
|
|
284
270
|
_CoreManager.default.set('ENCRYPTED_USER', value);
|
|
285
271
|
},
|
|
286
272
|
get encryptedUser() {
|
|
@@ -316,26 +302,26 @@ var Parse /*: ParseType*/ = {
|
|
|
316
302
|
get allowCustomObjectId() {
|
|
317
303
|
return _CoreManager.default.get('ALLOW_CUSTOM_OBJECT_ID');
|
|
318
304
|
},
|
|
319
|
-
_request
|
|
305
|
+
_request() {
|
|
320
306
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
321
307
|
args[_key] = arguments[_key];
|
|
322
308
|
}
|
|
323
309
|
return _CoreManager.default.getRESTController().request.apply(null, args);
|
|
324
310
|
},
|
|
325
|
-
_ajax
|
|
311
|
+
_ajax() {
|
|
326
312
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
327
313
|
args[_key2] = arguments[_key2];
|
|
328
314
|
}
|
|
329
315
|
return _CoreManager.default.getRESTController().ajax.apply(null, args);
|
|
330
316
|
},
|
|
331
317
|
// We attempt to match the signatures of the legacy versions of these methods
|
|
332
|
-
_decode
|
|
318
|
+
_decode(_, value) {
|
|
333
319
|
return (0, _decode2.default)(value);
|
|
334
320
|
},
|
|
335
|
-
_encode
|
|
321
|
+
_encode(value, _, disallowObjects) {
|
|
336
322
|
return (0, _encode2.default)(value, disallowObjects);
|
|
337
323
|
},
|
|
338
|
-
_getInstallationId
|
|
324
|
+
_getInstallationId() {
|
|
339
325
|
return _CoreManager.default.getInstallationController().currentInstallationId();
|
|
340
326
|
},
|
|
341
327
|
/**
|
|
@@ -346,9 +332,9 @@ var Parse /*: ParseType*/ = {
|
|
|
346
332
|
* @param [ms] Milliseconds to ping the server. Default 2000ms
|
|
347
333
|
* @static
|
|
348
334
|
*/
|
|
349
|
-
enableLocalDatastore
|
|
350
|
-
|
|
351
|
-
|
|
335
|
+
enableLocalDatastore() {
|
|
336
|
+
let polling = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
337
|
+
let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
352
338
|
if (!this.applicationId) {
|
|
353
339
|
console.log("'enableLocalDataStore' must be called after 'initialize'");
|
|
354
340
|
return;
|
|
@@ -366,7 +352,7 @@ var Parse /*: ParseType*/ = {
|
|
|
366
352
|
* @static
|
|
367
353
|
* @returns {boolean}
|
|
368
354
|
*/
|
|
369
|
-
isLocalDatastoreEnabled
|
|
355
|
+
isLocalDatastoreEnabled() {
|
|
370
356
|
return this.LocalDatastore.isEnabled;
|
|
371
357
|
},
|
|
372
358
|
/**
|
|
@@ -379,7 +365,7 @@ var Parse /*: ParseType*/ = {
|
|
|
379
365
|
* @static
|
|
380
366
|
* @returns {object}
|
|
381
367
|
*/
|
|
382
|
-
dumpLocalDatastore
|
|
368
|
+
dumpLocalDatastore() {
|
|
383
369
|
if (!this.LocalDatastore.isEnabled) {
|
|
384
370
|
console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
|
|
385
371
|
return _promise.default.resolve({});
|
|
@@ -393,7 +379,7 @@ var Parse /*: ParseType*/ = {
|
|
|
393
379
|
*
|
|
394
380
|
* @static
|
|
395
381
|
*/
|
|
396
|
-
enableEncryptedUser
|
|
382
|
+
enableEncryptedUser() {
|
|
397
383
|
this.encryptedUser = true;
|
|
398
384
|
},
|
|
399
385
|
/**
|
|
@@ -402,7 +388,7 @@ var Parse /*: ParseType*/ = {
|
|
|
402
388
|
* @static
|
|
403
389
|
* @returns {boolean}
|
|
404
390
|
*/
|
|
405
|
-
isEncryptedUserEnabled
|
|
391
|
+
isEncryptedUserEnabled() {
|
|
406
392
|
return this.encryptedUser;
|
|
407
393
|
}
|
|
408
394
|
};
|
|
@@ -410,5 +396,4 @@ _CoreManager.default.setRESTController(_RESTController.default);
|
|
|
410
396
|
// For legacy requires, of the form `var Parse = require('parse').Parse`
|
|
411
397
|
Parse.Parse = Parse;
|
|
412
398
|
module.exports = Parse;
|
|
413
|
-
var _default = Parse;
|
|
414
|
-
exports.default = _default;
|
|
399
|
+
var _default = exports.default = Parse;
|