@squiz/db-lib 1.21.1-alpha.9 → 1.22.1-alpha.0

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/lib/index.js CHANGED
@@ -1383,9 +1383,9 @@ var require_split2 = __commonJS({
1383
1383
  }
1384
1384
  cb();
1385
1385
  }
1386
- function push(self, val) {
1386
+ function push(self2, val) {
1387
1387
  if (val !== void 0) {
1388
- self.push(val);
1388
+ self2.push(val);
1389
1389
  }
1390
1390
  }
1391
1391
  function noop(incoming) {
@@ -3028,33 +3028,33 @@ var require_connection = __commonJS({
3028
3028
  this.ssl = config.ssl || false;
3029
3029
  this._ending = false;
3030
3030
  this._emitMessage = false;
3031
- var self = this;
3031
+ var self2 = this;
3032
3032
  this.on("newListener", function(eventName) {
3033
3033
  if (eventName === "message") {
3034
- self._emitMessage = true;
3034
+ self2._emitMessage = true;
3035
3035
  }
3036
3036
  });
3037
3037
  }
3038
3038
  connect(port, host) {
3039
- var self = this;
3039
+ var self2 = this;
3040
3040
  this._connecting = true;
3041
3041
  this.stream.setNoDelay(true);
3042
3042
  this.stream.connect(port, host);
3043
3043
  this.stream.once("connect", function() {
3044
- if (self._keepAlive) {
3045
- self.stream.setKeepAlive(true, self._keepAliveInitialDelayMillis);
3044
+ if (self2._keepAlive) {
3045
+ self2.stream.setKeepAlive(true, self2._keepAliveInitialDelayMillis);
3046
3046
  }
3047
- self.emit("connect");
3047
+ self2.emit("connect");
3048
3048
  });
3049
3049
  const reportStreamError = function(error) {
3050
- if (self._ending && (error.code === "ECONNRESET" || error.code === "EPIPE")) {
3050
+ if (self2._ending && (error.code === "ECONNRESET" || error.code === "EPIPE")) {
3051
3051
  return;
3052
3052
  }
3053
- self.emit("error", error);
3053
+ self2.emit("error", error);
3054
3054
  };
3055
3055
  this.stream.on("error", reportStreamError);
3056
3056
  this.stream.on("close", function() {
3057
- self.emit("end");
3057
+ self2.emit("end");
3058
3058
  });
3059
3059
  if (!this.ssl) {
3060
3060
  return this.attachListeners(this.stream);
@@ -3065,33 +3065,33 @@ var require_connection = __commonJS({
3065
3065
  case "S":
3066
3066
  break;
3067
3067
  case "N":
3068
- self.stream.end();
3069
- return self.emit("error", new Error("The server does not support SSL connections"));
3068
+ self2.stream.end();
3069
+ return self2.emit("error", new Error("The server does not support SSL connections"));
3070
3070
  default:
3071
- self.stream.end();
3072
- return self.emit("error", new Error("There was an error establishing an SSL connection"));
3071
+ self2.stream.end();
3072
+ return self2.emit("error", new Error("There was an error establishing an SSL connection"));
3073
3073
  }
3074
3074
  var tls = require("tls");
3075
3075
  const options = {
3076
- socket: self.stream
3076
+ socket: self2.stream
3077
3077
  };
3078
- if (self.ssl !== true) {
3079
- Object.assign(options, self.ssl);
3080
- if ("key" in self.ssl) {
3081
- options.key = self.ssl.key;
3078
+ if (self2.ssl !== true) {
3079
+ Object.assign(options, self2.ssl);
3080
+ if ("key" in self2.ssl) {
3081
+ options.key = self2.ssl.key;
3082
3082
  }
3083
3083
  }
3084
3084
  if (net.isIP(host) === 0) {
3085
3085
  options.servername = host;
3086
3086
  }
3087
3087
  try {
3088
- self.stream = tls.connect(options);
3088
+ self2.stream = tls.connect(options);
3089
3089
  } catch (err) {
3090
- return self.emit("error", err);
3090
+ return self2.emit("error", err);
3091
3091
  }
3092
- self.attachListeners(self.stream);
3093
- self.stream.on("error", reportStreamError);
3094
- self.emit("sslconnect");
3092
+ self2.attachListeners(self2.stream);
3093
+ self2.stream.on("error", reportStreamError);
3094
+ self2.emit("sslconnect");
3095
3095
  });
3096
3096
  }
3097
3097
  attachListeners(stream) {
@@ -3259,7 +3259,7 @@ var require_client = __commonJS({
3259
3259
  this.queryQueue.length = 0;
3260
3260
  }
3261
3261
  _connect(callback) {
3262
- var self = this;
3262
+ var self2 = this;
3263
3263
  var con = this.connection;
3264
3264
  this._connectionCallback = callback;
3265
3265
  if (this._connecting || this._connected) {
@@ -3283,14 +3283,14 @@ var require_client = __commonJS({
3283
3283
  con.connect(this.port, this.host);
3284
3284
  }
3285
3285
  con.on("connect", function() {
3286
- if (self.ssl) {
3286
+ if (self2.ssl) {
3287
3287
  con.requestSsl();
3288
3288
  } else {
3289
- con.startup(self.getStartupConf());
3289
+ con.startup(self2.getStartupConf());
3290
3290
  }
3291
3291
  });
3292
3292
  con.on("sslconnect", function() {
3293
- con.startup(self.getStartupConf());
3293
+ con.startup(self2.getStartupConf());
3294
3294
  });
3295
3295
  this._attachListeners(con);
3296
3296
  con.once("end", () => {
@@ -3969,6 +3969,7 @@ var require_pg_pool = __commonJS({
3969
3969
  _release(client, idleListener, err) {
3970
3970
  client.on("error", idleListener);
3971
3971
  client._poolUseCount = (client._poolUseCount || 0) + 1;
3972
+ this.emit("release", err, client);
3972
3973
  if (err || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) {
3973
3974
  if (client._poolUseCount >= this.options.maxUses) {
3974
3975
  this.log("remove expended client");
@@ -4155,34 +4156,34 @@ var require_query2 = __commonJS({
4155
4156
  };
4156
4157
  NativeQuery.prototype.submit = function(client) {
4157
4158
  this.state = "running";
4158
- var self = this;
4159
+ var self2 = this;
4159
4160
  this.native = client.native;
4160
4161
  client.native.arrayMode = this._arrayMode;
4161
4162
  var after = function(err, rows, results) {
4162
4163
  client.native.arrayMode = false;
4163
4164
  setImmediate(function() {
4164
- self.emit("_done");
4165
+ self2.emit("_done");
4165
4166
  });
4166
4167
  if (err) {
4167
- return self.handleError(err);
4168
+ return self2.handleError(err);
4168
4169
  }
4169
- if (self._emitRowEvents) {
4170
+ if (self2._emitRowEvents) {
4170
4171
  if (results.length > 1) {
4171
4172
  rows.forEach((rowOfRows, i) => {
4172
4173
  rowOfRows.forEach((row) => {
4173
- self.emit("row", row, results[i]);
4174
+ self2.emit("row", row, results[i]);
4174
4175
  });
4175
4176
  });
4176
4177
  } else {
4177
4178
  rows.forEach(function(row) {
4178
- self.emit("row", row, results);
4179
+ self2.emit("row", row, results);
4179
4180
  });
4180
4181
  }
4181
4182
  }
4182
- self.state = "end";
4183
- self.emit("end", results);
4184
- if (self.callback) {
4185
- self.callback(null, results);
4183
+ self2.state = "end";
4184
+ self2.emit("end", results);
4185
+ if (self2.callback) {
4186
+ self2.callback(null, results);
4186
4187
  }
4187
4188
  };
4188
4189
  if (process.domain) {
@@ -4205,8 +4206,8 @@ var require_query2 = __commonJS({
4205
4206
  return client.native.prepare(this.name, this.text, values.length, function(err) {
4206
4207
  if (err)
4207
4208
  return after(err);
4208
- client.namedQueries[self.name] = self.text;
4209
- return self.native.execute(self.name, values, after);
4209
+ client.namedQueries[self2.name] = self2.text;
4210
+ return self2.native.execute(self2.name, values, after);
4210
4211
  });
4211
4212
  } else if (this.values) {
4212
4213
  if (!Array.isArray(this.values)) {
@@ -4275,7 +4276,7 @@ var require_client2 = __commonJS({
4275
4276
  this._queryQueue.length = 0;
4276
4277
  };
4277
4278
  Client.prototype._connect = function(cb) {
4278
- var self = this;
4279
+ var self2 = this;
4279
4280
  if (this._connecting) {
4280
4281
  process.nextTick(() => cb(new Error("Client has already been connected. You cannot reuse a client.")));
4281
4282
  return;
@@ -4284,25 +4285,25 @@ var require_client2 = __commonJS({
4284
4285
  this.connectionParameters.getLibpqConnectionString(function(err, conString) {
4285
4286
  if (err)
4286
4287
  return cb(err);
4287
- self.native.connect(conString, function(err2) {
4288
+ self2.native.connect(conString, function(err2) {
4288
4289
  if (err2) {
4289
- self.native.end();
4290
+ self2.native.end();
4290
4291
  return cb(err2);
4291
4292
  }
4292
- self._connected = true;
4293
- self.native.on("error", function(err3) {
4294
- self._queryable = false;
4295
- self._errorAllQueries(err3);
4296
- self.emit("error", err3);
4293
+ self2._connected = true;
4294
+ self2.native.on("error", function(err3) {
4295
+ self2._queryable = false;
4296
+ self2._errorAllQueries(err3);
4297
+ self2.emit("error", err3);
4297
4298
  });
4298
- self.native.on("notification", function(msg) {
4299
- self.emit("notification", {
4299
+ self2.native.on("notification", function(msg) {
4300
+ self2.emit("notification", {
4300
4301
  channel: msg.relname,
4301
4302
  payload: msg.extra
4302
4303
  });
4303
4304
  });
4304
- self.emit("connect");
4305
- self._pulseQueryQueue(true);
4305
+ self2.emit("connect");
4306
+ self2._pulseQueryQueue(true);
4306
4307
  cb();
4307
4308
  });
4308
4309
  });
@@ -4388,7 +4389,7 @@ var require_client2 = __commonJS({
4388
4389
  return result;
4389
4390
  };
4390
4391
  Client.prototype.end = function(cb) {
4391
- var self = this;
4392
+ var self2 = this;
4392
4393
  this._ending = true;
4393
4394
  if (!this._connected) {
4394
4395
  this.once("connect", this.end.bind(this, cb));
@@ -4400,9 +4401,9 @@ var require_client2 = __commonJS({
4400
4401
  });
4401
4402
  }
4402
4403
  this.native.end(function() {
4403
- self._errorAllQueries(new Error("Connection terminated"));
4404
+ self2._errorAllQueries(new Error("Connection terminated"));
4404
4405
  process.nextTick(() => {
4405
- self.emit("end");
4406
+ self2.emit("end");
4406
4407
  if (cb)
4407
4408
  cb();
4408
4409
  });
@@ -4428,9 +4429,9 @@ var require_client2 = __commonJS({
4428
4429
  }
4429
4430
  this._activeQuery = query;
4430
4431
  query.submit(this);
4431
- var self = this;
4432
+ var self2 = this;
4432
4433
  query.once("_done", function() {
4433
- self._pulseQueryQueue();
4434
+ self2._pulseQueryQueue();
4434
4435
  });
4435
4436
  };
4436
4437
  Client.prototype.cancel = function(query) {
@@ -5430,7 +5431,7 @@ var require_errors = __commonJS({
5430
5431
  "use strict";
5431
5432
  var format = require_format();
5432
5433
  var { LEVEL, MESSAGE } = require_triple_beam();
5433
- module2.exports = format((einfo, { stack }) => {
5434
+ module2.exports = format((einfo, { stack, cause }) => {
5434
5435
  if (einfo instanceof Error) {
5435
5436
  const info = Object.assign({}, einfo, {
5436
5437
  level: einfo.level,
@@ -5440,6 +5441,8 @@ var require_errors = __commonJS({
5440
5441
  });
5441
5442
  if (stack)
5442
5443
  info.stack = einfo.stack;
5444
+ if (cause)
5445
+ info.cause = einfo.cause;
5443
5446
  return info;
5444
5447
  }
5445
5448
  if (!(einfo.message instanceof Error))
@@ -5450,6 +5453,8 @@ var require_errors = __commonJS({
5450
5453
  einfo[MESSAGE] = err.message;
5451
5454
  if (stack)
5452
5455
  einfo.stack = err.stack;
5456
+ if (cause)
5457
+ einfo.cause = err.cause;
5453
5458
  return einfo;
5454
5459
  });
5455
5460
  }
@@ -5616,138 +5621,11 @@ var require_safe_stable_stringify = __commonJS({
5616
5621
  exports.configure = configure;
5617
5622
  module2.exports = stringify2;
5618
5623
  var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;
5619
- var strEscapeSequencesReplacer = new RegExp(strEscapeSequencesRegExp, "g");
5620
- var meta = [
5621
- "\\u0000",
5622
- "\\u0001",
5623
- "\\u0002",
5624
- "\\u0003",
5625
- "\\u0004",
5626
- "\\u0005",
5627
- "\\u0006",
5628
- "\\u0007",
5629
- "\\b",
5630
- "\\t",
5631
- "\\n",
5632
- "\\u000b",
5633
- "\\f",
5634
- "\\r",
5635
- "\\u000e",
5636
- "\\u000f",
5637
- "\\u0010",
5638
- "\\u0011",
5639
- "\\u0012",
5640
- "\\u0013",
5641
- "\\u0014",
5642
- "\\u0015",
5643
- "\\u0016",
5644
- "\\u0017",
5645
- "\\u0018",
5646
- "\\u0019",
5647
- "\\u001a",
5648
- "\\u001b",
5649
- "\\u001c",
5650
- "\\u001d",
5651
- "\\u001e",
5652
- "\\u001f",
5653
- "",
5654
- "",
5655
- '\\"',
5656
- "",
5657
- "",
5658
- "",
5659
- "",
5660
- "",
5661
- "",
5662
- "",
5663
- "",
5664
- "",
5665
- "",
5666
- "",
5667
- "",
5668
- "",
5669
- "",
5670
- "",
5671
- "",
5672
- "",
5673
- "",
5674
- "",
5675
- "",
5676
- "",
5677
- "",
5678
- "",
5679
- "",
5680
- "",
5681
- "",
5682
- "",
5683
- "",
5684
- "",
5685
- "",
5686
- "",
5687
- "",
5688
- "",
5689
- "",
5690
- "",
5691
- "",
5692
- "",
5693
- "",
5694
- "",
5695
- "",
5696
- "",
5697
- "",
5698
- "",
5699
- "",
5700
- "",
5701
- "",
5702
- "",
5703
- "",
5704
- "",
5705
- "",
5706
- "",
5707
- "",
5708
- "",
5709
- "",
5710
- "",
5711
- "",
5712
- "",
5713
- "\\\\"
5714
- ];
5715
- function escapeFn(str) {
5716
- if (str.length === 2) {
5717
- const charCode2 = str.charCodeAt(1);
5718
- return `${str[0]}\\u${charCode2.toString(16)}`;
5719
- }
5720
- const charCode = str.charCodeAt(0);
5721
- return meta.length > charCode ? meta[charCode] : `\\u${charCode.toString(16)}`;
5722
- }
5723
5624
  function strEscape(str) {
5724
5625
  if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) {
5725
- return str;
5726
- }
5727
- if (str.length > 100) {
5728
- return str.replace(strEscapeSequencesReplacer, escapeFn);
5729
- }
5730
- let result = "";
5731
- let last = 0;
5732
- for (let i = 0; i < str.length; i++) {
5733
- const point = str.charCodeAt(i);
5734
- if (point === 34 || point === 92 || point < 32) {
5735
- result += `${str.slice(last, i)}${meta[point]}`;
5736
- last = i + 1;
5737
- } else if (point >= 55296 && point <= 57343) {
5738
- if (point <= 56319 && i + 1 < str.length) {
5739
- const nextPoint = str.charCodeAt(i + 1);
5740
- if (nextPoint >= 56320 && nextPoint <= 57343) {
5741
- i++;
5742
- continue;
5743
- }
5744
- }
5745
- result += `${str.slice(last, i)}\\u${point.toString(16)}`;
5746
- last = i + 1;
5747
- }
5626
+ return `"${str}"`;
5748
5627
  }
5749
- result += str.slice(last);
5750
- return result;
5628
+ return JSON.stringify(str);
5751
5629
  }
5752
5630
  function insertSort(array) {
5753
5631
  if (array.length > 200) {
@@ -5887,7 +5765,7 @@ var require_safe_stable_stringify = __commonJS({
5887
5765
  value = replacer.call(parent, key, value);
5888
5766
  switch (typeof value) {
5889
5767
  case "string":
5890
- return `"${strEscape(value)}"`;
5768
+ return strEscape(value);
5891
5769
  case "object": {
5892
5770
  if (value === null) {
5893
5771
  return "null";
@@ -5916,11 +5794,11 @@ ${indentation}`;
5916
5794
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
5917
5795
  let i = 0;
5918
5796
  for (; i < maximumValuesToStringify - 1; i++) {
5919
- const tmp2 = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation);
5797
+ const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
5920
5798
  res += tmp2 !== void 0 ? tmp2 : "null";
5921
5799
  res += join;
5922
5800
  }
5923
- const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation);
5801
+ const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
5924
5802
  res += tmp !== void 0 ? tmp : "null";
5925
5803
  if (value.length - 1 > maximumBreadth) {
5926
5804
  const removedKeys = value.length - maximumBreadth - 1;
@@ -5949,14 +5827,8 @@ ${originalIndentation}`;
5949
5827
  ${indentation}`;
5950
5828
  whitespace = " ";
5951
5829
  }
5952
- let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
5953
- if (isTypedArrayWithEntries(value)) {
5954
- res += stringifyTypedArray(value, join, maximumBreadth);
5955
- keys = keys.slice(value.length);
5956
- maximumPropertiesToStringify -= value.length;
5957
- separator = join;
5958
- }
5959
- if (deterministic) {
5830
+ const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
5831
+ if (deterministic && !isTypedArrayWithEntries(value)) {
5960
5832
  keys = insertSort(keys);
5961
5833
  }
5962
5834
  stack.push(value);
@@ -5964,7 +5836,7 @@ ${indentation}`;
5964
5836
  const key2 = keys[i];
5965
5837
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
5966
5838
  if (tmp !== void 0) {
5967
- res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`;
5839
+ res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
5968
5840
  separator = join;
5969
5841
  }
5970
5842
  }
@@ -6001,7 +5873,7 @@ ${originalIndentation}`;
6001
5873
  }
6002
5874
  switch (typeof value) {
6003
5875
  case "string":
6004
- return `"${strEscape(value)}"`;
5876
+ return strEscape(value);
6005
5877
  case "object": {
6006
5878
  if (value === null) {
6007
5879
  return "null";
@@ -6030,11 +5902,11 @@ ${indentation}`;
6030
5902
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
6031
5903
  let i = 0;
6032
5904
  for (; i < maximumValuesToStringify - 1; i++) {
6033
- const tmp2 = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation);
5905
+ const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
6034
5906
  res += tmp2 !== void 0 ? tmp2 : "null";
6035
5907
  res += join;
6036
5908
  }
6037
- const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation);
5909
+ const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
6038
5910
  res += tmp !== void 0 ? tmp : "null";
6039
5911
  if (value.length - 1 > maximumBreadth) {
6040
5912
  const removedKeys = value.length - maximumBreadth - 1;
@@ -6059,7 +5931,7 @@ ${indentation}`;
6059
5931
  for (const key2 of replacer) {
6060
5932
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
6061
5933
  if (tmp !== void 0) {
6062
- res += `${separator}"${strEscape(key2)}":${whitespace}${tmp}`;
5934
+ res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
6063
5935
  separator = join;
6064
5936
  }
6065
5937
  }
@@ -6088,7 +5960,7 @@ ${originalIndentation}`;
6088
5960
  function stringifyIndent(key, value, stack, spacer, indentation) {
6089
5961
  switch (typeof value) {
6090
5962
  case "string":
6091
- return `"${strEscape(value)}"`;
5963
+ return strEscape(value);
6092
5964
  case "object": {
6093
5965
  if (value === null) {
6094
5966
  return "null";
@@ -6122,11 +5994,11 @@ ${indentation}`;
6122
5994
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
6123
5995
  let i = 0;
6124
5996
  for (; i < maximumValuesToStringify - 1; i++) {
6125
- const tmp2 = stringifyIndent(i, value[i], stack, spacer, indentation);
5997
+ const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
6126
5998
  res2 += tmp2 !== void 0 ? tmp2 : "null";
6127
5999
  res2 += join2;
6128
6000
  }
6129
- const tmp = stringifyIndent(i, value[i], stack, spacer, indentation);
6001
+ const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
6130
6002
  res2 += tmp !== void 0 ? tmp : "null";
6131
6003
  if (value.length - 1 > maximumBreadth) {
6132
6004
  const removedKeys = value.length - maximumBreadth - 1;
@@ -6165,7 +6037,7 @@ ${indentation}`;
6165
6037
  const key2 = keys[i];
6166
6038
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
6167
6039
  if (tmp !== void 0) {
6168
- res += `${separator}"${strEscape(key2)}": ${tmp}`;
6040
+ res += `${separator}${strEscape(key2)}: ${tmp}`;
6169
6041
  separator = join;
6170
6042
  }
6171
6043
  }
@@ -6199,7 +6071,7 @@ ${originalIndentation}`;
6199
6071
  function stringifySimple(key, value, stack) {
6200
6072
  switch (typeof value) {
6201
6073
  case "string":
6202
- return `"${strEscape(value)}"`;
6074
+ return strEscape(value);
6203
6075
  case "object": {
6204
6076
  if (value === null) {
6205
6077
  return "null";
@@ -6228,11 +6100,11 @@ ${originalIndentation}`;
6228
6100
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
6229
6101
  let i = 0;
6230
6102
  for (; i < maximumValuesToStringify - 1; i++) {
6231
- const tmp2 = stringifySimple(i, value[i], stack);
6103
+ const tmp2 = stringifySimple(String(i), value[i], stack);
6232
6104
  res += tmp2 !== void 0 ? tmp2 : "null";
6233
6105
  res += ",";
6234
6106
  }
6235
- const tmp = stringifySimple(i, value[i], stack);
6107
+ const tmp = stringifySimple(String(i), value[i], stack);
6236
6108
  res += tmp !== void 0 ? tmp : "null";
6237
6109
  if (value.length - 1 > maximumBreadth) {
6238
6110
  const removedKeys = value.length - maximumBreadth - 1;
@@ -6265,7 +6137,7 @@ ${originalIndentation}`;
6265
6137
  const key2 = keys[i];
6266
6138
  const tmp = stringifySimple(key2, value[key2], stack);
6267
6139
  if (tmp !== void 0) {
6268
- res += `${separator}"${strEscape(key2)}":${tmp}`;
6140
+ res += `${separator}${strEscape(key2)}:${tmp}`;
6269
6141
  separator = ",";
6270
6142
  }
6271
6143
  }
@@ -6437,14 +6309,13 @@ var require_ms = __commonJS({
6437
6309
  var m = s * 60;
6438
6310
  var h = m * 60;
6439
6311
  var d = h * 24;
6440
- var w = d * 7;
6441
6312
  var y = d * 365.25;
6442
6313
  module2.exports = function(val, options) {
6443
6314
  options = options || {};
6444
6315
  var type = typeof val;
6445
6316
  if (type === "string" && val.length > 0) {
6446
6317
  return parse2(val);
6447
- } else if (type === "number" && isFinite(val)) {
6318
+ } else if (type === "number" && isNaN(val) === false) {
6448
6319
  return options.long ? fmtLong(val) : fmtShort(val);
6449
6320
  }
6450
6321
  throw new Error(
@@ -6456,7 +6327,7 @@ var require_ms = __commonJS({
6456
6327
  if (str.length > 100) {
6457
6328
  return;
6458
6329
  }
6459
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
6330
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
6460
6331
  str
6461
6332
  );
6462
6333
  if (!match) {
@@ -6471,10 +6342,6 @@ var require_ms = __commonJS({
6471
6342
  case "yr":
6472
6343
  case "y":
6473
6344
  return n * y;
6474
- case "weeks":
6475
- case "week":
6476
- case "w":
6477
- return n * w;
6478
6345
  case "days":
6479
6346
  case "day":
6480
6347
  case "d":
@@ -6508,40 +6375,31 @@ var require_ms = __commonJS({
6508
6375
  }
6509
6376
  }
6510
6377
  function fmtShort(ms) {
6511
- var msAbs = Math.abs(ms);
6512
- if (msAbs >= d) {
6378
+ if (ms >= d) {
6513
6379
  return Math.round(ms / d) + "d";
6514
6380
  }
6515
- if (msAbs >= h) {
6381
+ if (ms >= h) {
6516
6382
  return Math.round(ms / h) + "h";
6517
6383
  }
6518
- if (msAbs >= m) {
6384
+ if (ms >= m) {
6519
6385
  return Math.round(ms / m) + "m";
6520
6386
  }
6521
- if (msAbs >= s) {
6387
+ if (ms >= s) {
6522
6388
  return Math.round(ms / s) + "s";
6523
6389
  }
6524
6390
  return ms + "ms";
6525
6391
  }
6526
6392
  function fmtLong(ms) {
6527
- var msAbs = Math.abs(ms);
6528
- if (msAbs >= d) {
6529
- return plural(ms, msAbs, d, "day");
6530
- }
6531
- if (msAbs >= h) {
6532
- return plural(ms, msAbs, h, "hour");
6533
- }
6534
- if (msAbs >= m) {
6535
- return plural(ms, msAbs, m, "minute");
6393
+ return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
6394
+ }
6395
+ function plural(ms, n, name) {
6396
+ if (ms < n) {
6397
+ return;
6536
6398
  }
6537
- if (msAbs >= s) {
6538
- return plural(ms, msAbs, s, "second");
6399
+ if (ms < n * 1.5) {
6400
+ return Math.floor(ms / n) + " " + name;
6539
6401
  }
6540
- return ms + " ms";
6541
- }
6542
- function plural(ms, msAbs, n, name) {
6543
- var isPlural = msAbs >= n * 1.5;
6544
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
6402
+ return Math.ceil(ms / n) + " " + name + "s";
6545
6403
  }
6546
6404
  }
6547
6405
  });
@@ -7413,16 +7271,16 @@ var require_destroy = __commonJS({
7413
7271
  });
7414
7272
  return this;
7415
7273
  }
7416
- function emitErrorAndCloseNT(self, err) {
7417
- emitErrorNT(self, err);
7418
- emitCloseNT(self);
7274
+ function emitErrorAndCloseNT(self2, err) {
7275
+ emitErrorNT(self2, err);
7276
+ emitCloseNT(self2);
7419
7277
  }
7420
- function emitCloseNT(self) {
7421
- if (self._writableState && !self._writableState.emitClose)
7278
+ function emitCloseNT(self2) {
7279
+ if (self2._writableState && !self2._writableState.emitClose)
7422
7280
  return;
7423
- if (self._readableState && !self._readableState.emitClose)
7281
+ if (self2._readableState && !self2._readableState.emitClose)
7424
7282
  return;
7425
- self.emit("close");
7283
+ self2.emit("close");
7426
7284
  }
7427
7285
  function undestroy() {
7428
7286
  if (this._readableState) {
@@ -7441,8 +7299,8 @@ var require_destroy = __commonJS({
7441
7299
  this._writableState.errorEmitted = false;
7442
7300
  }
7443
7301
  }
7444
- function emitErrorNT(self, err) {
7445
- self.emit("error", err);
7302
+ function emitErrorNT(self2, err) {
7303
+ self2.emit("error", err);
7446
7304
  }
7447
7305
  function errorOrDestroy(stream, err) {
7448
7306
  var rState = stream._readableState;
@@ -7640,32 +7498,25 @@ var require_buffer_list = __commonJS({
7640
7498
  var keys = Object.keys(object);
7641
7499
  if (Object.getOwnPropertySymbols) {
7642
7500
  var symbols = Object.getOwnPropertySymbols(object);
7643
- if (enumerableOnly)
7644
- symbols = symbols.filter(function(sym) {
7645
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7646
- });
7647
- keys.push.apply(keys, symbols);
7501
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
7502
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
7503
+ })), keys.push.apply(keys, symbols);
7648
7504
  }
7649
7505
  return keys;
7650
7506
  }
7651
7507
  function _objectSpread(target) {
7652
7508
  for (var i = 1; i < arguments.length; i++) {
7653
- var source = arguments[i] != null ? arguments[i] : {};
7654
- if (i % 2) {
7655
- ownKeys(Object(source), true).forEach(function(key) {
7656
- _defineProperty(target, key, source[key]);
7657
- });
7658
- } else if (Object.getOwnPropertyDescriptors) {
7659
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
7660
- } else {
7661
- ownKeys(Object(source)).forEach(function(key) {
7662
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7663
- });
7664
- }
7509
+ var source = null != arguments[i] ? arguments[i] : {};
7510
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
7511
+ _defineProperty(target, key, source[key]);
7512
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
7513
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
7514
+ });
7665
7515
  }
7666
7516
  return target;
7667
7517
  }
7668
7518
  function _defineProperty(obj, key, value) {
7519
+ key = _toPropertyKey(key);
7669
7520
  if (key in obj) {
7670
7521
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
7671
7522
  } else {
@@ -7685,7 +7536,7 @@ var require_buffer_list = __commonJS({
7685
7536
  descriptor.configurable = true;
7686
7537
  if ("value" in descriptor)
7687
7538
  descriptor.writable = true;
7688
- Object.defineProperty(target, descriptor.key, descriptor);
7539
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
7689
7540
  }
7690
7541
  }
7691
7542
  function _createClass(Constructor, protoProps, staticProps) {
@@ -7693,8 +7544,25 @@ var require_buffer_list = __commonJS({
7693
7544
  _defineProperties(Constructor.prototype, protoProps);
7694
7545
  if (staticProps)
7695
7546
  _defineProperties(Constructor, staticProps);
7547
+ Object.defineProperty(Constructor, "prototype", { writable: false });
7696
7548
  return Constructor;
7697
7549
  }
7550
+ function _toPropertyKey(arg) {
7551
+ var key = _toPrimitive(arg, "string");
7552
+ return typeof key === "symbol" ? key : String(key);
7553
+ }
7554
+ function _toPrimitive(input, hint) {
7555
+ if (typeof input !== "object" || input === null)
7556
+ return input;
7557
+ var prim = input[Symbol.toPrimitive];
7558
+ if (prim !== void 0) {
7559
+ var res = prim.call(input, hint || "default");
7560
+ if (typeof res !== "object")
7561
+ return res;
7562
+ throw new TypeError("@@toPrimitive must return a primitive value.");
7563
+ }
7564
+ return (hint === "string" ? String : Number)(input);
7565
+ }
7698
7566
  var _require = require("buffer");
7699
7567
  var Buffer2 = _require.Buffer;
7700
7568
  var _require2 = require("util");
@@ -7762,9 +7630,8 @@ var require_buffer_list = __commonJS({
7762
7630
  return "";
7763
7631
  var p = this.head;
7764
7632
  var ret = "" + p.data;
7765
- while (p = p.next) {
7633
+ while (p = p.next)
7766
7634
  ret += s + p.data;
7767
- }
7768
7635
  return ret;
7769
7636
  }
7770
7637
  }, {
@@ -7872,7 +7739,7 @@ var require_buffer_list = __commonJS({
7872
7739
  }, {
7873
7740
  key: custom,
7874
7741
  value: function value(_, options) {
7875
- return inspect(this, _objectSpread({}, options, {
7742
+ return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
7876
7743
  // Only inspect one level.
7877
7744
  depth: 0,
7878
7745
  // It should not recurse.
@@ -8069,14 +7936,14 @@ var require_string_decoder = __commonJS({
8069
7936
  return 4;
8070
7937
  return byte >> 6 === 2 ? -1 : -2;
8071
7938
  }
8072
- function utf8CheckIncomplete(self, buf, i) {
7939
+ function utf8CheckIncomplete(self2, buf, i) {
8073
7940
  var j = buf.length - 1;
8074
7941
  if (j < i)
8075
7942
  return 0;
8076
7943
  var nb = utf8CheckByte(buf[j]);
8077
7944
  if (nb >= 0) {
8078
7945
  if (nb > 0)
8079
- self.lastNeed = nb - 1;
7946
+ self2.lastNeed = nb - 1;
8080
7947
  return nb;
8081
7948
  }
8082
7949
  if (--j < i || nb === -2)
@@ -8084,7 +7951,7 @@ var require_string_decoder = __commonJS({
8084
7951
  nb = utf8CheckByte(buf[j]);
8085
7952
  if (nb >= 0) {
8086
7953
  if (nb > 0)
8087
- self.lastNeed = nb - 2;
7954
+ self2.lastNeed = nb - 2;
8088
7955
  return nb;
8089
7956
  }
8090
7957
  if (--j < i || nb === -2)
@@ -8095,25 +7962,25 @@ var require_string_decoder = __commonJS({
8095
7962
  if (nb === 2)
8096
7963
  nb = 0;
8097
7964
  else
8098
- self.lastNeed = nb - 3;
7965
+ self2.lastNeed = nb - 3;
8099
7966
  }
8100
7967
  return nb;
8101
7968
  }
8102
7969
  return 0;
8103
7970
  }
8104
- function utf8CheckExtraBytes(self, buf, p) {
7971
+ function utf8CheckExtraBytes(self2, buf, p) {
8105
7972
  if ((buf[0] & 192) !== 128) {
8106
- self.lastNeed = 0;
7973
+ self2.lastNeed = 0;
8107
7974
  return "\uFFFD";
8108
7975
  }
8109
- if (self.lastNeed > 1 && buf.length > 1) {
7976
+ if (self2.lastNeed > 1 && buf.length > 1) {
8110
7977
  if ((buf[1] & 192) !== 128) {
8111
- self.lastNeed = 1;
7978
+ self2.lastNeed = 1;
8112
7979
  return "\uFFFD";
8113
7980
  }
8114
- if (self.lastNeed > 2 && buf.length > 2) {
7981
+ if (self2.lastNeed > 2 && buf.length > 2) {
8115
7982
  if ((buf[2] & 192) !== 128) {
8116
- self.lastNeed = 2;
7983
+ self2.lastNeed = 2;
8117
7984
  return "\uFFFD";
8118
7985
  }
8119
7986
  }
@@ -8310,6 +8177,7 @@ var require_async_iterator = __commonJS({
8310
8177
  "use strict";
8311
8178
  var _Object$setPrototypeO;
8312
8179
  function _defineProperty(obj, key, value) {
8180
+ key = _toPropertyKey(key);
8313
8181
  if (key in obj) {
8314
8182
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
8315
8183
  } else {
@@ -8317,6 +8185,22 @@ var require_async_iterator = __commonJS({
8317
8185
  }
8318
8186
  return obj;
8319
8187
  }
8188
+ function _toPropertyKey(arg) {
8189
+ var key = _toPrimitive(arg, "string");
8190
+ return typeof key === "symbol" ? key : String(key);
8191
+ }
8192
+ function _toPrimitive(input, hint) {
8193
+ if (typeof input !== "object" || input === null)
8194
+ return input;
8195
+ var prim = input[Symbol.toPrimitive];
8196
+ if (prim !== void 0) {
8197
+ var res = prim.call(input, hint || "default");
8198
+ if (typeof res !== "object")
8199
+ return res;
8200
+ throw new TypeError("@@toPrimitive must return a primitive value.");
8201
+ }
8202
+ return (hint === "string" ? String : Number)(input);
8203
+ }
8320
8204
  var finished = require_end_of_stream();
8321
8205
  var kLastResolve = Symbol("lastResolve");
8322
8206
  var kLastReject = Symbol("lastReject");
@@ -8492,9 +8376,9 @@ var require_from = __commonJS({
8492
8376
  }
8493
8377
  function _asyncToGenerator(fn) {
8494
8378
  return function() {
8495
- var self = this, args = arguments;
8379
+ var self2 = this, args = arguments;
8496
8380
  return new Promise(function(resolve, reject) {
8497
- var gen = fn.apply(self, args);
8381
+ var gen = fn.apply(self2, args);
8498
8382
  function _next(value) {
8499
8383
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
8500
8384
  }
@@ -8509,32 +8393,25 @@ var require_from = __commonJS({
8509
8393
  var keys = Object.keys(object);
8510
8394
  if (Object.getOwnPropertySymbols) {
8511
8395
  var symbols = Object.getOwnPropertySymbols(object);
8512
- if (enumerableOnly)
8513
- symbols = symbols.filter(function(sym) {
8514
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8515
- });
8516
- keys.push.apply(keys, symbols);
8396
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
8397
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8398
+ })), keys.push.apply(keys, symbols);
8517
8399
  }
8518
8400
  return keys;
8519
8401
  }
8520
8402
  function _objectSpread(target) {
8521
8403
  for (var i = 1; i < arguments.length; i++) {
8522
- var source = arguments[i] != null ? arguments[i] : {};
8523
- if (i % 2) {
8524
- ownKeys(Object(source), true).forEach(function(key) {
8525
- _defineProperty(target, key, source[key]);
8526
- });
8527
- } else if (Object.getOwnPropertyDescriptors) {
8528
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8529
- } else {
8530
- ownKeys(Object(source)).forEach(function(key) {
8531
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8532
- });
8533
- }
8404
+ var source = null != arguments[i] ? arguments[i] : {};
8405
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
8406
+ _defineProperty(target, key, source[key]);
8407
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
8408
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8409
+ });
8534
8410
  }
8535
8411
  return target;
8536
8412
  }
8537
8413
  function _defineProperty(obj, key, value) {
8414
+ key = _toPropertyKey(key);
8538
8415
  if (key in obj) {
8539
8416
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
8540
8417
  } else {
@@ -8542,6 +8419,22 @@ var require_from = __commonJS({
8542
8419
  }
8543
8420
  return obj;
8544
8421
  }
8422
+ function _toPropertyKey(arg) {
8423
+ var key = _toPrimitive(arg, "string");
8424
+ return typeof key === "symbol" ? key : String(key);
8425
+ }
8426
+ function _toPrimitive(input, hint) {
8427
+ if (typeof input !== "object" || input === null)
8428
+ return input;
8429
+ var prim = input[Symbol.toPrimitive];
8430
+ if (prim !== void 0) {
8431
+ var res = prim.call(input, hint || "default");
8432
+ if (typeof res !== "object")
8433
+ return res;
8434
+ throw new TypeError("@@toPrimitive must return a primitive value.");
8435
+ }
8436
+ return (hint === "string" ? String : Number)(input);
8437
+ }
8545
8438
  var ERR_INVALID_ARG_TYPE = require_errors2().codes.ERR_INVALID_ARG_TYPE;
8546
8439
  function from(Readable, iterable, opts) {
8547
8440
  var iterator;
@@ -8569,7 +8462,7 @@ var require_from = __commonJS({
8569
8462
  function _next2() {
8570
8463
  _next2 = _asyncToGenerator(function* () {
8571
8464
  try {
8572
- var _ref = yield iterator.next(), value = _ref.value, done = _ref.done;
8465
+ var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done;
8573
8466
  if (done) {
8574
8467
  readable.push(null);
8575
8468
  } else if (readable.push(yield value)) {
@@ -8602,7 +8495,7 @@ var require_stream_readable = __commonJS({
8602
8495
  };
8603
8496
  var Stream = require_stream();
8604
8497
  var Buffer2 = require("buffer").Buffer;
8605
- var OurUint8Array = global.Uint8Array || function() {
8498
+ var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
8606
8499
  };
8607
8500
  function _uint8ArrayToBuffer(chunk) {
8608
8501
  return Buffer2.from(chunk);
@@ -9119,11 +9012,10 @@ var require_stream_readable = __commonJS({
9119
9012
  state.pipes = null;
9120
9013
  state.pipesCount = 0;
9121
9014
  state.flowing = false;
9122
- for (var i = 0; i < len; i++) {
9015
+ for (var i = 0; i < len; i++)
9123
9016
  dests[i].emit("unpipe", this, {
9124
9017
  hasUnpiped: false
9125
9018
  });
9126
- }
9127
9019
  return this;
9128
9020
  }
9129
9021
  var index = indexOf(state.pipes, dest);
@@ -9173,18 +9065,18 @@ var require_stream_readable = __commonJS({
9173
9065
  }
9174
9066
  return res;
9175
9067
  };
9176
- function updateReadableListening(self) {
9177
- var state = self._readableState;
9178
- state.readableListening = self.listenerCount("readable") > 0;
9068
+ function updateReadableListening(self2) {
9069
+ var state = self2._readableState;
9070
+ state.readableListening = self2.listenerCount("readable") > 0;
9179
9071
  if (state.resumeScheduled && !state.paused) {
9180
9072
  state.flowing = true;
9181
- } else if (self.listenerCount("data") > 0) {
9182
- self.resume();
9073
+ } else if (self2.listenerCount("data") > 0) {
9074
+ self2.resume();
9183
9075
  }
9184
9076
  }
9185
- function nReadingNextTick(self) {
9077
+ function nReadingNextTick(self2) {
9186
9078
  debug("readable nexttick read 0");
9187
- self.read(0);
9079
+ self2.read(0);
9188
9080
  }
9189
9081
  Readable.prototype.resume = function() {
9190
9082
  var state = this._readableState;
@@ -9226,9 +9118,8 @@ var require_stream_readable = __commonJS({
9226
9118
  function flow(stream) {
9227
9119
  var state = stream._readableState;
9228
9120
  debug("flow", state.flowing);
9229
- while (state.flowing && stream.read() !== null) {
9121
+ while (state.flowing && stream.read() !== null)
9230
9122
  ;
9231
- }
9232
9123
  }
9233
9124
  Readable.prototype.wrap = function(stream) {
9234
9125
  var _this = this;
@@ -9393,9 +9284,8 @@ var require_stream_duplex = __commonJS({
9393
9284
  "use strict";
9394
9285
  var objectKeys = Object.keys || function(obj) {
9395
9286
  var keys2 = [];
9396
- for (var key in obj) {
9287
+ for (var key in obj)
9397
9288
  keys2.push(key);
9398
- }
9399
9289
  return keys2;
9400
9290
  };
9401
9291
  module2.exports = Duplex;
@@ -9462,8 +9352,8 @@ var require_stream_duplex = __commonJS({
9462
9352
  return;
9463
9353
  process.nextTick(onEndNT, this);
9464
9354
  }
9465
- function onEndNT(self) {
9466
- self.end();
9355
+ function onEndNT(self2) {
9356
+ self2.end();
9467
9357
  }
9468
9358
  Object.defineProperty(Duplex.prototype, "destroyed", {
9469
9359
  // making it explicit this property is not enumerable
@@ -9507,7 +9397,7 @@ var require_stream_writable = __commonJS({
9507
9397
  };
9508
9398
  var Stream = require_stream();
9509
9399
  var Buffer2 = require("buffer").Buffer;
9510
- var OurUint8Array = global.Uint8Array || function() {
9400
+ var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
9511
9401
  };
9512
9402
  function _uint8ArrayToBuffer(chunk) {
9513
9403
  return Buffer2.from(chunk);
@@ -12667,14 +12557,14 @@ var require_color = __commonJS({
12667
12557
  return this[this.model]();
12668
12558
  },
12669
12559
  string: function(places) {
12670
- var self = this.model in colorString.to ? this : this.rgb();
12671
- self = self.round(typeof places === "number" ? places : 1);
12672
- var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);
12673
- return colorString.to[self.model](args);
12560
+ var self2 = this.model in colorString.to ? this : this.rgb();
12561
+ self2 = self2.round(typeof places === "number" ? places : 1);
12562
+ var args = self2.valpha === 1 ? self2.color : self2.color.concat(this.valpha);
12563
+ return colorString.to[self2.model](args);
12674
12564
  },
12675
12565
  percentString: function(places) {
12676
- var self = this.rgb().round(typeof places === "number" ? places : 1);
12677
- var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);
12566
+ var self2 = this.rgb().round(typeof places === "number" ? places : 1);
12567
+ var args = self2.valpha === 1 ? self2.color : self2.color.concat(this.valpha);
12678
12568
  return colorString.to.rgb.percent(args);
12679
12569
  },
12680
12570
  array: function() {
@@ -14256,11 +14146,11 @@ var require_stack_trace = __commonJS({
14256
14146
  if (!err.stack) {
14257
14147
  return [];
14258
14148
  }
14259
- var self = this;
14149
+ var self2 = this;
14260
14150
  var lines = err.stack.split("\n").slice(1);
14261
14151
  return lines.map(function(line) {
14262
14152
  if (line.match(/^\s*[-]{4,}$/)) {
14263
- return self._createParsedCallSite({
14153
+ return self2._createParsedCallSite({
14264
14154
  fileName: line,
14265
14155
  lineNumber: null,
14266
14156
  functionName: null,
@@ -14313,7 +14203,7 @@ var require_stack_trace = __commonJS({
14313
14203
  columnNumber: parseInt(lineMatch[4], 10) || null,
14314
14204
  "native": isNative
14315
14205
  };
14316
- return self._createParsedCallSite(properties);
14206
+ return self2._createParsedCallSite(properties);
14317
14207
  }).filter(function(callSite) {
14318
14208
  return !!callSite;
14319
14209
  });
@@ -14854,7 +14744,7 @@ var require_logger = __commonJS({
14854
14744
  var { warn } = require_common();
14855
14745
  var config = require_config2();
14856
14746
  var formatRegExp = /%[scdjifoO%]/g;
14857
- var Logger = class extends Transform {
14747
+ var Logger2 = class extends Transform {
14858
14748
  /**
14859
14749
  * Constructor function for the Logger object responsible for persisting log
14860
14750
  * messages and metadata to one or more transports.
@@ -15350,7 +15240,7 @@ var require_logger = __commonJS({
15350
15240
  }
15351
15241
  return value;
15352
15242
  }
15353
- Object.defineProperty(Logger.prototype, "transports", {
15243
+ Object.defineProperty(Logger2.prototype, "transports", {
15354
15244
  configurable: false,
15355
15245
  enumerable: true,
15356
15246
  get() {
@@ -15358,7 +15248,7 @@ var require_logger = __commonJS({
15358
15248
  return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes;
15359
15249
  }
15360
15250
  });
15361
- module2.exports = Logger;
15251
+ module2.exports = Logger2;
15362
15252
  }
15363
15253
  });
15364
15254
 
@@ -15368,14 +15258,14 @@ var require_create_logger = __commonJS({
15368
15258
  "use strict";
15369
15259
  var { LEVEL } = require_triple_beam();
15370
15260
  var config = require_config2();
15371
- var Logger = require_logger();
15261
+ var Logger2 = require_logger();
15372
15262
  var debug = require_node2()("winston:create-logger");
15373
15263
  function isLevelEnabledFunctionName(level) {
15374
15264
  return "is" + level.charAt(0).toUpperCase() + level.slice(1) + "Enabled";
15375
15265
  }
15376
15266
  module2.exports = function(opts = {}) {
15377
15267
  opts.levels = opts.levels || config.npm.levels;
15378
- class DerivedLogger extends Logger {
15268
+ class DerivedLogger extends Logger2 {
15379
15269
  /**
15380
15270
  * Create a new class derived logger for which the levels can be attached to
15381
15271
  * the prototype of. This is a V8 optimization that is well know to increase
@@ -15394,20 +15284,20 @@ var require_create_logger = __commonJS({
15394
15284
  return;
15395
15285
  }
15396
15286
  DerivedLogger.prototype[level] = function(...args) {
15397
- const self = this || logger2;
15287
+ const self2 = this || logger2;
15398
15288
  if (args.length === 1) {
15399
15289
  const [msg] = args;
15400
15290
  const info = msg && msg.message && msg || { message: msg };
15401
15291
  info.level = info[LEVEL] = level;
15402
- self._addDefaultMeta(info);
15403
- self.write(info);
15292
+ self2._addDefaultMeta(info);
15293
+ self2.write(info);
15404
15294
  return this || logger2;
15405
15295
  }
15406
15296
  if (args.length === 0) {
15407
- self.log(level, "");
15408
- return self;
15297
+ self2.log(level, "");
15298
+ return self2;
15409
15299
  }
15410
- return self.log(level, ...args);
15300
+ return self2.log(level, ...args);
15411
15301
  };
15412
15302
  DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function() {
15413
15303
  return (this || logger2).isLevelEnabled(level);
@@ -15662,6 +15552,7 @@ __export(tslib_es6_exports, {
15662
15552
  __classPrivateFieldSet: () => __classPrivateFieldSet,
15663
15553
  __createBinding: () => __createBinding,
15664
15554
  __decorate: () => __decorate,
15555
+ __esDecorate: () => __esDecorate,
15665
15556
  __exportStar: () => __exportStar,
15666
15557
  __extends: () => __extends,
15667
15558
  __generator: () => __generator,
@@ -15670,8 +15561,11 @@ __export(tslib_es6_exports, {
15670
15561
  __makeTemplateObject: () => __makeTemplateObject,
15671
15562
  __metadata: () => __metadata,
15672
15563
  __param: () => __param,
15564
+ __propKey: () => __propKey,
15673
15565
  __read: () => __read,
15674
15566
  __rest: () => __rest,
15567
+ __runInitializers: () => __runInitializers,
15568
+ __setFunctionName: () => __setFunctionName,
15675
15569
  __spread: () => __spread,
15676
15570
  __spreadArray: () => __spreadArray,
15677
15571
  __spreadArrays: () => __spreadArrays,
@@ -15713,6 +15607,65 @@ function __param(paramIndex, decorator) {
15713
15607
  decorator(target, key, paramIndex);
15714
15608
  };
15715
15609
  }
15610
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
15611
+ function accept(f) {
15612
+ if (f !== void 0 && typeof f !== "function")
15613
+ throw new TypeError("Function expected");
15614
+ return f;
15615
+ }
15616
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
15617
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
15618
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
15619
+ var _, done = false;
15620
+ for (var i = decorators.length - 1; i >= 0; i--) {
15621
+ var context = {};
15622
+ for (var p in contextIn)
15623
+ context[p] = p === "access" ? {} : contextIn[p];
15624
+ for (var p in contextIn.access)
15625
+ context.access[p] = contextIn.access[p];
15626
+ context.addInitializer = function(f) {
15627
+ if (done)
15628
+ throw new TypeError("Cannot add initializers after decoration has completed");
15629
+ extraInitializers.push(accept(f || null));
15630
+ };
15631
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
15632
+ if (kind === "accessor") {
15633
+ if (result === void 0)
15634
+ continue;
15635
+ if (result === null || typeof result !== "object")
15636
+ throw new TypeError("Object expected");
15637
+ if (_ = accept(result.get))
15638
+ descriptor.get = _;
15639
+ if (_ = accept(result.set))
15640
+ descriptor.set = _;
15641
+ if (_ = accept(result.init))
15642
+ initializers.push(_);
15643
+ } else if (_ = accept(result)) {
15644
+ if (kind === "field")
15645
+ initializers.push(_);
15646
+ else
15647
+ descriptor[key] = _;
15648
+ }
15649
+ }
15650
+ if (target)
15651
+ Object.defineProperty(target, contextIn.name, descriptor);
15652
+ done = true;
15653
+ }
15654
+ function __runInitializers(thisArg, initializers, value) {
15655
+ var useValue = arguments.length > 2;
15656
+ for (var i = 0; i < initializers.length; i++) {
15657
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
15658
+ }
15659
+ return useValue ? value : void 0;
15660
+ }
15661
+ function __propKey(x) {
15662
+ return typeof x === "symbol" ? x : "".concat(x);
15663
+ }
15664
+ function __setFunctionName(f, name, prefix) {
15665
+ if (typeof name === "symbol")
15666
+ name = name.description ? "[".concat(name.description, "]") : "";
15667
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
15668
+ }
15716
15669
  function __metadata(metadataKey, metadataValue) {
15717
15670
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
15718
15671
  return Reflect.metadata(metadataKey, metadataValue);
@@ -15932,7 +15885,7 @@ function __asyncDelegator(o) {
15932
15885
  }, i;
15933
15886
  function verb(n, f) {
15934
15887
  i[n] = o[n] ? function(v) {
15935
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
15888
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
15936
15889
  } : f;
15937
15890
  }
15938
15891
  }
@@ -35276,6 +35229,7 @@ __export(src_exports, {
35276
35229
  DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
35277
35230
  Migrator: () => Migrator,
35278
35231
  Pool: () => import_pg2.Pool,
35232
+ PoolClient: () => import_pg2.PoolClient,
35279
35233
  PostgresErrorCode: () => PostgresErrorCode,
35280
35234
  getConnectionInfo: () => getConnectionInfo
35281
35235
  });
@@ -35960,6 +35914,7 @@ var import_pg2 = __toESM(require_lib2());
35960
35914
  DEFAULT_PAGE_SIZE,
35961
35915
  Migrator,
35962
35916
  Pool,
35917
+ PoolClient,
35963
35918
  PostgresErrorCode,
35964
35919
  getConnectionInfo
35965
35920
  });