datastore-api 4.0.3 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/datastore-api.cjs.development.js +208 -209
- package/dist/datastore-api.cjs.development.js.map +1 -1
- package/dist/datastore-api.cjs.production.min.js +1 -1
- package/dist/datastore-api.cjs.production.min.js.map +1 -1
- package/dist/datastore-api.esm.js +208 -209
- package/dist/datastore-api.esm.js.map +1 -1
- package/dist/lib/dstore-api.d.ts +1 -3
- package/package.json +96 -83
- package/src/lib/dstore-api.ts +6 -4
|
@@ -9,304 +9,304 @@ import promClient from 'prom-client';
|
|
|
9
9
|
|
|
10
10
|
function _regeneratorRuntime() {
|
|
11
11
|
_regeneratorRuntime = function () {
|
|
12
|
-
return
|
|
12
|
+
return exports;
|
|
13
13
|
};
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
t[e] = r.value;
|
|
14
|
+
var exports = {},
|
|
15
|
+
Op = Object.prototype,
|
|
16
|
+
hasOwn = Op.hasOwnProperty,
|
|
17
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
18
|
+
obj[key] = desc.value;
|
|
20
19
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function define(
|
|
26
|
-
return Object.defineProperty(
|
|
27
|
-
value:
|
|
20
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
21
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
22
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
23
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
24
|
+
function define(obj, key, value) {
|
|
25
|
+
return Object.defineProperty(obj, key, {
|
|
26
|
+
value: value,
|
|
28
27
|
enumerable: !0,
|
|
29
28
|
configurable: !0,
|
|
30
29
|
writable: !0
|
|
31
|
-
}),
|
|
30
|
+
}), obj[key];
|
|
32
31
|
}
|
|
33
32
|
try {
|
|
34
33
|
define({}, "");
|
|
35
|
-
} catch (
|
|
36
|
-
define = function (
|
|
37
|
-
return
|
|
34
|
+
} catch (err) {
|
|
35
|
+
define = function (obj, key, value) {
|
|
36
|
+
return obj[key] = value;
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
|
-
function wrap(
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
value: makeInvokeMethod(
|
|
46
|
-
}),
|
|
39
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
40
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
41
|
+
generator = Object.create(protoGenerator.prototype),
|
|
42
|
+
context = new Context(tryLocsList || []);
|
|
43
|
+
return defineProperty(generator, "_invoke", {
|
|
44
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
45
|
+
}), generator;
|
|
47
46
|
}
|
|
48
|
-
function tryCatch(
|
|
47
|
+
function tryCatch(fn, obj, arg) {
|
|
49
48
|
try {
|
|
50
49
|
return {
|
|
51
50
|
type: "normal",
|
|
52
|
-
arg:
|
|
51
|
+
arg: fn.call(obj, arg)
|
|
53
52
|
};
|
|
54
|
-
} catch (
|
|
53
|
+
} catch (err) {
|
|
55
54
|
return {
|
|
56
55
|
type: "throw",
|
|
57
|
-
arg:
|
|
56
|
+
arg: err
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
l = "suspendedYield",
|
|
64
|
-
f = "executing",
|
|
65
|
-
s = "completed",
|
|
66
|
-
y = {};
|
|
60
|
+
exports.wrap = wrap;
|
|
61
|
+
var ContinueSentinel = {};
|
|
67
62
|
function Generator() {}
|
|
68
63
|
function GeneratorFunction() {}
|
|
69
64
|
function GeneratorFunctionPrototype() {}
|
|
70
|
-
var
|
|
71
|
-
define(
|
|
65
|
+
var IteratorPrototype = {};
|
|
66
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
72
67
|
return this;
|
|
73
68
|
});
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
function defineIteratorMethods(
|
|
79
|
-
["next", "throw", "return"].forEach(function (
|
|
80
|
-
define(
|
|
81
|
-
return this._invoke(
|
|
69
|
+
var getProto = Object.getPrototypeOf,
|
|
70
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
71
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
72
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
73
|
+
function defineIteratorMethods(prototype) {
|
|
74
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
75
|
+
define(prototype, method, function (arg) {
|
|
76
|
+
return this._invoke(method, arg);
|
|
82
77
|
});
|
|
83
78
|
});
|
|
84
79
|
}
|
|
85
|
-
function AsyncIterator(
|
|
86
|
-
function invoke(
|
|
87
|
-
var
|
|
88
|
-
if ("throw" !==
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
return
|
|
92
|
-
invoke("next",
|
|
93
|
-
}, function (
|
|
94
|
-
invoke("throw",
|
|
95
|
-
}) :
|
|
96
|
-
|
|
97
|
-
}, function (
|
|
98
|
-
return invoke("throw",
|
|
80
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
81
|
+
function invoke(method, arg, resolve, reject) {
|
|
82
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
83
|
+
if ("throw" !== record.type) {
|
|
84
|
+
var result = record.arg,
|
|
85
|
+
value = result.value;
|
|
86
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
87
|
+
invoke("next", value, resolve, reject);
|
|
88
|
+
}, function (err) {
|
|
89
|
+
invoke("throw", err, resolve, reject);
|
|
90
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
91
|
+
result.value = unwrapped, resolve(result);
|
|
92
|
+
}, function (error) {
|
|
93
|
+
return invoke("throw", error, resolve, reject);
|
|
99
94
|
});
|
|
100
95
|
}
|
|
101
|
-
|
|
96
|
+
reject(record.arg);
|
|
102
97
|
}
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
value: function (
|
|
98
|
+
var previousPromise;
|
|
99
|
+
defineProperty(this, "_invoke", {
|
|
100
|
+
value: function (method, arg) {
|
|
106
101
|
function callInvokeWithMethodAndArg() {
|
|
107
|
-
return new
|
|
108
|
-
invoke(
|
|
102
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
103
|
+
invoke(method, arg, resolve, reject);
|
|
109
104
|
});
|
|
110
105
|
}
|
|
111
|
-
return
|
|
106
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
112
107
|
}
|
|
113
108
|
});
|
|
114
109
|
}
|
|
115
|
-
function makeInvokeMethod(
|
|
116
|
-
var
|
|
117
|
-
return function (
|
|
118
|
-
if (
|
|
119
|
-
if (
|
|
120
|
-
if ("throw" ===
|
|
121
|
-
return
|
|
122
|
-
value: t,
|
|
123
|
-
done: !0
|
|
124
|
-
};
|
|
110
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
111
|
+
var state = "suspendedStart";
|
|
112
|
+
return function (method, arg) {
|
|
113
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
114
|
+
if ("completed" === state) {
|
|
115
|
+
if ("throw" === method) throw arg;
|
|
116
|
+
return doneResult();
|
|
125
117
|
}
|
|
126
|
-
for (
|
|
127
|
-
var
|
|
128
|
-
if (
|
|
129
|
-
var
|
|
130
|
-
if (
|
|
131
|
-
if (
|
|
132
|
-
return
|
|
118
|
+
for (context.method = method, context.arg = arg;;) {
|
|
119
|
+
var delegate = context.delegate;
|
|
120
|
+
if (delegate) {
|
|
121
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
122
|
+
if (delegateResult) {
|
|
123
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
124
|
+
return delegateResult;
|
|
133
125
|
}
|
|
134
126
|
}
|
|
135
|
-
if ("next" ===
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
} else "return" ===
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
if ("normal" ===
|
|
142
|
-
if (
|
|
127
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
128
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
129
|
+
context.dispatchException(context.arg);
|
|
130
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
131
|
+
state = "executing";
|
|
132
|
+
var record = tryCatch(innerFn, self, context);
|
|
133
|
+
if ("normal" === record.type) {
|
|
134
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
143
135
|
return {
|
|
144
|
-
value:
|
|
145
|
-
done:
|
|
136
|
+
value: record.arg,
|
|
137
|
+
done: context.done
|
|
146
138
|
};
|
|
147
139
|
}
|
|
148
|
-
"throw" ===
|
|
140
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
149
141
|
}
|
|
150
142
|
};
|
|
151
143
|
}
|
|
152
|
-
function maybeInvokeDelegate(
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
if (
|
|
156
|
-
var
|
|
157
|
-
if ("throw" ===
|
|
158
|
-
var
|
|
159
|
-
return
|
|
144
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
145
|
+
var methodName = context.method,
|
|
146
|
+
method = delegate.iterator[methodName];
|
|
147
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
148
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
149
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
150
|
+
var info = record.arg;
|
|
151
|
+
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);
|
|
160
152
|
}
|
|
161
|
-
function pushTryEntry(
|
|
162
|
-
var
|
|
163
|
-
tryLoc:
|
|
153
|
+
function pushTryEntry(locs) {
|
|
154
|
+
var entry = {
|
|
155
|
+
tryLoc: locs[0]
|
|
164
156
|
};
|
|
165
|
-
1 in
|
|
157
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
166
158
|
}
|
|
167
|
-
function resetTryEntry(
|
|
168
|
-
var
|
|
169
|
-
|
|
159
|
+
function resetTryEntry(entry) {
|
|
160
|
+
var record = entry.completion || {};
|
|
161
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
170
162
|
}
|
|
171
|
-
function Context(
|
|
163
|
+
function Context(tryLocsList) {
|
|
172
164
|
this.tryEntries = [{
|
|
173
165
|
tryLoc: "root"
|
|
174
|
-
}],
|
|
166
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
175
167
|
}
|
|
176
|
-
function values(
|
|
177
|
-
if (
|
|
178
|
-
var
|
|
179
|
-
if (
|
|
180
|
-
if ("function" == typeof
|
|
181
|
-
if (!isNaN(
|
|
182
|
-
var
|
|
183
|
-
|
|
184
|
-
for (; ++
|
|
185
|
-
return next.value =
|
|
168
|
+
function values(iterable) {
|
|
169
|
+
if (iterable) {
|
|
170
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
171
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
172
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
173
|
+
if (!isNaN(iterable.length)) {
|
|
174
|
+
var i = -1,
|
|
175
|
+
next = function next() {
|
|
176
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
177
|
+
return next.value = undefined, next.done = !0, next;
|
|
186
178
|
};
|
|
187
|
-
return
|
|
179
|
+
return next.next = next;
|
|
188
180
|
}
|
|
189
181
|
}
|
|
190
|
-
|
|
182
|
+
return {
|
|
183
|
+
next: doneResult
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function doneResult() {
|
|
187
|
+
return {
|
|
188
|
+
value: undefined,
|
|
189
|
+
done: !0
|
|
190
|
+
};
|
|
191
191
|
}
|
|
192
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
192
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
193
193
|
value: GeneratorFunctionPrototype,
|
|
194
194
|
configurable: !0
|
|
195
|
-
}),
|
|
195
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
196
196
|
value: GeneratorFunction,
|
|
197
197
|
configurable: !0
|
|
198
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
199
|
-
var
|
|
200
|
-
return !!
|
|
201
|
-
},
|
|
202
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
203
|
-
},
|
|
198
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
199
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
200
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
201
|
+
}, exports.mark = function (genFun) {
|
|
202
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
203
|
+
}, exports.awrap = function (arg) {
|
|
204
204
|
return {
|
|
205
|
-
__await:
|
|
205
|
+
__await: arg
|
|
206
206
|
};
|
|
207
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
207
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
208
208
|
return this;
|
|
209
|
-
}),
|
|
210
|
-
void 0 ===
|
|
211
|
-
var
|
|
212
|
-
return
|
|
213
|
-
return
|
|
209
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
210
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
211
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
212
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
213
|
+
return result.done ? result.value : iter.next();
|
|
214
214
|
});
|
|
215
|
-
}, defineIteratorMethods(
|
|
215
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
216
216
|
return this;
|
|
217
|
-
}), define(
|
|
217
|
+
}), define(Gp, "toString", function () {
|
|
218
218
|
return "[object Generator]";
|
|
219
|
-
}),
|
|
220
|
-
var
|
|
221
|
-
|
|
222
|
-
for (var
|
|
223
|
-
return
|
|
224
|
-
for (;
|
|
225
|
-
var
|
|
226
|
-
if (
|
|
219
|
+
}), exports.keys = function (val) {
|
|
220
|
+
var object = Object(val),
|
|
221
|
+
keys = [];
|
|
222
|
+
for (var key in object) keys.push(key);
|
|
223
|
+
return keys.reverse(), function next() {
|
|
224
|
+
for (; keys.length;) {
|
|
225
|
+
var key = keys.pop();
|
|
226
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
227
227
|
}
|
|
228
228
|
return next.done = !0, next;
|
|
229
229
|
};
|
|
230
|
-
},
|
|
230
|
+
}, exports.values = values, Context.prototype = {
|
|
231
231
|
constructor: Context,
|
|
232
|
-
reset: function (
|
|
233
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
232
|
+
reset: function (skipTempReset) {
|
|
233
|
+
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) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
234
234
|
},
|
|
235
235
|
stop: function () {
|
|
236
236
|
this.done = !0;
|
|
237
|
-
var
|
|
238
|
-
if ("throw" ===
|
|
237
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
238
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
239
239
|
return this.rval;
|
|
240
240
|
},
|
|
241
|
-
dispatchException: function (
|
|
242
|
-
if (this.done) throw
|
|
243
|
-
var
|
|
244
|
-
function handle(
|
|
245
|
-
return
|
|
241
|
+
dispatchException: function (exception) {
|
|
242
|
+
if (this.done) throw exception;
|
|
243
|
+
var context = this;
|
|
244
|
+
function handle(loc, caught) {
|
|
245
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
246
246
|
}
|
|
247
|
-
for (var
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
if ("root" ===
|
|
251
|
-
if (
|
|
252
|
-
var
|
|
253
|
-
|
|
254
|
-
if (
|
|
255
|
-
if (this.prev <
|
|
256
|
-
if (this.prev <
|
|
257
|
-
} else if (
|
|
258
|
-
if (this.prev <
|
|
247
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
248
|
+
var entry = this.tryEntries[i],
|
|
249
|
+
record = entry.completion;
|
|
250
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
251
|
+
if (entry.tryLoc <= this.prev) {
|
|
252
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
253
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
254
|
+
if (hasCatch && hasFinally) {
|
|
255
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
256
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
257
|
+
} else if (hasCatch) {
|
|
258
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
259
259
|
} else {
|
|
260
|
-
if (!
|
|
261
|
-
if (this.prev <
|
|
260
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
261
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
},
|
|
266
|
-
abrupt: function (
|
|
267
|
-
for (var
|
|
268
|
-
var
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
266
|
+
abrupt: function (type, arg) {
|
|
267
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
268
|
+
var entry = this.tryEntries[i];
|
|
269
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
270
|
+
var finallyEntry = entry;
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
|
|
275
|
-
var
|
|
276
|
-
return
|
|
274
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
275
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
276
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
277
277
|
},
|
|
278
|
-
complete: function (
|
|
279
|
-
if ("throw" ===
|
|
280
|
-
return "break" ===
|
|
278
|
+
complete: function (record, afterLoc) {
|
|
279
|
+
if ("throw" === record.type) throw record.arg;
|
|
280
|
+
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;
|
|
281
281
|
},
|
|
282
|
-
finish: function (
|
|
283
|
-
for (var
|
|
284
|
-
var
|
|
285
|
-
if (
|
|
282
|
+
finish: function (finallyLoc) {
|
|
283
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
284
|
+
var entry = this.tryEntries[i];
|
|
285
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
|
-
catch: function (
|
|
289
|
-
for (var
|
|
290
|
-
var
|
|
291
|
-
if (
|
|
292
|
-
var
|
|
293
|
-
if ("throw" ===
|
|
294
|
-
var
|
|
295
|
-
resetTryEntry(
|
|
288
|
+
catch: function (tryLoc) {
|
|
289
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
290
|
+
var entry = this.tryEntries[i];
|
|
291
|
+
if (entry.tryLoc === tryLoc) {
|
|
292
|
+
var record = entry.completion;
|
|
293
|
+
if ("throw" === record.type) {
|
|
294
|
+
var thrown = record.arg;
|
|
295
|
+
resetTryEntry(entry);
|
|
296
296
|
}
|
|
297
|
-
return
|
|
297
|
+
return thrown;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
throw new Error("illegal catch attempt");
|
|
301
301
|
},
|
|
302
|
-
delegateYield: function (
|
|
302
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
303
303
|
return this.delegate = {
|
|
304
|
-
iterator: values(
|
|
305
|
-
resultName:
|
|
306
|
-
nextLoc:
|
|
307
|
-
}, "next" === this.method && (this.arg =
|
|
304
|
+
iterator: values(iterable),
|
|
305
|
+
resultName: resultName,
|
|
306
|
+
nextLoc: nextLoc
|
|
307
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
308
308
|
}
|
|
309
|
-
},
|
|
309
|
+
}, exports;
|
|
310
310
|
}
|
|
311
311
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
312
312
|
try {
|
|
@@ -397,11 +397,7 @@ function _construct(Parent, args, Class) {
|
|
|
397
397
|
return _construct.apply(null, arguments);
|
|
398
398
|
}
|
|
399
399
|
function _isNativeFunction(fn) {
|
|
400
|
-
|
|
401
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
402
|
-
} catch (e) {
|
|
403
|
-
return typeof fn === "function";
|
|
404
|
-
}
|
|
400
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
405
401
|
}
|
|
406
402
|
function _wrapNativeSuper(Class) {
|
|
407
403
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -471,6 +467,9 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
471
467
|
var debug = /*#__PURE__*/Debug('ds:api');
|
|
472
468
|
/** @ignore */
|
|
473
469
|
var transactionAsyncLocalStorage = /*#__PURE__*/new AsyncLocalStorage();
|
|
470
|
+
// for HMR
|
|
471
|
+
promClient.register.removeSingleMetric('dstore_requests_seconds');
|
|
472
|
+
promClient.register.removeSingleMetric('dstore_failures_total');
|
|
474
473
|
/** @ignore */
|
|
475
474
|
var metricHistogram = /*#__PURE__*/new promClient.Histogram({
|
|
476
475
|
name: 'dstore_requests_seconds',
|
|
@@ -1389,7 +1388,7 @@ var Dstore = /*#__PURE__*/function () {
|
|
|
1389
1388
|
var DstoreError = /*#__PURE__*/function (_Error) {
|
|
1390
1389
|
_inheritsLoose(DstoreError, _Error);
|
|
1391
1390
|
function DstoreError(message, originalError, extensions) {
|
|
1392
|
-
var _this2$stack, _originalError$stack, _this2$stack2;
|
|
1391
|
+
var _this2$stack, _originalError$stack, _originalError$stack$, _originalError$stack$2, _this2$stack2, _this2$stack2$split, _this2$stack2$split$s;
|
|
1393
1392
|
var _this2;
|
|
1394
1393
|
_this2 = _Error.call(this, message + ": " + (originalError == null ? void 0 : originalError.message)) || this;
|
|
1395
1394
|
// if no name provided, use the default. defineProperty ensures that it stays non-enumerable
|
|
@@ -1403,7 +1402,7 @@ var DstoreError = /*#__PURE__*/function (_Error) {
|
|
|
1403
1402
|
// metadata: Metadata { internalRepr: Map(0) {}, options: {} },
|
|
1404
1403
|
_this2.originalError = originalError;
|
|
1405
1404
|
_this2.extensions = _extends({}, extensions);
|
|
1406
|
-
_this2.stack = (((_this2$stack = _this2.stack) == null ? void 0 : _this2$stack.split('\n')[0]) || '') + '\n' + ((originalError == null
|
|
1405
|
+
_this2.stack = (((_this2$stack = _this2.stack) == null ? void 0 : _this2$stack.split('\n')[0]) || '') + '\n' + ((originalError == null ? void 0 : (_originalError$stack = originalError.stack) == null ? void 0 : (_originalError$stack$ = _originalError$stack.split('\n')) == null ? void 0 : (_originalError$stack$2 = _originalError$stack$.slice(1)) == null ? void 0 : _originalError$stack$2.join('\n')) || '') + '\n' + (((_this2$stack2 = _this2.stack) == null ? void 0 : (_this2$stack2$split = _this2$stack2.split('\n')) == null ? void 0 : (_this2$stack2$split$s = _this2$stack2$split.slice(1)) == null ? void 0 : _this2$stack2$split$s.join('\n')) || '');
|
|
1407
1406
|
// These are usually present on Datastore Errors
|
|
1408
1407
|
// logger.error({ err: originalError, extensions }, message);
|
|
1409
1408
|
return _this2;
|