lambda-live-debugger 0.0.114 → 0.0.115

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.
@@ -1690,9 +1690,9 @@ var require_async_iterator = __commonJS({
1690
1690
  },
1691
1691
  next: function next() {
1692
1692
  var _this = this;
1693
- var error = this[kError];
1694
- if (error !== null) {
1695
- return Promise.reject(error);
1693
+ var error2 = this[kError];
1694
+ if (error2 !== null) {
1695
+ return Promise.reject(error2);
1696
1696
  }
1697
1697
  if (this[kEnded]) {
1698
1698
  return Promise.resolve(createIterResult(void 0, true));
@@ -1805,8 +1805,8 @@ var require_from = __commonJS({
1805
1805
  try {
1806
1806
  var info = gen[key](arg);
1807
1807
  var value = info.value;
1808
- } catch (error) {
1809
- reject(error);
1808
+ } catch (error2) {
1809
+ reject(error2);
1810
1810
  return;
1811
1811
  }
1812
1812
  if (info.done) {
@@ -2923,19 +2923,19 @@ var require_pipeline = __commonJS({
2923
2923
  if (streams.length < 2) {
2924
2924
  throw new ERR_MISSING_ARGS("streams");
2925
2925
  }
2926
- var error;
2926
+ var error2;
2927
2927
  var destroys = streams.map(function(stream, i) {
2928
2928
  var reading = i < streams.length - 1;
2929
2929
  var writing = i > 0;
2930
2930
  return destroyer(stream, reading, writing, function(err) {
2931
- if (!error)
2932
- error = err;
2931
+ if (!error2)
2932
+ error2 = err;
2933
2933
  if (err)
2934
2934
  destroys.forEach(call);
2935
2935
  if (reading)
2936
2936
  return;
2937
2937
  destroys.forEach(call);
2938
- callback(error);
2938
+ callback(error2);
2939
2939
  });
2940
2940
  });
2941
2941
  return streams.reduce(pipe);
@@ -3724,7 +3724,7 @@ var require_ms = __commonJS({
3724
3724
  // ../../node_modules/debug/src/common.js
3725
3725
  var require_common = __commonJS({
3726
3726
  "../../node_modules/debug/src/common.js"(exports2, module2) {
3727
- function setup(env) {
3727
+ function setup(env2) {
3728
3728
  createDebug.debug = createDebug;
3729
3729
  createDebug.default = createDebug;
3730
3730
  createDebug.coerce = coerce;
@@ -3733,8 +3733,8 @@ var require_common = __commonJS({
3733
3733
  createDebug.enabled = enabled;
3734
3734
  createDebug.humanize = require_ms();
3735
3735
  createDebug.destroy = destroy;
3736
- Object.keys(env).forEach((key) => {
3737
- createDebug[key] = env[key];
3736
+ Object.keys(env2).forEach((key) => {
3737
+ createDebug[key] = env2[key];
3738
3738
  });
3739
3739
  createDebug.names = [];
3740
3740
  createDebug.skips = [];
@@ -4021,14 +4021,14 @@ var require_browser = __commonJS({
4021
4021
  } else {
4022
4022
  exports2.storage.removeItem("debug");
4023
4023
  }
4024
- } catch (error) {
4024
+ } catch (error2) {
4025
4025
  }
4026
4026
  }
4027
4027
  function load() {
4028
4028
  let r;
4029
4029
  try {
4030
4030
  r = exports2.storage.getItem("debug");
4031
- } catch (error) {
4031
+ } catch (error2) {
4032
4032
  }
4033
4033
  if (!r && typeof process !== "undefined" && "env" in process) {
4034
4034
  r = process.env.DEBUG;
@@ -4038,7 +4038,7 @@ var require_browser = __commonJS({
4038
4038
  function localstorage() {
4039
4039
  try {
4040
4040
  return localStorage;
4041
- } catch (error) {
4041
+ } catch (error2) {
4042
4042
  }
4043
4043
  }
4044
4044
  module2.exports = require_common()(exports2);
@@ -4046,8 +4046,8 @@ var require_browser = __commonJS({
4046
4046
  formatters.j = function(v) {
4047
4047
  try {
4048
4048
  return JSON.stringify(v);
4049
- } catch (error) {
4050
- return "[UnexpectedJSONParseError]: " + error.message;
4049
+ } catch (error2) {
4050
+ return "[UnexpectedJSONParseError]: " + error2.message;
4051
4051
  }
4052
4052
  };
4053
4053
  }
@@ -4070,28 +4070,28 @@ var require_has_flag = __commonJS({
4070
4070
  var require_supports_color = __commonJS({
4071
4071
  "../../node_modules/supports-color/index.js"(exports2, module2) {
4072
4072
  "use strict";
4073
- var os = require("os");
4074
- var tty = require("tty");
4075
- var hasFlag = require_has_flag();
4076
- var { env } = process;
4077
- var flagForceColor;
4078
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
4079
- flagForceColor = 0;
4080
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
4081
- flagForceColor = 1;
4082
- }
4083
- function envForceColor() {
4084
- if ("FORCE_COLOR" in env) {
4085
- if (env.FORCE_COLOR === "true") {
4073
+ var os2 = require("os");
4074
+ var tty2 = require("tty");
4075
+ var hasFlag2 = require_has_flag();
4076
+ var { env: env2 } = process;
4077
+ var flagForceColor2;
4078
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
4079
+ flagForceColor2 = 0;
4080
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
4081
+ flagForceColor2 = 1;
4082
+ }
4083
+ function envForceColor2() {
4084
+ if ("FORCE_COLOR" in env2) {
4085
+ if (env2.FORCE_COLOR === "true") {
4086
4086
  return 1;
4087
4087
  }
4088
- if (env.FORCE_COLOR === "false") {
4088
+ if (env2.FORCE_COLOR === "false") {
4089
4089
  return 0;
4090
4090
  }
4091
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
4091
+ return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
4092
4092
  }
4093
4093
  }
4094
- function translateLevel(level) {
4094
+ function translateLevel2(level) {
4095
4095
  if (level === 0) {
4096
4096
  return false;
4097
4097
  }
@@ -4102,20 +4102,20 @@ var require_supports_color = __commonJS({
4102
4102
  has16m: level >= 3
4103
4103
  };
4104
4104
  }
4105
- function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
4106
- const noFlagForceColor = envForceColor();
4105
+ function supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
4106
+ const noFlagForceColor = envForceColor2();
4107
4107
  if (noFlagForceColor !== void 0) {
4108
- flagForceColor = noFlagForceColor;
4108
+ flagForceColor2 = noFlagForceColor;
4109
4109
  }
4110
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
4110
+ const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
4111
4111
  if (forceColor === 0) {
4112
4112
  return 0;
4113
4113
  }
4114
4114
  if (sniffFlags) {
4115
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
4115
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
4116
4116
  return 3;
4117
4117
  }
4118
- if (hasFlag("color=256")) {
4118
+ if (hasFlag2("color=256")) {
4119
4119
  return 2;
4120
4120
  }
4121
4121
  }
@@ -4123,59 +4123,59 @@ var require_supports_color = __commonJS({
4123
4123
  return 0;
4124
4124
  }
4125
4125
  const min = forceColor || 0;
4126
- if (env.TERM === "dumb") {
4126
+ if (env2.TERM === "dumb") {
4127
4127
  return min;
4128
4128
  }
4129
4129
  if (process.platform === "win32") {
4130
- const osRelease = os.release().split(".");
4130
+ const osRelease = os2.release().split(".");
4131
4131
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
4132
4132
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
4133
4133
  }
4134
4134
  return 1;
4135
4135
  }
4136
- if ("CI" in env) {
4137
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
4136
+ if ("CI" in env2) {
4137
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
4138
4138
  return 1;
4139
4139
  }
4140
4140
  return min;
4141
4141
  }
4142
- if ("TEAMCITY_VERSION" in env) {
4143
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
4142
+ if ("TEAMCITY_VERSION" in env2) {
4143
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
4144
4144
  }
4145
- if (env.COLORTERM === "truecolor") {
4145
+ if (env2.COLORTERM === "truecolor") {
4146
4146
  return 3;
4147
4147
  }
4148
- if ("TERM_PROGRAM" in env) {
4149
- const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
4150
- switch (env.TERM_PROGRAM) {
4148
+ if ("TERM_PROGRAM" in env2) {
4149
+ const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
4150
+ switch (env2.TERM_PROGRAM) {
4151
4151
  case "iTerm.app":
4152
4152
  return version2 >= 3 ? 3 : 2;
4153
4153
  case "Apple_Terminal":
4154
4154
  return 2;
4155
4155
  }
4156
4156
  }
4157
- if (/-256(color)?$/i.test(env.TERM)) {
4157
+ if (/-256(color)?$/i.test(env2.TERM)) {
4158
4158
  return 2;
4159
4159
  }
4160
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
4160
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
4161
4161
  return 1;
4162
4162
  }
4163
- if ("COLORTERM" in env) {
4163
+ if ("COLORTERM" in env2) {
4164
4164
  return 1;
4165
4165
  }
4166
4166
  return min;
4167
4167
  }
4168
4168
  function getSupportLevel(stream, options = {}) {
4169
- const level = supportsColor(stream, {
4169
+ const level = supportsColor2(stream, {
4170
4170
  streamIsTTY: stream && stream.isTTY,
4171
4171
  ...options
4172
4172
  });
4173
- return translateLevel(level);
4173
+ return translateLevel2(level);
4174
4174
  }
4175
4175
  module2.exports = {
4176
4176
  supportsColor: getSupportLevel,
4177
- stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
4178
- stderr: getSupportLevel({ isTTY: tty.isatty(2) })
4177
+ stdout: getSupportLevel({ isTTY: tty2.isatty(1) }),
4178
+ stderr: getSupportLevel({ isTTY: tty2.isatty(2) })
4179
4179
  };
4180
4180
  }
4181
4181
  });
@@ -4183,10 +4183,10 @@ var require_supports_color = __commonJS({
4183
4183
  // ../../node_modules/debug/src/node.js
4184
4184
  var require_node2 = __commonJS({
4185
4185
  "../../node_modules/debug/src/node.js"(exports2, module2) {
4186
- var tty = require("tty");
4186
+ var tty2 = require("tty");
4187
4187
  var util = require("util");
4188
4188
  exports2.init = init;
4189
- exports2.log = log;
4189
+ exports2.log = log2;
4190
4190
  exports2.formatArgs = formatArgs;
4191
4191
  exports2.save = save;
4192
4192
  exports2.load = load;
@@ -4198,8 +4198,8 @@ var require_node2 = __commonJS({
4198
4198
  );
4199
4199
  exports2.colors = [6, 2, 3, 4, 5, 1];
4200
4200
  try {
4201
- const supportsColor = require_supports_color();
4202
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
4201
+ const supportsColor2 = require_supports_color();
4202
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
4203
4203
  exports2.colors = [
4204
4204
  20,
4205
4205
  21,
@@ -4279,7 +4279,7 @@ var require_node2 = __commonJS({
4279
4279
  221
4280
4280
  ];
4281
4281
  }
4282
- } catch (error) {
4282
+ } catch (error2) {
4283
4283
  }
4284
4284
  exports2.inspectOpts = Object.keys(process.env).filter((key) => {
4285
4285
  return /^debug_/i.test(key);
@@ -4301,7 +4301,7 @@ var require_node2 = __commonJS({
4301
4301
  return obj;
4302
4302
  }, {});
4303
4303
  function useColors() {
4304
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
4304
+ return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
4305
4305
  }
4306
4306
  function formatArgs(args) {
4307
4307
  const { namespace: name, useColors: useColors2 } = this;
@@ -4321,7 +4321,7 @@ var require_node2 = __commonJS({
4321
4321
  }
4322
4322
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
4323
4323
  }
4324
- function log(...args) {
4324
+ function log2(...args) {
4325
4325
  return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
4326
4326
  }
4327
4327
  function save(namespaces) {
@@ -6214,8 +6214,8 @@ var require_client = __commonJS({
6214
6214
  sendPacket(client, packet, cb);
6215
6215
  });
6216
6216
  }
6217
- function nop(error) {
6218
- debug("nop ::", error);
6217
+ function nop(error2) {
6218
+ debug("nop ::", error2);
6219
6219
  }
6220
6220
  function MqttClient(streamBuilder, options) {
6221
6221
  var k;
@@ -6346,13 +6346,13 @@ var require_client = __commonJS({
6346
6346
  parser.parse(buf);
6347
6347
  work();
6348
6348
  };
6349
- function streamErrorHandler(error) {
6350
- debug("streamErrorHandler :: error", error.message);
6351
- if (socketErrors.includes(error.code)) {
6349
+ function streamErrorHandler(error2) {
6350
+ debug("streamErrorHandler :: error", error2.message);
6351
+ if (socketErrors.includes(error2.code)) {
6352
6352
  debug("streamErrorHandler :: emitting error");
6353
- that.emit("error", error);
6353
+ that.emit("error", error2);
6354
6354
  } else {
6355
- nop(error);
6355
+ nop(error2);
6356
6356
  }
6357
6357
  }
6358
6358
  debug("_setupStream :: pipe stream to writable stream");
@@ -6963,13 +6963,13 @@ var require_client = __commonJS({
6963
6963
  debug("_handlePublish: qos %d", qos);
6964
6964
  switch (qos) {
6965
6965
  case 2: {
6966
- options.customHandleAcks(topic2, message, packet, function(error, code) {
6967
- if (!(error instanceof Error)) {
6968
- code = error;
6969
- error = null;
6966
+ options.customHandleAcks(topic2, message, packet, function(error2, code) {
6967
+ if (!(error2 instanceof Error)) {
6968
+ code = error2;
6969
+ error2 = null;
6970
6970
  }
6971
- if (error) {
6972
- return that.emit("error", error);
6971
+ if (error2) {
6972
+ return that.emit("error", error2);
6973
6973
  }
6974
6974
  if (validReasonCodes.indexOf(code) === -1) {
6975
6975
  return that.emit("error", new Error("Wrong reason code for pubrec"));
@@ -6985,13 +6985,13 @@ var require_client = __commonJS({
6985
6985
  break;
6986
6986
  }
6987
6987
  case 1: {
6988
- options.customHandleAcks(topic2, message, packet, function(error, code) {
6989
- if (!(error instanceof Error)) {
6990
- code = error;
6991
- error = null;
6988
+ options.customHandleAcks(topic2, message, packet, function(error2, code) {
6989
+ if (!(error2 instanceof Error)) {
6990
+ code = error2;
6991
+ error2 = null;
6992
6992
  }
6993
- if (error) {
6994
- return that.emit("error", error);
6993
+ if (error2) {
6994
+ return that.emit("error", error2);
6995
6995
  }
6996
6996
  if (validReasonCodes.indexOf(code) === -1) {
6997
6997
  return that.emit("error", new Error("Wrong reason code for puback"));
@@ -8660,7 +8660,7 @@ var require_receiver = __commonJS({
8660
8660
  const buf = this.consume(2);
8661
8661
  if ((buf[0] & 48) !== 0) {
8662
8662
  this._loop = false;
8663
- return error(
8663
+ return error2(
8664
8664
  RangeError,
8665
8665
  "RSV2 and RSV3 must be clear",
8666
8666
  true,
@@ -8671,7 +8671,7 @@ var require_receiver = __commonJS({
8671
8671
  const compressed = (buf[0] & 64) === 64;
8672
8672
  if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
8673
8673
  this._loop = false;
8674
- return error(
8674
+ return error2(
8675
8675
  RangeError,
8676
8676
  "RSV1 must be clear",
8677
8677
  true,
@@ -8685,7 +8685,7 @@ var require_receiver = __commonJS({
8685
8685
  if (this._opcode === 0) {
8686
8686
  if (compressed) {
8687
8687
  this._loop = false;
8688
- return error(
8688
+ return error2(
8689
8689
  RangeError,
8690
8690
  "RSV1 must be clear",
8691
8691
  true,
@@ -8695,7 +8695,7 @@ var require_receiver = __commonJS({
8695
8695
  }
8696
8696
  if (!this._fragmented) {
8697
8697
  this._loop = false;
8698
- return error(
8698
+ return error2(
8699
8699
  RangeError,
8700
8700
  "invalid opcode 0",
8701
8701
  true,
@@ -8707,7 +8707,7 @@ var require_receiver = __commonJS({
8707
8707
  } else if (this._opcode === 1 || this._opcode === 2) {
8708
8708
  if (this._fragmented) {
8709
8709
  this._loop = false;
8710
- return error(
8710
+ return error2(
8711
8711
  RangeError,
8712
8712
  `invalid opcode ${this._opcode}`,
8713
8713
  true,
@@ -8719,7 +8719,7 @@ var require_receiver = __commonJS({
8719
8719
  } else if (this._opcode > 7 && this._opcode < 11) {
8720
8720
  if (!this._fin) {
8721
8721
  this._loop = false;
8722
- return error(
8722
+ return error2(
8723
8723
  RangeError,
8724
8724
  "FIN must be set",
8725
8725
  true,
@@ -8729,7 +8729,7 @@ var require_receiver = __commonJS({
8729
8729
  }
8730
8730
  if (compressed) {
8731
8731
  this._loop = false;
8732
- return error(
8732
+ return error2(
8733
8733
  RangeError,
8734
8734
  "RSV1 must be clear",
8735
8735
  true,
@@ -8739,7 +8739,7 @@ var require_receiver = __commonJS({
8739
8739
  }
8740
8740
  if (this._payloadLength > 125) {
8741
8741
  this._loop = false;
8742
- return error(
8742
+ return error2(
8743
8743
  RangeError,
8744
8744
  `invalid payload length ${this._payloadLength}`,
8745
8745
  true,
@@ -8749,7 +8749,7 @@ var require_receiver = __commonJS({
8749
8749
  }
8750
8750
  } else {
8751
8751
  this._loop = false;
8752
- return error(
8752
+ return error2(
8753
8753
  RangeError,
8754
8754
  `invalid opcode ${this._opcode}`,
8755
8755
  true,
@@ -8763,7 +8763,7 @@ var require_receiver = __commonJS({
8763
8763
  if (this._isServer) {
8764
8764
  if (!this._masked) {
8765
8765
  this._loop = false;
8766
- return error(
8766
+ return error2(
8767
8767
  RangeError,
8768
8768
  "MASK must be set",
8769
8769
  true,
@@ -8773,7 +8773,7 @@ var require_receiver = __commonJS({
8773
8773
  }
8774
8774
  } else if (this._masked) {
8775
8775
  this._loop = false;
8776
- return error(
8776
+ return error2(
8777
8777
  RangeError,
8778
8778
  "MASK must be clear",
8779
8779
  true,
@@ -8817,7 +8817,7 @@ var require_receiver = __commonJS({
8817
8817
  const num = buf.readUInt32BE(0);
8818
8818
  if (num > Math.pow(2, 53 - 32) - 1) {
8819
8819
  this._loop = false;
8820
- return error(
8820
+ return error2(
8821
8821
  RangeError,
8822
8822
  "Unsupported WebSocket frame: payload length > 2^53 - 1",
8823
8823
  false,
@@ -8839,7 +8839,7 @@ var require_receiver = __commonJS({
8839
8839
  this._totalPayloadLength += this._payloadLength;
8840
8840
  if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
8841
8841
  this._loop = false;
8842
- return error(
8842
+ return error2(
8843
8843
  RangeError,
8844
8844
  "Max payload size exceeded",
8845
8845
  false,
@@ -8913,7 +8913,7 @@ var require_receiver = __commonJS({
8913
8913
  this._messageLength += buf.length;
8914
8914
  if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
8915
8915
  return cb(
8916
- error(
8916
+ error2(
8917
8917
  RangeError,
8918
8918
  "Max payload size exceeded",
8919
8919
  false,
@@ -8958,7 +8958,7 @@ var require_receiver = __commonJS({
8958
8958
  const buf = concat(fragments, messageLength);
8959
8959
  if (!isValidUTF8(buf)) {
8960
8960
  this._loop = false;
8961
- return error(
8961
+ return error2(
8962
8962
  Error,
8963
8963
  "invalid UTF-8 sequence",
8964
8964
  true,
@@ -8985,7 +8985,7 @@ var require_receiver = __commonJS({
8985
8985
  this.emit("conclude", 1005, "");
8986
8986
  this.end();
8987
8987
  } else if (data.length === 1) {
8988
- return error(
8988
+ return error2(
8989
8989
  RangeError,
8990
8990
  "invalid payload length 1",
8991
8991
  true,
@@ -8995,7 +8995,7 @@ var require_receiver = __commonJS({
8995
8995
  } else {
8996
8996
  const code = data.readUInt16BE(0);
8997
8997
  if (!isValidStatusCode(code)) {
8998
- return error(
8998
+ return error2(
8999
8999
  RangeError,
9000
9000
  `invalid status code ${code}`,
9001
9001
  true,
@@ -9005,7 +9005,7 @@ var require_receiver = __commonJS({
9005
9005
  }
9006
9006
  const buf = data.slice(2);
9007
9007
  if (!isValidUTF8(buf)) {
9008
- return error(
9008
+ return error2(
9009
9009
  Error,
9010
9010
  "invalid UTF-8 sequence",
9011
9011
  true,
@@ -9025,11 +9025,11 @@ var require_receiver = __commonJS({
9025
9025
  }
9026
9026
  };
9027
9027
  module2.exports = Receiver;
9028
- function error(ErrorCtor, message, prefix, statusCode, errorCode) {
9028
+ function error2(ErrorCtor, message, prefix, statusCode, errorCode) {
9029
9029
  const err = new ErrorCtor(
9030
9030
  prefix ? `Invalid WebSocket frame: ${message}` : message
9031
9031
  );
9032
- Error.captureStackTrace(err, error);
9032
+ Error.captureStackTrace(err, error2);
9033
9033
  err.code = errorCode;
9034
9034
  err[kStatusCode] = statusCode;
9035
9035
  return err;
@@ -9470,10 +9470,10 @@ var require_event_target = __commonJS({
9470
9470
  * @param {WebSocket} target A reference to the target to which the event was
9471
9471
  * dispatched
9472
9472
  */
9473
- constructor(error, target) {
9473
+ constructor(error2, target) {
9474
9474
  super("error", target);
9475
- this.message = error.message;
9476
- this.error = error;
9475
+ this.message = error2.message;
9476
+ this.error = error2;
9477
9477
  }
9478
9478
  };
9479
9479
  var EventTarget = {
@@ -9498,8 +9498,8 @@ var require_event_target = __commonJS({
9498
9498
  function onClose(code, message) {
9499
9499
  listener.call(this, new CloseEvent(code, message, this));
9500
9500
  }
9501
- function onError(error) {
9502
- listener.call(this, new ErrorEvent(error, this));
9501
+ function onError(error2) {
9502
+ listener.call(this, new ErrorEvent(error2, this));
9503
9503
  }
9504
9504
  function onOpen() {
9505
9505
  listener.call(this, new OpenEvent(this));
@@ -10687,7 +10687,7 @@ var require_stream2 = __commonJS({
10687
10687
  ws._socket.pause();
10688
10688
  }
10689
10689
  });
10690
- ws.once("error", function error(err) {
10690
+ ws.once("error", function error2(err) {
10691
10691
  if (duplex.destroyed)
10692
10692
  return;
10693
10693
  terminateOnDestroy = false;
@@ -10705,7 +10705,7 @@ var require_stream2 = __commonJS({
10705
10705
  return;
10706
10706
  }
10707
10707
  let called = false;
10708
- ws.once("error", function error(err2) {
10708
+ ws.once("error", function error2(err2) {
10709
10709
  called = true;
10710
10710
  callback(err2);
10711
10711
  });
@@ -14504,11 +14504,11 @@ var require_WebSocket = __commonJS({
14504
14504
  if (!this._finalized)
14505
14505
  this.close(code, reason);
14506
14506
  };
14507
- this._receiver.onerror = (error, code) => {
14507
+ this._receiver.onerror = (error2, code) => {
14508
14508
  this._closeMessage = "";
14509
14509
  this._closeCode = code;
14510
14510
  this.readyState = _WebSocket.CLOSING;
14511
- this.emit("error", error);
14511
+ this.emit("error", error2);
14512
14512
  this.finalize(true);
14513
14513
  };
14514
14514
  this.readyState = _WebSocket.OPEN;
@@ -14520,13 +14520,13 @@ var require_WebSocket = __commonJS({
14520
14520
  * @param {(Boolean|Error)} error Indicates whether or not an error occurred
14521
14521
  * @private
14522
14522
  */
14523
- finalize(error) {
14523
+ finalize(error2) {
14524
14524
  if (this._finalized)
14525
14525
  return;
14526
14526
  this.readyState = _WebSocket.CLOSING;
14527
14527
  this._finalized = true;
14528
- if (typeof error === "object")
14529
- this.emit("error", error);
14528
+ if (typeof error2 === "object")
14529
+ this.emit("error", error2);
14530
14530
  if (!this._socket)
14531
14531
  return this.emitClose();
14532
14532
  clearTimeout(this._closeTimer);
@@ -14534,7 +14534,7 @@ var require_WebSocket = __commonJS({
14534
14534
  this._ultron.destroy();
14535
14535
  this._ultron = null;
14536
14536
  this._socket.on("error", constants.NOOP);
14537
- if (!error)
14537
+ if (!error2)
14538
14538
  this._socket.end();
14539
14539
  else
14540
14540
  this._socket.destroy();
@@ -14891,11 +14891,11 @@ var require_WebSocket = __commonJS({
14891
14891
  this.finalize(new Error("opening handshake has timed out"));
14892
14892
  });
14893
14893
  }
14894
- this._req.on("error", (error) => {
14894
+ this._req.on("error", (error2) => {
14895
14895
  if (this._req.aborted)
14896
14896
  return;
14897
14897
  this._req = null;
14898
- this.finalize(error);
14898
+ this.finalize(error2);
14899
14899
  });
14900
14900
  this._req.on("response", (res) => {
14901
14901
  if (!this.emit("unexpected-response", this._req, res)) {
@@ -18092,8 +18092,8 @@ var require_device = __commonJS({
18092
18092
  device3.on("offline", function() {
18093
18093
  that.emit("offline");
18094
18094
  });
18095
- device3.on("error", function(error) {
18096
- that.emit("error", error);
18095
+ device3.on("error", function(error2) {
18096
+ that.emit("error", error2);
18097
18097
  });
18098
18098
  device3.on("packetsend", function(packet) {
18099
18099
  that.emit("packetsend", packet);
@@ -18341,8 +18341,8 @@ var require_thing = __commonJS({
18341
18341
  device3.on("offline", function() {
18342
18342
  that.emit("offline");
18343
18343
  });
18344
- device3.on("error", function(error) {
18345
- that.emit("error", error);
18344
+ device3.on("error", function(error2) {
18345
+ that.emit("error", error2);
18346
18346
  });
18347
18347
  device3.on("packetsend", function(packet) {
18348
18348
  that.emit("packetsend", packet);
@@ -18806,8 +18806,8 @@ var require_jobs = __commonJS({
18806
18806
  device3.on("offline", function() {
18807
18807
  that.emit("offline");
18808
18808
  });
18809
- device3.on("error", function(error) {
18810
- that.emit("error", error);
18809
+ device3.on("error", function(error2) {
18810
+ that.emit("error", error2);
18811
18811
  });
18812
18812
  device3.on("message", that._handleMessages);
18813
18813
  this.publish = device3.publish;
@@ -19281,7 +19281,7 @@ var require_dist_cjs4 = __commonJS({
19281
19281
  metadata: $metadata
19282
19282
  });
19283
19283
  return response;
19284
- } catch (error) {
19284
+ } catch (error2) {
19285
19285
  const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
19286
19286
  const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
19287
19287
  const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
@@ -19289,10 +19289,10 @@ var require_dist_cjs4 = __commonJS({
19289
19289
  clientName,
19290
19290
  commandName,
19291
19291
  input: inputFilterSensitiveLog(args.input),
19292
- error,
19293
- metadata: error.$metadata
19292
+ error: error2,
19293
+ metadata: error2.$metadata
19294
19294
  });
19295
- throw error;
19295
+ throw error2;
19296
19296
  }
19297
19297
  }, "loggerMiddleware");
19298
19298
  var loggerMiddlewareOptions = {
@@ -19495,7 +19495,7 @@ var require_dist_cjs6 = __commonJS({
19495
19495
  return url;
19496
19496
  }
19497
19497
  return new URL(value);
19498
- } catch (error) {
19498
+ } catch (error2) {
19499
19499
  return null;
19500
19500
  }
19501
19501
  })();
@@ -19682,9 +19682,9 @@ var require_dist_cjs6 = __commonJS({
19682
19682
  if (typeof expression === "string") {
19683
19683
  try {
19684
19684
  return new URL(expression);
19685
- } catch (error) {
19686
- console.error(`Failed to construct URL with ${expression}`, error);
19687
- throw error;
19685
+ } catch (error2) {
19686
+ console.error(`Failed to construct URL with ${expression}`, error2);
19687
+ throw error2;
19688
19688
  }
19689
19689
  }
19690
19690
  throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`);
@@ -19713,13 +19713,13 @@ var require_dist_cjs6 = __commonJS({
19713
19713
  };
19714
19714
  }, "evaluateEndpointRule");
19715
19715
  var evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => {
19716
- const { conditions, error } = errorRule;
19716
+ const { conditions, error: error2 } = errorRule;
19717
19717
  const { result, referenceRecord } = evaluateConditions(conditions, options);
19718
19718
  if (!result) {
19719
19719
  return;
19720
19720
  }
19721
19721
  throw new EndpointError2(
19722
- evaluateExpression(error, "Error", {
19722
+ evaluateExpression(error2, "Error", {
19723
19723
  ...options,
19724
19724
  referenceRecord: { ...options.referenceRecord, ...referenceRecord }
19725
19725
  })
@@ -20396,7 +20396,7 @@ var require_dist_cjs11 = __commonJS({
20396
20396
  var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
20397
20397
  var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
20398
20398
  var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
20399
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),
20399
+ environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),
20400
20400
  configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),
20401
20401
  default: false
20402
20402
  };
@@ -20404,7 +20404,7 @@ var require_dist_cjs11 = __commonJS({
20404
20404
  var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
20405
20405
  var DEFAULT_USE_FIPS_ENDPOINT = false;
20406
20406
  var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
20407
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),
20407
+ environmentVariableSelector: (env2) => (0, import_util_config_provider.booleanSelector)(env2, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),
20408
20408
  configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),
20409
20409
  default: false
20410
20410
  };
@@ -20448,7 +20448,7 @@ var require_dist_cjs11 = __commonJS({
20448
20448
  var REGION_ENV_NAME = "AWS_REGION";
20449
20449
  var REGION_INI_NAME = "region";
20450
20450
  var NODE_REGION_CONFIG_OPTIONS = {
20451
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
20451
+ environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
20452
20452
  configFileSelector: (profile) => profile[REGION_INI_NAME],
20453
20453
  default: () => {
20454
20454
  throw new Error("Region is missing");
@@ -20574,8 +20574,8 @@ var require_dist_cjs12 = __commonJS({
20574
20574
  this.name = "ProviderError";
20575
20575
  Object.setPrototypeOf(this, _ProviderError2.prototype);
20576
20576
  }
20577
- static from(error, tryNextLink = true) {
20578
- return Object.assign(new this(error.message, tryNextLink), error);
20577
+ static from(error2, tryNextLink = true) {
20578
+ return Object.assign(new this(error2.message, tryNextLink), error2);
20579
20579
  }
20580
20580
  };
20581
20581
  __name(_ProviderError, "ProviderError");
@@ -20990,12 +20990,12 @@ var require_getEndpointUrlConfig = __commonJS({
20990
20990
  var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
20991
20991
  var CONFIG_ENDPOINT_URL = "endpoint_url";
20992
20992
  var getEndpointUrlConfig = (serviceId) => ({
20993
- environmentVariableSelector: (env) => {
20993
+ environmentVariableSelector: (env2) => {
20994
20994
  const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
20995
- const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
20995
+ const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
20996
20996
  if (serviceEndpointUrl)
20997
20997
  return serviceEndpointUrl;
20998
- const endpointUrl = env[ENV_ENDPOINT_URL];
20998
+ const endpointUrl = env2[ENV_ENDPOINT_URL];
20999
20999
  if (endpointUrl)
21000
21000
  return endpointUrl;
21001
21001
  return void 0;
@@ -21170,20 +21170,20 @@ var require_dist_cjs17 = __commonJS({
21170
21170
  response,
21171
21171
  output: parsed
21172
21172
  };
21173
- } catch (error) {
21174
- Object.defineProperty(error, "$response", {
21173
+ } catch (error2) {
21174
+ Object.defineProperty(error2, "$response", {
21175
21175
  value: response
21176
21176
  });
21177
- if (!("$metadata" in error)) {
21177
+ if (!("$metadata" in error2)) {
21178
21178
  const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
21179
- error.message += "\n " + hint;
21180
- if (typeof error.$responseBodyText !== "undefined") {
21181
- if (error.$response) {
21182
- error.$response.body = error.$responseBodyText;
21179
+ error2.message += "\n " + hint;
21180
+ if (typeof error2.$responseBodyText !== "undefined") {
21181
+ if (error2.$response) {
21182
+ error2.$response.body = error2.$responseBodyText;
21183
21183
  }
21184
21184
  }
21185
21185
  }
21186
- throw error;
21186
+ throw error2;
21187
21187
  }
21188
21188
  }, "deserializerMiddleware");
21189
21189
  var serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => {
@@ -21862,25 +21862,25 @@ var require_dist_cjs19 = __commonJS({
21862
21862
  var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
21863
21863
  var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
21864
21864
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
21865
- var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait");
21866
- var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError");
21867
- var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => {
21865
+ var isRetryableByTrait = /* @__PURE__ */ __name((error2) => error2.$retryable !== void 0, "isRetryableByTrait");
21866
+ var isClockSkewError = /* @__PURE__ */ __name((error2) => CLOCK_SKEW_ERROR_CODES.includes(error2.name), "isClockSkewError");
21867
+ var isClockSkewCorrectedError = /* @__PURE__ */ __name((error2) => {
21868
21868
  var _a;
21869
- return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected;
21869
+ return (_a = error2.$metadata) == null ? void 0 : _a.clockSkewCorrected;
21870
21870
  }, "isClockSkewCorrectedError");
21871
- var isThrottlingError = /* @__PURE__ */ __name((error) => {
21871
+ var isThrottlingError = /* @__PURE__ */ __name((error2) => {
21872
21872
  var _a, _b;
21873
- return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true;
21873
+ return ((_a = error2.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error2.name) || ((_b = error2.$retryable) == null ? void 0 : _b.throttling) == true;
21874
21874
  }, "isThrottlingError");
21875
- var isTransientError = /* @__PURE__ */ __name((error) => {
21875
+ var isTransientError = /* @__PURE__ */ __name((error2) => {
21876
21876
  var _a;
21877
- return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);
21877
+ return isClockSkewCorrectedError(error2) || TRANSIENT_ERROR_CODES.includes(error2.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error2 == null ? void 0 : error2.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error2.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);
21878
21878
  }, "isTransientError");
21879
- var isServerError = /* @__PURE__ */ __name((error) => {
21879
+ var isServerError = /* @__PURE__ */ __name((error2) => {
21880
21880
  var _a;
21881
- if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) {
21882
- const statusCode = error.$metadata.httpStatusCode;
21883
- if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
21881
+ if (((_a = error2.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) {
21882
+ const statusCode = error2.$metadata.httpStatusCode;
21883
+ if (500 <= statusCode && statusCode <= 599 && !isTransientError(error2)) {
21884
21884
  return true;
21885
21885
  }
21886
21886
  return false;
@@ -22124,7 +22124,7 @@ var require_dist_cjs20 = __commonJS({
22124
22124
  async getMaxAttempts() {
22125
22125
  try {
22126
22126
  return await this.maxAttemptsProvider();
22127
- } catch (error) {
22127
+ } catch (error2) {
22128
22128
  console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
22129
22129
  return DEFAULT_MAX_ATTEMPTS;
22130
22130
  }
@@ -25216,13 +25216,13 @@ var require_dist_cjs33 = __commonJS({
25216
25216
  const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST;
25217
25217
  const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST;
25218
25218
  let availableCapacity = initialRetryTokens;
25219
- const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount");
25220
- const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens");
25221
- const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {
25222
- if (!hasRetryTokens(error)) {
25219
+ const getCapacityAmount = /* @__PURE__ */ __name((error2) => error2.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount");
25220
+ const hasRetryTokens = /* @__PURE__ */ __name((error2) => getCapacityAmount(error2) <= availableCapacity, "hasRetryTokens");
25221
+ const retrieveRetryTokens = /* @__PURE__ */ __name((error2) => {
25222
+ if (!hasRetryTokens(error2)) {
25223
25223
  throw new Error("No retry token available");
25224
25224
  }
25225
- const capacityAmount = getCapacityAmount(error);
25225
+ const capacityAmount = getCapacityAmount(error2);
25226
25226
  availableCapacity -= capacityAmount;
25227
25227
  return capacityAmount;
25228
25228
  }, "retrieveRetryTokens");
@@ -25238,20 +25238,20 @@ var require_dist_cjs33 = __commonJS({
25238
25238
  }, "getDefaultRetryQuota");
25239
25239
  var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider");
25240
25240
  var import_service_error_classification = require_dist_cjs19();
25241
- var defaultRetryDecider = /* @__PURE__ */ __name((error) => {
25242
- if (!error) {
25241
+ var defaultRetryDecider = /* @__PURE__ */ __name((error2) => {
25242
+ if (!error2) {
25243
25243
  return false;
25244
25244
  }
25245
- return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);
25245
+ return (0, import_service_error_classification.isRetryableByTrait)(error2) || (0, import_service_error_classification.isClockSkewError)(error2) || (0, import_service_error_classification.isThrottlingError)(error2) || (0, import_service_error_classification.isTransientError)(error2);
25246
25246
  }, "defaultRetryDecider");
25247
- var asSdkError = /* @__PURE__ */ __name((error) => {
25248
- if (error instanceof Error)
25249
- return error;
25250
- if (error instanceof Object)
25251
- return Object.assign(new Error(), error);
25252
- if (typeof error === "string")
25253
- return new Error(error);
25254
- return new Error(`AWS SDK error wrapper for ${error}`);
25247
+ var asSdkError = /* @__PURE__ */ __name((error2) => {
25248
+ if (error2 instanceof Error)
25249
+ return error2;
25250
+ if (error2 instanceof Object)
25251
+ return Object.assign(new Error(), error2);
25252
+ if (typeof error2 === "string")
25253
+ return new Error(error2);
25254
+ return new Error(`AWS SDK error wrapper for ${error2}`);
25255
25255
  }, "asSdkError");
25256
25256
  var _StandardRetryStrategy = class _StandardRetryStrategy {
25257
25257
  constructor(maxAttemptsProvider, options) {
@@ -25261,14 +25261,14 @@ var require_dist_cjs33 = __commonJS({
25261
25261
  this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider;
25262
25262
  this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);
25263
25263
  }
25264
- shouldRetry(error, attempts, maxAttempts) {
25265
- return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
25264
+ shouldRetry(error2, attempts, maxAttempts) {
25265
+ return attempts < maxAttempts && this.retryDecider(error2) && this.retryQuota.hasRetryTokens(error2);
25266
25266
  }
25267
25267
  async getMaxAttempts() {
25268
25268
  let maxAttempts;
25269
25269
  try {
25270
25270
  maxAttempts = await this.maxAttemptsProvider();
25271
- } catch (error) {
25271
+ } catch (error2) {
25272
25272
  maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;
25273
25273
  }
25274
25274
  return maxAttempts;
@@ -25362,8 +25362,8 @@ var require_dist_cjs33 = __commonJS({
25362
25362
  var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
25363
25363
  var CONFIG_MAX_ATTEMPTS = "max_attempts";
25364
25364
  var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
25365
- environmentVariableSelector: (env) => {
25366
- const value = env[ENV_MAX_ATTEMPTS];
25365
+ environmentVariableSelector: (env2) => {
25366
+ const value = env2[ENV_MAX_ATTEMPTS];
25367
25367
  if (!value)
25368
25368
  return void 0;
25369
25369
  const maxAttempt = parseInt(value);
@@ -25405,7 +25405,7 @@ var require_dist_cjs33 = __commonJS({
25405
25405
  var ENV_RETRY_MODE = "AWS_RETRY_MODE";
25406
25406
  var CONFIG_RETRY_MODE = "retry_mode";
25407
25407
  var NODE_RETRY_MODE_CONFIG_OPTIONS = {
25408
- environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
25408
+ environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
25409
25409
  configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
25410
25410
  default: import_util_retry.DEFAULT_RETRY_MODE
25411
25411
  };
@@ -25489,23 +25489,23 @@ var require_dist_cjs33 = __commonJS({
25489
25489
  }
25490
25490
  }, "retryMiddleware");
25491
25491
  var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2");
25492
- var getRetryErrorInfo = /* @__PURE__ */ __name((error) => {
25492
+ var getRetryErrorInfo = /* @__PURE__ */ __name((error2) => {
25493
25493
  const errorInfo = {
25494
- error,
25495
- errorType: getRetryErrorType(error)
25494
+ error: error2,
25495
+ errorType: getRetryErrorType(error2)
25496
25496
  };
25497
- const retryAfterHint = getRetryAfterHint(error.$response);
25497
+ const retryAfterHint = getRetryAfterHint(error2.$response);
25498
25498
  if (retryAfterHint) {
25499
25499
  errorInfo.retryAfterHint = retryAfterHint;
25500
25500
  }
25501
25501
  return errorInfo;
25502
25502
  }, "getRetryErrorInfo");
25503
- var getRetryErrorType = /* @__PURE__ */ __name((error) => {
25504
- if ((0, import_service_error_classification.isThrottlingError)(error))
25503
+ var getRetryErrorType = /* @__PURE__ */ __name((error2) => {
25504
+ if ((0, import_service_error_classification.isThrottlingError)(error2))
25505
25505
  return "THROTTLING";
25506
- if ((0, import_service_error_classification.isTransientError)(error))
25506
+ if ((0, import_service_error_classification.isTransientError)(error2))
25507
25507
  return "TRANSIENT";
25508
- if ((0, import_service_error_classification.isServerError)(error))
25508
+ if ((0, import_service_error_classification.isServerError)(error2))
25509
25509
  return "SERVER_ERROR";
25510
25510
  return "CLIENT_ERROR";
25511
25511
  }, "getRetryErrorType");
@@ -25674,8 +25674,8 @@ var require_dist_cjs34 = __commonJS({
25674
25674
  }
25675
25675
  }), "getHttpAuthSchemePlugin");
25676
25676
  var import_protocol_http = require_dist_cjs2();
25677
- var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {
25678
- throw error;
25677
+ var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error2) => {
25678
+ throw error2;
25679
25679
  }, "defaultErrorHandler");
25680
25680
  var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {
25681
25681
  }, "defaultSuccessHandler");
@@ -26018,7 +26018,7 @@ var require_dist_cjs35 = __commonJS({
26018
26018
  ...request.headers,
26019
26019
  [CONTENT_LENGTH_HEADER]: String(length)
26020
26020
  };
26021
- } catch (error) {
26021
+ } catch (error2) {
26022
26022
  }
26023
26023
  }
26024
26024
  }
@@ -26308,8 +26308,8 @@ function __read(o, n) {
26308
26308
  try {
26309
26309
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
26310
26310
  ar.push(r.value);
26311
- } catch (error) {
26312
- e = { error };
26311
+ } catch (error2) {
26312
+ e = { error: error2 };
26313
26313
  } finally {
26314
26314
  try {
26315
26315
  if (r && !r.done && (m = i["return"]))
@@ -26461,7 +26461,7 @@ function __classPrivateFieldIn(state, receiver) {
26461
26461
  throw new TypeError("Cannot use 'in' operator on non-object");
26462
26462
  return typeof state === "function" ? receiver === state : state.has(receiver);
26463
26463
  }
26464
- function __addDisposableResource(env, value, async) {
26464
+ function __addDisposableResource(env2, value, async) {
26465
26465
  if (value !== null && value !== void 0) {
26466
26466
  if (typeof value !== "object" && typeof value !== "function")
26467
26467
  throw new TypeError("Object expected.");
@@ -26478,20 +26478,20 @@ function __addDisposableResource(env, value, async) {
26478
26478
  }
26479
26479
  if (typeof dispose !== "function")
26480
26480
  throw new TypeError("Object not disposable.");
26481
- env.stack.push({ value, dispose, async });
26481
+ env2.stack.push({ value, dispose, async });
26482
26482
  } else if (async) {
26483
- env.stack.push({ async: true });
26483
+ env2.stack.push({ async: true });
26484
26484
  }
26485
26485
  return value;
26486
26486
  }
26487
- function __disposeResources(env) {
26487
+ function __disposeResources(env2) {
26488
26488
  function fail(e) {
26489
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
26490
- env.hasError = true;
26489
+ env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
26490
+ env2.hasError = true;
26491
26491
  }
26492
26492
  function next() {
26493
- while (env.stack.length) {
26494
- var rec = env.stack.pop();
26493
+ while (env2.stack.length) {
26494
+ var rec = env2.stack.pop();
26495
26495
  try {
26496
26496
  var result = rec.dispose && rec.dispose.call(rec.value);
26497
26497
  if (rec.async)
@@ -26503,8 +26503,8 @@ function __disposeResources(env) {
26503
26503
  fail(e);
26504
26504
  }
26505
26505
  }
26506
- if (env.hasError)
26507
- throw env.error;
26506
+ if (env2.hasError)
26507
+ throw env2.error;
26508
26508
  }
26509
26509
  return next();
26510
26510
  }
@@ -26553,9 +26553,9 @@ var init_tslib_es6 = __esm({
26553
26553
  } : function(o, v) {
26554
26554
  o["default"] = v;
26555
26555
  };
26556
- _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
26556
+ _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error2, suppressed, message) {
26557
26557
  var e = new Error(message);
26558
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
26558
+ return e.name = "SuppressedError", e.error = error2, e.suppressed = suppressed, e;
26559
26559
  };
26560
26560
  tslib_es6_default = {
26561
26561
  __extends,
@@ -27280,18 +27280,18 @@ var require_httpAuthSchemes = __commonJS({
27280
27280
  return signedRequest;
27281
27281
  }
27282
27282
  errorHandler(signingProperties) {
27283
- return (error) => {
27284
- const serverTime = error.ServerTime ?? getDateHeader(error.$response);
27283
+ return (error2) => {
27284
+ const serverTime = error2.ServerTime ?? getDateHeader(error2.$response);
27285
27285
  if (serverTime) {
27286
27286
  const config = throwSigningPropertyError("config", signingProperties.config);
27287
27287
  const initialSystemClockOffset = config.systemClockOffset;
27288
27288
  config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
27289
27289
  const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
27290
- if (clockSkewCorrected && error.$metadata) {
27291
- error.$metadata.clockSkewCorrected = true;
27290
+ if (clockSkewCorrected && error2.$metadata) {
27291
+ error2.$metadata.clockSkewCorrected = true;
27292
27292
  }
27293
27293
  }
27294
- throw error;
27294
+ throw error2;
27295
27295
  };
27296
27296
  }
27297
27297
  successHandler(httpResponse, signingProperties) {
@@ -29709,7 +29709,7 @@ var require_dist_cjs39 = __commonJS({
29709
29709
  var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
29710
29710
  var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
29711
29711
  var ENDPOINT_CONFIG_OPTIONS = {
29712
- environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],
29712
+ environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME],
29713
29713
  configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
29714
29714
  default: void 0
29715
29715
  };
@@ -29721,7 +29721,7 @@ var require_dist_cjs39 = __commonJS({
29721
29721
  var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
29722
29722
  var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
29723
29723
  var ENDPOINT_MODE_CONFIG_OPTIONS = {
29724
- environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],
29724
+ environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME],
29725
29725
  configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
29726
29726
  default: "IPv4"
29727
29727
  /* IPv4 */
@@ -29796,8 +29796,8 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL
29796
29796
  let fallbackBlockedFromProcessEnv = false;
29797
29797
  const configValue = await (0, import_node_config_provider.loadConfig)(
29798
29798
  {
29799
- environmentVariableSelector: (env) => {
29800
- const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
29799
+ environmentVariableSelector: (env2) => {
29800
+ const envValue = env2[AWS_EC2_METADATA_V1_DISABLED];
29801
29801
  fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
29802
29802
  if (envValue === void 0) {
29803
29803
  throw new import_property_provider.CredentialsProviderError(
@@ -29866,12 +29866,12 @@ For more information, please visit: ` + STATIC_STABILITY_DOC_URL
29866
29866
  let token;
29867
29867
  try {
29868
29868
  token = (await getMetadataToken({ ...endpoint, timeout })).toString();
29869
- } catch (error) {
29870
- if ((error == null ? void 0 : error.statusCode) === 400) {
29871
- throw Object.assign(error, {
29869
+ } catch (error2) {
29870
+ if ((error2 == null ? void 0 : error2.statusCode) === 400) {
29871
+ throw Object.assign(error2, {
29872
29872
  message: "EC2 Metadata token request returned error"
29873
29873
  });
29874
- } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) {
29874
+ } else if (error2.message === "TimeoutError" || [403, 404, 405].includes(error2.statusCode)) {
29875
29875
  disableFetchToken = true;
29876
29876
  }
29877
29877
  logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
@@ -30638,8 +30638,8 @@ var require_dist_cjs44 = __commonJS({
30638
30638
  var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
30639
30639
  var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
30640
30640
  var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
30641
- environmentVariableSelector: (env) => {
30642
- return env[AWS_DEFAULTS_MODE_ENV];
30641
+ environmentVariableSelector: (env2) => {
30642
+ return env2[AWS_DEFAULTS_MODE_ENV];
30643
30643
  },
30644
30644
  configFileSelector: (profile) => {
30645
30645
  return profile[AWS_DEFAULTS_MODE_CONFIG];
@@ -30811,7 +30811,7 @@ var require_dist_cjs45 = __commonJS({
30811
30811
  var REGION_ENV_NAME = "AWS_REGION";
30812
30812
  var REGION_INI_NAME = "region";
30813
30813
  var NODE_REGION_CONFIG_OPTIONS = {
30814
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
30814
+ environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
30815
30815
  configFileSelector: (profile) => profile[REGION_INI_NAME],
30816
30816
  default: () => {
30817
30817
  throw new Error("Region is missing");
@@ -32859,13 +32859,13 @@ var require_dist_cjs48 = __commonJS({
32859
32859
  expiresAt: newTokenExpiration.toISOString(),
32860
32860
  refreshToken: newSsoOidcToken.refreshToken
32861
32861
  });
32862
- } catch (error) {
32862
+ } catch (error2) {
32863
32863
  }
32864
32864
  return {
32865
32865
  token: newSsoOidcToken.accessToken,
32866
32866
  expiration: newTokenExpiration
32867
32867
  };
32868
- } catch (error) {
32868
+ } catch (error2) {
32869
32869
  validateTokenExpiry(existingToken);
32870
32870
  return existingToken;
32871
32871
  }
@@ -35023,8 +35023,8 @@ var require_dist_cjs51 = __commonJS({
35023
35023
  throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
35024
35024
  }
35025
35025
  return getValidatedProcessCredentials(profileName, data);
35026
- } catch (error) {
35027
- throw new import_property_provider.CredentialsProviderError(error.message);
35026
+ } catch (error2) {
35027
+ throw new import_property_provider.CredentialsProviderError(error2.message);
35028
35028
  }
35029
35029
  } else {
35030
35030
  throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
@@ -49201,18 +49201,18 @@ var require_Errors = __commonJS({
49201
49201
  }
49202
49202
  }
49203
49203
  module2.exports.intoError = intoError;
49204
- function toRapidResponse(error) {
49204
+ function toRapidResponse(error2) {
49205
49205
  try {
49206
- if (util.types.isNativeError(error) || _isError(error)) {
49206
+ if (util.types.isNativeError(error2) || _isError(error2)) {
49207
49207
  return {
49208
- errorType: error.name,
49209
- errorMessage: error.message,
49210
- trace: error.stack.split("\n")
49208
+ errorType: error2.name,
49209
+ errorMessage: error2.message,
49210
+ trace: error2.stack.split("\n")
49211
49211
  };
49212
49212
  } else {
49213
49213
  return {
49214
- errorType: typeof error,
49215
- errorMessage: error.toString(),
49214
+ errorType: typeof error2,
49215
+ errorMessage: error2.toString(),
49216
49216
  trace: []
49217
49217
  };
49218
49218
  }
@@ -49224,29 +49224,29 @@ var require_Errors = __commonJS({
49224
49224
  }
49225
49225
  }
49226
49226
  module2.exports.toRapidResponse = toRapidResponse;
49227
- module2.exports.toFormatted = (error) => {
49227
+ module2.exports.toFormatted = (error2) => {
49228
49228
  try {
49229
- return " " + JSON.stringify(error, (_k, v) => _withEnumerableProperties(v));
49229
+ return " " + JSON.stringify(error2, (_k, v) => _withEnumerableProperties(v));
49230
49230
  } catch (err) {
49231
- return " " + JSON.stringify(toRapidResponse(error));
49231
+ return " " + JSON.stringify(toRapidResponse(error2));
49232
49232
  }
49233
49233
  };
49234
- function _withEnumerableProperties(error) {
49235
- if (error instanceof Error) {
49234
+ function _withEnumerableProperties(error2) {
49235
+ if (error2 instanceof Error) {
49236
49236
  let ret = Object.assign(
49237
49237
  {
49238
- errorType: error.name,
49239
- errorMessage: error.message,
49240
- code: error.code
49238
+ errorType: error2.name,
49239
+ errorMessage: error2.message,
49240
+ code: error2.code
49241
49241
  },
49242
- error
49242
+ error2
49243
49243
  );
49244
- if (typeof error.stack == "string") {
49245
- ret.stack = error.stack.split("\n");
49244
+ if (typeof error2.stack == "string") {
49245
+ ret.stack = error2.stack.split("\n");
49246
49246
  }
49247
49247
  return ret;
49248
49248
  } else {
49249
- return error;
49249
+ return error2;
49250
49250
  }
49251
49251
  }
49252
49252
  var errorClasses = [
@@ -49588,20 +49588,529 @@ function splitMessageToChunks(input) {
49588
49588
  // ../ioTService.ts
49589
49589
  var import_client_iot = __toESM(require_dist_cjs55(), 1);
49590
49590
 
49591
+ // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
49592
+ var ANSI_BACKGROUND_OFFSET = 10;
49593
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
49594
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
49595
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
49596
+ var styles = {
49597
+ modifier: {
49598
+ reset: [0, 0],
49599
+ // 21 isn't widely supported and 22 does the same thing
49600
+ bold: [1, 22],
49601
+ dim: [2, 22],
49602
+ italic: [3, 23],
49603
+ underline: [4, 24],
49604
+ overline: [53, 55],
49605
+ inverse: [7, 27],
49606
+ hidden: [8, 28],
49607
+ strikethrough: [9, 29]
49608
+ },
49609
+ color: {
49610
+ black: [30, 39],
49611
+ red: [31, 39],
49612
+ green: [32, 39],
49613
+ yellow: [33, 39],
49614
+ blue: [34, 39],
49615
+ magenta: [35, 39],
49616
+ cyan: [36, 39],
49617
+ white: [37, 39],
49618
+ // Bright color
49619
+ blackBright: [90, 39],
49620
+ gray: [90, 39],
49621
+ // Alias of `blackBright`
49622
+ grey: [90, 39],
49623
+ // Alias of `blackBright`
49624
+ redBright: [91, 39],
49625
+ greenBright: [92, 39],
49626
+ yellowBright: [93, 39],
49627
+ blueBright: [94, 39],
49628
+ magentaBright: [95, 39],
49629
+ cyanBright: [96, 39],
49630
+ whiteBright: [97, 39]
49631
+ },
49632
+ bgColor: {
49633
+ bgBlack: [40, 49],
49634
+ bgRed: [41, 49],
49635
+ bgGreen: [42, 49],
49636
+ bgYellow: [43, 49],
49637
+ bgBlue: [44, 49],
49638
+ bgMagenta: [45, 49],
49639
+ bgCyan: [46, 49],
49640
+ bgWhite: [47, 49],
49641
+ // Bright color
49642
+ bgBlackBright: [100, 49],
49643
+ bgGray: [100, 49],
49644
+ // Alias of `bgBlackBright`
49645
+ bgGrey: [100, 49],
49646
+ // Alias of `bgBlackBright`
49647
+ bgRedBright: [101, 49],
49648
+ bgGreenBright: [102, 49],
49649
+ bgYellowBright: [103, 49],
49650
+ bgBlueBright: [104, 49],
49651
+ bgMagentaBright: [105, 49],
49652
+ bgCyanBright: [106, 49],
49653
+ bgWhiteBright: [107, 49]
49654
+ }
49655
+ };
49656
+ var modifierNames = Object.keys(styles.modifier);
49657
+ var foregroundColorNames = Object.keys(styles.color);
49658
+ var backgroundColorNames = Object.keys(styles.bgColor);
49659
+ var colorNames = [...foregroundColorNames, ...backgroundColorNames];
49660
+ function assembleStyles() {
49661
+ const codes = /* @__PURE__ */ new Map();
49662
+ for (const [groupName, group] of Object.entries(styles)) {
49663
+ for (const [styleName, style] of Object.entries(group)) {
49664
+ styles[styleName] = {
49665
+ open: `\x1B[${style[0]}m`,
49666
+ close: `\x1B[${style[1]}m`
49667
+ };
49668
+ group[styleName] = styles[styleName];
49669
+ codes.set(style[0], style[1]);
49670
+ }
49671
+ Object.defineProperty(styles, groupName, {
49672
+ value: group,
49673
+ enumerable: false
49674
+ });
49675
+ }
49676
+ Object.defineProperty(styles, "codes", {
49677
+ value: codes,
49678
+ enumerable: false
49679
+ });
49680
+ styles.color.close = "\x1B[39m";
49681
+ styles.bgColor.close = "\x1B[49m";
49682
+ styles.color.ansi = wrapAnsi16();
49683
+ styles.color.ansi256 = wrapAnsi256();
49684
+ styles.color.ansi16m = wrapAnsi16m();
49685
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
49686
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
49687
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
49688
+ Object.defineProperties(styles, {
49689
+ rgbToAnsi256: {
49690
+ value(red, green, blue) {
49691
+ if (red === green && green === blue) {
49692
+ if (red < 8) {
49693
+ return 16;
49694
+ }
49695
+ if (red > 248) {
49696
+ return 231;
49697
+ }
49698
+ return Math.round((red - 8) / 247 * 24) + 232;
49699
+ }
49700
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
49701
+ },
49702
+ enumerable: false
49703
+ },
49704
+ hexToRgb: {
49705
+ value(hex) {
49706
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
49707
+ if (!matches) {
49708
+ return [0, 0, 0];
49709
+ }
49710
+ let [colorString] = matches;
49711
+ if (colorString.length === 3) {
49712
+ colorString = [...colorString].map((character) => character + character).join("");
49713
+ }
49714
+ const integer = Number.parseInt(colorString, 16);
49715
+ return [
49716
+ /* eslint-disable no-bitwise */
49717
+ integer >> 16 & 255,
49718
+ integer >> 8 & 255,
49719
+ integer & 255
49720
+ /* eslint-enable no-bitwise */
49721
+ ];
49722
+ },
49723
+ enumerable: false
49724
+ },
49725
+ hexToAnsi256: {
49726
+ value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
49727
+ enumerable: false
49728
+ },
49729
+ ansi256ToAnsi: {
49730
+ value(code) {
49731
+ if (code < 8) {
49732
+ return 30 + code;
49733
+ }
49734
+ if (code < 16) {
49735
+ return 90 + (code - 8);
49736
+ }
49737
+ let red;
49738
+ let green;
49739
+ let blue;
49740
+ if (code >= 232) {
49741
+ red = ((code - 232) * 10 + 8) / 255;
49742
+ green = red;
49743
+ blue = red;
49744
+ } else {
49745
+ code -= 16;
49746
+ const remainder = code % 36;
49747
+ red = Math.floor(code / 36) / 5;
49748
+ green = Math.floor(remainder / 6) / 5;
49749
+ blue = remainder % 6 / 5;
49750
+ }
49751
+ const value = Math.max(red, green, blue) * 2;
49752
+ if (value === 0) {
49753
+ return 30;
49754
+ }
49755
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
49756
+ if (value === 2) {
49757
+ result += 60;
49758
+ }
49759
+ return result;
49760
+ },
49761
+ enumerable: false
49762
+ },
49763
+ rgbToAnsi: {
49764
+ value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
49765
+ enumerable: false
49766
+ },
49767
+ hexToAnsi: {
49768
+ value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
49769
+ enumerable: false
49770
+ }
49771
+ });
49772
+ return styles;
49773
+ }
49774
+ var ansiStyles = assembleStyles();
49775
+ var ansi_styles_default = ansiStyles;
49776
+
49777
+ // ../../node_modules/chalk/source/vendor/supports-color/index.js
49778
+ var import_node_process = __toESM(require("node:process"), 1);
49779
+ var import_node_os = __toESM(require("node:os"), 1);
49780
+ var import_node_tty = __toESM(require("node:tty"), 1);
49781
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
49782
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
49783
+ const position = argv.indexOf(prefix + flag);
49784
+ const terminatorPosition = argv.indexOf("--");
49785
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
49786
+ }
49787
+ var { env } = import_node_process.default;
49788
+ var flagForceColor;
49789
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
49790
+ flagForceColor = 0;
49791
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
49792
+ flagForceColor = 1;
49793
+ }
49794
+ function envForceColor() {
49795
+ if ("FORCE_COLOR" in env) {
49796
+ if (env.FORCE_COLOR === "true") {
49797
+ return 1;
49798
+ }
49799
+ if (env.FORCE_COLOR === "false") {
49800
+ return 0;
49801
+ }
49802
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
49803
+ }
49804
+ }
49805
+ function translateLevel(level) {
49806
+ if (level === 0) {
49807
+ return false;
49808
+ }
49809
+ return {
49810
+ level,
49811
+ hasBasic: true,
49812
+ has256: level >= 2,
49813
+ has16m: level >= 3
49814
+ };
49815
+ }
49816
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
49817
+ const noFlagForceColor = envForceColor();
49818
+ if (noFlagForceColor !== void 0) {
49819
+ flagForceColor = noFlagForceColor;
49820
+ }
49821
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
49822
+ if (forceColor === 0) {
49823
+ return 0;
49824
+ }
49825
+ if (sniffFlags) {
49826
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
49827
+ return 3;
49828
+ }
49829
+ if (hasFlag("color=256")) {
49830
+ return 2;
49831
+ }
49832
+ }
49833
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
49834
+ return 1;
49835
+ }
49836
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
49837
+ return 0;
49838
+ }
49839
+ const min = forceColor || 0;
49840
+ if (env.TERM === "dumb") {
49841
+ return min;
49842
+ }
49843
+ if (import_node_process.default.platform === "win32") {
49844
+ const osRelease = import_node_os.default.release().split(".");
49845
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
49846
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
49847
+ }
49848
+ return 1;
49849
+ }
49850
+ if ("CI" in env) {
49851
+ if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
49852
+ return 3;
49853
+ }
49854
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
49855
+ return 1;
49856
+ }
49857
+ return min;
49858
+ }
49859
+ if ("TEAMCITY_VERSION" in env) {
49860
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
49861
+ }
49862
+ if (env.COLORTERM === "truecolor") {
49863
+ return 3;
49864
+ }
49865
+ if (env.TERM === "xterm-kitty") {
49866
+ return 3;
49867
+ }
49868
+ if ("TERM_PROGRAM" in env) {
49869
+ const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
49870
+ switch (env.TERM_PROGRAM) {
49871
+ case "iTerm.app": {
49872
+ return version2 >= 3 ? 3 : 2;
49873
+ }
49874
+ case "Apple_Terminal": {
49875
+ return 2;
49876
+ }
49877
+ }
49878
+ }
49879
+ if (/-256(color)?$/i.test(env.TERM)) {
49880
+ return 2;
49881
+ }
49882
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
49883
+ return 1;
49884
+ }
49885
+ if ("COLORTERM" in env) {
49886
+ return 1;
49887
+ }
49888
+ return min;
49889
+ }
49890
+ function createSupportsColor(stream, options = {}) {
49891
+ const level = _supportsColor(stream, {
49892
+ streamIsTTY: stream && stream.isTTY,
49893
+ ...options
49894
+ });
49895
+ return translateLevel(level);
49896
+ }
49897
+ var supportsColor = {
49898
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
49899
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
49900
+ };
49901
+ var supports_color_default = supportsColor;
49902
+
49903
+ // ../../node_modules/chalk/source/utilities.js
49904
+ function stringReplaceAll(string, substring, replacer) {
49905
+ let index = string.indexOf(substring);
49906
+ if (index === -1) {
49907
+ return string;
49908
+ }
49909
+ const substringLength = substring.length;
49910
+ let endIndex = 0;
49911
+ let returnValue = "";
49912
+ do {
49913
+ returnValue += string.slice(endIndex, index) + substring + replacer;
49914
+ endIndex = index + substringLength;
49915
+ index = string.indexOf(substring, endIndex);
49916
+ } while (index !== -1);
49917
+ returnValue += string.slice(endIndex);
49918
+ return returnValue;
49919
+ }
49920
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
49921
+ let endIndex = 0;
49922
+ let returnValue = "";
49923
+ do {
49924
+ const gotCR = string[index - 1] === "\r";
49925
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
49926
+ endIndex = index + 1;
49927
+ index = string.indexOf("\n", endIndex);
49928
+ } while (index !== -1);
49929
+ returnValue += string.slice(endIndex);
49930
+ return returnValue;
49931
+ }
49932
+
49933
+ // ../../node_modules/chalk/source/index.js
49934
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
49935
+ var GENERATOR = Symbol("GENERATOR");
49936
+ var STYLER = Symbol("STYLER");
49937
+ var IS_EMPTY = Symbol("IS_EMPTY");
49938
+ var levelMapping = [
49939
+ "ansi",
49940
+ "ansi",
49941
+ "ansi256",
49942
+ "ansi16m"
49943
+ ];
49944
+ var styles2 = /* @__PURE__ */ Object.create(null);
49945
+ var applyOptions = (object, options = {}) => {
49946
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
49947
+ throw new Error("The `level` option should be an integer from 0 to 3");
49948
+ }
49949
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
49950
+ object.level = options.level === void 0 ? colorLevel : options.level;
49951
+ };
49952
+ var chalkFactory = (options) => {
49953
+ const chalk2 = (...strings) => strings.join(" ");
49954
+ applyOptions(chalk2, options);
49955
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
49956
+ return chalk2;
49957
+ };
49958
+ function createChalk(options) {
49959
+ return chalkFactory(options);
49960
+ }
49961
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
49962
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
49963
+ styles2[styleName] = {
49964
+ get() {
49965
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
49966
+ Object.defineProperty(this, styleName, { value: builder });
49967
+ return builder;
49968
+ }
49969
+ };
49970
+ }
49971
+ styles2.visible = {
49972
+ get() {
49973
+ const builder = createBuilder(this, this[STYLER], true);
49974
+ Object.defineProperty(this, "visible", { value: builder });
49975
+ return builder;
49976
+ }
49977
+ };
49978
+ var getModelAnsi = (model, level, type, ...arguments_) => {
49979
+ if (model === "rgb") {
49980
+ if (level === "ansi16m") {
49981
+ return ansi_styles_default[type].ansi16m(...arguments_);
49982
+ }
49983
+ if (level === "ansi256") {
49984
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
49985
+ }
49986
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
49987
+ }
49988
+ if (model === "hex") {
49989
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
49990
+ }
49991
+ return ansi_styles_default[type][model](...arguments_);
49992
+ };
49993
+ var usedModels = ["rgb", "hex", "ansi256"];
49994
+ for (const model of usedModels) {
49995
+ styles2[model] = {
49996
+ get() {
49997
+ const { level } = this;
49998
+ return function(...arguments_) {
49999
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
50000
+ return createBuilder(this, styler, this[IS_EMPTY]);
50001
+ };
50002
+ }
50003
+ };
50004
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
50005
+ styles2[bgModel] = {
50006
+ get() {
50007
+ const { level } = this;
50008
+ return function(...arguments_) {
50009
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
50010
+ return createBuilder(this, styler, this[IS_EMPTY]);
50011
+ };
50012
+ }
50013
+ };
50014
+ }
50015
+ var proto = Object.defineProperties(() => {
50016
+ }, {
50017
+ ...styles2,
50018
+ level: {
50019
+ enumerable: true,
50020
+ get() {
50021
+ return this[GENERATOR].level;
50022
+ },
50023
+ set(level) {
50024
+ this[GENERATOR].level = level;
50025
+ }
50026
+ }
50027
+ });
50028
+ var createStyler = (open, close, parent) => {
50029
+ let openAll;
50030
+ let closeAll;
50031
+ if (parent === void 0) {
50032
+ openAll = open;
50033
+ closeAll = close;
50034
+ } else {
50035
+ openAll = parent.openAll + open;
50036
+ closeAll = close + parent.closeAll;
50037
+ }
50038
+ return {
50039
+ open,
50040
+ close,
50041
+ openAll,
50042
+ closeAll,
50043
+ parent
50044
+ };
50045
+ };
50046
+ var createBuilder = (self2, _styler, _isEmpty) => {
50047
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
50048
+ Object.setPrototypeOf(builder, proto);
50049
+ builder[GENERATOR] = self2;
50050
+ builder[STYLER] = _styler;
50051
+ builder[IS_EMPTY] = _isEmpty;
50052
+ return builder;
50053
+ };
50054
+ var applyStyle = (self2, string) => {
50055
+ if (self2.level <= 0 || !string) {
50056
+ return self2[IS_EMPTY] ? "" : string;
50057
+ }
50058
+ let styler = self2[STYLER];
50059
+ if (styler === void 0) {
50060
+ return string;
50061
+ }
50062
+ const { openAll, closeAll } = styler;
50063
+ if (string.includes("\x1B")) {
50064
+ while (styler !== void 0) {
50065
+ string = stringReplaceAll(string, styler.close, styler.open);
50066
+ styler = styler.parent;
50067
+ }
50068
+ }
50069
+ const lfIndex = string.indexOf("\n");
50070
+ if (lfIndex !== -1) {
50071
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
50072
+ }
50073
+ return openAll + string + closeAll;
50074
+ };
50075
+ Object.defineProperties(createChalk.prototype, styles2);
50076
+ var chalk = createChalk();
50077
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
50078
+ var source_default = chalk;
50079
+
49591
50080
  // ../logger.ts
50081
+ var orange = "#D24E01";
49592
50082
  var verboseEnabled = false;
50083
+ function log(...args) {
50084
+ args = args.map((arg) => {
50085
+ if (typeof arg === "string") {
50086
+ return arg.replace(/\[(.*?)\]/g, (match) => source_default.gray(match));
50087
+ }
50088
+ return arg;
50089
+ });
50090
+ console.log(...args);
50091
+ }
50092
+ function important(...args) {
50093
+ console.log(source_default.hex(orange)(...args));
50094
+ }
50095
+ function error(...args) {
50096
+ console.error(source_default.red(...args));
50097
+ }
50098
+ function warn(...args) {
50099
+ console.warn(source_default.hex(orange)(...args));
50100
+ }
49593
50101
  function verbose(...args) {
49594
50102
  if (verboseEnabled) {
49595
- console.info(...args);
50103
+ console.info(source_default.grey(...args));
49596
50104
  }
49597
50105
  }
49598
50106
  function setVerbose(enabled) {
49599
50107
  verboseEnabled = enabled;
49600
50108
  }
49601
50109
  var Logger = {
49602
- log: console.log,
49603
- error: console.error,
49604
- warn: console.warn,
50110
+ log,
50111
+ error,
50112
+ warn,
50113
+ important,
49605
50114
  verbose,
49606
50115
  setVerbose
49607
50116
  };
@@ -49757,9 +50266,9 @@ async function regularMode(context, event) {
49757
50266
  promiseResolve(message.data.body);
49758
50267
  }
49759
50268
  if (message.type === "ERROR") {
49760
- const error = new Error(message.data.errorMessage);
49761
- error.stack = message.data.trace;
49762
- promiseReject(error);
50269
+ const error2 = new Error(message.data.errorMessage);
50270
+ error2.stack = message.data.trace;
50271
+ promiseReject(error2);
49763
50272
  }
49764
50273
  },
49765
50274
  topic