parse 4.0.0-beta.1 → 4.0.1-beta.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/LICENSE +167 -25
- package/NOTICE +10 -0
- package/README.md +1 -3
- package/dist/parse.js +188 -374
- package/dist/parse.min.js +7 -6
- package/dist/parse.weapp.js +188 -374
- package/dist/parse.weapp.min.js +7 -6
- package/lib/browser/Analytics.js +0 -7
- package/lib/browser/AnonymousUtils.js +0 -7
- package/lib/browser/Cloud.js +0 -7
- package/lib/browser/CoreManager.js +1 -8
- package/lib/browser/EventEmitter.js +0 -7
- package/lib/browser/FacebookUtils.js +0 -7
- package/lib/browser/InstallationController.js +0 -7
- package/lib/browser/LocalDatastoreUtils.js +0 -7
- package/lib/browser/OfflineQuery.js +27 -8
- package/lib/browser/Parse.js +0 -9
- package/lib/browser/ParseACL.js +0 -7
- package/lib/browser/ParseConfig.js +0 -7
- package/lib/browser/ParseError.js +0 -9
- package/lib/browser/ParseGeoPoint.js +0 -7
- package/lib/browser/ParseObject.js +158 -126
- package/lib/browser/ParsePolygon.js +0 -7
- package/lib/browser/ParseRelation.js +0 -7
- package/lib/browser/ParseSchema.js +0 -7
- package/lib/browser/Push.js +0 -7
- package/lib/browser/RESTController.js +0 -7
- package/lib/browser/SingleInstanceStateController.js +0 -7
- package/lib/browser/Storage.js +0 -7
- package/lib/browser/StorageController.browser.js +0 -7
- package/lib/browser/StorageController.default.js +0 -7
- package/lib/browser/StorageController.react-native.js +0 -7
- package/lib/browser/StorageController.weapp.js +0 -7
- package/lib/browser/TaskQueue.js +0 -7
- package/lib/browser/UniqueInstanceStateController.js +0 -7
- package/lib/browser/arrayContainsObject.js +0 -7
- package/lib/browser/canBeSerialized.js +0 -7
- package/lib/browser/decode.js +0 -7
- package/lib/browser/encode.js +0 -7
- package/lib/browser/equals.js +0 -9
- package/lib/browser/escape.js +0 -7
- package/lib/browser/isRevocableSession.js +0 -7
- package/lib/browser/parseDate.js +0 -7
- package/lib/browser/unique.js +0 -7
- package/lib/browser/unsavedChildren.js +0 -7
- package/lib/node/Analytics.js +0 -7
- package/lib/node/AnonymousUtils.js +0 -7
- package/lib/node/Cloud.js +0 -7
- package/lib/node/CoreManager.js +1 -8
- package/lib/node/EventEmitter.js +0 -7
- package/lib/node/FacebookUtils.js +0 -7
- package/lib/node/InstallationController.js +0 -7
- package/lib/node/LiveQueryClient.js +0 -10
- package/lib/node/LiveQuerySubscription.js +0 -10
- package/lib/node/LocalDatastore.js +0 -7
- package/lib/node/LocalDatastoreController.js +0 -7
- package/lib/node/LocalDatastoreController.react-native.js +0 -7
- package/lib/node/LocalDatastoreUtils.js +0 -7
- package/lib/node/ObjectStateMutations.js +0 -7
- package/lib/node/OfflineQuery.js +8 -0
- package/lib/node/Parse.js +0 -9
- package/lib/node/ParseACL.js +0 -7
- package/lib/node/ParseCLP.js +0 -7
- package/lib/node/ParseConfig.js +0 -7
- package/lib/node/ParseError.js +0 -9
- package/lib/node/ParseFile.js +0 -7
- package/lib/node/ParseGeoPoint.js +0 -7
- package/lib/node/ParseInstallation.js +0 -7
- package/lib/node/ParseLiveQuery.js +0 -7
- package/lib/node/ParseObject.js +40 -29
- package/lib/node/ParseOp.js +0 -7
- package/lib/node/ParsePolygon.js +0 -7
- package/lib/node/ParseQuery.js +0 -7
- package/lib/node/ParseRelation.js +0 -7
- package/lib/node/ParseRole.js +0 -7
- package/lib/node/ParseSchema.js +0 -7
- package/lib/node/ParseSession.js +0 -7
- package/lib/node/ParseUser.js +0 -7
- package/lib/node/Push.js +0 -7
- package/lib/node/RESTController.js +0 -7
- package/lib/node/SingleInstanceStateController.js +0 -7
- package/lib/node/Storage.js +0 -7
- package/lib/node/StorageController.browser.js +0 -7
- package/lib/node/StorageController.default.js +0 -7
- package/lib/node/StorageController.react-native.js +0 -7
- package/lib/node/StorageController.weapp.js +0 -7
- package/lib/node/TaskQueue.js +0 -7
- package/lib/node/UniqueInstanceStateController.js +0 -7
- package/lib/node/arrayContainsObject.js +0 -7
- package/lib/node/canBeSerialized.js +0 -7
- package/lib/node/decode.js +0 -7
- package/lib/node/encode.js +0 -7
- package/lib/node/equals.js +0 -9
- package/lib/node/escape.js +0 -7
- package/lib/node/isRevocableSession.js +0 -7
- package/lib/node/parseDate.js +0 -7
- package/lib/node/unique.js +0 -7
- package/lib/node/unsavedChildren.js +0 -7
- package/lib/react-native/CoreManager.js +2 -2
- package/lib/react-native/EventuallyQueue.js +169 -676
- package/lib/react-native/LiveQueryClient.js +3 -46
- package/lib/react-native/LocalDatastore.js +303 -863
- package/lib/react-native/LocalDatastoreController.js +75 -535
- package/lib/react-native/LocalDatastoreController.react-native.js +95 -503
- package/lib/react-native/ObjectStateMutations.js +2 -31
- package/lib/react-native/OfflineQuery.js +24 -60
- package/lib/react-native/ParseCLP.js +55 -129
- package/lib/react-native/ParseFile.js +63 -468
- package/lib/react-native/ParseLiveQuery.js +60 -455
- package/lib/react-native/ParseObject.js +263 -897
- package/lib/react-native/ParseQuery.js +207 -643
- package/lib/react-native/ParseSchema.js +3 -3
- package/lib/react-native/ParseUser.js +118 -573
- package/lib/react-native/RESTController.js +1 -29
- package/lib/weapp/Analytics.js +0 -7
- package/lib/weapp/AnonymousUtils.js +0 -7
- package/lib/weapp/Cloud.js +0 -7
- package/lib/weapp/CoreManager.js +1 -8
- package/lib/weapp/EventEmitter.js +0 -7
- package/lib/weapp/FacebookUtils.js +0 -7
- package/lib/weapp/InstallationController.js +0 -7
- package/lib/weapp/LocalDatastoreUtils.js +0 -7
- package/lib/weapp/OfflineQuery.js +27 -8
- package/lib/weapp/Parse.js +0 -9
- package/lib/weapp/ParseACL.js +0 -7
- package/lib/weapp/ParseConfig.js +0 -7
- package/lib/weapp/ParseError.js +0 -9
- package/lib/weapp/ParseGeoPoint.js +0 -7
- package/lib/weapp/ParseObject.js +158 -126
- package/lib/weapp/ParsePolygon.js +0 -7
- package/lib/weapp/ParseRelation.js +0 -7
- package/lib/weapp/ParseSchema.js +0 -7
- package/lib/weapp/Push.js +0 -7
- package/lib/weapp/RESTController.js +0 -7
- package/lib/weapp/SingleInstanceStateController.js +0 -7
- package/lib/weapp/Storage.js +0 -7
- package/lib/weapp/StorageController.browser.js +0 -7
- package/lib/weapp/StorageController.default.js +0 -7
- package/lib/weapp/StorageController.react-native.js +0 -7
- package/lib/weapp/StorageController.weapp.js +0 -7
- package/lib/weapp/TaskQueue.js +0 -7
- package/lib/weapp/UniqueInstanceStateController.js +0 -7
- package/lib/weapp/arrayContainsObject.js +0 -7
- package/lib/weapp/canBeSerialized.js +0 -7
- package/lib/weapp/decode.js +0 -7
- package/lib/weapp/encode.js +0 -7
- package/lib/weapp/equals.js +0 -9
- package/lib/weapp/escape.js +0 -7
- package/lib/weapp/isRevocableSession.js +0 -7
- package/lib/weapp/parseDate.js +0 -7
- package/lib/weapp/unique.js +0 -7
- package/lib/weapp/unsavedChildren.js +0 -7
- package/package.json +9 -9
- package/PATENTS +0 -37
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
+
|
|
8
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
11
|
|
|
10
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -29,357 +31,6 @@ var _ParseSession = _interopRequireDefault(require("./ParseSession"));
|
|
|
29
31
|
|
|
30
32
|
var _Storage = _interopRequireDefault(require("./Storage"));
|
|
31
33
|
|
|
32
|
-
function _regeneratorRuntime() {
|
|
33
|
-
"use strict";
|
|
34
|
-
|
|
35
|
-
_regeneratorRuntime = function () {
|
|
36
|
-
return exports;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var exports = {},
|
|
40
|
-
Op = Object.prototype,
|
|
41
|
-
hasOwn = Op.hasOwnProperty,
|
|
42
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
43
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
44
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
45
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
46
|
-
|
|
47
|
-
function define(obj, key, value) {
|
|
48
|
-
return Object.defineProperty(obj, key, {
|
|
49
|
-
value: value,
|
|
50
|
-
enumerable: !0,
|
|
51
|
-
configurable: !0,
|
|
52
|
-
writable: !0
|
|
53
|
-
}), obj[key];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
define({}, "");
|
|
58
|
-
} catch (err) {
|
|
59
|
-
define = function (obj, key, value) {
|
|
60
|
-
return obj[key] = value;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
65
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
66
|
-
generator = Object.create(protoGenerator.prototype),
|
|
67
|
-
context = new Context(tryLocsList || []);
|
|
68
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
69
|
-
var state = "suspendedStart";
|
|
70
|
-
return function (method, arg) {
|
|
71
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
72
|
-
|
|
73
|
-
if ("completed" === state) {
|
|
74
|
-
if ("throw" === method) throw arg;
|
|
75
|
-
return doneResult();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
for (context.method = method, context.arg = arg;;) {
|
|
79
|
-
var delegate = context.delegate;
|
|
80
|
-
|
|
81
|
-
if (delegate) {
|
|
82
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
83
|
-
|
|
84
|
-
if (delegateResult) {
|
|
85
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
86
|
-
return delegateResult;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
91
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
92
|
-
context.dispatchException(context.arg);
|
|
93
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
94
|
-
state = "executing";
|
|
95
|
-
var record = tryCatch(innerFn, self, context);
|
|
96
|
-
|
|
97
|
-
if ("normal" === record.type) {
|
|
98
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
99
|
-
return {
|
|
100
|
-
value: record.arg,
|
|
101
|
-
done: context.done
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
}(innerFn, self, context), generator;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function tryCatch(fn, obj, arg) {
|
|
112
|
-
try {
|
|
113
|
-
return {
|
|
114
|
-
type: "normal",
|
|
115
|
-
arg: fn.call(obj, arg)
|
|
116
|
-
};
|
|
117
|
-
} catch (err) {
|
|
118
|
-
return {
|
|
119
|
-
type: "throw",
|
|
120
|
-
arg: err
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
exports.wrap = wrap;
|
|
126
|
-
var ContinueSentinel = {};
|
|
127
|
-
|
|
128
|
-
function Generator() {}
|
|
129
|
-
|
|
130
|
-
function GeneratorFunction() {}
|
|
131
|
-
|
|
132
|
-
function GeneratorFunctionPrototype() {}
|
|
133
|
-
|
|
134
|
-
var IteratorPrototype = {};
|
|
135
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
136
|
-
return this;
|
|
137
|
-
});
|
|
138
|
-
var getProto = Object.getPrototypeOf,
|
|
139
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
140
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
141
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
142
|
-
|
|
143
|
-
function defineIteratorMethods(prototype) {
|
|
144
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
145
|
-
define(prototype, method, function (arg) {
|
|
146
|
-
return this._invoke(method, arg);
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
152
|
-
function invoke(method, arg, resolve, reject) {
|
|
153
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
154
|
-
|
|
155
|
-
if ("throw" !== record.type) {
|
|
156
|
-
var result = record.arg,
|
|
157
|
-
value = result.value;
|
|
158
|
-
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
159
|
-
invoke("next", value, resolve, reject);
|
|
160
|
-
}, function (err) {
|
|
161
|
-
invoke("throw", err, resolve, reject);
|
|
162
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
163
|
-
result.value = unwrapped, resolve(result);
|
|
164
|
-
}, function (error) {
|
|
165
|
-
return invoke("throw", error, resolve, reject);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
reject(record.arg);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
var previousPromise;
|
|
173
|
-
|
|
174
|
-
this._invoke = function (method, arg) {
|
|
175
|
-
function callInvokeWithMethodAndArg() {
|
|
176
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
177
|
-
invoke(method, arg, resolve, reject);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
186
|
-
var method = delegate.iterator[context.method];
|
|
187
|
-
|
|
188
|
-
if (undefined === method) {
|
|
189
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
190
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
191
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return ContinueSentinel;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
198
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
199
|
-
var info = record.arg;
|
|
200
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function pushTryEntry(locs) {
|
|
204
|
-
var entry = {
|
|
205
|
-
tryLoc: locs[0]
|
|
206
|
-
};
|
|
207
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function resetTryEntry(entry) {
|
|
211
|
-
var record = entry.completion || {};
|
|
212
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function Context(tryLocsList) {
|
|
216
|
-
this.tryEntries = [{
|
|
217
|
-
tryLoc: "root"
|
|
218
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function values(iterable) {
|
|
222
|
-
if (iterable) {
|
|
223
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
224
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
225
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
226
|
-
|
|
227
|
-
if (!isNaN(iterable.length)) {
|
|
228
|
-
var i = -1,
|
|
229
|
-
next = function next() {
|
|
230
|
-
for (; ++i < iterable.length;) {
|
|
231
|
-
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return next.value = undefined, next.done = !0, next;
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
return next.next = next;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return {
|
|
242
|
-
next: doneResult
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
function doneResult() {
|
|
247
|
-
return {
|
|
248
|
-
value: undefined,
|
|
249
|
-
done: !0
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
254
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
255
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
256
|
-
}, exports.mark = function (genFun) {
|
|
257
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
258
|
-
}, exports.awrap = function (arg) {
|
|
259
|
-
return {
|
|
260
|
-
__await: arg
|
|
261
|
-
};
|
|
262
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
263
|
-
return this;
|
|
264
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
265
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
266
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
267
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
268
|
-
return result.done ? result.value : iter.next();
|
|
269
|
-
});
|
|
270
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
271
|
-
return this;
|
|
272
|
-
}), define(Gp, "toString", function () {
|
|
273
|
-
return "[object Generator]";
|
|
274
|
-
}), exports.keys = function (object) {
|
|
275
|
-
var keys = [];
|
|
276
|
-
|
|
277
|
-
for (var key in object) {
|
|
278
|
-
keys.push(key);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return keys.reverse(), function next() {
|
|
282
|
-
for (; keys.length;) {
|
|
283
|
-
var key = keys.pop();
|
|
284
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return next.done = !0, next;
|
|
288
|
-
};
|
|
289
|
-
}, exports.values = values, Context.prototype = {
|
|
290
|
-
constructor: Context,
|
|
291
|
-
reset: function (skipTempReset) {
|
|
292
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
|
|
293
|
-
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
stop: function () {
|
|
297
|
-
this.done = !0;
|
|
298
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
299
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
300
|
-
return this.rval;
|
|
301
|
-
},
|
|
302
|
-
dispatchException: function (exception) {
|
|
303
|
-
if (this.done) throw exception;
|
|
304
|
-
var context = this;
|
|
305
|
-
|
|
306
|
-
function handle(loc, caught) {
|
|
307
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
311
|
-
var entry = this.tryEntries[i],
|
|
312
|
-
record = entry.completion;
|
|
313
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
314
|
-
|
|
315
|
-
if (entry.tryLoc <= this.prev) {
|
|
316
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
317
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
318
|
-
|
|
319
|
-
if (hasCatch && hasFinally) {
|
|
320
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
321
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
322
|
-
} else if (hasCatch) {
|
|
323
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
324
|
-
} else {
|
|
325
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
326
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
abrupt: function (type, arg) {
|
|
332
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
333
|
-
var entry = this.tryEntries[i];
|
|
334
|
-
|
|
335
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
336
|
-
var finallyEntry = entry;
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
342
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
343
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
344
|
-
},
|
|
345
|
-
complete: function (record, afterLoc) {
|
|
346
|
-
if ("throw" === record.type) throw record.arg;
|
|
347
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
348
|
-
},
|
|
349
|
-
finish: function (finallyLoc) {
|
|
350
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
351
|
-
var entry = this.tryEntries[i];
|
|
352
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
catch: function (tryLoc) {
|
|
356
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
357
|
-
var entry = this.tryEntries[i];
|
|
358
|
-
|
|
359
|
-
if (entry.tryLoc === tryLoc) {
|
|
360
|
-
var record = entry.completion;
|
|
361
|
-
|
|
362
|
-
if ("throw" === record.type) {
|
|
363
|
-
var thrown = record.arg;
|
|
364
|
-
resetTryEntry(entry);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
return thrown;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
throw new Error("illegal catch attempt");
|
|
372
|
-
},
|
|
373
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
374
|
-
return this.delegate = {
|
|
375
|
-
iterator: values(iterable),
|
|
376
|
-
resultName: resultName,
|
|
377
|
-
nextLoc: nextLoc
|
|
378
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
379
|
-
}
|
|
380
|
-
}, exports;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
34
|
function _createSuper(Derived) {
|
|
384
35
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
385
36
|
|
|
@@ -655,25 +306,17 @@ var ParseUser = function (_ParseObject) {
|
|
|
655
306
|
}, {
|
|
656
307
|
key: "isCurrentAsync",
|
|
657
308
|
value: function () {
|
|
658
|
-
var
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
case 4:
|
|
671
|
-
case "end":
|
|
672
|
-
return _context.stop();
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}, null, this, null, Promise);
|
|
676
|
-
}
|
|
309
|
+
var _isCurrentAsync = (0, _asyncToGenerator2.default)(function* () {
|
|
310
|
+
var current = yield ParseUser.currentAsync();
|
|
311
|
+
return !!current && current.id === this.id;
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
function isCurrentAsync() {
|
|
315
|
+
return _isCurrentAsync.apply(this, arguments);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return isCurrentAsync;
|
|
319
|
+
}()
|
|
677
320
|
}, {
|
|
678
321
|
key: "getUsername",
|
|
679
322
|
value: function () {
|
|
@@ -783,179 +426,99 @@ var ParseUser = function (_ParseObject) {
|
|
|
783
426
|
}, {
|
|
784
427
|
key: "save",
|
|
785
428
|
value: function () {
|
|
786
|
-
var
|
|
787
|
-
|
|
788
|
-
_key4
|
|
789
|
-
current,
|
|
790
|
-
_args2 = arguments;
|
|
791
|
-
|
|
792
|
-
return _regeneratorRuntime().async(function (_context2) {
|
|
793
|
-
while (1) {
|
|
794
|
-
switch (_context2.prev = _context2.next) {
|
|
795
|
-
case 0:
|
|
796
|
-
for (_len = _args2.length, args = new Array(_len), _key4 = 0; _key4 < _len; _key4++) {
|
|
797
|
-
args[_key4] = _args2[_key4];
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
_context2.next = 3;
|
|
801
|
-
return _regeneratorRuntime().awrap((0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "save", this).apply(this, args));
|
|
802
|
-
|
|
803
|
-
case 3:
|
|
804
|
-
_context2.next = 5;
|
|
805
|
-
return _regeneratorRuntime().awrap(this.isCurrentAsync());
|
|
806
|
-
|
|
807
|
-
case 5:
|
|
808
|
-
current = _context2.sent;
|
|
809
|
-
|
|
810
|
-
if (!current) {
|
|
811
|
-
_context2.next = 8;
|
|
812
|
-
break;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
return _context2.abrupt("return", _CoreManager.default.getUserController().updateUserOnDisk(this));
|
|
816
|
-
|
|
817
|
-
case 8:
|
|
818
|
-
return _context2.abrupt("return", this);
|
|
819
|
-
|
|
820
|
-
case 9:
|
|
821
|
-
case "end":
|
|
822
|
-
return _context2.stop();
|
|
823
|
-
}
|
|
429
|
+
var _save = (0, _asyncToGenerator2.default)(function* () {
|
|
430
|
+
for (var _len = arguments.length, args = new Array(_len), _key4 = 0; _key4 < _len; _key4++) {
|
|
431
|
+
args[_key4] = arguments[_key4];
|
|
824
432
|
}
|
|
825
|
-
|
|
826
|
-
|
|
433
|
+
|
|
434
|
+
yield (0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "save", this).apply(this, args);
|
|
435
|
+
var current = yield this.isCurrentAsync();
|
|
436
|
+
|
|
437
|
+
if (current) {
|
|
438
|
+
return _CoreManager.default.getUserController().updateUserOnDisk(this);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
return this;
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
function save() {
|
|
445
|
+
return _save.apply(this, arguments);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return save;
|
|
449
|
+
}()
|
|
827
450
|
}, {
|
|
828
451
|
key: "destroy",
|
|
829
452
|
value: function () {
|
|
830
|
-
var
|
|
831
|
-
|
|
832
|
-
_key5
|
|
833
|
-
current,
|
|
834
|
-
_args3 = arguments;
|
|
835
|
-
|
|
836
|
-
return _regeneratorRuntime().async(function (_context3) {
|
|
837
|
-
while (1) {
|
|
838
|
-
switch (_context3.prev = _context3.next) {
|
|
839
|
-
case 0:
|
|
840
|
-
for (_len2 = _args3.length, args = new Array(_len2), _key5 = 0; _key5 < _len2; _key5++) {
|
|
841
|
-
args[_key5] = _args3[_key5];
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
_context3.next = 3;
|
|
845
|
-
return _regeneratorRuntime().awrap((0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "destroy", this).apply(this, args));
|
|
846
|
-
|
|
847
|
-
case 3:
|
|
848
|
-
_context3.next = 5;
|
|
849
|
-
return _regeneratorRuntime().awrap(this.isCurrentAsync());
|
|
850
|
-
|
|
851
|
-
case 5:
|
|
852
|
-
current = _context3.sent;
|
|
853
|
-
|
|
854
|
-
if (!current) {
|
|
855
|
-
_context3.next = 8;
|
|
856
|
-
break;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
return _context3.abrupt("return", _CoreManager.default.getUserController().removeUserFromDisk());
|
|
860
|
-
|
|
861
|
-
case 8:
|
|
862
|
-
return _context3.abrupt("return", this);
|
|
863
|
-
|
|
864
|
-
case 9:
|
|
865
|
-
case "end":
|
|
866
|
-
return _context3.stop();
|
|
867
|
-
}
|
|
453
|
+
var _destroy = (0, _asyncToGenerator2.default)(function* () {
|
|
454
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key5 = 0; _key5 < _len2; _key5++) {
|
|
455
|
+
args[_key5] = arguments[_key5];
|
|
868
456
|
}
|
|
869
|
-
|
|
870
|
-
|
|
457
|
+
|
|
458
|
+
yield (0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "destroy", this).apply(this, args);
|
|
459
|
+
var current = yield this.isCurrentAsync();
|
|
460
|
+
|
|
461
|
+
if (current) {
|
|
462
|
+
return _CoreManager.default.getUserController().removeUserFromDisk();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
return this;
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
function destroy() {
|
|
469
|
+
return _destroy.apply(this, arguments);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
return destroy;
|
|
473
|
+
}()
|
|
871
474
|
}, {
|
|
872
475
|
key: "fetch",
|
|
873
476
|
value: function () {
|
|
874
|
-
var
|
|
875
|
-
|
|
876
|
-
_key6
|
|
877
|
-
current,
|
|
878
|
-
_args4 = arguments;
|
|
879
|
-
|
|
880
|
-
return _regeneratorRuntime().async(function (_context4) {
|
|
881
|
-
while (1) {
|
|
882
|
-
switch (_context4.prev = _context4.next) {
|
|
883
|
-
case 0:
|
|
884
|
-
for (_len3 = _args4.length, args = new Array(_len3), _key6 = 0; _key6 < _len3; _key6++) {
|
|
885
|
-
args[_key6] = _args4[_key6];
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
_context4.next = 3;
|
|
889
|
-
return _regeneratorRuntime().awrap((0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "fetch", this).apply(this, args));
|
|
890
|
-
|
|
891
|
-
case 3:
|
|
892
|
-
_context4.next = 5;
|
|
893
|
-
return _regeneratorRuntime().awrap(this.isCurrentAsync());
|
|
894
|
-
|
|
895
|
-
case 5:
|
|
896
|
-
current = _context4.sent;
|
|
897
|
-
|
|
898
|
-
if (!current) {
|
|
899
|
-
_context4.next = 8;
|
|
900
|
-
break;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
return _context4.abrupt("return", _CoreManager.default.getUserController().updateUserOnDisk(this));
|
|
904
|
-
|
|
905
|
-
case 8:
|
|
906
|
-
return _context4.abrupt("return", this);
|
|
907
|
-
|
|
908
|
-
case 9:
|
|
909
|
-
case "end":
|
|
910
|
-
return _context4.stop();
|
|
911
|
-
}
|
|
477
|
+
var _fetch = (0, _asyncToGenerator2.default)(function* () {
|
|
478
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key6 = 0; _key6 < _len3; _key6++) {
|
|
479
|
+
args[_key6] = arguments[_key6];
|
|
912
480
|
}
|
|
913
|
-
|
|
914
|
-
|
|
481
|
+
|
|
482
|
+
yield (0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "fetch", this).apply(this, args);
|
|
483
|
+
var current = yield this.isCurrentAsync();
|
|
484
|
+
|
|
485
|
+
if (current) {
|
|
486
|
+
return _CoreManager.default.getUserController().updateUserOnDisk(this);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return this;
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
function fetch() {
|
|
493
|
+
return _fetch.apply(this, arguments);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return fetch;
|
|
497
|
+
}()
|
|
915
498
|
}, {
|
|
916
499
|
key: "fetchWithInclude",
|
|
917
500
|
value: function () {
|
|
918
|
-
var
|
|
919
|
-
|
|
920
|
-
_key7
|
|
921
|
-
current,
|
|
922
|
-
_args5 = arguments;
|
|
923
|
-
|
|
924
|
-
return _regeneratorRuntime().async(function (_context5) {
|
|
925
|
-
while (1) {
|
|
926
|
-
switch (_context5.prev = _context5.next) {
|
|
927
|
-
case 0:
|
|
928
|
-
for (_len4 = _args5.length, args = new Array(_len4), _key7 = 0; _key7 < _len4; _key7++) {
|
|
929
|
-
args[_key7] = _args5[_key7];
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
_context5.next = 3;
|
|
933
|
-
return _regeneratorRuntime().awrap((0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "fetchWithInclude", this).apply(this, args));
|
|
934
|
-
|
|
935
|
-
case 3:
|
|
936
|
-
_context5.next = 5;
|
|
937
|
-
return _regeneratorRuntime().awrap(this.isCurrentAsync());
|
|
938
|
-
|
|
939
|
-
case 5:
|
|
940
|
-
current = _context5.sent;
|
|
941
|
-
|
|
942
|
-
if (!current) {
|
|
943
|
-
_context5.next = 8;
|
|
944
|
-
break;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
return _context5.abrupt("return", _CoreManager.default.getUserController().updateUserOnDisk(this));
|
|
948
|
-
|
|
949
|
-
case 8:
|
|
950
|
-
return _context5.abrupt("return", this);
|
|
951
|
-
|
|
952
|
-
case 9:
|
|
953
|
-
case "end":
|
|
954
|
-
return _context5.stop();
|
|
955
|
-
}
|
|
501
|
+
var _fetchWithInclude = (0, _asyncToGenerator2.default)(function* () {
|
|
502
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key7 = 0; _key7 < _len4; _key7++) {
|
|
503
|
+
args[_key7] = arguments[_key7];
|
|
956
504
|
}
|
|
957
|
-
|
|
958
|
-
|
|
505
|
+
|
|
506
|
+
yield (0, _get2.default)((0, _getPrototypeOf2.default)(ParseUser.prototype), "fetchWithInclude", this).apply(this, args);
|
|
507
|
+
var current = yield this.isCurrentAsync();
|
|
508
|
+
|
|
509
|
+
if (current) {
|
|
510
|
+
return _CoreManager.default.getUserController().updateUserOnDisk(this);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return this;
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
function fetchWithInclude() {
|
|
517
|
+
return _fetchWithInclude.apply(this, arguments);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
return fetchWithInclude;
|
|
521
|
+
}()
|
|
959
522
|
}, {
|
|
960
523
|
key: "verifyPassword",
|
|
961
524
|
value: function (password, options) {
|
|
@@ -1495,60 +1058,42 @@ var DefaultController = {
|
|
|
1495
1058
|
email: email
|
|
1496
1059
|
}, options);
|
|
1497
1060
|
},
|
|
1498
|
-
upgradeToRevocableSession: function (
|
|
1499
|
-
var
|
|
1500
|
-
|
|
1501
|
-
while (1) {
|
|
1502
|
-
switch (_context6.prev = _context6.next) {
|
|
1503
|
-
case 0:
|
|
1504
|
-
token = user.getSessionToken();
|
|
1505
|
-
|
|
1506
|
-
if (token) {
|
|
1507
|
-
_context6.next = 3;
|
|
1508
|
-
break;
|
|
1509
|
-
}
|
|
1061
|
+
upgradeToRevocableSession: function () {
|
|
1062
|
+
var _upgradeToRevocableSession2 = (0, _asyncToGenerator2.default)(function* (user, options) {
|
|
1063
|
+
var token = user.getSessionToken();
|
|
1510
1064
|
|
|
1511
|
-
|
|
1065
|
+
if (!token) {
|
|
1066
|
+
return Promise.reject(new _ParseError.default(_ParseError.default.SESSION_MISSING, 'Cannot upgrade a user with no session token'));
|
|
1067
|
+
}
|
|
1512
1068
|
|
|
1513
|
-
|
|
1514
|
-
options.sessionToken = token;
|
|
1515
|
-
RESTController = _CoreManager.default.getRESTController();
|
|
1516
|
-
_context6.next = 7;
|
|
1517
|
-
return _regeneratorRuntime().awrap(RESTController.request('POST', 'upgradeToRevocableSession', {}, options));
|
|
1069
|
+
options.sessionToken = token;
|
|
1518
1070
|
|
|
1519
|
-
|
|
1520
|
-
result = _context6.sent;
|
|
1521
|
-
session = new _ParseSession.default();
|
|
1071
|
+
var RESTController = _CoreManager.default.getRESTController();
|
|
1522
1072
|
|
|
1523
|
-
|
|
1073
|
+
var result = yield RESTController.request('POST', 'upgradeToRevocableSession', {}, options);
|
|
1074
|
+
var session = new _ParseSession.default();
|
|
1524
1075
|
|
|
1525
|
-
|
|
1526
|
-
sessionToken: session.getSessionToken()
|
|
1527
|
-
});
|
|
1076
|
+
session._finishFetch(result);
|
|
1528
1077
|
|
|
1529
|
-
|
|
1530
|
-
|
|
1078
|
+
user._finishFetch({
|
|
1079
|
+
sessionToken: session.getSessionToken()
|
|
1080
|
+
});
|
|
1531
1081
|
|
|
1532
|
-
|
|
1533
|
-
current = _context6.sent;
|
|
1082
|
+
var current = yield user.isCurrentAsync();
|
|
1534
1083
|
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
}
|
|
1084
|
+
if (current) {
|
|
1085
|
+
return DefaultController.setCurrentUser(user);
|
|
1086
|
+
}
|
|
1539
1087
|
|
|
1540
|
-
|
|
1088
|
+
return Promise.resolve(user);
|
|
1089
|
+
});
|
|
1541
1090
|
|
|
1542
|
-
|
|
1543
|
-
|
|
1091
|
+
function upgradeToRevocableSession() {
|
|
1092
|
+
return _upgradeToRevocableSession2.apply(this, arguments);
|
|
1093
|
+
}
|
|
1544
1094
|
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
return _context6.stop();
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
}, null, null, null, Promise);
|
|
1551
|
-
},
|
|
1095
|
+
return upgradeToRevocableSession;
|
|
1096
|
+
}(),
|
|
1552
1097
|
linkWith: function (user, authData, options) {
|
|
1553
1098
|
return user.save({
|
|
1554
1099
|
authData: authData
|