parse 3.1.0 → 3.3.2-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 +32 -41
- package/dist/parse.js +2973 -1735
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +2989 -1830
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/AnonymousUtils.js +15 -1
- package/lib/browser/Cloud.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/InstallationController.js +1 -1
- package/lib/browser/LiveQueryClient.js +4 -6
- package/lib/browser/LiveQuerySubscription.js +1 -1
- package/lib/browser/LocalDatastore.js +3 -5
- package/lib/browser/LocalDatastoreController.js +3 -5
- package/lib/browser/LocalDatastoreUtils.js +1 -1
- package/lib/browser/ObjectStateMutations.js +28 -10
- package/lib/browser/OfflineQuery.js +197 -22
- package/lib/browser/Parse.js +57 -2
- package/lib/browser/ParseCLP.js +9 -8
- package/lib/browser/ParseError.js +9 -1
- package/lib/browser/ParseFile.js +6 -3
- package/lib/browser/ParseHooks.js +9 -9
- package/lib/browser/ParseInstallation.js +1 -1
- package/lib/browser/ParseObject.js +100 -32
- package/lib/browser/ParseOp.js +2 -6
- package/lib/browser/ParseQuery.js +1 -1
- package/lib/browser/ParseRole.js +1 -1
- package/lib/browser/ParseSession.js +1 -1
- package/lib/browser/ParseUser.js +20 -64
- package/lib/browser/Push.js +1 -1
- package/lib/browser/RESTController.js +7 -4
- package/lib/browser/SingleInstanceStateController.js +67 -14
- package/lib/browser/UniqueInstanceStateController.js +68 -15
- package/lib/browser/promiseUtils.js +1 -1
- package/lib/browser/uuid.js +5 -0
- package/lib/node/AnonymousUtils.js +15 -1
- package/lib/node/Cloud.js +2 -2
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/InstallationController.js +1 -1
- package/lib/node/LocalDatastoreUtils.js +1 -1
- package/lib/node/ObjectStateMutations.js +29 -10
- package/lib/node/OfflineQuery.js +162 -0
- package/lib/node/Parse.js +10 -12
- package/lib/node/ParseCLP.js +7 -3
- package/lib/node/ParseError.js +8 -0
- package/lib/node/ParseFile.js +7 -3
- package/lib/node/ParseHooks.js +9 -9
- package/lib/node/ParseObject.js +48 -31
- package/lib/node/ParseOp.js +1 -5
- package/lib/node/ParseQuery.js +1 -1
- package/lib/node/ParseUser.js +2 -21
- package/lib/node/Push.js +1 -1
- package/lib/node/RESTController.js +8 -4
- package/lib/node/SingleInstanceStateController.js +23 -25
- package/lib/node/UniqueInstanceStateController.js +23 -25
- package/lib/node/promiseUtils.js +2 -2
- package/lib/node/uuid.js +5 -0
- package/lib/react-native/AnonymousUtils.js +4 -1
- package/lib/react-native/Cloud.js +2 -2
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/EventEmitter.js +4 -0
- package/lib/react-native/InstallationController.js +1 -1
- package/lib/react-native/LiveQueryClient.js +16 -20
- package/lib/react-native/LiveQuerySubscription.js +1 -1
- package/lib/react-native/LocalDatastore.js +15 -19
- package/lib/react-native/LocalDatastoreController.js +15 -19
- package/lib/react-native/LocalDatastoreUtils.js +1 -1
- package/lib/react-native/ObjectStateMutations.js +29 -10
- package/lib/react-native/OfflineQuery.js +171 -27
- package/lib/react-native/Parse.js +50 -2
- package/lib/react-native/ParseCLP.js +22 -22
- package/lib/react-native/ParseError.js +2 -1
- package/lib/react-native/ParseFile.js +7 -3
- package/lib/react-native/ParseHooks.js +9 -9
- package/lib/react-native/ParseInstallation.js +1 -1
- package/lib/react-native/ParseObject.js +91 -39
- package/lib/react-native/ParseOp.js +2 -2
- package/lib/react-native/ParseRole.js +1 -1
- package/lib/react-native/ParseSession.js +1 -1
- package/lib/react-native/ParseUser.js +17 -56
- package/lib/react-native/Push.js +1 -1
- package/lib/react-native/RESTController.js +8 -4
- package/lib/react-native/SingleInstanceStateController.js +63 -15
- package/lib/react-native/UniqueInstanceStateController.js +63 -15
- package/lib/react-native/promiseUtils.js +1 -1
- package/lib/react-native/uuid.js +3 -0
- package/lib/weapp/AnonymousUtils.js +15 -1
- package/lib/weapp/Cloud.js +2 -2
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/InstallationController.js +1 -1
- package/lib/weapp/LiveQueryClient.js +4 -6
- package/lib/weapp/LiveQuerySubscription.js +1 -1
- package/lib/weapp/LocalDatastore.js +3 -5
- package/lib/weapp/LocalDatastoreController.js +3 -5
- package/lib/weapp/LocalDatastoreUtils.js +1 -1
- package/lib/weapp/ObjectStateMutations.js +28 -10
- package/lib/weapp/OfflineQuery.js +197 -22
- package/lib/weapp/Parse.js +57 -2
- package/lib/weapp/ParseCLP.js +9 -8
- package/lib/weapp/ParseError.js +9 -1
- package/lib/weapp/ParseFile.js +6 -3
- package/lib/weapp/ParseHooks.js +9 -9
- package/lib/weapp/ParseInstallation.js +1 -1
- package/lib/weapp/ParseObject.js +100 -32
- package/lib/weapp/ParseOp.js +2 -6
- package/lib/weapp/ParseQuery.js +1 -1
- package/lib/weapp/ParseRole.js +1 -1
- package/lib/weapp/ParseSession.js +1 -1
- package/lib/weapp/ParseUser.js +20 -64
- package/lib/weapp/Push.js +1 -1
- package/lib/weapp/RESTController.js +7 -4
- package/lib/weapp/SingleInstanceStateController.js +67 -14
- package/lib/weapp/UniqueInstanceStateController.js +68 -15
- package/lib/weapp/promiseUtils.js +1 -1
- package/lib/weapp/uuid.js +21 -0
- package/package.json +15 -7
- package/CHANGELOG.md +0 -389
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
2
|
-
|
|
3
1
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
2
|
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -53,29 +51,75 @@ var UniqueInstanceStateController = _interopRequireWildcard(require("./UniqueIns
|
|
|
53
51
|
|
|
54
52
|
var _unsavedChildren = _interopRequireDefault(require("./unsavedChildren"));
|
|
55
53
|
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
55
|
+
if (typeof WeakMap !== "function") return null;
|
|
56
|
+
var cacheBabelInterop = new WeakMap();
|
|
57
|
+
var cacheNodeInterop = new WeakMap();
|
|
58
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
59
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
60
|
+
})(nodeInterop);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
64
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
69
|
+
return {
|
|
70
|
+
default: obj
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
75
|
+
|
|
76
|
+
if (cache && cache.has(obj)) {
|
|
77
|
+
return cache.get(obj);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
var newObj = {};
|
|
81
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
82
|
+
|
|
83
|
+
for (var key in obj) {
|
|
84
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
85
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
86
|
+
|
|
87
|
+
if (desc && (desc.get || desc.set)) {
|
|
88
|
+
Object.defineProperty(newObj, key, desc);
|
|
89
|
+
} else {
|
|
90
|
+
newObj[key] = obj[key];
|
|
91
|
+
}
|
|
72
92
|
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
newObj.default = obj;
|
|
96
|
+
|
|
97
|
+
if (cache) {
|
|
98
|
+
cache.set(obj, newObj);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return newObj;
|
|
102
|
+
}
|
|
73
103
|
|
|
74
|
-
|
|
104
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
105
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
106
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
107
|
+
|
|
108
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
109
|
+
if (it) o = it;
|
|
110
|
+
var i = 0;
|
|
111
|
+
return function () {
|
|
112
|
+
if (i >= o.length) return {
|
|
113
|
+
done: true
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
done: false,
|
|
117
|
+
value: o[i++]
|
|
118
|
+
};
|
|
119
|
+
};
|
|
75
120
|
}
|
|
76
121
|
|
|
77
|
-
|
|
78
|
-
return it.next.bind(it);
|
|
122
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
123
|
}
|
|
80
124
|
|
|
81
125
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -102,9 +146,13 @@ function ownKeys(object, enumerableOnly) {
|
|
|
102
146
|
|
|
103
147
|
if (Object.getOwnPropertySymbols) {
|
|
104
148
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
149
|
+
|
|
150
|
+
if (enumerableOnly) {
|
|
151
|
+
symbols = symbols.filter(function (sym) {
|
|
152
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
108
156
|
keys.push.apply(keys, symbols);
|
|
109
157
|
}
|
|
110
158
|
|
|
@@ -131,7 +179,7 @@ function _objectSpread(target) {
|
|
|
131
179
|
return target;
|
|
132
180
|
}
|
|
133
181
|
|
|
134
|
-
var uuidv4 = require('uuid
|
|
182
|
+
var uuidv4 = require('./uuid');
|
|
135
183
|
|
|
136
184
|
var classMap = {};
|
|
137
185
|
var objectCount = 0;
|
|
@@ -464,7 +512,7 @@ var ParseObject = function () {
|
|
|
464
512
|
for (var attr in pending) {
|
|
465
513
|
if (pending[attr] instanceof _ParseOp.RelationOp) {
|
|
466
514
|
changes[attr] = pending[attr].applyTo(undefined, this, attr);
|
|
467
|
-
} else if (!(attr in response)
|
|
515
|
+
} else if (!(attr in response)) {
|
|
468
516
|
changes[attr] = pending[attr].applyTo(undefined);
|
|
469
517
|
}
|
|
470
518
|
}
|
|
@@ -855,12 +903,7 @@ var ParseObject = function () {
|
|
|
855
903
|
}, {
|
|
856
904
|
key: "clone",
|
|
857
905
|
value: function clone() {
|
|
858
|
-
var clone = new this.constructor();
|
|
859
|
-
|
|
860
|
-
if (!clone.className) {
|
|
861
|
-
clone.className = this.className;
|
|
862
|
-
}
|
|
863
|
-
|
|
906
|
+
var clone = new this.constructor(this.className);
|
|
864
907
|
var attributes = this.attributes;
|
|
865
908
|
|
|
866
909
|
if (typeof this.constructor.readOnlyAttributes === 'function') {
|
|
@@ -885,12 +928,7 @@ var ParseObject = function () {
|
|
|
885
928
|
}, {
|
|
886
929
|
key: "newInstance",
|
|
887
930
|
value: function () {
|
|
888
|
-
var clone = new this.constructor();
|
|
889
|
-
|
|
890
|
-
if (!clone.className) {
|
|
891
|
-
clone.className = this.className;
|
|
892
|
-
}
|
|
893
|
-
|
|
931
|
+
var clone = new this.constructor(this.className);
|
|
894
932
|
clone.id = this.id;
|
|
895
933
|
|
|
896
934
|
if (singleInstance) {
|
|
@@ -1359,6 +1397,11 @@ var ParseObject = function () {
|
|
|
1359
1397
|
}, null, this, null, Promise);
|
|
1360
1398
|
}
|
|
1361
1399
|
}], [{
|
|
1400
|
+
key: "_getClassMap",
|
|
1401
|
+
value: function () {
|
|
1402
|
+
return classMap;
|
|
1403
|
+
}
|
|
1404
|
+
}, {
|
|
1362
1405
|
key: "_clearAllState",
|
|
1363
1406
|
value: function () {
|
|
1364
1407
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
@@ -1501,7 +1544,7 @@ var ParseObject = function () {
|
|
|
1501
1544
|
}
|
|
1502
1545
|
|
|
1503
1546
|
var constructor = classMap[json.className];
|
|
1504
|
-
var o = constructor ? new constructor() : new ParseObject(json.className);
|
|
1547
|
+
var o = constructor ? new constructor(json.className) : new ParseObject(json.className);
|
|
1505
1548
|
var otherAttributes = {};
|
|
1506
1549
|
|
|
1507
1550
|
for (var _attr12 in json) {
|
|
@@ -1561,6 +1604,15 @@ var ParseObject = function () {
|
|
|
1561
1604
|
constructor.className = className;
|
|
1562
1605
|
}
|
|
1563
1606
|
}
|
|
1607
|
+
}, {
|
|
1608
|
+
key: "unregisterSubclass",
|
|
1609
|
+
value: function (className) {
|
|
1610
|
+
if (typeof className !== 'string') {
|
|
1611
|
+
throw new TypeError('The first argument must be a valid class name.');
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
delete classMap[className];
|
|
1615
|
+
}
|
|
1564
1616
|
}, {
|
|
1565
1617
|
key: "extend",
|
|
1566
1618
|
value: function (className, protoProps, classProps) {
|
|
@@ -3,8 +3,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.UnsetOp = exports.SetOp = exports.RemoveOp = exports.RelationOp = exports.Op = exports.IncrementOp = exports.AddUniqueOp = exports.AddOp = void 0;
|
|
6
7
|
exports.opFromJSON = opFromJSON;
|
|
7
|
-
exports.RelationOp = exports.RemoveOp = exports.AddUniqueOp = exports.AddOp = exports.IncrementOp = exports.UnsetOp = exports.SetOp = exports.Op = void 0;
|
|
8
8
|
|
|
9
9
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
10
10
|
|
|
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() {
|
|
|
54
54
|
if (typeof Proxy === "function") return true;
|
|
55
55
|
|
|
56
56
|
try {
|
|
57
|
-
|
|
57
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
58
58
|
return true;
|
|
59
59
|
} catch (e) {
|
|
60
60
|
return false;
|
|
@@ -47,7 +47,7 @@ function _isNativeReflectConstruct() {
|
|
|
47
47
|
if (typeof Proxy === "function") return true;
|
|
48
48
|
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
51
51
|
return true;
|
|
52
52
|
} catch (e) {
|
|
53
53
|
return false;
|
|
@@ -47,7 +47,7 @@ function _isNativeReflectConstruct() {
|
|
|
47
47
|
if (typeof Proxy === "function") return true;
|
|
48
48
|
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
51
51
|
return true;
|
|
52
52
|
} catch (e) {
|
|
53
53
|
return false;
|
|
@@ -19,8 +19,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
19
19
|
|
|
20
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
21
|
|
|
22
|
-
var _AnonymousUtils = _interopRequireDefault(require("./AnonymousUtils"));
|
|
23
|
-
|
|
24
22
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
25
23
|
|
|
26
24
|
var _isRevocableSession = _interopRequireDefault(require("./isRevocableSession"));
|
|
@@ -57,7 +55,7 @@ function _isNativeReflectConstruct() {
|
|
|
57
55
|
if (typeof Proxy === "function") return true;
|
|
58
56
|
|
|
59
57
|
try {
|
|
60
|
-
|
|
58
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
61
59
|
return true;
|
|
62
60
|
} catch (e) {
|
|
63
61
|
return false;
|
|
@@ -900,42 +898,13 @@ var DefaultController = {
|
|
|
900
898
|
return _Storage.default.removeItemAsync(path);
|
|
901
899
|
},
|
|
902
900
|
setCurrentUser: function (user) {
|
|
903
|
-
|
|
904
|
-
return _regenerator.default.async(function (_context6) {
|
|
905
|
-
while (1) {
|
|
906
|
-
switch (_context6.prev = _context6.next) {
|
|
907
|
-
case 0:
|
|
908
|
-
_context6.next = 2;
|
|
909
|
-
return _regenerator.default.awrap(this.currentUserAsync());
|
|
910
|
-
|
|
911
|
-
case 2:
|
|
912
|
-
currentUser = _context6.sent;
|
|
913
|
-
|
|
914
|
-
if (!(currentUser && !user.equals(currentUser) && _AnonymousUtils.default.isLinked(currentUser))) {
|
|
915
|
-
_context6.next = 6;
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
_context6.next = 6;
|
|
920
|
-
return _regenerator.default.awrap(currentUser.destroy({
|
|
921
|
-
sessionToken: currentUser.getSessionToken()
|
|
922
|
-
}));
|
|
923
|
-
|
|
924
|
-
case 6:
|
|
925
|
-
currentUserCache = user;
|
|
901
|
+
currentUserCache = user;
|
|
926
902
|
|
|
927
|
-
|
|
903
|
+
user._cleanupAuthData();
|
|
928
904
|
|
|
929
|
-
|
|
905
|
+
user._synchronizeAllAuthData();
|
|
930
906
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
case 10:
|
|
934
|
-
case "end":
|
|
935
|
-
return _context6.stop();
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}, null, this, null, Promise);
|
|
907
|
+
return DefaultController.updateUserOnDisk(user);
|
|
939
908
|
},
|
|
940
909
|
currentUser: function () {
|
|
941
910
|
if (currentUserCache) {
|
|
@@ -1144,18 +1113,10 @@ var DefaultController = {
|
|
|
1144
1113
|
var promise = _Storage.default.removeItemAsync(path);
|
|
1145
1114
|
|
|
1146
1115
|
if (currentUser !== null) {
|
|
1147
|
-
var isAnonymous = _AnonymousUtils.default.isLinked(currentUser);
|
|
1148
|
-
|
|
1149
1116
|
var currentSession = currentUser.getSessionToken();
|
|
1150
1117
|
|
|
1151
1118
|
if (currentSession && (0, _isRevocableSession.default)(currentSession)) {
|
|
1152
1119
|
promise = promise.then(function () {
|
|
1153
|
-
if (isAnonymous) {
|
|
1154
|
-
return currentUser.destroy({
|
|
1155
|
-
sessionToken: currentSession
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
}).then(function () {
|
|
1159
1120
|
return RESTController.request('POST', 'logout', {}, {
|
|
1160
1121
|
sessionToken: currentSession
|
|
1161
1122
|
});
|
|
@@ -1183,27 +1144,27 @@ var DefaultController = {
|
|
|
1183
1144
|
},
|
|
1184
1145
|
upgradeToRevocableSession: function (user, options) {
|
|
1185
1146
|
var token, RESTController, result, session, current;
|
|
1186
|
-
return _regenerator.default.async(function (
|
|
1147
|
+
return _regenerator.default.async(function (_context6) {
|
|
1187
1148
|
while (1) {
|
|
1188
|
-
switch (
|
|
1149
|
+
switch (_context6.prev = _context6.next) {
|
|
1189
1150
|
case 0:
|
|
1190
1151
|
token = user.getSessionToken();
|
|
1191
1152
|
|
|
1192
1153
|
if (token) {
|
|
1193
|
-
|
|
1154
|
+
_context6.next = 3;
|
|
1194
1155
|
break;
|
|
1195
1156
|
}
|
|
1196
1157
|
|
|
1197
|
-
return
|
|
1158
|
+
return _context6.abrupt("return", Promise.reject(new _ParseError.default(_ParseError.default.SESSION_MISSING, 'Cannot upgrade a user with no session token')));
|
|
1198
1159
|
|
|
1199
1160
|
case 3:
|
|
1200
1161
|
options.sessionToken = token;
|
|
1201
1162
|
RESTController = _CoreManager.default.getRESTController();
|
|
1202
|
-
|
|
1163
|
+
_context6.next = 7;
|
|
1203
1164
|
return _regenerator.default.awrap(RESTController.request('POST', 'upgradeToRevocableSession', {}, options));
|
|
1204
1165
|
|
|
1205
1166
|
case 7:
|
|
1206
|
-
result =
|
|
1167
|
+
result = _context6.sent;
|
|
1207
1168
|
session = new _ParseSession.default();
|
|
1208
1169
|
|
|
1209
1170
|
session._finishFetch(result);
|
|
@@ -1212,25 +1173,25 @@ var DefaultController = {
|
|
|
1212
1173
|
sessionToken: session.getSessionToken()
|
|
1213
1174
|
});
|
|
1214
1175
|
|
|
1215
|
-
|
|
1176
|
+
_context6.next = 13;
|
|
1216
1177
|
return _regenerator.default.awrap(user.isCurrentAsync());
|
|
1217
1178
|
|
|
1218
1179
|
case 13:
|
|
1219
|
-
current =
|
|
1180
|
+
current = _context6.sent;
|
|
1220
1181
|
|
|
1221
1182
|
if (!current) {
|
|
1222
|
-
|
|
1183
|
+
_context6.next = 16;
|
|
1223
1184
|
break;
|
|
1224
1185
|
}
|
|
1225
1186
|
|
|
1226
|
-
return
|
|
1187
|
+
return _context6.abrupt("return", DefaultController.setCurrentUser(user));
|
|
1227
1188
|
|
|
1228
1189
|
case 16:
|
|
1229
|
-
return
|
|
1190
|
+
return _context6.abrupt("return", Promise.resolve(user));
|
|
1230
1191
|
|
|
1231
1192
|
case 17:
|
|
1232
1193
|
case "end":
|
|
1233
|
-
return
|
|
1194
|
+
return _context6.stop();
|
|
1234
1195
|
}
|
|
1235
1196
|
}
|
|
1236
1197
|
}, null, null, null, Promise);
|
package/lib/react-native/Push.js
CHANGED
|
@@ -3,8 +3,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.send = send;
|
|
7
6
|
exports.getPushStatus = getPushStatus;
|
|
7
|
+
exports.send = send;
|
|
8
8
|
|
|
9
9
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
10
10
|
|
|
@@ -13,9 +13,13 @@ function ownKeys(object, enumerableOnly) {
|
|
|
13
13
|
|
|
14
14
|
if (Object.getOwnPropertySymbols) {
|
|
15
15
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
|
|
17
|
+
if (enumerableOnly) {
|
|
18
|
+
symbols = symbols.filter(function (sym) {
|
|
19
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
keys.push.apply(keys, symbols);
|
|
20
24
|
}
|
|
21
25
|
|
|
@@ -42,7 +46,7 @@ function _objectSpread(target) {
|
|
|
42
46
|
return target;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
var uuidv4 = require('uuid
|
|
49
|
+
var uuidv4 = require('./uuid');
|
|
46
50
|
|
|
47
51
|
var XHR = null;
|
|
48
52
|
|
|
@@ -1,28 +1,76 @@
|
|
|
1
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
2
|
-
|
|
3
1
|
Object.defineProperty(exports, "__esModule", {
|
|
4
2
|
value: true
|
|
5
3
|
});
|
|
4
|
+
exports.clearAllState = clearAllState;
|
|
5
|
+
exports.commitServerChanges = commitServerChanges;
|
|
6
|
+
exports.duplicateState = duplicateState;
|
|
7
|
+
exports.enqueueTask = enqueueTask;
|
|
8
|
+
exports.estimateAttribute = estimateAttribute;
|
|
9
|
+
exports.estimateAttributes = estimateAttributes;
|
|
10
|
+
exports.getObjectCache = getObjectCache;
|
|
11
|
+
exports.getPendingOps = getPendingOps;
|
|
12
|
+
exports.getServerData = getServerData;
|
|
6
13
|
exports.getState = getState;
|
|
7
14
|
exports.initializeState = initializeState;
|
|
15
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
16
|
+
exports.popPendingState = popPendingState;
|
|
17
|
+
exports.pushPendingState = pushPendingState;
|
|
8
18
|
exports.removeState = removeState;
|
|
9
|
-
exports.getServerData = getServerData;
|
|
10
|
-
exports.setServerData = setServerData;
|
|
11
|
-
exports.getPendingOps = getPendingOps;
|
|
12
19
|
exports.setPendingOp = setPendingOp;
|
|
13
|
-
exports.
|
|
14
|
-
exports.popPendingState = popPendingState;
|
|
15
|
-
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
16
|
-
exports.getObjectCache = getObjectCache;
|
|
17
|
-
exports.estimateAttribute = estimateAttribute;
|
|
18
|
-
exports.estimateAttributes = estimateAttributes;
|
|
19
|
-
exports.commitServerChanges = commitServerChanges;
|
|
20
|
-
exports.enqueueTask = enqueueTask;
|
|
21
|
-
exports.clearAllState = clearAllState;
|
|
22
|
-
exports.duplicateState = duplicateState;
|
|
20
|
+
exports.setServerData = setServerData;
|
|
23
21
|
|
|
24
22
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
25
23
|
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
25
|
+
if (typeof WeakMap !== "function") return null;
|
|
26
|
+
var cacheBabelInterop = new WeakMap();
|
|
27
|
+
var cacheNodeInterop = new WeakMap();
|
|
28
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
29
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
30
|
+
})(nodeInterop);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
34
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
35
|
+
return obj;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
39
|
+
return {
|
|
40
|
+
default: obj
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
45
|
+
|
|
46
|
+
if (cache && cache.has(obj)) {
|
|
47
|
+
return cache.get(obj);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
var newObj = {};
|
|
51
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
52
|
+
|
|
53
|
+
for (var key in obj) {
|
|
54
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
+
|
|
57
|
+
if (desc && (desc.get || desc.set)) {
|
|
58
|
+
Object.defineProperty(newObj, key, desc);
|
|
59
|
+
} else {
|
|
60
|
+
newObj[key] = obj[key];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
newObj.default = obj;
|
|
66
|
+
|
|
67
|
+
if (cache) {
|
|
68
|
+
cache.set(obj, newObj);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return newObj;
|
|
72
|
+
}
|
|
73
|
+
|
|
26
74
|
var objectState = {};
|
|
27
75
|
|
|
28
76
|
function getState(obj) {
|
|
@@ -1,32 +1,80 @@
|
|
|
1
1
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
6
|
+
exports.clearAllState = clearAllState;
|
|
7
|
+
exports.commitServerChanges = commitServerChanges;
|
|
8
|
+
exports.duplicateState = duplicateState;
|
|
9
|
+
exports.enqueueTask = enqueueTask;
|
|
10
|
+
exports.estimateAttribute = estimateAttribute;
|
|
11
|
+
exports.estimateAttributes = estimateAttributes;
|
|
12
|
+
exports.getObjectCache = getObjectCache;
|
|
13
|
+
exports.getPendingOps = getPendingOps;
|
|
14
|
+
exports.getServerData = getServerData;
|
|
8
15
|
exports.getState = getState;
|
|
9
16
|
exports.initializeState = initializeState;
|
|
17
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
18
|
+
exports.popPendingState = popPendingState;
|
|
19
|
+
exports.pushPendingState = pushPendingState;
|
|
10
20
|
exports.removeState = removeState;
|
|
11
|
-
exports.getServerData = getServerData;
|
|
12
|
-
exports.setServerData = setServerData;
|
|
13
|
-
exports.getPendingOps = getPendingOps;
|
|
14
21
|
exports.setPendingOp = setPendingOp;
|
|
15
|
-
exports.
|
|
16
|
-
exports.popPendingState = popPendingState;
|
|
17
|
-
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
18
|
-
exports.getObjectCache = getObjectCache;
|
|
19
|
-
exports.estimateAttribute = estimateAttribute;
|
|
20
|
-
exports.estimateAttributes = estimateAttributes;
|
|
21
|
-
exports.commitServerChanges = commitServerChanges;
|
|
22
|
-
exports.enqueueTask = enqueueTask;
|
|
23
|
-
exports.duplicateState = duplicateState;
|
|
24
|
-
exports.clearAllState = clearAllState;
|
|
22
|
+
exports.setServerData = setServerData;
|
|
25
23
|
|
|
26
24
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
27
25
|
|
|
28
26
|
var _TaskQueue = _interopRequireDefault(require("./TaskQueue"));
|
|
29
27
|
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
+
if (typeof WeakMap !== "function") return null;
|
|
30
|
+
var cacheBabelInterop = new WeakMap();
|
|
31
|
+
var cacheNodeInterop = new WeakMap();
|
|
32
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
33
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
+
})(nodeInterop);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
38
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
43
|
+
return {
|
|
44
|
+
default: obj
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
49
|
+
|
|
50
|
+
if (cache && cache.has(obj)) {
|
|
51
|
+
return cache.get(obj);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var newObj = {};
|
|
55
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
56
|
+
|
|
57
|
+
for (var key in obj) {
|
|
58
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
59
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
60
|
+
|
|
61
|
+
if (desc && (desc.get || desc.set)) {
|
|
62
|
+
Object.defineProperty(newObj, key, desc);
|
|
63
|
+
} else {
|
|
64
|
+
newObj[key] = obj[key];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
newObj.default = obj;
|
|
70
|
+
|
|
71
|
+
if (cache) {
|
|
72
|
+
cache.set(obj, newObj);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return newObj;
|
|
76
|
+
}
|
|
77
|
+
|
|
30
78
|
var objectState = new WeakMap();
|
|
31
79
|
|
|
32
80
|
function getState(obj) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", {
|
|
2
2
|
value: true
|
|
3
3
|
});
|
|
4
|
+
exports.continueWhile = continueWhile;
|
|
4
5
|
exports.resolvingPromise = resolvingPromise;
|
|
5
6
|
exports.when = when;
|
|
6
|
-
exports.continueWhile = continueWhile;
|
|
7
7
|
|
|
8
8
|
function resolvingPromise() {
|
|
9
9
|
var res;
|
|
@@ -23,7 +23,7 @@ var _ParseUser = _interopRequireDefault(require("./ParseUser"));
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var uuidv4 = require('uuid
|
|
26
|
+
var uuidv4 = require('./uuid');
|
|
27
27
|
|
|
28
28
|
var registered = false;
|
|
29
29
|
/**
|
|
@@ -115,6 +115,20 @@ var AnonymousUtils = {
|
|
|
115
115
|
|
|
116
116
|
return user.linkWith(provider.getAuthType(), provider.getAuthData(), options);
|
|
117
117
|
},
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Returns true if Authentication Provider has been registered for use.
|
|
121
|
+
*
|
|
122
|
+
* @function isRegistered
|
|
123
|
+
* @name Parse.AnonymousUtils.isRegistered
|
|
124
|
+
* @returns {boolean}
|
|
125
|
+
* @static
|
|
126
|
+
*/
|
|
127
|
+
isRegistered: function ()
|
|
128
|
+
/*: boolean*/
|
|
129
|
+
{
|
|
130
|
+
return registered;
|
|
131
|
+
},
|
|
118
132
|
_getAuthProvider: function () {
|
|
119
133
|
var provider = {
|
|
120
134
|
restoreAuthentication: function () {
|
package/lib/weapp/Cloud.js
CHANGED
|
@@ -8,10 +8,10 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
exports.
|
|
11
|
+
exports.getJobStatus = getJobStatus;
|
|
12
12
|
exports.getJobsData = getJobsData;
|
|
13
|
+
exports.run = run;
|
|
13
14
|
exports.startJob = startJob;
|
|
14
|
-
exports.getJobStatus = getJobStatus;
|
|
15
15
|
|
|
16
16
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
17
17
|
|
package/lib/weapp/CoreManager.js
CHANGED