parse 3.2.0 → 3.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -41
- package/dist/parse.js +3670 -2420
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +3684 -2513
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/AnonymousUtils.js +1 -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 +77 -6
- 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 +72 -16
- package/lib/browser/ParseOp.js +2 -6
- package/lib/browser/ParseRole.js +1 -1
- package/lib/browser/ParseSession.js +1 -1
- package/lib/browser/ParseUser.js +1 -1
- 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 +1 -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 +28 -17
- 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 +25 -18
- package/lib/node/ParseOp.js +1 -5
- 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 +1 -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 +65 -5
- 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 +74 -26
- 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 +1 -1
- 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 +1 -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 +77 -6
- 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 +72 -16
- package/lib/weapp/ParseOp.js +2 -6
- package/lib/weapp/ParseRole.js +1 -1
- package/lib/weapp/ParseSession.js +1 -1
- package/lib/weapp/ParseUser.js +1 -1
- 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 +14 -7
- package/CHANGELOG.md +0 -408
package/lib/weapp/ParseCLP.js
CHANGED
|
@@ -18,8 +18,6 @@ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stab
|
|
|
18
18
|
|
|
19
19
|
var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
20
20
|
|
|
21
|
-
var _getIterator = require("@babel/runtime-corejs3/core-js/get-iterator");
|
|
22
|
-
|
|
23
21
|
var _Array$isArray2 = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
24
22
|
|
|
25
23
|
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
@@ -72,9 +70,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
72
70
|
if (_Object$getOwnPropertySymbols) {
|
|
73
71
|
var symbols = _Object$getOwnPropertySymbols(object);
|
|
74
72
|
|
|
75
|
-
if (enumerableOnly)
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
if (enumerableOnly) {
|
|
74
|
+
symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
75
|
+
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
78
79
|
keys.push.apply(keys, symbols);
|
|
79
80
|
}
|
|
80
81
|
|
|
@@ -106,9 +107,9 @@ function _objectSpread(target) {
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
109
|
-
var it;
|
|
110
|
+
var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"];
|
|
110
111
|
|
|
111
|
-
if (
|
|
112
|
+
if (!it) {
|
|
112
113
|
if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
113
114
|
if (it) o = it;
|
|
114
115
|
var i = 0;
|
|
@@ -141,7 +142,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
141
142
|
err;
|
|
142
143
|
return {
|
|
143
144
|
s: function () {
|
|
144
|
-
it =
|
|
145
|
+
it = it.call(o);
|
|
145
146
|
},
|
|
146
147
|
n: function () {
|
|
147
148
|
var step = it.next();
|
package/lib/weapp/ParseError.js
CHANGED
|
@@ -52,7 +52,7 @@ function _isNativeReflectConstruct() {
|
|
|
52
52
|
if (typeof Proxy === "function") return true;
|
|
53
53
|
|
|
54
54
|
try {
|
|
55
|
-
|
|
55
|
+
Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {}));
|
|
56
56
|
return true;
|
|
57
57
|
} catch (e) {
|
|
58
58
|
return false;
|
|
@@ -452,6 +452,14 @@ ParseError.DUPLICATE_REQUEST = 159;
|
|
|
452
452
|
*/
|
|
453
453
|
|
|
454
454
|
ParseError.INVALID_EVENT_NAME = 160;
|
|
455
|
+
/**
|
|
456
|
+
* Error code indicating that a field had an invalid value.
|
|
457
|
+
*
|
|
458
|
+
* @property {number} INVALID_VALUE
|
|
459
|
+
* @static
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
ParseError.INVALID_VALUE = 162;
|
|
455
463
|
/**
|
|
456
464
|
* Error code indicating that the username is missing or empty.
|
|
457
465
|
*
|
package/lib/weapp/ParseFile.js
CHANGED
|
@@ -58,9 +58,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
58
58
|
if (_Object$getOwnPropertySymbols) {
|
|
59
59
|
var symbols = _Object$getOwnPropertySymbols(object);
|
|
60
60
|
|
|
61
|
-
if (enumerableOnly)
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
if (enumerableOnly) {
|
|
62
|
+
symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
63
|
+
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
64
67
|
keys.push.apply(keys, symbols);
|
|
65
68
|
}
|
|
66
69
|
|
package/lib/weapp/ParseHooks.js
CHANGED
|
@@ -8,19 +8,19 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
exports.
|
|
12
|
-
exports.getTriggers = getTriggers;
|
|
13
|
-
exports.getFunction = getFunction;
|
|
14
|
-
exports.getTrigger = getTrigger;
|
|
11
|
+
exports.create = create;
|
|
15
12
|
exports.createFunction = createFunction;
|
|
16
13
|
exports.createTrigger = createTrigger;
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
14
|
+
exports.getFunction = getFunction;
|
|
15
|
+
exports.getFunctions = getFunctions;
|
|
16
|
+
exports.getTrigger = getTrigger;
|
|
17
|
+
exports.getTriggers = getTriggers;
|
|
18
|
+
exports.remove = remove;
|
|
21
19
|
exports.removeFunction = removeFunction;
|
|
22
20
|
exports.removeTrigger = removeTrigger;
|
|
23
|
-
exports.
|
|
21
|
+
exports.update = update;
|
|
22
|
+
exports.updateFunction = updateFunction;
|
|
23
|
+
exports.updateTrigger = updateTrigger;
|
|
24
24
|
|
|
25
25
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
26
26
|
|
|
@@ -48,7 +48,7 @@ function _isNativeReflectConstruct() {
|
|
|
48
48
|
if (typeof Proxy === "function") return true;
|
|
49
49
|
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {}));
|
|
52
52
|
return true;
|
|
53
53
|
} catch (e) {
|
|
54
54
|
return false;
|
package/lib/weapp/ParseObject.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
4
|
|
|
7
|
-
var
|
|
5
|
+
var _typeof3 = require("@babel/runtime-corejs3/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
8
8
|
|
|
9
9
|
var _Array$isArray2 = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
10
10
|
|
|
@@ -116,10 +116,59 @@ var UniqueInstanceStateController = _interopRequireWildcard(require("./UniqueIns
|
|
|
116
116
|
|
|
117
117
|
var _unsavedChildren = _interopRequireDefault(require("./unsavedChildren"));
|
|
118
118
|
|
|
119
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
120
|
+
if (typeof _WeakMap !== "function") return null;
|
|
121
|
+
var cacheBabelInterop = new _WeakMap();
|
|
122
|
+
var cacheNodeInterop = new _WeakMap();
|
|
123
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
124
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
125
|
+
})(nodeInterop);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
129
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
130
|
+
return obj;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") {
|
|
134
|
+
return {
|
|
135
|
+
default: obj
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
140
|
+
|
|
141
|
+
if (cache && cache.has(obj)) {
|
|
142
|
+
return cache.get(obj);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
var newObj = {};
|
|
146
|
+
|
|
147
|
+
for (var key in obj) {
|
|
148
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
149
|
+
var desc = _Object$defineProperty2 && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null;
|
|
150
|
+
|
|
151
|
+
if (desc && (desc.get || desc.set)) {
|
|
152
|
+
_Object$defineProperty2(newObj, key, desc);
|
|
153
|
+
} else {
|
|
154
|
+
newObj[key] = obj[key];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
newObj.default = obj;
|
|
160
|
+
|
|
161
|
+
if (cache) {
|
|
162
|
+
cache.set(obj, newObj);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return newObj;
|
|
166
|
+
}
|
|
167
|
+
|
|
119
168
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
120
|
-
var it;
|
|
169
|
+
var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"];
|
|
121
170
|
|
|
122
|
-
if (
|
|
171
|
+
if (!it) {
|
|
123
172
|
if (_Array$isArray2(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
124
173
|
if (it) o = it;
|
|
125
174
|
var i = 0;
|
|
@@ -152,7 +201,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
152
201
|
err;
|
|
153
202
|
return {
|
|
154
203
|
s: function () {
|
|
155
|
-
it =
|
|
204
|
+
it = it.call(o);
|
|
156
205
|
},
|
|
157
206
|
n: function () {
|
|
158
207
|
var step = it.next();
|
|
@@ -202,9 +251,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
202
251
|
if (_Object$getOwnPropertySymbols) {
|
|
203
252
|
var symbols = _Object$getOwnPropertySymbols(object);
|
|
204
253
|
|
|
205
|
-
if (enumerableOnly)
|
|
206
|
-
|
|
207
|
-
|
|
254
|
+
if (enumerableOnly) {
|
|
255
|
+
symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
256
|
+
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
208
260
|
keys.push.apply(keys, symbols);
|
|
209
261
|
}
|
|
210
262
|
|
|
@@ -235,7 +287,7 @@ function _objectSpread(target) {
|
|
|
235
287
|
return target;
|
|
236
288
|
}
|
|
237
289
|
|
|
238
|
-
var uuidv4 = require('uuid
|
|
290
|
+
var uuidv4 = require('./uuid');
|
|
239
291
|
/*:: export type Pointer = {
|
|
240
292
|
__type: string,
|
|
241
293
|
className: string,
|
|
@@ -711,7 +763,7 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
711
763
|
for (var attr in pending) {
|
|
712
764
|
if (pending[attr] instanceof _ParseOp.RelationOp) {
|
|
713
765
|
changes[attr] = pending[attr].applyTo(undefined, this, attr);
|
|
714
|
-
} else if (!(attr in response)
|
|
766
|
+
} else if (!(attr in response)) {
|
|
715
767
|
// Only SetOps and UnsetOps should not come back with results
|
|
716
768
|
changes[attr] = pending[attr].applyTo(undefined);
|
|
717
769
|
}
|
|
@@ -1916,9 +1968,11 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1916
1968
|
* or<pre>
|
|
1917
1969
|
* object.save(attrs, options);</pre>
|
|
1918
1970
|
* or<pre>
|
|
1971
|
+
* object.save(key, value);</pre>
|
|
1972
|
+
* or<pre>
|
|
1919
1973
|
* object.save(key, value, options);</pre>
|
|
1920
1974
|
*
|
|
1921
|
-
*
|
|
1975
|
+
* Example 1: <pre>
|
|
1922
1976
|
* gameTurn.save({
|
|
1923
1977
|
* player: "Jake Cutter",
|
|
1924
1978
|
* diceRoll: 2
|
|
@@ -1928,6 +1982,9 @@ var ParseObject = /*#__PURE__*/function () {
|
|
|
1928
1982
|
* // The save failed. Error is an instance of Parse.Error.
|
|
1929
1983
|
* });</pre>
|
|
1930
1984
|
*
|
|
1985
|
+
* Example 2: <pre>
|
|
1986
|
+
* gameTurn.save("player", "Jake Cutter");</pre>
|
|
1987
|
+
*
|
|
1931
1988
|
* @param {string | object | null} [arg1]
|
|
1932
1989
|
* Valid options are:<ul>
|
|
1933
1990
|
* <li>`Object` - Key/value pairs to update on the object.</li>
|
|
@@ -3442,10 +3499,9 @@ var DefaultController = {
|
|
|
3442
3499
|
}, options).then(function (results) {
|
|
3443
3500
|
for (var i = 0; i < results.length; i++) {
|
|
3444
3501
|
if (results[i] && results[i].hasOwnProperty('error')) {
|
|
3445
|
-
var
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
errors.push(_err);
|
|
3502
|
+
var err = new _ParseError.default(results[i].error.code, results[i].error.error);
|
|
3503
|
+
err.object = batch[i];
|
|
3504
|
+
errors.push(err);
|
|
3449
3505
|
}
|
|
3450
3506
|
}
|
|
3451
3507
|
});
|
package/lib/weapp/ParseOp.js
CHANGED
|
@@ -10,8 +10,8 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
10
10
|
value: true
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
+
exports.UnsetOp = exports.SetOp = exports.RemoveOp = exports.RelationOp = exports.Op = exports.IncrementOp = exports.AddUniqueOp = exports.AddOp = void 0;
|
|
13
14
|
exports.opFromJSON = opFromJSON;
|
|
14
|
-
exports.RelationOp = exports.RemoveOp = exports.AddUniqueOp = exports.AddOp = exports.IncrementOp = exports.UnsetOp = exports.SetOp = exports.Op = void 0;
|
|
15
15
|
|
|
16
16
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
17
17
|
|
|
@@ -75,7 +75,7 @@ function _isNativeReflectConstruct() {
|
|
|
75
75
|
if (typeof Proxy === "function") return true;
|
|
76
76
|
|
|
77
77
|
try {
|
|
78
|
-
|
|
78
|
+
Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {}));
|
|
79
79
|
return true;
|
|
80
80
|
} catch (e) {
|
|
81
81
|
return false;
|
|
@@ -158,8 +158,6 @@ var Op = /*#__PURE__*/function () {
|
|
|
158
158
|
key: "applyTo",
|
|
159
159
|
value: // Empty parent class
|
|
160
160
|
function ()
|
|
161
|
-
/*: mixed*/
|
|
162
|
-
|
|
163
161
|
/*: mixed*/
|
|
164
162
|
{}
|
|
165
163
|
/* eslint-disable-line no-unused-vars */
|
|
@@ -167,8 +165,6 @@ var Op = /*#__PURE__*/function () {
|
|
|
167
165
|
}, {
|
|
168
166
|
key: "mergeWith",
|
|
169
167
|
value: function ()
|
|
170
|
-
/*: Op*/
|
|
171
|
-
|
|
172
168
|
/*: ?Op*/
|
|
173
169
|
{}
|
|
174
170
|
/* eslint-disable-line no-unused-vars */
|
package/lib/weapp/ParseRole.js
CHANGED
|
@@ -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;
|
|
@@ -58,7 +58,7 @@ function _isNativeReflectConstruct() {
|
|
|
58
58
|
if (typeof Proxy === "function") return true;
|
|
59
59
|
|
|
60
60
|
try {
|
|
61
|
-
|
|
61
|
+
Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {}));
|
|
62
62
|
return true;
|
|
63
63
|
} catch (e) {
|
|
64
64
|
return false;
|
package/lib/weapp/ParseUser.js
CHANGED
|
@@ -72,7 +72,7 @@ function _isNativeReflectConstruct() {
|
|
|
72
72
|
if (typeof Proxy === "function") return true;
|
|
73
73
|
|
|
74
74
|
try {
|
|
75
|
-
|
|
75
|
+
Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {}));
|
|
76
76
|
return true;
|
|
77
77
|
} catch (e) {
|
|
78
78
|
return false;
|
package/lib/weapp/Push.js
CHANGED
|
@@ -42,9 +42,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
42
42
|
if (_Object$getOwnPropertySymbols) {
|
|
43
43
|
var symbols = _Object$getOwnPropertySymbols(object);
|
|
44
44
|
|
|
45
|
-
if (enumerableOnly)
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (enumerableOnly) {
|
|
46
|
+
symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
47
|
+
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
48
51
|
keys.push.apply(keys, symbols);
|
|
49
52
|
}
|
|
50
53
|
|
|
@@ -88,7 +91,7 @@ function _objectSpread(target) {
|
|
|
88
91
|
/* global XMLHttpRequest, XDomainRequest */
|
|
89
92
|
|
|
90
93
|
|
|
91
|
-
var uuidv4 = require('uuid
|
|
94
|
+
var uuidv4 = require('./uuid');
|
|
92
95
|
|
|
93
96
|
var XHR = null;
|
|
94
97
|
|
|
@@ -1,32 +1,85 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4
4
|
|
|
5
5
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
6
|
|
|
7
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
8
|
+
|
|
9
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
10
|
+
|
|
7
11
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
12
|
value: true
|
|
9
13
|
});
|
|
10
14
|
|
|
15
|
+
exports.clearAllState = clearAllState;
|
|
16
|
+
exports.commitServerChanges = commitServerChanges;
|
|
17
|
+
exports.duplicateState = duplicateState;
|
|
18
|
+
exports.enqueueTask = enqueueTask;
|
|
19
|
+
exports.estimateAttribute = estimateAttribute;
|
|
20
|
+
exports.estimateAttributes = estimateAttributes;
|
|
21
|
+
exports.getObjectCache = getObjectCache;
|
|
22
|
+
exports.getPendingOps = getPendingOps;
|
|
23
|
+
exports.getServerData = getServerData;
|
|
11
24
|
exports.getState = getState;
|
|
12
25
|
exports.initializeState = initializeState;
|
|
26
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
27
|
+
exports.popPendingState = popPendingState;
|
|
28
|
+
exports.pushPendingState = pushPendingState;
|
|
13
29
|
exports.removeState = removeState;
|
|
14
|
-
exports.getServerData = getServerData;
|
|
15
|
-
exports.setServerData = setServerData;
|
|
16
|
-
exports.getPendingOps = getPendingOps;
|
|
17
30
|
exports.setPendingOp = setPendingOp;
|
|
18
|
-
exports.
|
|
19
|
-
exports.popPendingState = popPendingState;
|
|
20
|
-
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
21
|
-
exports.getObjectCache = getObjectCache;
|
|
22
|
-
exports.estimateAttribute = estimateAttribute;
|
|
23
|
-
exports.estimateAttributes = estimateAttributes;
|
|
24
|
-
exports.commitServerChanges = commitServerChanges;
|
|
25
|
-
exports.enqueueTask = enqueueTask;
|
|
26
|
-
exports.clearAllState = clearAllState;
|
|
27
|
-
exports.duplicateState = duplicateState;
|
|
31
|
+
exports.setServerData = setServerData;
|
|
28
32
|
|
|
29
33
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
34
|
+
|
|
35
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
36
|
+
if (typeof _WeakMap !== "function") return null;
|
|
37
|
+
var cacheBabelInterop = new _WeakMap();
|
|
38
|
+
var cacheNodeInterop = new _WeakMap();
|
|
39
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
40
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
41
|
+
})(nodeInterop);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
45
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
46
|
+
return obj;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
50
|
+
return {
|
|
51
|
+
default: obj
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
56
|
+
|
|
57
|
+
if (cache && cache.has(obj)) {
|
|
58
|
+
return cache.get(obj);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var newObj = {};
|
|
62
|
+
|
|
63
|
+
for (var key in obj) {
|
|
64
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
65
|
+
var desc = _Object$defineProperty && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null;
|
|
66
|
+
|
|
67
|
+
if (desc && (desc.get || desc.set)) {
|
|
68
|
+
_Object$defineProperty(newObj, key, desc);
|
|
69
|
+
} else {
|
|
70
|
+
newObj[key] = obj[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
newObj.default = obj;
|
|
76
|
+
|
|
77
|
+
if (cache) {
|
|
78
|
+
cache.set(obj, newObj);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return newObj;
|
|
82
|
+
}
|
|
30
83
|
/**
|
|
31
84
|
* Copyright (c) 2015-present, Parse, LLC.
|
|
32
85
|
* All rights reserved.
|
|
@@ -1,38 +1,91 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
6
|
+
|
|
7
7
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
8
8
|
|
|
9
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
10
|
+
|
|
11
|
+
var _WeakMap2 = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
12
|
+
|
|
9
13
|
_Object$defineProperty(exports, "__esModule", {
|
|
10
14
|
value: true
|
|
11
15
|
});
|
|
12
16
|
|
|
17
|
+
exports.clearAllState = clearAllState;
|
|
18
|
+
exports.commitServerChanges = commitServerChanges;
|
|
19
|
+
exports.duplicateState = duplicateState;
|
|
20
|
+
exports.enqueueTask = enqueueTask;
|
|
21
|
+
exports.estimateAttribute = estimateAttribute;
|
|
22
|
+
exports.estimateAttributes = estimateAttributes;
|
|
23
|
+
exports.getObjectCache = getObjectCache;
|
|
24
|
+
exports.getPendingOps = getPendingOps;
|
|
25
|
+
exports.getServerData = getServerData;
|
|
13
26
|
exports.getState = getState;
|
|
14
27
|
exports.initializeState = initializeState;
|
|
28
|
+
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
29
|
+
exports.popPendingState = popPendingState;
|
|
30
|
+
exports.pushPendingState = pushPendingState;
|
|
15
31
|
exports.removeState = removeState;
|
|
16
|
-
exports.getServerData = getServerData;
|
|
17
|
-
exports.setServerData = setServerData;
|
|
18
|
-
exports.getPendingOps = getPendingOps;
|
|
19
32
|
exports.setPendingOp = setPendingOp;
|
|
20
|
-
exports.
|
|
21
|
-
exports.popPendingState = popPendingState;
|
|
22
|
-
exports.mergeFirstPendingState = mergeFirstPendingState;
|
|
23
|
-
exports.getObjectCache = getObjectCache;
|
|
24
|
-
exports.estimateAttribute = estimateAttribute;
|
|
25
|
-
exports.estimateAttributes = estimateAttributes;
|
|
26
|
-
exports.commitServerChanges = commitServerChanges;
|
|
27
|
-
exports.enqueueTask = enqueueTask;
|
|
28
|
-
exports.duplicateState = duplicateState;
|
|
29
|
-
exports.clearAllState = clearAllState;
|
|
33
|
+
exports.setServerData = setServerData;
|
|
30
34
|
|
|
31
35
|
var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/weak-map"));
|
|
32
36
|
|
|
33
37
|
var ObjectStateMutations = _interopRequireWildcard(require("./ObjectStateMutations"));
|
|
34
38
|
|
|
35
39
|
var _TaskQueue = _interopRequireDefault(require("./TaskQueue"));
|
|
40
|
+
|
|
41
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
42
|
+
if (typeof _WeakMap2 !== "function") return null;
|
|
43
|
+
var cacheBabelInterop = new _WeakMap2();
|
|
44
|
+
var cacheNodeInterop = new _WeakMap2();
|
|
45
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
46
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
47
|
+
})(nodeInterop);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
51
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
|
|
56
|
+
return {
|
|
57
|
+
default: obj
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
62
|
+
|
|
63
|
+
if (cache && cache.has(obj)) {
|
|
64
|
+
return cache.get(obj);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
var newObj = {};
|
|
68
|
+
|
|
69
|
+
for (var key in obj) {
|
|
70
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
71
|
+
var desc = _Object$defineProperty && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null;
|
|
72
|
+
|
|
73
|
+
if (desc && (desc.get || desc.set)) {
|
|
74
|
+
_Object$defineProperty(newObj, key, desc);
|
|
75
|
+
} else {
|
|
76
|
+
newObj[key] = obj[key];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
newObj.default = obj;
|
|
82
|
+
|
|
83
|
+
if (cache) {
|
|
84
|
+
cache.set(obj, newObj);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return newObj;
|
|
88
|
+
}
|
|
36
89
|
/**
|
|
37
90
|
* Copyright (c) 2015-present, Parse, LLC.
|
|
38
91
|
* All rights reserved.
|
|
@@ -8,9 +8,9 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
+
exports.continueWhile = continueWhile;
|
|
11
12
|
exports.resolvingPromise = resolvingPromise;
|
|
12
13
|
exports.when = when;
|
|
13
|
-
exports.continueWhile = continueWhile;
|
|
14
14
|
|
|
15
15
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
16
16
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var uuid = null;
|
|
4
|
+
|
|
5
|
+
uuid = function () {
|
|
6
|
+
var s = [];
|
|
7
|
+
var hexDigits = '0123456789abcdef';
|
|
8
|
+
|
|
9
|
+
for (var i = 0; i < 36; i++) {
|
|
10
|
+
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
|
|
14
|
+
|
|
15
|
+
s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
|
|
16
|
+
|
|
17
|
+
s[8] = s[13] = s[18] = s[23] = '-';
|
|
18
|
+
return s.join('');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports = uuid;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-alpha.1",
|
|
4
4
|
"description": "The Parse JavaScript SDK",
|
|
5
5
|
"homepage": "https://parseplatform.org/",
|
|
6
6
|
"keywords": [
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"react-native": false
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/runtime": "7.
|
|
33
|
-
"@babel/runtime-corejs3": "7.
|
|
34
|
-
"idb-keyval": "5.0.
|
|
32
|
+
"@babel/runtime": "7.14.8",
|
|
33
|
+
"@babel/runtime-corejs3": "7.14.6",
|
|
34
|
+
"idb-keyval": "5.0.6",
|
|
35
35
|
"react-native-crypto-js": "1.0.0",
|
|
36
36
|
"uuid": "3.4.0",
|
|
37
|
-
"ws": "7.
|
|
37
|
+
"ws": "7.5.0",
|
|
38
38
|
"xmlhttprequest": "1.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -46,6 +46,12 @@
|
|
|
46
46
|
"@babel/preset-env": "7.10.2",
|
|
47
47
|
"@babel/preset-react": "7.10.1",
|
|
48
48
|
"@parse/minami": "1.0.0",
|
|
49
|
+
"@semantic-release/changelog": "5.0.1",
|
|
50
|
+
"@semantic-release/commit-analyzer": "8.0.1",
|
|
51
|
+
"@semantic-release/git": "9.0.0",
|
|
52
|
+
"@semantic-release/github": "7.2.3",
|
|
53
|
+
"@semantic-release/npm": "7.1.3",
|
|
54
|
+
"@semantic-release/release-notes-generator": "9.0.3",
|
|
49
55
|
"babel-eslint": "10.1.0",
|
|
50
56
|
"babel-jest": "24.9.0",
|
|
51
57
|
"babel-plugin-inline-package-json": "2.0.0",
|
|
@@ -75,13 +81,14 @@
|
|
|
75
81
|
"jsdoc-babel": "0.5.0",
|
|
76
82
|
"lint-staged": "10.5.3",
|
|
77
83
|
"metro-react-native-babel-preset": "0.59.0",
|
|
78
|
-
"parse-server": "github:parse-community/parse-server#
|
|
84
|
+
"parse-server": "github:parse-community/parse-server#alpha",
|
|
79
85
|
"prettier": "2.2.1",
|
|
80
86
|
"regenerator-runtime": "0.13.5",
|
|
87
|
+
"semantic-release": "17.4.6",
|
|
81
88
|
"vinyl-source-stream": "2.0.0"
|
|
82
89
|
},
|
|
83
90
|
"optionalDependencies": {
|
|
84
|
-
"crypto-js": "4.
|
|
91
|
+
"crypto-js": "4.1.1"
|
|
85
92
|
},
|
|
86
93
|
"scripts": {
|
|
87
94
|
"build": "node build_releases.js",
|