parse 3.5.0-alpha.2 → 3.5.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +5816 -2480
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +5814 -2478
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/EventuallyQueue.js +395 -29
- package/lib/browser/LiveQueryClient.js +2 -6
- package/lib/browser/LocalDatastore.js +392 -18
- package/lib/browser/LocalDatastoreController.js +391 -21
- package/lib/browser/LocalDatastoreController.react-native.js +387 -23
- package/lib/browser/ParseFile.js +388 -22
- package/lib/browser/ParseLiveQuery.js +381 -18
- package/lib/browser/ParseObject.js +405 -41
- package/lib/browser/ParseOp.js +1 -3
- package/lib/browser/ParseQuery.js +396 -47
- package/lib/browser/ParseSchema.js +9 -7
- package/lib/browser/ParseUser.js +388 -14
- package/lib/browser/StorageController.react-native.js +6 -18
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseObject.js +6 -6
- package/lib/node/ParseQuery.js +1 -3
- package/lib/node/ParseSchema.js +9 -7
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/EventuallyQueue.js +376 -27
- package/lib/react-native/LiveQueryClient.js +2 -6
- package/lib/react-native/LocalDatastore.js +374 -26
- package/lib/react-native/LocalDatastoreController.js +365 -16
- package/lib/react-native/LocalDatastoreController.react-native.js +363 -14
- package/lib/react-native/ParseFile.js +359 -16
- package/lib/react-native/ParseLiveQuery.js +357 -8
- package/lib/react-native/ParseObject.js +385 -38
- package/lib/react-native/ParseOp.js +1 -3
- package/lib/react-native/ParseQuery.js +374 -39
- package/lib/react-native/ParseSchema.js +9 -7
- package/lib/react-native/ParseUser.js +368 -19
- package/lib/react-native/StorageController.react-native.js +6 -18
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/EventuallyQueue.js +395 -29
- package/lib/weapp/LiveQueryClient.js +2 -6
- package/lib/weapp/LocalDatastore.js +392 -18
- package/lib/weapp/LocalDatastoreController.js +391 -21
- package/lib/weapp/LocalDatastoreController.react-native.js +387 -23
- package/lib/weapp/ParseFile.js +388 -22
- package/lib/weapp/ParseLiveQuery.js +381 -18
- package/lib/weapp/ParseObject.js +405 -41
- package/lib/weapp/ParseOp.js +1 -3
- package/lib/weapp/ParseQuery.js +396 -47
- package/lib/weapp/ParseSchema.js +9 -7
- package/lib/weapp/ParseUser.js +388 -14
- package/lib/weapp/StorageController.react-native.js +6 -18
- package/package.json +1 -1
package/lib/weapp/ParseFile.js
CHANGED
|
@@ -2,14 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
6
|
-
|
|
7
5
|
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
8
6
|
|
|
9
7
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
10
8
|
|
|
11
|
-
var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
12
|
-
|
|
13
9
|
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
14
10
|
|
|
15
11
|
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
@@ -18,6 +14,26 @@ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stab
|
|
|
18
14
|
|
|
19
15
|
var _Object$keys2 = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
20
16
|
|
|
17
|
+
var _sliceInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
18
|
+
|
|
19
|
+
var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
|
|
20
|
+
|
|
21
|
+
var _Promise2 = require("@babel/runtime-corejs3/core-js-stable/promise");
|
|
22
|
+
|
|
23
|
+
var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
|
|
24
|
+
|
|
25
|
+
var _typeof3 = require("@babel/runtime-corejs3/helpers/typeof");
|
|
26
|
+
|
|
27
|
+
var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
28
|
+
|
|
29
|
+
var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
|
|
30
|
+
|
|
31
|
+
var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
|
|
32
|
+
|
|
33
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
34
|
+
|
|
35
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
36
|
+
|
|
21
37
|
_Object$defineProperty(exports, "__esModule", {
|
|
22
38
|
value: true
|
|
23
39
|
});
|
|
@@ -36,8 +52,6 @@ var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-st
|
|
|
36
52
|
|
|
37
53
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
|
|
38
54
|
|
|
39
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
40
|
-
|
|
41
55
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
42
56
|
|
|
43
57
|
var _slice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/slice"));
|
|
@@ -68,12 +82,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
68
82
|
|
|
69
83
|
function _objectSpread(target) {
|
|
70
84
|
for (var i = 1; i < arguments.length; i++) {
|
|
71
|
-
var
|
|
85
|
+
var _context10, _context11;
|
|
72
86
|
|
|
73
87
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
74
|
-
i % 2 ? _forEachInstanceProperty2(
|
|
88
|
+
i % 2 ? _forEachInstanceProperty2(_context10 = ownKeys(Object(source), !0)).call(_context10, function (key) {
|
|
75
89
|
(0, _defineProperty2.default)(target, key, source[key]);
|
|
76
|
-
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(
|
|
90
|
+
}) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(_context11 = ownKeys(Object(source))).call(_context11, function (key) {
|
|
77
91
|
_Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key));
|
|
78
92
|
});
|
|
79
93
|
}
|
|
@@ -81,6 +95,364 @@ function _objectSpread(target) {
|
|
|
81
95
|
return target;
|
|
82
96
|
}
|
|
83
97
|
|
|
98
|
+
function _regeneratorRuntime() {
|
|
99
|
+
"use strict";
|
|
100
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
101
|
+
|
|
102
|
+
_regeneratorRuntime = function () {
|
|
103
|
+
return exports;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var exports = {},
|
|
107
|
+
Op = Object.prototype,
|
|
108
|
+
hasOwn = Op.hasOwnProperty,
|
|
109
|
+
$Symbol = "function" == typeof _Symbol ? _Symbol : {},
|
|
110
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
111
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
112
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
113
|
+
|
|
114
|
+
function define(obj, key, value) {
|
|
115
|
+
return _Object$defineProperty(obj, key, {
|
|
116
|
+
value: value,
|
|
117
|
+
enumerable: !0,
|
|
118
|
+
configurable: !0,
|
|
119
|
+
writable: !0
|
|
120
|
+
}), obj[key];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
define({}, "");
|
|
125
|
+
} catch (err) {
|
|
126
|
+
define = function (obj, key, value) {
|
|
127
|
+
return obj[key] = value;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
132
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
133
|
+
generator = _Object$create(protoGenerator.prototype),
|
|
134
|
+
context = new Context(tryLocsList || []);
|
|
135
|
+
|
|
136
|
+
return generator._invoke = function (innerFn, self, context) {
|
|
137
|
+
var state = "suspendedStart";
|
|
138
|
+
return function (method, arg) {
|
|
139
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
140
|
+
|
|
141
|
+
if ("completed" === state) {
|
|
142
|
+
if ("throw" === method) throw arg;
|
|
143
|
+
return doneResult();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
for (context.method = method, context.arg = arg;;) {
|
|
147
|
+
var delegate = context.delegate;
|
|
148
|
+
|
|
149
|
+
if (delegate) {
|
|
150
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
151
|
+
|
|
152
|
+
if (delegateResult) {
|
|
153
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
154
|
+
return delegateResult;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
159
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
160
|
+
context.dispatchException(context.arg);
|
|
161
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
162
|
+
state = "executing";
|
|
163
|
+
var record = tryCatch(innerFn, self, context);
|
|
164
|
+
|
|
165
|
+
if ("normal" === record.type) {
|
|
166
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
167
|
+
return {
|
|
168
|
+
value: record.arg,
|
|
169
|
+
done: context.done
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}(innerFn, self, context), generator;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function tryCatch(fn, obj, arg) {
|
|
180
|
+
try {
|
|
181
|
+
return {
|
|
182
|
+
type: "normal",
|
|
183
|
+
arg: fn.call(obj, arg)
|
|
184
|
+
};
|
|
185
|
+
} catch (err) {
|
|
186
|
+
return {
|
|
187
|
+
type: "throw",
|
|
188
|
+
arg: err
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
exports.wrap = wrap;
|
|
194
|
+
var ContinueSentinel = {};
|
|
195
|
+
|
|
196
|
+
function Generator() {}
|
|
197
|
+
|
|
198
|
+
function GeneratorFunction() {}
|
|
199
|
+
|
|
200
|
+
function GeneratorFunctionPrototype() {}
|
|
201
|
+
|
|
202
|
+
var IteratorPrototype = {};
|
|
203
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
204
|
+
return this;
|
|
205
|
+
});
|
|
206
|
+
var getProto = _Object$getPrototypeOf,
|
|
207
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
208
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
209
|
+
|
|
210
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);
|
|
211
|
+
|
|
212
|
+
function defineIteratorMethods(prototype) {
|
|
213
|
+
var _context8;
|
|
214
|
+
|
|
215
|
+
_forEachInstanceProperty2(_context8 = ["next", "throw", "return"]).call(_context8, function (method) {
|
|
216
|
+
define(prototype, method, function (arg) {
|
|
217
|
+
return this._invoke(method, arg);
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
223
|
+
function invoke(method, arg, resolve, reject) {
|
|
224
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
225
|
+
|
|
226
|
+
if ("throw" !== record.type) {
|
|
227
|
+
var result = record.arg,
|
|
228
|
+
value = result.value;
|
|
229
|
+
return value && "object" == _typeof3(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
230
|
+
invoke("next", value, resolve, reject);
|
|
231
|
+
}, function (err) {
|
|
232
|
+
invoke("throw", err, resolve, reject);
|
|
233
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
234
|
+
result.value = unwrapped, resolve(result);
|
|
235
|
+
}, function (error) {
|
|
236
|
+
return invoke("throw", error, resolve, reject);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
reject(record.arg);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var previousPromise;
|
|
244
|
+
|
|
245
|
+
this._invoke = function (method, arg) {
|
|
246
|
+
function callInvokeWithMethodAndArg() {
|
|
247
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
248
|
+
invoke(method, arg, resolve, reject);
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
257
|
+
var method = delegate.iterator[context.method];
|
|
258
|
+
|
|
259
|
+
if (undefined === method) {
|
|
260
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
261
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
262
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return ContinueSentinel;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
269
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
270
|
+
var info = record.arg;
|
|
271
|
+
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);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function pushTryEntry(locs) {
|
|
275
|
+
var entry = {
|
|
276
|
+
tryLoc: locs[0]
|
|
277
|
+
};
|
|
278
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function resetTryEntry(entry) {
|
|
282
|
+
var record = entry.completion || {};
|
|
283
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function Context(tryLocsList) {
|
|
287
|
+
this.tryEntries = [{
|
|
288
|
+
tryLoc: "root"
|
|
289
|
+
}], _forEachInstanceProperty2(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function values(iterable) {
|
|
293
|
+
if (iterable) {
|
|
294
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
295
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
296
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
297
|
+
|
|
298
|
+
if (!isNaN(iterable.length)) {
|
|
299
|
+
var i = -1,
|
|
300
|
+
next = function next() {
|
|
301
|
+
for (; ++i < iterable.length;) {
|
|
302
|
+
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return next.value = undefined, next.done = !0, next;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
return next.next = next;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return {
|
|
313
|
+
next: doneResult
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
function doneResult() {
|
|
318
|
+
return {
|
|
319
|
+
value: undefined,
|
|
320
|
+
done: !0
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
325
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
326
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
327
|
+
}, exports.mark = function (genFun) {
|
|
328
|
+
return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun;
|
|
329
|
+
}, exports.awrap = function (arg) {
|
|
330
|
+
return {
|
|
331
|
+
__await: arg
|
|
332
|
+
};
|
|
333
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
334
|
+
return this;
|
|
335
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
336
|
+
void 0 === PromiseImpl && (PromiseImpl = _Promise2);
|
|
337
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
338
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
339
|
+
return result.done ? result.value : iter.next();
|
|
340
|
+
});
|
|
341
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
342
|
+
return this;
|
|
343
|
+
}), define(Gp, "toString", function () {
|
|
344
|
+
return "[object Generator]";
|
|
345
|
+
}), exports.keys = function (object) {
|
|
346
|
+
var keys = [];
|
|
347
|
+
|
|
348
|
+
for (var key in object) {
|
|
349
|
+
keys.push(key);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return _reverseInstanceProperty(keys).call(keys), function next() {
|
|
353
|
+
for (; keys.length;) {
|
|
354
|
+
var key = keys.pop();
|
|
355
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return next.done = !0, next;
|
|
359
|
+
};
|
|
360
|
+
}, exports.values = values, Context.prototype = {
|
|
361
|
+
constructor: Context,
|
|
362
|
+
reset: function (skipTempReset) {
|
|
363
|
+
var _context9;
|
|
364
|
+
|
|
365
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty2(_context9 = this.tryEntries).call(_context9, resetTryEntry), !skipTempReset) for (var name in this) {
|
|
366
|
+
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty2(name).call(name, 1)) && (this[name] = undefined);
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
stop: function () {
|
|
370
|
+
this.done = !0;
|
|
371
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
372
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
373
|
+
return this.rval;
|
|
374
|
+
},
|
|
375
|
+
dispatchException: function (exception) {
|
|
376
|
+
if (this.done) throw exception;
|
|
377
|
+
var context = this;
|
|
378
|
+
|
|
379
|
+
function handle(loc, caught) {
|
|
380
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
384
|
+
var entry = this.tryEntries[i],
|
|
385
|
+
record = entry.completion;
|
|
386
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
387
|
+
|
|
388
|
+
if (entry.tryLoc <= this.prev) {
|
|
389
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
390
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
391
|
+
|
|
392
|
+
if (hasCatch && hasFinally) {
|
|
393
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
394
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
395
|
+
} else if (hasCatch) {
|
|
396
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
397
|
+
} else {
|
|
398
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
399
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
abrupt: function (type, arg) {
|
|
405
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
406
|
+
var entry = this.tryEntries[i];
|
|
407
|
+
|
|
408
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
409
|
+
var finallyEntry = entry;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
415
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
416
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
417
|
+
},
|
|
418
|
+
complete: function (record, afterLoc) {
|
|
419
|
+
if ("throw" === record.type) throw record.arg;
|
|
420
|
+
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;
|
|
421
|
+
},
|
|
422
|
+
finish: function (finallyLoc) {
|
|
423
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
424
|
+
var entry = this.tryEntries[i];
|
|
425
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
catch: function (tryLoc) {
|
|
429
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
430
|
+
var entry = this.tryEntries[i];
|
|
431
|
+
|
|
432
|
+
if (entry.tryLoc === tryLoc) {
|
|
433
|
+
var record = entry.completion;
|
|
434
|
+
|
|
435
|
+
if ("throw" === record.type) {
|
|
436
|
+
var thrown = record.arg;
|
|
437
|
+
resetTryEntry(entry);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return thrown;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
throw new Error("illegal catch attempt");
|
|
445
|
+
},
|
|
446
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
447
|
+
return this.delegate = {
|
|
448
|
+
iterator: values(iterable),
|
|
449
|
+
resultName: resultName,
|
|
450
|
+
nextLoc: nextLoc
|
|
451
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
452
|
+
}
|
|
453
|
+
}, exports;
|
|
454
|
+
}
|
|
455
|
+
|
|
84
456
|
var ParseError = require('./ParseError').default;
|
|
85
457
|
|
|
86
458
|
var XHR = null;
|
|
@@ -251,11 +623,9 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
251
623
|
(0, _createClass2.default)(ParseFile, [{
|
|
252
624
|
key: "getData",
|
|
253
625
|
value: function () {
|
|
254
|
-
var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
255
|
-
var _this = this;
|
|
256
|
-
|
|
626
|
+
var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
257
627
|
var options, controller, result;
|
|
258
|
-
return
|
|
628
|
+
return _regeneratorRuntime().wrap(function (_context4) {
|
|
259
629
|
while (1) {
|
|
260
630
|
switch (_context4.prev = _context4.next) {
|
|
261
631
|
case 0:
|
|
@@ -277,7 +647,7 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
277
647
|
case 4:
|
|
278
648
|
options = {
|
|
279
649
|
requestTask: function (task) {
|
|
280
|
-
return
|
|
650
|
+
return this._requestTask = task;
|
|
281
651
|
}
|
|
282
652
|
};
|
|
283
653
|
controller = _CoreManager.default.getFileController();
|
|
@@ -544,13 +914,11 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
544
914
|
value: function (metadata
|
|
545
915
|
/*: any*/
|
|
546
916
|
) {
|
|
547
|
-
var _this4 = this;
|
|
548
|
-
|
|
549
917
|
if (metadata && (0, _typeof2.default)(metadata) === 'object') {
|
|
550
918
|
var _context5;
|
|
551
919
|
|
|
552
920
|
(0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
|
|
553
|
-
|
|
921
|
+
this.addMetadata(key, metadata[key]);
|
|
554
922
|
});
|
|
555
923
|
}
|
|
556
924
|
}
|
|
@@ -583,13 +951,11 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
583
951
|
value: function (tags
|
|
584
952
|
/*: any*/
|
|
585
953
|
) {
|
|
586
|
-
var _this5 = this;
|
|
587
|
-
|
|
588
954
|
if (tags && (0, _typeof2.default)(tags) === 'object') {
|
|
589
955
|
var _context6;
|
|
590
956
|
|
|
591
957
|
(0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
|
|
592
|
-
|
|
958
|
+
this.addTag(key, tags[key]);
|
|
593
959
|
});
|
|
594
960
|
}
|
|
595
961
|
}
|
|
@@ -651,7 +1017,7 @@ var ParseFile = /*#__PURE__*/function () {
|
|
|
651
1017
|
|
|
652
1018
|
var DefaultController = {
|
|
653
1019
|
saveFile: function () {
|
|
654
|
-
var _saveFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
1020
|
+
var _saveFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name
|
|
655
1021
|
/*: string*/
|
|
656
1022
|
, source
|
|
657
1023
|
/*: FileSource*/
|
|
@@ -660,7 +1026,7 @@ var DefaultController = {
|
|
|
660
1026
|
) {
|
|
661
1027
|
var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
|
|
662
1028
|
|
|
663
|
-
return
|
|
1029
|
+
return _regeneratorRuntime().wrap(function (_context7) {
|
|
664
1030
|
while (1) {
|
|
665
1031
|
switch (_context7.prev = _context7.next) {
|
|
666
1032
|
case 0:
|