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
package/lib/node/ParseObject.js
CHANGED
|
@@ -43,19 +43,17 @@ var UniqueInstanceStateController = _interopRequireWildcard(require("./UniqueIns
|
|
|
43
43
|
|
|
44
44
|
var _unsavedChildren = _interopRequireDefault(require("./unsavedChildren"));
|
|
45
45
|
|
|
46
|
-
function _getRequireWildcardCache() {
|
|
46
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
47
47
|
if (typeof WeakMap !== "function") return null;
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
_getRequireWildcardCache = function () {
|
|
51
|
-
return
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return cache;
|
|
48
|
+
var cacheBabelInterop = new WeakMap();
|
|
49
|
+
var cacheNodeInterop = new WeakMap();
|
|
50
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
51
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
52
|
+
})(nodeInterop);
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
function _interopRequireWildcard(obj) {
|
|
58
|
-
if (obj && obj.__esModule) {
|
|
55
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
56
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
59
57
|
return obj;
|
|
60
58
|
}
|
|
61
59
|
|
|
@@ -65,7 +63,7 @@ function _interopRequireWildcard(obj) {
|
|
|
65
63
|
};
|
|
66
64
|
}
|
|
67
65
|
|
|
68
|
-
var cache = _getRequireWildcardCache();
|
|
66
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
69
67
|
|
|
70
68
|
if (cache && cache.has(obj)) {
|
|
71
69
|
return cache.get(obj);
|
|
@@ -75,7 +73,7 @@ function _interopRequireWildcard(obj) {
|
|
|
75
73
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
76
74
|
|
|
77
75
|
for (var key in obj) {
|
|
78
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
76
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
79
77
|
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
80
78
|
|
|
81
79
|
if (desc && (desc.get || desc.set)) {
|
|
@@ -106,9 +104,13 @@ function ownKeys(object, enumerableOnly) {
|
|
|
106
104
|
|
|
107
105
|
if (Object.getOwnPropertySymbols) {
|
|
108
106
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
|
|
108
|
+
if (enumerableOnly) {
|
|
109
|
+
symbols = symbols.filter(function (sym) {
|
|
110
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
112
114
|
keys.push.apply(keys, symbols);
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -150,7 +152,7 @@ function _defineProperty(obj, key, value) {
|
|
|
150
152
|
return obj;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
|
-
const uuidv4 = require('uuid
|
|
155
|
+
const uuidv4 = require('./uuid');
|
|
154
156
|
/*:: export type Pointer = {
|
|
155
157
|
__type: string,
|
|
156
158
|
className: string,
|
|
@@ -611,7 +613,7 @@ class ParseObject {
|
|
|
611
613
|
for (var attr in pending) {
|
|
612
614
|
if (pending[attr] instanceof _ParseOp.RelationOp) {
|
|
613
615
|
changes[attr] = pending[attr].applyTo(undefined, this, attr);
|
|
614
|
-
} else if (!(attr in response)
|
|
616
|
+
} else if (!(attr in response)) {
|
|
615
617
|
// Only SetOps and UnsetOps should not come back with results
|
|
616
618
|
changes[attr] = pending[attr].applyTo(undefined);
|
|
617
619
|
}
|
|
@@ -655,6 +657,10 @@ class ParseObject {
|
|
|
655
657
|
|
|
656
658
|
stateController.mergeFirstPendingState(this._getStateIdentifier());
|
|
657
659
|
}
|
|
660
|
+
|
|
661
|
+
static _getClassMap() {
|
|
662
|
+
return classMap;
|
|
663
|
+
}
|
|
658
664
|
/** Public methods **/
|
|
659
665
|
|
|
660
666
|
|
|
@@ -1298,12 +1304,7 @@ class ParseObject {
|
|
|
1298
1304
|
clone()
|
|
1299
1305
|
/*: any*/
|
|
1300
1306
|
{
|
|
1301
|
-
const clone = new this.constructor();
|
|
1302
|
-
|
|
1303
|
-
if (!clone.className) {
|
|
1304
|
-
clone.className = this.className;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
+
const clone = new this.constructor(this.className);
|
|
1307
1308
|
let attributes = this.attributes;
|
|
1308
1309
|
|
|
1309
1310
|
if (typeof this.constructor.readOnlyAttributes === 'function') {
|
|
@@ -1337,12 +1338,7 @@ class ParseObject {
|
|
|
1337
1338
|
newInstance()
|
|
1338
1339
|
/*: any*/
|
|
1339
1340
|
{
|
|
1340
|
-
const clone = new this.constructor();
|
|
1341
|
-
|
|
1342
|
-
if (!clone.className) {
|
|
1343
|
-
clone.className = this.className;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1341
|
+
const clone = new this.constructor(this.className);
|
|
1346
1342
|
clone.id = this.id;
|
|
1347
1343
|
|
|
1348
1344
|
if (singleInstance) {
|
|
@@ -1709,9 +1705,11 @@ class ParseObject {
|
|
|
1709
1705
|
* or<pre>
|
|
1710
1706
|
* object.save(attrs, options);</pre>
|
|
1711
1707
|
* or<pre>
|
|
1708
|
+
* object.save(key, value);</pre>
|
|
1709
|
+
* or<pre>
|
|
1712
1710
|
* object.save(key, value, options);</pre>
|
|
1713
1711
|
*
|
|
1714
|
-
*
|
|
1712
|
+
* Example 1: <pre>
|
|
1715
1713
|
* gameTurn.save({
|
|
1716
1714
|
* player: "Jake Cutter",
|
|
1717
1715
|
* diceRoll: 2
|
|
@@ -1721,6 +1719,9 @@ class ParseObject {
|
|
|
1721
1719
|
* // The save failed. Error is an instance of Parse.Error.
|
|
1722
1720
|
* });</pre>
|
|
1723
1721
|
*
|
|
1722
|
+
* Example 2: <pre>
|
|
1723
|
+
* gameTurn.save("player", "Jake Cutter");</pre>
|
|
1724
|
+
*
|
|
1724
1725
|
* @param {string | object | null} [arg1]
|
|
1725
1726
|
* Valid options are:<ul>
|
|
1726
1727
|
* <li>`Object` - Key/value pairs to update on the object.</li>
|
|
@@ -2407,7 +2408,7 @@ class ParseObject {
|
|
|
2407
2408
|
}
|
|
2408
2409
|
|
|
2409
2410
|
const constructor = classMap[json.className];
|
|
2410
|
-
const o = constructor ? new constructor() : new ParseObject(json.className);
|
|
2411
|
+
const o = constructor ? new constructor(json.className) : new ParseObject(json.className);
|
|
2411
2412
|
const otherAttributes = {};
|
|
2412
2413
|
|
|
2413
2414
|
for (const attr in json) {
|
|
@@ -2481,6 +2482,22 @@ class ParseObject {
|
|
|
2481
2482
|
constructor.className = className;
|
|
2482
2483
|
}
|
|
2483
2484
|
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Unegisters a subclass of Parse.Object with a specific class name.
|
|
2487
|
+
*
|
|
2488
|
+
* @param {string} className The class name of the subclass
|
|
2489
|
+
*/
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
static unregisterSubclass(className
|
|
2493
|
+
/*: string*/
|
|
2494
|
+
) {
|
|
2495
|
+
if (typeof className !== 'string') {
|
|
2496
|
+
throw new TypeError('The first argument must be a valid class name.');
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
delete classMap[className];
|
|
2500
|
+
}
|
|
2484
2501
|
/**
|
|
2485
2502
|
* Creates a new subclass of Parse.Object for the given Parse class name.
|
|
2486
2503
|
*
|
package/lib/node/ParseOp.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
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 _arrayContainsObject = _interopRequireDefault(require("./arrayContainsObject"));
|
|
10
10
|
|
|
@@ -105,16 +105,12 @@ function opFromJSON(json
|
|
|
105
105
|
class Op {
|
|
106
106
|
// Empty parent class
|
|
107
107
|
applyTo()
|
|
108
|
-
/*: mixed*/
|
|
109
|
-
|
|
110
108
|
/*: mixed*/
|
|
111
109
|
{}
|
|
112
110
|
/* eslint-disable-line no-unused-vars */
|
|
113
111
|
|
|
114
112
|
|
|
115
113
|
mergeWith()
|
|
116
|
-
/*: Op*/
|
|
117
|
-
|
|
118
114
|
/*: ?Op*/
|
|
119
115
|
{}
|
|
120
116
|
/* eslint-disable-line no-unused-vars */
|
package/lib/node/ParseQuery.js
CHANGED
package/lib/node/ParseUser.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _AnonymousUtils = _interopRequireDefault(require("./AnonymousUtils"));
|
|
9
|
-
|
|
10
8
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
11
9
|
|
|
12
10
|
var _isRevocableSession = _interopRequireDefault(require("./isRevocableSession"));
|
|
@@ -431,8 +429,7 @@ class ParseUser extends _ParseObject.default {
|
|
|
431
429
|
setUsername(username
|
|
432
430
|
/*: string*/
|
|
433
431
|
) {
|
|
434
|
-
// Strip anonymity
|
|
435
|
-
// encounter anonymous user created by android/iOS in cloud code.
|
|
432
|
+
// Strip anonymity
|
|
436
433
|
const authData = this.get('authData');
|
|
437
434
|
|
|
438
435
|
if (authData && typeof authData === 'object' && authData.hasOwnProperty('anonymous')) {
|
|
@@ -1238,15 +1235,7 @@ const DefaultController = {
|
|
|
1238
1235
|
return _Storage.default.removeItemAsync(path);
|
|
1239
1236
|
},
|
|
1240
1237
|
|
|
1241
|
-
|
|
1242
|
-
const currentUser = await this.currentUserAsync();
|
|
1243
|
-
|
|
1244
|
-
if (currentUser && !user.equals(currentUser) && _AnonymousUtils.default.isLinked(currentUser)) {
|
|
1245
|
-
await currentUser.destroy({
|
|
1246
|
-
sessionToken: currentUser.getSessionToken()
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1238
|
+
setCurrentUser(user) {
|
|
1250
1239
|
currentUserCache = user;
|
|
1251
1240
|
|
|
1252
1241
|
user._cleanupAuthData();
|
|
@@ -1512,18 +1501,10 @@ const DefaultController = {
|
|
|
1512
1501
|
let promise = _Storage.default.removeItemAsync(path);
|
|
1513
1502
|
|
|
1514
1503
|
if (currentUser !== null) {
|
|
1515
|
-
const isAnonymous = _AnonymousUtils.default.isLinked(currentUser);
|
|
1516
|
-
|
|
1517
1504
|
const currentSession = currentUser.getSessionToken();
|
|
1518
1505
|
|
|
1519
1506
|
if (currentSession && (0, _isRevocableSession.default)(currentSession)) {
|
|
1520
1507
|
promise = promise.then(() => {
|
|
1521
|
-
if (isAnonymous) {
|
|
1522
|
-
return currentUser.destroy({
|
|
1523
|
-
sessionToken: currentSession
|
|
1524
|
-
});
|
|
1525
|
-
}
|
|
1526
|
-
}).then(() => {
|
|
1527
1508
|
return RESTController.request('POST', 'logout', {}, {
|
|
1528
1509
|
sessionToken: currentSession
|
|
1529
1510
|
});
|
package/lib/node/Push.js
CHANGED
|
@@ -17,9 +17,13 @@ function ownKeys(object, enumerableOnly) {
|
|
|
17
17
|
|
|
18
18
|
if (Object.getOwnPropertySymbols) {
|
|
19
19
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
|
|
21
|
+
if (enumerableOnly) {
|
|
22
|
+
symbols = symbols.filter(function (sym) {
|
|
23
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
keys.push.apply(keys, symbols);
|
|
24
28
|
}
|
|
25
29
|
|
|
@@ -74,7 +78,7 @@ function _defineProperty(obj, key, value) {
|
|
|
74
78
|
/* global XMLHttpRequest, XDomainRequest */
|
|
75
79
|
|
|
76
80
|
|
|
77
|
-
const uuidv4 = require('uuid
|
|
81
|
+
const uuidv4 = require('./uuid');
|
|
78
82
|
|
|
79
83
|
let XHR = null;
|
|
80
84
|
|
|
@@ -3,39 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
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;
|
|
6
15
|
exports.getState = getState;
|
|
7
16
|
exports.initializeState = initializeState;
|
|
17
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
18
|
+
exports.popPendingState = popPendingState;
|
|
19
|
+
exports.pushPendingState = pushPendingState;
|
|
8
20
|
exports.removeState = removeState;
|
|
9
|
-
exports.getServerData = getServerData;
|
|
10
|
-
exports.setServerData = setServerData;
|
|
11
|
-
exports.getPendingOps = getPendingOps;
|
|
12
21
|
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;
|
|
22
|
+
exports.setServerData = setServerData;
|
|
23
23
|
|
|
24
24
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
25
25
|
|
|
26
|
-
function _getRequireWildcardCache() {
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
27
27
|
if (typeof WeakMap !== "function") return null;
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
_getRequireWildcardCache = function () {
|
|
31
|
-
return
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return cache;
|
|
28
|
+
var cacheBabelInterop = new WeakMap();
|
|
29
|
+
var cacheNodeInterop = new WeakMap();
|
|
30
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
31
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
32
|
+
})(nodeInterop);
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
function _interopRequireWildcard(obj) {
|
|
38
|
-
if (obj && obj.__esModule) {
|
|
35
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
36
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
37
|
return obj;
|
|
40
38
|
}
|
|
41
39
|
|
|
@@ -45,7 +43,7 @@ function _interopRequireWildcard(obj) {
|
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
var cache = _getRequireWildcardCache();
|
|
46
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
49
47
|
|
|
50
48
|
if (cache && cache.has(obj)) {
|
|
51
49
|
return cache.get(obj);
|
|
@@ -55,7 +53,7 @@ function _interopRequireWildcard(obj) {
|
|
|
55
53
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
56
54
|
|
|
57
55
|
for (var key in obj) {
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
59
57
|
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
60
58
|
|
|
61
59
|
if (desc && (desc.get || desc.set)) {
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
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;
|
|
6
15
|
exports.getState = getState;
|
|
7
16
|
exports.initializeState = initializeState;
|
|
17
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
18
|
+
exports.popPendingState = popPendingState;
|
|
19
|
+
exports.pushPendingState = pushPendingState;
|
|
8
20
|
exports.removeState = removeState;
|
|
9
|
-
exports.getServerData = getServerData;
|
|
10
|
-
exports.setServerData = setServerData;
|
|
11
|
-
exports.getPendingOps = getPendingOps;
|
|
12
21
|
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.duplicateState = duplicateState;
|
|
22
|
-
exports.clearAllState = clearAllState;
|
|
22
|
+
exports.setServerData = setServerData;
|
|
23
23
|
|
|
24
24
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
25
25
|
|
|
@@ -31,19 +31,17 @@ function _interopRequireDefault(obj) {
|
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function _getRequireWildcardCache() {
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
35
35
|
if (typeof WeakMap !== "function") return null;
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
_getRequireWildcardCache = function () {
|
|
39
|
-
return
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
return cache;
|
|
36
|
+
var cacheBabelInterop = new WeakMap();
|
|
37
|
+
var cacheNodeInterop = new WeakMap();
|
|
38
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
39
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
40
|
+
})(nodeInterop);
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
function _interopRequireWildcard(obj) {
|
|
46
|
-
if (obj && obj.__esModule) {
|
|
43
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
44
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
47
45
|
return obj;
|
|
48
46
|
}
|
|
49
47
|
|
|
@@ -53,7 +51,7 @@ function _interopRequireWildcard(obj) {
|
|
|
53
51
|
};
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
var cache = _getRequireWildcardCache();
|
|
54
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
57
55
|
|
|
58
56
|
if (cache && cache.has(obj)) {
|
|
59
57
|
return cache.get(obj);
|
|
@@ -63,7 +61,7 @@ function _interopRequireWildcard(obj) {
|
|
|
63
61
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
64
62
|
|
|
65
63
|
for (var key in obj) {
|
|
66
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
64
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
67
65
|
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
68
66
|
|
|
69
67
|
if (desc && (desc.get || desc.set)) {
|
package/lib/node/promiseUtils.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.continueWhile = continueWhile;
|
|
6
7
|
exports.resolvingPromise = resolvingPromise;
|
|
7
|
-
exports.when = when;
|
|
8
|
-
exports.continueWhile = continueWhile; // Create Deferred Promise
|
|
8
|
+
exports.when = when; // Create Deferred Promise
|
|
9
9
|
|
|
10
10
|
function resolvingPromise() {
|
|
11
11
|
let res;
|
package/lib/node/uuid.js
ADDED
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ParseUser = _interopRequireDefault(require("./ParseUser"));
|
|
9
9
|
|
|
10
|
-
var uuidv4 = require('uuid
|
|
10
|
+
var uuidv4 = require('./uuid');
|
|
11
11
|
|
|
12
12
|
var registered = false;
|
|
13
13
|
var AnonymousUtils = {
|
|
@@ -26,6 +26,9 @@ var AnonymousUtils = {
|
|
|
26
26
|
|
|
27
27
|
return user.linkWith(provider.getAuthType(), provider.getAuthData(), options);
|
|
28
28
|
},
|
|
29
|
+
isRegistered: function () {
|
|
30
|
+
return registered;
|
|
31
|
+
},
|
|
29
32
|
_getAuthProvider: function () {
|
|
30
33
|
var provider = {
|
|
31
34
|
restoreAuthentication: function () {
|
|
@@ -3,10 +3,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getJobStatus = getJobStatus;
|
|
7
7
|
exports.getJobsData = getJobsData;
|
|
8
|
+
exports.run = run;
|
|
8
9
|
exports.startJob = startJob;
|
|
9
|
-
exports.getJobStatus = getJobStatus;
|
|
10
10
|
|
|
11
11
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
12
12
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
var EventEmitter = require('../../../react-native/Libraries/vendor/emitter/EventEmitter');
|
|
2
2
|
|
|
3
|
+
if (EventEmitter.default) {
|
|
4
|
+
EventEmitter = EventEmitter.default;
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
4
8
|
module.exports = EventEmitter;
|
|
@@ -2,7 +2,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
2
2
|
|
|
3
3
|
var _Storage = _interopRequireDefault(require("./Storage"));
|
|
4
4
|
|
|
5
|
-
var uuidv4 = require('uuid
|
|
5
|
+
var uuidv4 = require('./uuid');
|
|
6
6
|
|
|
7
7
|
var iidCache = null;
|
|
8
8
|
var InstallationController = {
|
|
@@ -26,28 +26,24 @@ var _LiveQuerySubscription = _interopRequireDefault(require("./LiveQuerySubscrip
|
|
|
26
26
|
var _promiseUtils = require("./promiseUtils");
|
|
27
27
|
|
|
28
28
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
29
|
-
var it;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
return {
|
|
40
|
-
done: false,
|
|
41
|
-
value: o[i++]
|
|
42
|
-
};
|
|
29
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
30
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
31
|
+
|
|
32
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
33
|
+
if (it) o = it;
|
|
34
|
+
var i = 0;
|
|
35
|
+
return function () {
|
|
36
|
+
if (i >= o.length) return {
|
|
37
|
+
done: true
|
|
43
38
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
return {
|
|
40
|
+
done: false,
|
|
41
|
+
value: o[i++]
|
|
42
|
+
};
|
|
43
|
+
};
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
return it.next.bind(it);
|
|
46
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -93,7 +89,7 @@ function _isNativeReflectConstruct() {
|
|
|
93
89
|
if (typeof Proxy === "function") return true;
|
|
94
90
|
|
|
95
91
|
try {
|
|
96
|
-
|
|
92
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
97
93
|
return true;
|
|
98
94
|
} catch (e) {
|
|
99
95
|
return false;
|
|
@@ -45,7 +45,7 @@ function _isNativeReflectConstruct() {
|
|
|
45
45
|
if (typeof Proxy === "function") return true;
|
|
46
46
|
|
|
47
47
|
try {
|
|
48
|
-
|
|
48
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
49
49
|
return true;
|
|
50
50
|
} catch (e) {
|
|
51
51
|
return false;
|
|
@@ -13,28 +13,24 @@ var _ParseQuery = _interopRequireDefault(require("./ParseQuery"));
|
|
|
13
13
|
var _LocalDatastoreUtils = require("./LocalDatastoreUtils");
|
|
14
14
|
|
|
15
15
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
16
|
-
var it;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
done: false,
|
|
28
|
-
value: o[i++]
|
|
29
|
-
};
|
|
16
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
17
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
18
|
+
|
|
19
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
20
|
+
if (it) o = it;
|
|
21
|
+
var i = 0;
|
|
22
|
+
return function () {
|
|
23
|
+
if (i >= o.length) return {
|
|
24
|
+
done: true
|
|
30
25
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
return {
|
|
27
|
+
done: false,
|
|
28
|
+
value: o[i++]
|
|
29
|
+
};
|
|
30
|
+
};
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
return it.next.bind(it);
|
|
33
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
function _unsupportedIterableToArray(o, minLen) {
|