parse 4.0.0-alpha.6 → 4.0.0-alpha.8
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 +3991 -6551
- package/dist/parse.min.js +7 -6
- package/dist/parse.weapp.js +3152 -6482
- package/dist/parse.weapp.min.js +7 -6
- package/lib/browser/Analytics.js +4 -11
- package/lib/browser/AnonymousUtils.js +2 -9
- package/lib/browser/Cloud.js +4 -11
- package/lib/browser/CloudCode.js +0 -1
- package/lib/browser/CoreManager.js +3 -10
- package/lib/browser/EventEmitter.js +0 -7
- package/lib/browser/EventuallyQueue.js +282 -668
- package/lib/browser/FacebookUtils.js +2 -9
- package/lib/browser/InstallationController.js +0 -7
- package/lib/browser/LiveQueryClient.js +35 -26
- package/lib/browser/LiveQuerySubscription.js +5 -4
- package/lib/browser/LocalDatastore.js +472 -864
- package/lib/browser/LocalDatastoreController.js +161 -547
- package/lib/browser/LocalDatastoreController.react-native.js +156 -537
- package/lib/browser/LocalDatastoreUtils.js +2 -9
- package/lib/browser/ObjectStateMutations.js +25 -25
- package/lib/browser/OfflineQuery.js +31 -33
- package/lib/browser/Parse.js +4 -13
- package/lib/browser/ParseACL.js +9 -16
- package/lib/browser/ParseCLP.js +46 -48
- package/lib/browser/ParseConfig.js +6 -13
- package/lib/browser/ParseError.js +2 -11
- package/lib/browser/ParseFile.js +107 -482
- package/lib/browser/ParseGeoPoint.js +4 -11
- package/lib/browser/ParseHooks.js +2 -2
- package/lib/browser/ParseInstallation.js +2 -2
- package/lib/browser/ParseLiveQuery.js +104 -480
- package/lib/browser/ParseObject.js +598 -958
- package/lib/browser/ParseOp.js +11 -11
- package/lib/browser/ParsePolygon.js +5 -12
- package/lib/browser/ParseQuery.js +365 -758
- package/lib/browser/ParseRelation.js +2 -9
- package/lib/browser/ParseRole.js +2 -2
- package/lib/browser/ParseSchema.js +2 -9
- package/lib/browser/ParseSession.js +2 -2
- package/lib/browser/ParseUser.js +221 -607
- package/lib/browser/Push.js +2 -9
- package/lib/browser/RESTController.js +12 -19
- package/lib/browser/SingleInstanceStateController.js +4 -11
- 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 +8 -15
- package/lib/browser/arrayContainsObject.js +2 -9
- package/lib/browser/canBeSerialized.js +2 -9
- package/lib/browser/decode.js +4 -11
- package/lib/browser/encode.js +8 -15
- package/lib/browser/equals.js +4 -13
- package/lib/browser/escape.js +0 -7
- package/lib/browser/isRevocableSession.js +2 -9
- package/lib/browser/parseDate.js +2 -9
- package/lib/browser/promiseUtils.js +4 -4
- package/lib/browser/unique.js +4 -11
- package/lib/browser/unsavedChildren.js +6 -13
- package/lib/browser/uuid.js +5 -1
- package/lib/node/Analytics.js +0 -7
- package/lib/node/AnonymousUtils.js +0 -7
- package/lib/node/Cloud.js +0 -7
- package/lib/node/CloudCode.js +0 -1
- 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 +18 -17
- package/lib/node/LiveQuerySubscription.js +2 -11
- 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/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 +7 -12
- 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 +45 -34
- package/lib/node/ParseOp.js +0 -7
- package/lib/node/ParsePolygon.js +0 -7
- package/lib/node/ParseQuery.js +3 -18
- 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/node/uuid.js +7 -1
- package/lib/react-native/CoreManager.js +2 -2
- package/lib/react-native/EventuallyQueue.js +169 -676
- package/lib/react-native/LiveQueryClient.js +16 -50
- package/lib/react-native/LiveQuerySubscription.js +3 -2
- 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 +17 -63
- 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/react-native/uuid.js +5 -1
- package/lib/weapp/Analytics.js +4 -11
- package/lib/weapp/AnonymousUtils.js +2 -9
- package/lib/weapp/Cloud.js +4 -11
- package/lib/weapp/CloudCode.js +0 -1
- package/lib/weapp/CoreManager.js +3 -10
- package/lib/weapp/EventEmitter.js +0 -7
- package/lib/weapp/EventuallyQueue.js +282 -668
- package/lib/weapp/FacebookUtils.js +2 -9
- package/lib/weapp/InstallationController.js +0 -7
- package/lib/weapp/LiveQueryClient.js +35 -26
- package/lib/weapp/LiveQuerySubscription.js +5 -4
- package/lib/weapp/LocalDatastore.js +472 -864
- package/lib/weapp/LocalDatastoreController.js +161 -547
- package/lib/weapp/LocalDatastoreController.react-native.js +156 -537
- package/lib/weapp/LocalDatastoreUtils.js +2 -9
- package/lib/weapp/ObjectStateMutations.js +25 -25
- package/lib/weapp/OfflineQuery.js +31 -33
- package/lib/weapp/Parse.js +4 -13
- package/lib/weapp/ParseACL.js +9 -16
- package/lib/weapp/ParseCLP.js +46 -48
- package/lib/weapp/ParseConfig.js +6 -13
- package/lib/weapp/ParseError.js +2 -11
- package/lib/weapp/ParseFile.js +107 -482
- package/lib/weapp/ParseGeoPoint.js +4 -11
- package/lib/weapp/ParseHooks.js +2 -2
- package/lib/weapp/ParseInstallation.js +2 -2
- package/lib/weapp/ParseLiveQuery.js +104 -480
- package/lib/weapp/ParseObject.js +598 -958
- package/lib/weapp/ParseOp.js +11 -11
- package/lib/weapp/ParsePolygon.js +5 -12
- package/lib/weapp/ParseQuery.js +365 -758
- package/lib/weapp/ParseRelation.js +2 -9
- package/lib/weapp/ParseRole.js +2 -2
- package/lib/weapp/ParseSchema.js +2 -9
- package/lib/weapp/ParseSession.js +2 -2
- package/lib/weapp/ParseUser.js +221 -607
- package/lib/weapp/Push.js +2 -9
- package/lib/weapp/RESTController.js +12 -19
- package/lib/weapp/SingleInstanceStateController.js +4 -11
- 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 +8 -15
- package/lib/weapp/arrayContainsObject.js +2 -9
- package/lib/weapp/canBeSerialized.js +2 -9
- package/lib/weapp/decode.js +4 -11
- package/lib/weapp/encode.js +8 -15
- package/lib/weapp/equals.js +4 -13
- package/lib/weapp/escape.js +0 -7
- package/lib/weapp/isRevocableSession.js +2 -9
- package/lib/weapp/parseDate.js +2 -9
- package/lib/weapp/promiseUtils.js +4 -4
- package/lib/weapp/unique.js +4 -11
- package/lib/weapp/unsavedChildren.js +6 -13
- package/lib/weapp/uuid.js +2 -0
- package/package.json +24 -24
- package/PATENTS +0 -37
|
@@ -1,40 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _Array$isArray = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
6
|
-
|
|
7
|
-
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
8
|
-
|
|
9
|
-
var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
10
|
-
|
|
11
3
|
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
12
4
|
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var _Promise2 = require("@babel/runtime-corejs3/core-js-stable/promise");
|
|
16
|
-
|
|
17
|
-
var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
|
|
18
|
-
|
|
19
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
5
|
+
var _Array$from = require("@babel/runtime-corejs3/core-js-stable/array/from");
|
|
20
6
|
|
|
21
|
-
var
|
|
7
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
22
8
|
|
|
23
|
-
var
|
|
9
|
+
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
24
10
|
|
|
25
|
-
var
|
|
11
|
+
var _Array$isArray = require("@babel/runtime-corejs3/core-js-stable/array/is-array");
|
|
26
12
|
|
|
27
|
-
var
|
|
13
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
28
14
|
|
|
29
|
-
var
|
|
15
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
30
16
|
|
|
31
|
-
var
|
|
17
|
+
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
32
18
|
|
|
33
19
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
34
20
|
|
|
35
|
-
var
|
|
21
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
36
22
|
|
|
37
|
-
var
|
|
23
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
38
24
|
|
|
39
25
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
40
26
|
|
|
@@ -100,12 +86,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
100
86
|
}
|
|
101
87
|
|
|
102
88
|
function _unsupportedIterableToArray(o, minLen) {
|
|
103
|
-
var
|
|
89
|
+
var _context7;
|
|
104
90
|
|
|
105
91
|
if (!o) return;
|
|
106
92
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
107
93
|
|
|
108
|
-
var n = _sliceInstanceProperty(
|
|
94
|
+
var n = _sliceInstanceProperty(_context7 = Object.prototype.toString.call(o)).call(_context7, 8, -1);
|
|
109
95
|
|
|
110
96
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
111
97
|
if (n === "Map" || n === "Set") return _Array$from(o);
|
|
@@ -115,409 +101,47 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
115
101
|
function _arrayLikeToArray(arr, len) {
|
|
116
102
|
if (len == null || len > arr.length) len = arr.length;
|
|
117
103
|
|
|
118
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
119
|
-
arr2[i] = arr[i];
|
|
120
|
-
}
|
|
104
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
121
105
|
|
|
122
106
|
return arr2;
|
|
123
107
|
}
|
|
124
108
|
|
|
125
|
-
function _regeneratorRuntime() {
|
|
126
|
-
"use strict";
|
|
127
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
128
|
-
|
|
129
|
-
_regeneratorRuntime = function () {
|
|
130
|
-
return exports;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
var exports = {},
|
|
134
|
-
Op = Object.prototype,
|
|
135
|
-
hasOwn = Op.hasOwnProperty,
|
|
136
|
-
$Symbol = "function" == typeof _Symbol ? _Symbol : {},
|
|
137
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
138
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
139
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
140
|
-
|
|
141
|
-
function define(obj, key, value) {
|
|
142
|
-
return _Object$defineProperty(obj, key, {
|
|
143
|
-
value: value,
|
|
144
|
-
enumerable: !0,
|
|
145
|
-
configurable: !0,
|
|
146
|
-
writable: !0
|
|
147
|
-
}), obj[key];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
try {
|
|
151
|
-
define({}, "");
|
|
152
|
-
} catch (err) {
|
|
153
|
-
define = function (obj, key, value) {
|
|
154
|
-
return obj[key] = value;
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
159
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
160
|
-
generator = _Object$create(protoGenerator.prototype),
|
|
161
|
-
context = new Context(tryLocsList || []);
|
|
162
|
-
|
|
163
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
164
|
-
var state = "suspendedStart";
|
|
165
|
-
return function (method, arg) {
|
|
166
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
167
|
-
|
|
168
|
-
if ("completed" === state) {
|
|
169
|
-
if ("throw" === method) throw arg;
|
|
170
|
-
return doneResult();
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
for (context.method = method, context.arg = arg;;) {
|
|
174
|
-
var delegate = context.delegate;
|
|
175
|
-
|
|
176
|
-
if (delegate) {
|
|
177
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
178
|
-
|
|
179
|
-
if (delegateResult) {
|
|
180
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
181
|
-
return delegateResult;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
186
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
187
|
-
context.dispatchException(context.arg);
|
|
188
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
189
|
-
state = "executing";
|
|
190
|
-
var record = tryCatch(innerFn, self, context);
|
|
191
|
-
|
|
192
|
-
if ("normal" === record.type) {
|
|
193
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
194
|
-
return {
|
|
195
|
-
value: record.arg,
|
|
196
|
-
done: context.done
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
}(innerFn, self, context), generator;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
function tryCatch(fn, obj, arg) {
|
|
207
|
-
try {
|
|
208
|
-
return {
|
|
209
|
-
type: "normal",
|
|
210
|
-
arg: fn.call(obj, arg)
|
|
211
|
-
};
|
|
212
|
-
} catch (err) {
|
|
213
|
-
return {
|
|
214
|
-
type: "throw",
|
|
215
|
-
arg: err
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
exports.wrap = wrap;
|
|
221
|
-
var ContinueSentinel = {};
|
|
222
|
-
|
|
223
|
-
function Generator() {}
|
|
224
|
-
|
|
225
|
-
function GeneratorFunction() {}
|
|
226
|
-
|
|
227
|
-
function GeneratorFunctionPrototype() {}
|
|
228
|
-
|
|
229
|
-
var IteratorPrototype = {};
|
|
230
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
231
|
-
return this;
|
|
232
|
-
});
|
|
233
|
-
var getProto = _Object$getPrototypeOf,
|
|
234
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
235
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
236
|
-
|
|
237
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);
|
|
238
|
-
|
|
239
|
-
function defineIteratorMethods(prototype) {
|
|
240
|
-
var _context7;
|
|
241
|
-
|
|
242
|
-
_forEachInstanceProperty(_context7 = ["next", "throw", "return"]).call(_context7, function (method) {
|
|
243
|
-
define(prototype, method, function (arg) {
|
|
244
|
-
return this._invoke(method, arg);
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
250
|
-
function invoke(method, arg, resolve, reject) {
|
|
251
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
252
|
-
|
|
253
|
-
if ("throw" !== record.type) {
|
|
254
|
-
var result = record.arg,
|
|
255
|
-
value = result.value;
|
|
256
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
257
|
-
invoke("next", value, resolve, reject);
|
|
258
|
-
}, function (err) {
|
|
259
|
-
invoke("throw", err, resolve, reject);
|
|
260
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
261
|
-
result.value = unwrapped, resolve(result);
|
|
262
|
-
}, function (error) {
|
|
263
|
-
return invoke("throw", error, resolve, reject);
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
reject(record.arg);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
var previousPromise;
|
|
271
|
-
|
|
272
|
-
this._invoke = function (method, arg) {
|
|
273
|
-
function callInvokeWithMethodAndArg() {
|
|
274
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
275
|
-
invoke(method, arg, resolve, reject);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
284
|
-
var method = delegate.iterator[context.method];
|
|
285
|
-
|
|
286
|
-
if (undefined === method) {
|
|
287
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
288
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
289
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return ContinueSentinel;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
296
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
297
|
-
var info = record.arg;
|
|
298
|
-
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);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function pushTryEntry(locs) {
|
|
302
|
-
var entry = {
|
|
303
|
-
tryLoc: locs[0]
|
|
304
|
-
};
|
|
305
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
function resetTryEntry(entry) {
|
|
309
|
-
var record = entry.completion || {};
|
|
310
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
function Context(tryLocsList) {
|
|
314
|
-
this.tryEntries = [{
|
|
315
|
-
tryLoc: "root"
|
|
316
|
-
}], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
function values(iterable) {
|
|
320
|
-
if (iterable) {
|
|
321
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
322
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
323
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
324
|
-
|
|
325
|
-
if (!isNaN(iterable.length)) {
|
|
326
|
-
var i = -1,
|
|
327
|
-
next = function next() {
|
|
328
|
-
for (; ++i < iterable.length;) {
|
|
329
|
-
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
return next.value = undefined, next.done = !0, next;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
return next.next = next;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
return {
|
|
340
|
-
next: doneResult
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function doneResult() {
|
|
345
|
-
return {
|
|
346
|
-
value: undefined,
|
|
347
|
-
done: !0
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
352
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
353
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
354
|
-
}, exports.mark = function (genFun) {
|
|
355
|
-
return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun;
|
|
356
|
-
}, exports.awrap = function (arg) {
|
|
357
|
-
return {
|
|
358
|
-
__await: arg
|
|
359
|
-
};
|
|
360
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
361
|
-
return this;
|
|
362
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
363
|
-
void 0 === PromiseImpl && (PromiseImpl = _Promise2);
|
|
364
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
365
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
366
|
-
return result.done ? result.value : iter.next();
|
|
367
|
-
});
|
|
368
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
369
|
-
return this;
|
|
370
|
-
}), define(Gp, "toString", function () {
|
|
371
|
-
return "[object Generator]";
|
|
372
|
-
}), exports.keys = function (object) {
|
|
373
|
-
var keys = [];
|
|
374
|
-
|
|
375
|
-
for (var key in object) {
|
|
376
|
-
keys.push(key);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return _reverseInstanceProperty(keys).call(keys), function next() {
|
|
380
|
-
for (; keys.length;) {
|
|
381
|
-
var key = keys.pop();
|
|
382
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return next.done = !0, next;
|
|
386
|
-
};
|
|
387
|
-
}, exports.values = values, Context.prototype = {
|
|
388
|
-
constructor: Context,
|
|
389
|
-
reset: function (skipTempReset) {
|
|
390
|
-
var _context8;
|
|
391
|
-
|
|
392
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context8 = this.tryEntries).call(_context8, resetTryEntry), !skipTempReset) for (var name in this) {
|
|
393
|
-
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
stop: function () {
|
|
397
|
-
this.done = !0;
|
|
398
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
399
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
400
|
-
return this.rval;
|
|
401
|
-
},
|
|
402
|
-
dispatchException: function (exception) {
|
|
403
|
-
if (this.done) throw exception;
|
|
404
|
-
var context = this;
|
|
405
|
-
|
|
406
|
-
function handle(loc, caught) {
|
|
407
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
411
|
-
var entry = this.tryEntries[i],
|
|
412
|
-
record = entry.completion;
|
|
413
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
414
|
-
|
|
415
|
-
if (entry.tryLoc <= this.prev) {
|
|
416
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
417
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
418
|
-
|
|
419
|
-
if (hasCatch && hasFinally) {
|
|
420
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
421
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
422
|
-
} else if (hasCatch) {
|
|
423
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
424
|
-
} else {
|
|
425
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
426
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
abrupt: function (type, arg) {
|
|
432
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
433
|
-
var entry = this.tryEntries[i];
|
|
434
|
-
|
|
435
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
436
|
-
var finallyEntry = entry;
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
442
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
443
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
444
|
-
},
|
|
445
|
-
complete: function (record, afterLoc) {
|
|
446
|
-
if ("throw" === record.type) throw record.arg;
|
|
447
|
-
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;
|
|
448
|
-
},
|
|
449
|
-
finish: function (finallyLoc) {
|
|
450
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
451
|
-
var entry = this.tryEntries[i];
|
|
452
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
catch: function (tryLoc) {
|
|
456
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
457
|
-
var entry = this.tryEntries[i];
|
|
458
|
-
|
|
459
|
-
if (entry.tryLoc === tryLoc) {
|
|
460
|
-
var record = entry.completion;
|
|
461
|
-
|
|
462
|
-
if ("throw" === record.type) {
|
|
463
|
-
var thrown = record.arg;
|
|
464
|
-
resetTryEntry(entry);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
return thrown;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
throw new Error("illegal catch attempt");
|
|
472
|
-
},
|
|
473
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
474
|
-
return this.delegate = {
|
|
475
|
-
iterator: values(iterable),
|
|
476
|
-
resultName: resultName,
|
|
477
|
-
nextLoc: nextLoc
|
|
478
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
479
|
-
}
|
|
480
|
-
}, exports;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
109
|
var LocalDatastoreController = {
|
|
484
110
|
fromPinWithName: function (name
|
|
485
111
|
/*: string*/
|
|
486
112
|
)
|
|
487
113
|
/*: Array<Object>*/
|
|
488
114
|
{
|
|
489
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
115
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
490
116
|
var values, objects;
|
|
491
|
-
return
|
|
492
|
-
while (1) {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}
|
|
117
|
+
return _regenerator.default.wrap(function (_context) {
|
|
118
|
+
while (1) switch (_context.prev = _context.next) {
|
|
119
|
+
case 0:
|
|
120
|
+
_context.next = 2;
|
|
121
|
+
return _Storage.default.getItemAsync(name);
|
|
122
|
+
|
|
123
|
+
case 2:
|
|
124
|
+
values = _context.sent;
|
|
125
|
+
|
|
126
|
+
if (values) {
|
|
127
|
+
_context.next = 5;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
505
130
|
|
|
506
|
-
|
|
131
|
+
return _context.abrupt("return", []);
|
|
507
132
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
133
|
+
case 5:
|
|
134
|
+
objects = JSON.parse(values);
|
|
135
|
+
return _context.abrupt("return", objects);
|
|
511
136
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
137
|
+
case 7:
|
|
138
|
+
case "end":
|
|
139
|
+
return _context.stop();
|
|
516
140
|
}
|
|
517
141
|
}, _callee);
|
|
518
142
|
}))();
|
|
519
143
|
},
|
|
520
|
-
pinWithName: function
|
|
144
|
+
pinWithName: function (name
|
|
521
145
|
/*: string*/
|
|
522
146
|
, value
|
|
523
147
|
/*: any*/
|
|
@@ -525,176 +149,166 @@ var LocalDatastoreController = {
|
|
|
525
149
|
var values = (0, _stringify.default)(value);
|
|
526
150
|
return _Storage.default.setItemAsync(name, values);
|
|
527
151
|
},
|
|
528
|
-
unPinWithName: function
|
|
152
|
+
unPinWithName: function (name
|
|
529
153
|
/*: string*/
|
|
530
154
|
) {
|
|
531
155
|
return _Storage.default.removeItemAsync(name);
|
|
532
156
|
},
|
|
533
|
-
getAllContents: function
|
|
157
|
+
getAllContents: function ()
|
|
534
158
|
/*: Object*/
|
|
535
159
|
{
|
|
536
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
160
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
537
161
|
var keys;
|
|
538
|
-
return
|
|
539
|
-
while (1) {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
var
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
_context2.next = 8;
|
|
562
|
-
break;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
_context2.next = 6;
|
|
566
|
-
return _Storage.default.getItemAsync(key);
|
|
567
|
-
|
|
568
|
-
case 6:
|
|
569
|
-
value = _context2.sent;
|
|
570
|
-
|
|
571
|
-
try {
|
|
572
|
-
LDS[key] = JSON.parse(value);
|
|
573
|
-
} catch (error) {
|
|
574
|
-
console.error('Error getAllContents: ', error);
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
case 8:
|
|
578
|
-
return _context2.abrupt("return", LDS);
|
|
579
|
-
|
|
580
|
-
case 9:
|
|
581
|
-
case "end":
|
|
582
|
-
return _context2.stop();
|
|
162
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
163
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
164
|
+
case 0:
|
|
165
|
+
_context3.next = 2;
|
|
166
|
+
return _Storage.default.getAllKeysAsync();
|
|
167
|
+
|
|
168
|
+
case 2:
|
|
169
|
+
keys = _context3.sent;
|
|
170
|
+
return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
|
|
171
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(previousPromise, key) {
|
|
172
|
+
var LDS, value;
|
|
173
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
174
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
175
|
+
case 0:
|
|
176
|
+
_context2.next = 2;
|
|
177
|
+
return previousPromise;
|
|
178
|
+
|
|
179
|
+
case 2:
|
|
180
|
+
LDS = _context2.sent;
|
|
181
|
+
|
|
182
|
+
if (!(0, _LocalDatastoreUtils.isLocalDatastoreKey)(key)) {
|
|
183
|
+
_context2.next = 8;
|
|
184
|
+
break;
|
|
583
185
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
186
|
+
|
|
187
|
+
_context2.next = 6;
|
|
188
|
+
return _Storage.default.getItemAsync(key);
|
|
189
|
+
|
|
190
|
+
case 6:
|
|
191
|
+
value = _context2.sent;
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
LDS[key] = JSON.parse(value);
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.error('Error getAllContents: ', error);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
case 8:
|
|
200
|
+
return _context2.abrupt("return", LDS);
|
|
201
|
+
|
|
202
|
+
case 9:
|
|
203
|
+
case "end":
|
|
204
|
+
return _context2.stop();
|
|
205
|
+
}
|
|
206
|
+
}, _callee2);
|
|
207
|
+
}));
|
|
208
|
+
|
|
209
|
+
return function () {
|
|
210
|
+
return _ref.apply(this, arguments);
|
|
211
|
+
};
|
|
212
|
+
}(), _promise.default.resolve({})));
|
|
213
|
+
|
|
214
|
+
case 4:
|
|
215
|
+
case "end":
|
|
216
|
+
return _context3.stop();
|
|
597
217
|
}
|
|
598
218
|
}, _callee3);
|
|
599
219
|
}))();
|
|
600
220
|
},
|
|
601
221
|
// Used for testing
|
|
602
|
-
getRawStorage: function
|
|
222
|
+
getRawStorage: function ()
|
|
603
223
|
/*: Object*/
|
|
604
224
|
{
|
|
605
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
225
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
606
226
|
var keys;
|
|
607
|
-
return
|
|
608
|
-
while (1) {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
var
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
case 4:
|
|
650
|
-
case "end":
|
|
651
|
-
return _context5.stop();
|
|
652
|
-
}
|
|
227
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
228
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
229
|
+
case 0:
|
|
230
|
+
_context5.next = 2;
|
|
231
|
+
return _Storage.default.getAllKeysAsync();
|
|
232
|
+
|
|
233
|
+
case 2:
|
|
234
|
+
keys = _context5.sent;
|
|
235
|
+
return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
|
|
236
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(previousPromise, key) {
|
|
237
|
+
var LDS, value;
|
|
238
|
+
return _regenerator.default.wrap(function (_context4) {
|
|
239
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
240
|
+
case 0:
|
|
241
|
+
_context4.next = 2;
|
|
242
|
+
return previousPromise;
|
|
243
|
+
|
|
244
|
+
case 2:
|
|
245
|
+
LDS = _context4.sent;
|
|
246
|
+
_context4.next = 5;
|
|
247
|
+
return _Storage.default.getItemAsync(key);
|
|
248
|
+
|
|
249
|
+
case 5:
|
|
250
|
+
value = _context4.sent;
|
|
251
|
+
LDS[key] = value;
|
|
252
|
+
return _context4.abrupt("return", LDS);
|
|
253
|
+
|
|
254
|
+
case 8:
|
|
255
|
+
case "end":
|
|
256
|
+
return _context4.stop();
|
|
257
|
+
}
|
|
258
|
+
}, _callee4);
|
|
259
|
+
}));
|
|
260
|
+
|
|
261
|
+
return function () {
|
|
262
|
+
return _ref2.apply(this, arguments);
|
|
263
|
+
};
|
|
264
|
+
}(), _promise.default.resolve({})));
|
|
265
|
+
|
|
266
|
+
case 4:
|
|
267
|
+
case "end":
|
|
268
|
+
return _context5.stop();
|
|
653
269
|
}
|
|
654
270
|
}, _callee5);
|
|
655
271
|
}))();
|
|
656
272
|
},
|
|
657
|
-
clear: function
|
|
273
|
+
clear: function ()
|
|
658
274
|
/*: Promise*/
|
|
659
275
|
{
|
|
660
276
|
var _this = this;
|
|
661
277
|
|
|
662
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/
|
|
278
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
663
279
|
var keys, toRemove, _iterator, _step, key, promises;
|
|
664
280
|
|
|
665
|
-
return
|
|
666
|
-
while (1) {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
return _Storage.default.getAllKeysAsync();
|
|
281
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
282
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
283
|
+
case 0:
|
|
284
|
+
_context6.next = 2;
|
|
285
|
+
return _Storage.default.getAllKeysAsync();
|
|
671
286
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
287
|
+
case 2:
|
|
288
|
+
keys = _context6.sent;
|
|
289
|
+
toRemove = [];
|
|
290
|
+
_iterator = _createForOfIteratorHelper(keys);
|
|
676
291
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
292
|
+
try {
|
|
293
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
294
|
+
key = _step.value;
|
|
680
295
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
296
|
+
if ((0, _LocalDatastoreUtils.isLocalDatastoreKey)(key)) {
|
|
297
|
+
toRemove.push(key);
|
|
684
298
|
}
|
|
685
|
-
} catch (err) {
|
|
686
|
-
_iterator.e(err);
|
|
687
|
-
} finally {
|
|
688
|
-
_iterator.f();
|
|
689
299
|
}
|
|
300
|
+
} catch (err) {
|
|
301
|
+
_iterator.e(err);
|
|
302
|
+
} finally {
|
|
303
|
+
_iterator.f();
|
|
304
|
+
}
|
|
690
305
|
|
|
691
|
-
|
|
692
|
-
|
|
306
|
+
promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
|
|
307
|
+
return _context6.abrupt("return", _promise.default.all(promises));
|
|
693
308
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
309
|
+
case 8:
|
|
310
|
+
case "end":
|
|
311
|
+
return _context6.stop();
|
|
698
312
|
}
|
|
699
313
|
}, _callee6);
|
|
700
314
|
}))();
|