parse 5.1.1-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 +10186 -14918
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +10180 -15057
- 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 +24 -46
- 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 +312 -446
- package/lib/browser/LiveQuerySubscription.js +25 -28
- package/lib/browser/LocalDatastore.js +254 -578
- package/lib/browser/LocalDatastoreController.default.js +48 -227
- package/lib/browser/LocalDatastoreController.js +11 -1
- package/lib/browser/LocalDatastoreController.react-native.js +72 -164
- package/lib/browser/LocalDatastoreUtils.js +4 -12
- package/lib/browser/ObjectStateMutations.js +89 -95
- package/lib/browser/OfflineQuery.js +106 -198
- package/lib/browser/Parse.js +45 -61
- package/lib/browser/ParseACL.js +242 -288
- package/lib/browser/ParseCLP.js +372 -580
- package/lib/browser/ParseConfig.js +115 -138
- package/lib/browser/ParseError.js +85 -182
- package/lib/browser/ParseFile.js +296 -444
- package/lib/browser/ParseGeoPoint.js +121 -140
- package/lib/browser/ParseHooks.js +12 -14
- package/lib/browser/ParseInstallation.js +226 -354
- package/lib/browser/ParseLiveQuery.js +74 -148
- package/lib/browser/ParseObject.js +2017 -2622
- package/lib/browser/ParseOp.js +343 -484
- package/lib/browser/ParsePolygon.js +101 -120
- package/lib/browser/ParseQuery.js +1722 -2068
- package/lib/browser/ParseRelation.js +99 -118
- package/lib/browser/ParseRole.js +88 -144
- package/lib/browser/ParseSchema.js +372 -434
- package/lib/browser/ParseSession.js +62 -110
- package/lib/browser/ParseUser.js +942 -1270
- package/lib/browser/Push.js +16 -44
- 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 +37 -49
- 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 -12
- 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 +18 -37
- package/lib/node/FacebookUtils.js +1 -5
- package/lib/node/IndexedDBStorageController.js +14 -10
- package/lib/node/InstallationController.js +7 -8
- package/lib/node/LiveQueryClient.js +20 -32
- package/lib/node/LiveQuerySubscription.js +3 -4
- package/lib/node/LocalDatastore.js +20 -24
- package/lib/node/LocalDatastoreController.default.js +12 -11
- package/lib/node/LocalDatastoreController.js +14 -1
- package/lib/node/LocalDatastoreController.react-native.js +27 -22
- package/lib/node/LocalDatastoreUtils.js +4 -12
- package/lib/node/ObjectStateMutations.js +52 -36
- package/lib/node/OfflineQuery.js +37 -23
- package/lib/node/Parse.js +35 -49
- package/lib/node/ParseACL.js +18 -27
- package/lib/node/ParseCLP.js +38 -50
- package/lib/node/ParseConfig.js +7 -14
- package/lib/node/ParseError.js +457 -458
- package/lib/node/ParseFile.js +33 -66
- package/lib/node/ParseGeoPoint.js +22 -17
- package/lib/node/ParseHooks.js +0 -2
- package/lib/node/ParseInstallation.js +21 -8
- package/lib/node/ParseLiveQuery.js +6 -11
- package/lib/node/ParseObject.js +138 -167
- package/lib/node/ParseOp.js +32 -44
- package/lib/node/ParsePolygon.js +11 -17
- package/lib/node/ParseQuery.js +118 -164
- package/lib/node/ParseRelation.js +7 -16
- package/lib/node/ParseRole.js +7 -13
- package/lib/node/ParseSchema.js +26 -39
- package/lib/node/ParseSession.js +7 -8
- package/lib/node/ParseUser.js +70 -76
- package/lib/node/Push.js +5 -15
- 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 +8 -11
- 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/Cloud.js +0 -1
- 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 +51 -36
- package/lib/react-native/LiveQuerySubscription.js +2 -4
- package/lib/react-native/LocalDatastore.js +41 -17
- package/lib/react-native/LocalDatastoreController.default.js +6 -1
- package/lib/react-native/LocalDatastoreController.js +11 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +16 -11
- package/lib/react-native/LocalDatastoreUtils.js +3 -6
- package/lib/react-native/ObjectStateMutations.js +30 -9
- 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 +5 -7
- package/lib/react-native/ParseConfig.js +4 -6
- package/lib/react-native/ParseError.js +13 -31
- package/lib/react-native/ParseFile.js +10 -10
- 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 +81 -90
- package/lib/react-native/ParseOp.js +41 -79
- package/lib/react-native/ParsePolygon.js +2 -4
- package/lib/react-native/ParseQuery.js +87 -81
- package/lib/react-native/ParseRelation.js +2 -4
- package/lib/react-native/ParseRole.js +14 -31
- package/lib/react-native/ParseSchema.js +3 -5
- package/lib/react-native/ParseSession.js +12 -29
- package/lib/react-native/ParseUser.js +32 -51
- 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 +8 -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 +24 -46
- 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 +312 -446
- package/lib/weapp/LiveQuerySubscription.js +25 -28
- package/lib/weapp/LocalDatastore.js +254 -578
- package/lib/weapp/LocalDatastoreController.default.js +48 -227
- package/lib/weapp/LocalDatastoreController.js +11 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +72 -164
- package/lib/weapp/LocalDatastoreUtils.js +4 -12
- package/lib/weapp/ObjectStateMutations.js +89 -95
- package/lib/weapp/OfflineQuery.js +106 -198
- package/lib/weapp/Parse.js +45 -60
- package/lib/weapp/ParseACL.js +242 -288
- package/lib/weapp/ParseCLP.js +372 -580
- package/lib/weapp/ParseConfig.js +115 -138
- package/lib/weapp/ParseError.js +85 -182
- package/lib/weapp/ParseFile.js +297 -446
- package/lib/weapp/ParseGeoPoint.js +121 -140
- package/lib/weapp/ParseHooks.js +12 -14
- package/lib/weapp/ParseInstallation.js +226 -354
- package/lib/weapp/ParseLiveQuery.js +74 -148
- package/lib/weapp/ParseObject.js +2017 -2622
- package/lib/weapp/ParseOp.js +343 -484
- package/lib/weapp/ParsePolygon.js +101 -120
- package/lib/weapp/ParseQuery.js +1722 -2068
- package/lib/weapp/ParseRelation.js +99 -118
- package/lib/weapp/ParseRole.js +88 -144
- package/lib/weapp/ParseSchema.js +372 -434
- package/lib/weapp/ParseSession.js +62 -110
- package/lib/weapp/ParseUser.js +942 -1270
- package/lib/weapp/Push.js +16 -44
- 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 +37 -49
- 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 +23 -30
|
@@ -22,6 +22,7 @@ var _ParseConfig = _interopRequireDefault(require("./ParseConfig"));
|
|
|
22
22
|
var _ParseError = _interopRequireDefault(require("./ParseError"));
|
|
23
23
|
var _FacebookUtils = _interopRequireDefault(require("./FacebookUtils"));
|
|
24
24
|
var _ParseFile = _interopRequireDefault(require("./ParseFile"));
|
|
25
|
+
var Hooks = _interopRequireWildcard(require("./ParseHooks"));
|
|
25
26
|
var _ParseGeoPoint = _interopRequireDefault(require("./ParseGeoPoint"));
|
|
26
27
|
var _ParsePolygon = _interopRequireDefault(require("./ParsePolygon"));
|
|
27
28
|
var _ParseInstallation = _interopRequireDefault(require("./ParseInstallation"));
|
|
@@ -40,44 +41,30 @@ var _LiveQueryClient = _interopRequireDefault(require("./LiveQueryClient"));
|
|
|
40
41
|
var _LocalDatastoreController = _interopRequireDefault(require("./LocalDatastoreController"));
|
|
41
42
|
var _StorageController = _interopRequireDefault(require("./StorageController"));
|
|
42
43
|
var _WebSocketController = _interopRequireDefault(require("./WebSocketController"));
|
|
43
|
-
function _getRequireWildcardCache(
|
|
44
|
-
if (typeof WeakMap
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
return (_getRequireWildcardCache = function (
|
|
48
|
-
return
|
|
49
|
-
})(
|
|
44
|
+
function _getRequireWildcardCache(e) {
|
|
45
|
+
if ("function" != typeof WeakMap) return null;
|
|
46
|
+
var r = new WeakMap(),
|
|
47
|
+
t = new WeakMap();
|
|
48
|
+
return (_getRequireWildcardCache = function (e) {
|
|
49
|
+
return e ? t : r;
|
|
50
|
+
})(e);
|
|
50
51
|
}
|
|
51
|
-
function _interopRequireWildcard(
|
|
52
|
-
if (!
|
|
53
|
-
|
|
52
|
+
function _interopRequireWildcard(e, r) {
|
|
53
|
+
if (!r && e && e.__esModule) return e;
|
|
54
|
+
if (null === e || "object" != typeof e && "function" != typeof e) return {
|
|
55
|
+
default: e
|
|
56
|
+
};
|
|
57
|
+
var t = _getRequireWildcardCache(r);
|
|
58
|
+
if (t && t.has(e)) return t.get(e);
|
|
59
|
+
var n = {
|
|
60
|
+
__proto__: null
|
|
61
|
+
},
|
|
62
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
63
|
+
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
64
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
65
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
54
66
|
}
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
default: obj
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
61
|
-
if (cache && cache.has(obj)) {
|
|
62
|
-
return cache.get(obj);
|
|
63
|
-
}
|
|
64
|
-
var newObj = {};
|
|
65
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
66
|
-
for (var key in obj) {
|
|
67
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
68
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
69
|
-
if (desc && (desc.get || desc.set)) {
|
|
70
|
-
Object.defineProperty(newObj, key, desc);
|
|
71
|
-
} else {
|
|
72
|
-
newObj[key] = obj[key];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
newObj.default = obj;
|
|
77
|
-
if (cache) {
|
|
78
|
-
cache.set(obj, newObj);
|
|
79
|
-
}
|
|
80
|
-
return newObj;
|
|
67
|
+
return n.default = e, t && t.set(e, n), n;
|
|
81
68
|
}
|
|
82
69
|
var Parse = {
|
|
83
70
|
ACL: _ParseACL.default,
|
|
@@ -276,5 +263,4 @@ var Parse = {
|
|
|
276
263
|
_CoreManager.default.setRESTController(_RESTController.default);
|
|
277
264
|
Parse.Parse = Parse;
|
|
278
265
|
module.exports = Parse;
|
|
279
|
-
var _default = Parse;
|
|
280
|
-
exports.default = _default;
|
|
266
|
+
var _default = exports.default = Parse;
|
|
@@ -12,8 +12,8 @@ var ParseACL = function () {
|
|
|
12
12
|
(0, _classCallCheck2.default)(this, ParseACL);
|
|
13
13
|
this.permissionsById = {};
|
|
14
14
|
if (arg1 && typeof arg1 === 'object') {
|
|
15
|
-
var
|
|
16
|
-
if (arg1 instanceof
|
|
15
|
+
var ParseUser = _CoreManager.default.getParseUser();
|
|
16
|
+
if (arg1 instanceof ParseUser) {
|
|
17
17
|
this.setReadAccess(arg1, true);
|
|
18
18
|
this.setWriteAccess(arg1, true);
|
|
19
19
|
} else {
|
|
@@ -36,7 +36,7 @@ var ParseACL = function () {
|
|
|
36
36
|
throw new TypeError('ParseACL constructed with a function. Did you forget ()?');
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
(0, _createClass2.default)(ParseACL, [{
|
|
39
|
+
return (0, _createClass2.default)(ParseACL, [{
|
|
40
40
|
key: "toJSON",
|
|
41
41
|
value: function () {
|
|
42
42
|
var permissions = {};
|
|
@@ -219,7 +219,5 @@ var ParseACL = function () {
|
|
|
219
219
|
this.setWriteAccess('role:' + role, allowed);
|
|
220
220
|
}
|
|
221
221
|
}]);
|
|
222
|
-
return ParseACL;
|
|
223
222
|
}();
|
|
224
|
-
var _default = ParseACL;
|
|
225
|
-
exports.default = _default;
|
|
223
|
+
var _default = exports.default = ParseACL;
|
|
@@ -109,7 +109,7 @@ var ParseCLP = function () {
|
|
|
109
109
|
throw new TypeError('ParseCLP constructed with a function. Did you forget ()?');
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
(0, _createClass2.default)(ParseCLP, [{
|
|
112
|
+
return (0, _createClass2.default)(ParseCLP, [{
|
|
113
113
|
key: "toJSON",
|
|
114
114
|
value: function toJSON() {
|
|
115
115
|
return Object.assign({}, this.permissionsMap);
|
|
@@ -247,7 +247,7 @@ var ParseCLP = function () {
|
|
|
247
247
|
}, {
|
|
248
248
|
key: "_getGroupPointerPermissions",
|
|
249
249
|
value: function _getGroupPointerPermissions(operation) {
|
|
250
|
-
return this.permissionsMap[operation];
|
|
250
|
+
return this.permissionsMap[operation] || [];
|
|
251
251
|
}
|
|
252
252
|
}, {
|
|
253
253
|
key: "setReadUserFields",
|
|
@@ -257,7 +257,7 @@ var ParseCLP = function () {
|
|
|
257
257
|
}, {
|
|
258
258
|
key: "getReadUserFields",
|
|
259
259
|
value: function getReadUserFields() {
|
|
260
|
-
return this._getGroupPointerPermissions('readUserFields');
|
|
260
|
+
return this._getGroupPointerPermissions('readUserFields') || [];
|
|
261
261
|
}
|
|
262
262
|
}, {
|
|
263
263
|
key: "setWriteUserFields",
|
|
@@ -267,7 +267,7 @@ var ParseCLP = function () {
|
|
|
267
267
|
}, {
|
|
268
268
|
key: "getWriteUserFields",
|
|
269
269
|
value: function getWriteUserFields() {
|
|
270
|
-
return this._getGroupPointerPermissions('writeUserFields');
|
|
270
|
+
return this._getGroupPointerPermissions('writeUserFields') || [];
|
|
271
271
|
}
|
|
272
272
|
}, {
|
|
273
273
|
key: "setProtectedFields",
|
|
@@ -365,7 +365,5 @@ var ParseCLP = function () {
|
|
|
365
365
|
this.setProtectedFields(this._getRoleName(role), fields);
|
|
366
366
|
}
|
|
367
367
|
}]);
|
|
368
|
-
return ParseCLP;
|
|
369
368
|
}();
|
|
370
|
-
var _default = ParseCLP;
|
|
371
|
-
exports.default = _default;
|
|
369
|
+
var _default = exports.default = ParseCLP;
|
|
@@ -17,7 +17,7 @@ var ParseConfig = function () {
|
|
|
17
17
|
this.attributes = {};
|
|
18
18
|
this._escapedAttributes = {};
|
|
19
19
|
}
|
|
20
|
-
(0, _createClass2.default)(ParseConfig, [{
|
|
20
|
+
return (0, _createClass2.default)(ParseConfig, [{
|
|
21
21
|
key: "get",
|
|
22
22
|
value: function (attr) {
|
|
23
23
|
return this.attributes[attr];
|
|
@@ -68,7 +68,6 @@ var ParseConfig = function () {
|
|
|
68
68
|
currentConfig = null;
|
|
69
69
|
}
|
|
70
70
|
}]);
|
|
71
|
-
return ParseConfig;
|
|
72
71
|
}();
|
|
73
72
|
var currentConfig = null;
|
|
74
73
|
var CURRENT_CONFIG_KEY = 'currentConfig';
|
|
@@ -133,8 +132,8 @@ var DefaultController = {
|
|
|
133
132
|
save: function (attrs, masterKeyOnlyFlags) {
|
|
134
133
|
var RESTController = _CoreManager.default.getRESTController();
|
|
135
134
|
var encodedAttrs = {};
|
|
136
|
-
for (var
|
|
137
|
-
encodedAttrs[
|
|
135
|
+
for (var key in attrs) {
|
|
136
|
+
encodedAttrs[key] = (0, _encode.default)(attrs[key]);
|
|
138
137
|
}
|
|
139
138
|
return RESTController.request('PUT', 'config', {
|
|
140
139
|
params: encodedAttrs,
|
|
@@ -152,5 +151,4 @@ var DefaultController = {
|
|
|
152
151
|
}
|
|
153
152
|
};
|
|
154
153
|
_CoreManager.default.setConfigController(DefaultController);
|
|
155
|
-
var _default = ParseConfig;
|
|
156
|
-
exports.default = _default;
|
|
154
|
+
var _default = exports.default = ParseConfig;
|
|
@@ -5,44 +5,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.default = void 0;
|
|
6
6
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
7
7
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
8
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
9
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
10
8
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
9
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
10
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
11
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
13
12
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
return function () {
|
|
17
|
-
var Super = (0, _getPrototypeOf2.default)(Derived),
|
|
18
|
-
result;
|
|
19
|
-
if (hasNativeReflectConstruct) {
|
|
20
|
-
var NewTarget = (0, _getPrototypeOf2.default)(this).constructor;
|
|
21
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
22
|
-
} else {
|
|
23
|
-
result = Super.apply(this, arguments);
|
|
24
|
-
}
|
|
25
|
-
return (0, _possibleConstructorReturn2.default)(this, result);
|
|
26
|
-
};
|
|
13
|
+
function _callSuper(t, o, e) {
|
|
14
|
+
return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e));
|
|
27
15
|
}
|
|
28
16
|
function _isNativeReflectConstruct() {
|
|
29
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
30
|
-
if (Reflect.construct.sham) return false;
|
|
31
|
-
if (typeof Proxy === "function") return true;
|
|
32
17
|
try {
|
|
33
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
}
|
|
18
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
19
|
+
} catch (t) {}
|
|
20
|
+
return (_isNativeReflectConstruct = function () {
|
|
21
|
+
return !!t;
|
|
22
|
+
})();
|
|
38
23
|
}
|
|
39
24
|
var ParseError = function (_Error) {
|
|
40
|
-
(0, _inherits2.default)(ParseError, _Error);
|
|
41
|
-
var _super = _createSuper(ParseError);
|
|
42
25
|
function ParseError(code, message) {
|
|
43
26
|
var _this;
|
|
44
27
|
(0, _classCallCheck2.default)(this, ParseError);
|
|
45
|
-
_this =
|
|
28
|
+
_this = _callSuper(this, ParseError, [message]);
|
|
46
29
|
_this.code = code;
|
|
47
30
|
var customMessage = message;
|
|
48
31
|
_CoreManager.default.get('PARSE_ERRORS').forEach(function (error) {
|
|
@@ -50,19 +33,19 @@ var ParseError = function (_Error) {
|
|
|
50
33
|
customMessage = error.message;
|
|
51
34
|
}
|
|
52
35
|
});
|
|
53
|
-
Object.defineProperty(
|
|
36
|
+
Object.defineProperty(_this, 'message', {
|
|
54
37
|
enumerable: true,
|
|
55
38
|
value: customMessage
|
|
56
39
|
});
|
|
57
40
|
return _this;
|
|
58
41
|
}
|
|
59
|
-
(0,
|
|
42
|
+
(0, _inherits2.default)(ParseError, _Error);
|
|
43
|
+
return (0, _createClass2.default)(ParseError, [{
|
|
60
44
|
key: "toString",
|
|
61
45
|
value: function () {
|
|
62
46
|
return 'ParseError: ' + this.code + ' ' + this.message;
|
|
63
47
|
}
|
|
64
48
|
}]);
|
|
65
|
-
return ParseError;
|
|
66
49
|
}((0, _wrapNativeSuper2.default)(Error));
|
|
67
50
|
ParseError.OTHER_CAUSE = -1;
|
|
68
51
|
ParseError.INTERNAL_SERVER_ERROR = 1;
|
|
@@ -125,5 +108,4 @@ ParseError.INVALID_SCHEMA_OPERATION = 255;
|
|
|
125
108
|
ParseError.AGGREGATE_ERROR = 600;
|
|
126
109
|
ParseError.FILE_READ_ERROR = 601;
|
|
127
110
|
ParseError.X_DOMAIN_REQUEST = 602;
|
|
128
|
-
var _default = ParseError;
|
|
129
|
-
exports.default = _default;
|
|
111
|
+
var _default = exports.default = ParseError;
|
|
@@ -8,7 +8,8 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
11
|
-
var
|
|
11
|
+
var _ParseError = _interopRequireDefault(require("./ParseError"));
|
|
12
|
+
var _Xhr = _interopRequireDefault(require("./Xhr.weapp"));
|
|
12
13
|
var XHR = null;
|
|
13
14
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
14
15
|
XHR = XMLHttpRequest;
|
|
@@ -72,7 +73,7 @@ var ParseFile = function () {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
|
-
(0, _createClass2.default)(ParseFile, [{
|
|
76
|
+
return (0, _createClass2.default)(ParseFile, [{
|
|
76
77
|
key: "getData",
|
|
77
78
|
value: function () {
|
|
78
79
|
var _getData = (0, _asyncToGenerator2.default)(function* () {
|
|
@@ -192,17 +193,17 @@ var ParseFile = function () {
|
|
|
192
193
|
var _this3 = this;
|
|
193
194
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
194
195
|
if (!this._name) {
|
|
195
|
-
throw new
|
|
196
|
+
throw new _ParseError.default(_ParseError.default.FILE_DELETE_UNNAMED_ERROR, 'Cannot delete an unnamed file.');
|
|
196
197
|
}
|
|
197
198
|
var destroyOptions = {
|
|
198
199
|
useMasterKey: true
|
|
199
200
|
};
|
|
200
201
|
if (options.hasOwnProperty('useMasterKey')) {
|
|
201
|
-
destroyOptions.useMasterKey = options.useMasterKey;
|
|
202
|
+
destroyOptions.useMasterKey = !!options.useMasterKey;
|
|
202
203
|
}
|
|
203
204
|
var controller = _CoreManager.default.getFileController();
|
|
204
205
|
return controller.deleteFile(this._name, destroyOptions).then(function () {
|
|
205
|
-
_this3._data =
|
|
206
|
+
_this3._data = undefined;
|
|
206
207
|
_this3._requestTask = null;
|
|
207
208
|
return _this3;
|
|
208
209
|
});
|
|
@@ -284,7 +285,6 @@ var ParseFile = function () {
|
|
|
284
285
|
return chunks.join('');
|
|
285
286
|
}
|
|
286
287
|
}]);
|
|
287
|
-
return ParseFile;
|
|
288
288
|
}();
|
|
289
289
|
var DefaultController = {
|
|
290
290
|
saveFile: function () {
|
|
@@ -310,7 +310,7 @@ var DefaultController = {
|
|
|
310
310
|
var newSource = {
|
|
311
311
|
format: 'base64',
|
|
312
312
|
base64: data,
|
|
313
|
-
type: source.type || (source.file ? source.file.type :
|
|
313
|
+
type: source.type || (source.file ? source.file.type : undefined)
|
|
314
314
|
};
|
|
315
315
|
return yield DefaultController.saveBase64(name, newSource, options);
|
|
316
316
|
});
|
|
@@ -319,7 +319,8 @@ var DefaultController = {
|
|
|
319
319
|
}
|
|
320
320
|
return saveFile;
|
|
321
321
|
}(),
|
|
322
|
-
saveBase64: function (name, source
|
|
322
|
+
saveBase64: function (name, source) {
|
|
323
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
323
324
|
if (source.format !== 'base64') {
|
|
324
325
|
throw new Error('saveBase64 can only be used with Base64-type sources.');
|
|
325
326
|
}
|
|
@@ -397,6 +398,5 @@ var DefaultController = {
|
|
|
397
398
|
}
|
|
398
399
|
};
|
|
399
400
|
_CoreManager.default.setFileController(DefaultController);
|
|
400
|
-
var _default = ParseFile;
|
|
401
|
-
exports.default = _default;
|
|
401
|
+
var _default = exports.default = ParseFile;
|
|
402
402
|
exports.b64Digit = b64Digit;
|
|
@@ -25,7 +25,7 @@ var ParseGeoPoint = function () {
|
|
|
25
25
|
this._longitude = 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
(0, _createClass2.default)(ParseGeoPoint, [{
|
|
28
|
+
return (0, _createClass2.default)(ParseGeoPoint, [{
|
|
29
29
|
key: "latitude",
|
|
30
30
|
get: function () {
|
|
31
31
|
return this._latitude;
|
|
@@ -111,7 +111,5 @@ var ParseGeoPoint = function () {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}]);
|
|
114
|
-
return ParseGeoPoint;
|
|
115
114
|
}();
|
|
116
|
-
var _default = ParseGeoPoint;
|
|
117
|
-
exports.default = _default;
|
|
115
|
+
var _default = exports.default = ParseGeoPoint;
|
|
@@ -7,37 +7,23 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
7
7
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
15
15
|
var _ParseError = _interopRequireDefault(require("./ParseError"));
|
|
16
16
|
var _ParseObject2 = _interopRequireDefault(require("./ParseObject"));
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
return function () {
|
|
20
|
-
var Super = (0, _getPrototypeOf2.default)(Derived),
|
|
21
|
-
result;
|
|
22
|
-
if (hasNativeReflectConstruct) {
|
|
23
|
-
var NewTarget = (0, _getPrototypeOf2.default)(this).constructor;
|
|
24
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
25
|
-
} else {
|
|
26
|
-
result = Super.apply(this, arguments);
|
|
27
|
-
}
|
|
28
|
-
return (0, _possibleConstructorReturn2.default)(this, result);
|
|
29
|
-
};
|
|
17
|
+
function _callSuper(t, o, e) {
|
|
18
|
+
return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e));
|
|
30
19
|
}
|
|
31
20
|
function _isNativeReflectConstruct() {
|
|
32
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
33
|
-
if (Reflect.construct.sham) return false;
|
|
34
|
-
if (typeof Proxy === "function") return true;
|
|
35
21
|
try {
|
|
36
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
}
|
|
22
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
23
|
+
} catch (t) {}
|
|
24
|
+
return (_isNativeReflectConstruct = function () {
|
|
25
|
+
return !!t;
|
|
26
|
+
})();
|
|
41
27
|
}
|
|
42
28
|
var DEVICE_TYPES = {
|
|
43
29
|
IOS: 'ios',
|
|
@@ -48,12 +34,10 @@ var DEVICE_TYPES = {
|
|
|
48
34
|
WEB: 'web'
|
|
49
35
|
};
|
|
50
36
|
var ParseInstallation = function (_ParseObject) {
|
|
51
|
-
(0, _inherits2.default)(ParseInstallation, _ParseObject);
|
|
52
|
-
var _super = _createSuper(ParseInstallation);
|
|
53
37
|
function ParseInstallation(attributes) {
|
|
54
38
|
var _this;
|
|
55
39
|
(0, _classCallCheck2.default)(this, ParseInstallation);
|
|
56
|
-
_this =
|
|
40
|
+
_this = _callSuper(this, ParseInstallation, ['_Installation']);
|
|
57
41
|
if (attributes && typeof attributes === 'object') {
|
|
58
42
|
if (!_this.set(attributes)) {
|
|
59
43
|
throw new Error("Can't create an invalid Installation");
|
|
@@ -61,7 +45,8 @@ var ParseInstallation = function (_ParseObject) {
|
|
|
61
45
|
}
|
|
62
46
|
return _this;
|
|
63
47
|
}
|
|
64
|
-
(0,
|
|
48
|
+
(0, _inherits2.default)(ParseInstallation, _ParseObject);
|
|
49
|
+
return (0, _createClass2.default)(ParseInstallation, [{
|
|
65
50
|
key: "appIdentifier",
|
|
66
51
|
get: function () {
|
|
67
52
|
return this.get('appIdentifier');
|
|
@@ -199,9 +184,7 @@ var ParseInstallation = function (_ParseObject) {
|
|
|
199
184
|
return _CoreManager.default.getInstallationController().currentInstallation();
|
|
200
185
|
}
|
|
201
186
|
}]);
|
|
202
|
-
return ParseInstallation;
|
|
203
187
|
}(_ParseObject2.default);
|
|
204
188
|
_ParseObject2.default.registerSubclass('_Installation', ParseInstallation);
|
|
205
189
|
module.exports = ParseInstallation;
|
|
206
|
-
var _default = ParseInstallation;
|
|
207
|
-
exports.default = _default;
|
|
190
|
+
var _default = exports.default = ParseInstallation;
|
|
@@ -30,7 +30,7 @@ var LiveQuery = function () {
|
|
|
30
30
|
};
|
|
31
31
|
this.on('error', function () {});
|
|
32
32
|
}
|
|
33
|
-
(0, _createClass2.default)(LiveQuery, [{
|
|
33
|
+
return (0, _createClass2.default)(LiveQuery, [{
|
|
34
34
|
key: "open",
|
|
35
35
|
value: function () {
|
|
36
36
|
var _open = (0, _asyncToGenerator2.default)(function* () {
|
|
@@ -55,10 +55,8 @@ var LiveQuery = function () {
|
|
|
55
55
|
return close;
|
|
56
56
|
}()
|
|
57
57
|
}]);
|
|
58
|
-
return LiveQuery;
|
|
59
58
|
}();
|
|
60
|
-
var _default = LiveQuery;
|
|
61
|
-
exports.default = _default;
|
|
59
|
+
var _default = exports.default = LiveQuery;
|
|
62
60
|
var defaultLiveQueryClient;
|
|
63
61
|
var DefaultLiveQueryController = {
|
|
64
62
|
setDefaultLiveQueryClient: function (liveQueryClient) {
|