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.
@@ -9,304 +9,304 @@ import promClient from 'prom-client';
9
9
 
10
10
  function _regeneratorRuntime() {
11
11
  _regeneratorRuntime = function () {
12
- return e;
12
+ return exports;
13
13
  };
14
- var t,
15
- e = {},
16
- r = Object.prototype,
17
- n = r.hasOwnProperty,
18
- o = Object.defineProperty || function (t, e, r) {
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
- i = "function" == typeof Symbol ? Symbol : {},
22
- a = i.iterator || "@@iterator",
23
- c = i.asyncIterator || "@@asyncIterator",
24
- u = i.toStringTag || "@@toStringTag";
25
- function define(t, e, r) {
26
- return Object.defineProperty(t, e, {
27
- value: r,
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
- }), t[e];
30
+ }), obj[key];
32
31
  }
33
32
  try {
34
33
  define({}, "");
35
- } catch (t) {
36
- define = function (t, e, r) {
37
- return t[e] = r;
34
+ } catch (err) {
35
+ define = function (obj, key, value) {
36
+ return obj[key] = value;
38
37
  };
39
38
  }
40
- function wrap(t, e, r, n) {
41
- var i = e && e.prototype instanceof Generator ? e : Generator,
42
- a = Object.create(i.prototype),
43
- c = new Context(n || []);
44
- return o(a, "_invoke", {
45
- value: makeInvokeMethod(t, r, c)
46
- }), a;
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(t, e, r) {
47
+ function tryCatch(fn, obj, arg) {
49
48
  try {
50
49
  return {
51
50
  type: "normal",
52
- arg: t.call(e, r)
51
+ arg: fn.call(obj, arg)
53
52
  };
54
- } catch (t) {
53
+ } catch (err) {
55
54
  return {
56
55
  type: "throw",
57
- arg: t
56
+ arg: err
58
57
  };
59
58
  }
60
59
  }
61
- e.wrap = wrap;
62
- var h = "suspendedStart",
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 p = {};
71
- define(p, a, function () {
65
+ var IteratorPrototype = {};
66
+ define(IteratorPrototype, iteratorSymbol, function () {
72
67
  return this;
73
68
  });
74
- var d = Object.getPrototypeOf,
75
- v = d && d(d(values([])));
76
- v && v !== r && n.call(v, a) && (p = v);
77
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
78
- function defineIteratorMethods(t) {
79
- ["next", "throw", "return"].forEach(function (e) {
80
- define(t, e, function (t) {
81
- return this._invoke(e, t);
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(t, e) {
86
- function invoke(r, o, i, a) {
87
- var c = tryCatch(t[r], t, o);
88
- if ("throw" !== c.type) {
89
- var u = c.arg,
90
- h = u.value;
91
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
92
- invoke("next", t, i, a);
93
- }, function (t) {
94
- invoke("throw", t, i, a);
95
- }) : e.resolve(h).then(function (t) {
96
- u.value = t, i(u);
97
- }, function (t) {
98
- return invoke("throw", t, i, a);
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
- a(c.arg);
96
+ reject(record.arg);
102
97
  }
103
- var r;
104
- o(this, "_invoke", {
105
- value: function (t, n) {
98
+ var previousPromise;
99
+ defineProperty(this, "_invoke", {
100
+ value: function (method, arg) {
106
101
  function callInvokeWithMethodAndArg() {
107
- return new e(function (e, r) {
108
- invoke(t, n, e, r);
102
+ return new PromiseImpl(function (resolve, reject) {
103
+ invoke(method, arg, resolve, reject);
109
104
  });
110
105
  }
111
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
106
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
112
107
  }
113
108
  });
114
109
  }
115
- function makeInvokeMethod(e, r, n) {
116
- var o = h;
117
- return function (i, a) {
118
- if (o === f) throw new Error("Generator is already running");
119
- if (o === s) {
120
- if ("throw" === i) throw a;
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 (n.method = i, n.arg = a;;) {
127
- var c = n.delegate;
128
- if (c) {
129
- var u = maybeInvokeDelegate(c, n);
130
- if (u) {
131
- if (u === y) continue;
132
- return u;
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" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
136
- if (o === h) throw o = s, n.arg;
137
- n.dispatchException(n.arg);
138
- } else "return" === n.method && n.abrupt("return", n.arg);
139
- o = f;
140
- var p = tryCatch(e, r, n);
141
- if ("normal" === p.type) {
142
- if (o = n.done ? s : l, p.arg === y) continue;
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: p.arg,
145
- done: n.done
136
+ value: record.arg,
137
+ done: context.done
146
138
  };
147
139
  }
148
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
140
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
149
141
  }
150
142
  };
151
143
  }
152
- function maybeInvokeDelegate(e, r) {
153
- var n = r.method,
154
- o = e.iterator[n];
155
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
156
- var i = tryCatch(o, e.iterator, r.arg);
157
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
158
- var a = i.arg;
159
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
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(t) {
162
- var e = {
163
- tryLoc: t[0]
153
+ function pushTryEntry(locs) {
154
+ var entry = {
155
+ tryLoc: locs[0]
164
156
  };
165
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
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(t) {
168
- var e = t.completion || {};
169
- e.type = "normal", delete e.arg, t.completion = e;
159
+ function resetTryEntry(entry) {
160
+ var record = entry.completion || {};
161
+ record.type = "normal", delete record.arg, entry.completion = record;
170
162
  }
171
- function Context(t) {
163
+ function Context(tryLocsList) {
172
164
  this.tryEntries = [{
173
165
  tryLoc: "root"
174
- }], t.forEach(pushTryEntry, this), this.reset(!0);
166
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
175
167
  }
176
- function values(e) {
177
- if (e || "" === e) {
178
- var r = e[a];
179
- if (r) return r.call(e);
180
- if ("function" == typeof e.next) return e;
181
- if (!isNaN(e.length)) {
182
- var o = -1,
183
- i = function next() {
184
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
185
- return next.value = t, next.done = !0, next;
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 i.next = i;
179
+ return next.next = next;
188
180
  }
189
181
  }
190
- throw new TypeError(typeof e + " is not iterable");
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, o(g, "constructor", {
192
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
193
193
  value: GeneratorFunctionPrototype,
194
194
  configurable: !0
195
- }), o(GeneratorFunctionPrototype, "constructor", {
195
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
196
196
  value: GeneratorFunction,
197
197
  configurable: !0
198
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
199
- var e = "function" == typeof t && t.constructor;
200
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
201
- }, e.mark = function (t) {
202
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
203
- }, e.awrap = function (t) {
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: t
205
+ __await: arg
206
206
  };
207
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
207
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
208
208
  return this;
209
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
210
- void 0 === i && (i = Promise);
211
- var a = new AsyncIterator(wrap(t, r, n, o), i);
212
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
213
- return t.done ? t.value : a.next();
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(g), define(g, u, "Generator"), define(g, a, function () {
215
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
216
216
  return this;
217
- }), define(g, "toString", function () {
217
+ }), define(Gp, "toString", function () {
218
218
  return "[object Generator]";
219
- }), e.keys = function (t) {
220
- var e = Object(t),
221
- r = [];
222
- for (var n in e) r.push(n);
223
- return r.reverse(), function next() {
224
- for (; r.length;) {
225
- var t = r.pop();
226
- if (t in e) return next.value = t, next.done = !1, next;
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
- }, e.values = values, Context.prototype = {
230
+ }, exports.values = values, Context.prototype = {
231
231
  constructor: Context,
232
- reset: function (e) {
233
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
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 t = this.tryEntries[0].completion;
238
- if ("throw" === t.type) throw t.arg;
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 (e) {
242
- if (this.done) throw e;
243
- var r = this;
244
- function handle(n, o) {
245
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
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 o = this.tryEntries.length - 1; o >= 0; --o) {
248
- var i = this.tryEntries[o],
249
- a = i.completion;
250
- if ("root" === i.tryLoc) return handle("end");
251
- if (i.tryLoc <= this.prev) {
252
- var c = n.call(i, "catchLoc"),
253
- u = n.call(i, "finallyLoc");
254
- if (c && u) {
255
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
256
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
257
- } else if (c) {
258
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
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 (!u) throw new Error("try statement without catch or finally");
261
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
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 (t, e) {
267
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
268
- var o = this.tryEntries[r];
269
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
270
- var i = o;
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
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
275
- var a = i ? i.completion : {};
276
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
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 (t, e) {
279
- if ("throw" === t.type) throw t.arg;
280
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
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 (t) {
283
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
284
- var r = this.tryEntries[e];
285
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
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 (t) {
289
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
290
- var r = this.tryEntries[e];
291
- if (r.tryLoc === t) {
292
- var n = r.completion;
293
- if ("throw" === n.type) {
294
- var o = n.arg;
295
- resetTryEntry(r);
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 o;
297
+ return thrown;
298
298
  }
299
299
  }
300
300
  throw new Error("illegal catch attempt");
301
301
  },
302
- delegateYield: function (e, r, n) {
302
+ delegateYield: function (iterable, resultName, nextLoc) {
303
303
  return this.delegate = {
304
- iterator: values(e),
305
- resultName: r,
306
- nextLoc: n
307
- }, "next" === this.method && (this.arg = t), y;
304
+ iterator: values(iterable),
305
+ resultName: resultName,
306
+ nextLoc: nextLoc
307
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
308
308
  }
309
- }, e;
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
- try {
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 || (_originalError$stack = originalError.stack) == null || (_originalError$stack = _originalError$stack.split('\n')) == null || (_originalError$stack = _originalError$stack.slice(1)) == null ? void 0 : _originalError$stack.join('\n')) || '') + '\n' + (((_this2$stack2 = _this2.stack) == null || (_this2$stack2 = _this2$stack2.split('\n')) == null || (_this2$stack2 = _this2$stack2.slice(1)) == null ? void 0 : _this2$stack2.join('\n')) || '');
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;