@jr2804/livesync-cli 1.0.30-cli.1 → 1.0.51-cli.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
- const require_stream_collector = require("./stream-collector-jwXXBEUn.cjs");
1
+ const require_stream_collector = require("./stream-collector-DMWbWhbd.cjs");
2
2
  const require_httpRequest = require("./httpRequest-C7Ex2WeE.cjs");
3
3
  const require_setCredentialFeature = require("./setCredentialFeature-qcUbSyqa.cjs");
4
- const require_date_utils = require("./date-utils-Dr5LXq4_.cjs");
5
- const require_serde = require("./serde-DtADB-gG.cjs");
4
+ const require_toUtf8 = require("./toUtf8-Dj4WWtpp.cjs");
6
5
  const require_configLoader = require("./configLoader-Cur07c2S.cjs");
6
+ let node_crypto = require("node:crypto");
7
7
  let node_fs = require("node:fs");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
10
10
  let node_os = require("node:os");
11
- let stream = require("stream");
12
11
  let buffer = require("buffer");
12
+ let stream = require("stream");
13
13
  let crypto$1 = require("crypto");
14
14
  crypto$1 = require_stream_collector.__toESM(crypto$1);
15
15
  let node_process = require("node:process");
@@ -356,6 +356,232 @@ var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParameters
356
356
  }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
357
357
  } });
358
358
  //#endregion
359
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
360
+ var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
361
+ var fromBase64 = (input) => {
362
+ if (input.length * 3 % 4 !== 0) throw new TypeError(`Incorrect padding on base64 string.`);
363
+ if (!BASE64_REGEX.exec(input)) throw new TypeError(`Invalid base64 string.`);
364
+ const buffer = require_toUtf8.fromString(input, "base64");
365
+ return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
366
+ };
367
+ //#endregion
368
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
369
+ var toBase64 = (_input) => {
370
+ let input;
371
+ if (typeof _input === "string") input = require_toUtf8.fromUtf8(_input);
372
+ else input = _input;
373
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
374
+ return require_toUtf8.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
375
+ };
376
+ //#endregion
377
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
378
+ function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
379
+ return class Uint8ArrayBlobAdapter extends Uint8Array {
380
+ static fromString(source, encoding = "utf-8") {
381
+ if (typeof source === "string") {
382
+ if (encoding === "base64") return Uint8ArrayBlobAdapter.mutate(fromBase64(source));
383
+ return Uint8ArrayBlobAdapter.mutate(fromUtf8(source));
384
+ }
385
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
386
+ }
387
+ static mutate(source) {
388
+ Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
389
+ return source;
390
+ }
391
+ transformToString(encoding = "utf-8") {
392
+ if (encoding === "base64") return toBase64(this);
393
+ return toUtf8(this);
394
+ }
395
+ };
396
+ }
397
+ //#endregion
398
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
399
+ var decimalToHex$1 = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
400
+ function bindV4(getRandomValues) {
401
+ if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") return () => crypto.randomUUID();
402
+ return () => {
403
+ const rnds = /* @__PURE__ */ new Uint8Array(16);
404
+ getRandomValues(rnds);
405
+ rnds[6] = rnds[6] & 15 | 64;
406
+ rnds[8] = rnds[8] & 63 | 128;
407
+ return decimalToHex$1[rnds[0]] + decimalToHex$1[rnds[1]] + decimalToHex$1[rnds[2]] + decimalToHex$1[rnds[3]] + "-" + decimalToHex$1[rnds[4]] + decimalToHex$1[rnds[5]] + "-" + decimalToHex$1[rnds[6]] + decimalToHex$1[rnds[7]] + "-" + decimalToHex$1[rnds[8]] + decimalToHex$1[rnds[9]] + "-" + decimalToHex$1[rnds[10]] + decimalToHex$1[rnds[11]] + decimalToHex$1[rnds[12]] + decimalToHex$1[rnds[13]] + decimalToHex$1[rnds[14]] + decimalToHex$1[rnds[15]];
408
+ };
409
+ }
410
+ //#endregion
411
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
412
+ var LazyJsonString = function LazyJsonString(val) {
413
+ return Object.assign(new String(val), {
414
+ deserializeJSON() {
415
+ return JSON.parse(String(val));
416
+ },
417
+ toString() {
418
+ return String(val);
419
+ },
420
+ toJSON() {
421
+ return String(val);
422
+ }
423
+ });
424
+ };
425
+ LazyJsonString.from = (object) => {
426
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) return object;
427
+ else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) return LazyJsonString(String(object));
428
+ return LazyJsonString(JSON.stringify(object));
429
+ };
430
+ LazyJsonString.fromObject = LazyJsonString.from;
431
+ //#endregion
432
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
433
+ var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
434
+ var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
435
+ var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
436
+ var date = `(\\d?\\d)`;
437
+ var year = `(\\d{4})`;
438
+ var RFC3339_WITH_OFFSET = /* @__PURE__ */ new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
439
+ var IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
440
+ var RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
441
+ var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
442
+ var months = [
443
+ "Jan",
444
+ "Feb",
445
+ "Mar",
446
+ "Apr",
447
+ "May",
448
+ "Jun",
449
+ "Jul",
450
+ "Aug",
451
+ "Sep",
452
+ "Oct",
453
+ "Nov",
454
+ "Dec"
455
+ ];
456
+ var _parseEpochTimestamp = (value) => {
457
+ if (value == null) return;
458
+ let num = NaN;
459
+ if (typeof value === "number") num = value;
460
+ else if (typeof value === "string") {
461
+ if (!/^-?\d*\.?\d+$/.test(value)) throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
462
+ num = Number.parseFloat(value);
463
+ } else if (typeof value === "object" && value.tag === 1) num = value.value;
464
+ if (isNaN(num) || Math.abs(num) === Infinity) throw new TypeError("Epoch timestamps must be valid finite numbers.");
465
+ return new Date(Math.round(num * 1e3));
466
+ };
467
+ var _parseRfc3339DateTimeWithOffset = (value) => {
468
+ if (value == null) return;
469
+ if (typeof value !== "string") throw new TypeError("RFC3339 timestamps must be strings");
470
+ const matches = RFC3339_WITH_OFFSET.exec(value);
471
+ if (!matches) throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
472
+ const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
473
+ range(monthStr, 1, 12);
474
+ range(dayStr, 1, 31);
475
+ range(hours, 0, 23);
476
+ range(minutes, 0, 59);
477
+ range(seconds, 0, 60);
478
+ const date = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
479
+ date.setUTCFullYear(Number(yearStr));
480
+ if (offsetStr.toUpperCase() != "Z") {
481
+ const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [
482
+ void 0,
483
+ "+",
484
+ 0,
485
+ 0
486
+ ];
487
+ const scalar = sign === "-" ? 1 : -1;
488
+ date.setTime(date.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
489
+ }
490
+ return date;
491
+ };
492
+ var _parseRfc7231DateTime = (value) => {
493
+ if (value == null) return;
494
+ if (typeof value !== "string") throw new TypeError("RFC7231 timestamps must be strings.");
495
+ let day;
496
+ let month;
497
+ let year;
498
+ let hour;
499
+ let minute;
500
+ let second;
501
+ let fraction;
502
+ let matches;
503
+ if (matches = IMF_FIXDATE.exec(value)) [, day, month, year, hour, minute, second, fraction] = matches;
504
+ else if (matches = RFC_850_DATE.exec(value)) {
505
+ [, day, month, year, hour, minute, second, fraction] = matches;
506
+ year = (Number(year) + 1900).toString();
507
+ } else if (matches = ASC_TIME.exec(value)) [, month, day, hour, minute, second, fraction, year] = matches;
508
+ if (year && second) {
509
+ const timestamp = Date.UTC(Number(year), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
510
+ range(day, 1, 31);
511
+ range(hour, 0, 23);
512
+ range(minute, 0, 59);
513
+ range(second, 0, 60);
514
+ const date = new Date(timestamp);
515
+ date.setUTCFullYear(Number(year));
516
+ return date;
517
+ }
518
+ throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
519
+ };
520
+ function range(v, min, max) {
521
+ const _v = Number(v);
522
+ if (_v < min || _v > max) throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
523
+ }
524
+ //#endregion
525
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
526
+ var splitHeader = (value) => {
527
+ const z = value.length;
528
+ const values = [];
529
+ let withinQuotes = false;
530
+ let prevChar = void 0;
531
+ let anchor = 0;
532
+ for (let i = 0; i < z; ++i) {
533
+ const char = value[i];
534
+ switch (char) {
535
+ case `"`:
536
+ if (prevChar !== "\\") withinQuotes = !withinQuotes;
537
+ break;
538
+ case ",":
539
+ if (!withinQuotes) {
540
+ values.push(value.slice(anchor, i));
541
+ anchor = i + 1;
542
+ }
543
+ break;
544
+ default:
545
+ }
546
+ prevChar = char;
547
+ }
548
+ values.push(value.slice(anchor));
549
+ return values.map((v) => {
550
+ v = v.trim();
551
+ const z = v.length;
552
+ if (z < 2) return v;
553
+ if (v[0] === `"` && v[z - 1] === `"`) v = v.slice(1, z - 1);
554
+ return v.replace(/\\"/g, "\"");
555
+ });
556
+ };
557
+ //#endregion
558
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js
559
+ var format = /^-?\d*(\.\d+)?$/;
560
+ var NumericValue = class NumericValue {
561
+ string;
562
+ type;
563
+ constructor(string, type) {
564
+ this.string = string;
565
+ this.type = type;
566
+ if (!format.test(string)) throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
567
+ }
568
+ toString() {
569
+ return this.string;
570
+ }
571
+ static [Symbol.hasInstance](object) {
572
+ if (!object || typeof object !== "object") return false;
573
+ const _nv = object;
574
+ return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
575
+ }
576
+ };
577
+ //#endregion
578
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js
579
+ var toUint8Array = (data) => {
580
+ if (typeof data === "string") return require_toUtf8.fromUtf8(data);
581
+ if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
582
+ return new Uint8Array(data);
583
+ };
584
+ //#endregion
359
585
  //#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js
360
586
  var deref = (schemaRef) => {
361
587
  if (typeof schemaRef === "function") return schemaRef();
@@ -788,12 +1014,17 @@ var TypeRegistry = class TypeRegistry {
788
1014
  }
789
1015
  };
790
1016
  //#endregion
1017
+ //#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/index.js
1018
+ var Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(require_toUtf8.toUtf8, require_toUtf8.fromUtf8, toBase64, fromBase64) {};
1019
+ var _getRandomValues = node_crypto.getRandomValues;
1020
+ var generateIdempotencyToken = bindV4(_getRandomValues);
1021
+ //#endregion
791
1022
  //#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js
792
- var collectBody = async (streamBody = new Uint8Array(), context) => {
793
- if (streamBody instanceof Uint8Array) return require_serde.Uint8ArrayBlobAdapter.mutate(streamBody);
794
- if (!streamBody) return require_serde.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
1023
+ var collectBody = async (streamBody = /* @__PURE__ */ new Uint8Array(), context) => {
1024
+ if (streamBody instanceof Uint8Array) return Uint8ArrayBlobAdapter.mutate(streamBody);
1025
+ if (!streamBody) return Uint8ArrayBlobAdapter.mutate(/* @__PURE__ */ new Uint8Array());
795
1026
  const fromContext = context.streamCollector(streamBody);
796
- return require_serde.Uint8ArrayBlobAdapter.mutate(await fromContext);
1027
+ return Uint8ArrayBlobAdapter.mutate(await fromContext);
797
1028
  };
798
1029
  //#endregion
799
1030
  //#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js
@@ -896,7 +1127,7 @@ var HttpProtocol = class extends SerdeContext {
896
1127
  });
897
1128
  }
898
1129
  async loadEventStreamCapability() {
899
- const { EventStreamSerde } = await Promise.resolve().then(() => require("./event-streams-DmrxQXpO.cjs"));
1130
+ const { EventStreamSerde } = await Promise.resolve().then(() => require("./event-streams-_ny8BA_d.cjs"));
900
1131
  return new EventStreamSerde({
901
1132
  marshaller: this.getEventStreamMarshaller(),
902
1133
  serializer: this.serializer,
@@ -936,12 +1167,12 @@ var FromStringShapeDeserializer = class extends SerdeContext {
936
1167
  }
937
1168
  read(_schema, data) {
938
1169
  const ns = NormalizedSchema.of(_schema);
939
- if (ns.isListSchema()) return require_serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
940
- if (ns.isBlobSchema()) return (this.serdeContext?.base64Decoder ?? require_serde.fromBase64)(data);
1170
+ if (ns.isListSchema()) return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
1171
+ if (ns.isBlobSchema()) return (this.serdeContext?.base64Decoder ?? fromBase64)(data);
941
1172
  if (ns.isTimestampSchema()) switch (determineTimestampFormat(ns, this.settings)) {
942
- case 5: return require_serde._parseRfc3339DateTimeWithOffset(data);
943
- case 6: return require_serde._parseRfc7231DateTime(data);
944
- case 7: return require_serde._parseEpochTimestamp(data);
1173
+ case 5: return _parseRfc3339DateTimeWithOffset(data);
1174
+ case 6: return _parseRfc7231DateTime(data);
1175
+ case 7: return _parseEpochTimestamp(data);
945
1176
  default:
946
1177
  console.warn("Missing timestamp format, parsing value with Date constructor:", data);
947
1178
  return new Date(data);
@@ -951,18 +1182,18 @@ var FromStringShapeDeserializer = class extends SerdeContext {
951
1182
  let intermediateValue = data;
952
1183
  if (mediaType) {
953
1184
  if (ns.getMergedTraits().httpHeader) intermediateValue = this.base64ToUtf8(intermediateValue);
954
- if (mediaType === "application/json" || mediaType.endsWith("+json")) intermediateValue = require_serde.LazyJsonString.from(intermediateValue);
1185
+ if (mediaType === "application/json" || mediaType.endsWith("+json")) intermediateValue = LazyJsonString.from(intermediateValue);
955
1186
  return intermediateValue;
956
1187
  }
957
1188
  }
958
1189
  if (ns.isNumericSchema()) return Number(data);
959
1190
  if (ns.isBigIntegerSchema()) return BigInt(data);
960
- if (ns.isBigDecimalSchema()) return new require_serde.NumericValue(data, "bigDecimal");
1191
+ if (ns.isBigDecimalSchema()) return new NumericValue(data, "bigDecimal");
961
1192
  if (ns.isBooleanSchema()) return String(data).toLowerCase() === "true";
962
1193
  return data;
963
1194
  }
964
1195
  base64ToUtf8(base64String) {
965
- return (this.serdeContext?.utf8Encoder ?? require_date_utils.toUtf8)((this.serdeContext?.base64Decoder ?? require_serde.fromBase64)(base64String));
1196
+ return (this.serdeContext?.utf8Encoder ?? require_toUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));
966
1197
  }
967
1198
  };
968
1199
  //#endregion
@@ -1135,7 +1366,7 @@ var getSigningKey = async (sha256Constructor, credentials, shortDate, region, se
1135
1366
  };
1136
1367
  var hmac = (ctor, secret, data) => {
1137
1368
  const hash = new ctor(secret);
1138
- hash.update(require_serde.toUint8Array(data));
1369
+ hash.update(toUint8Array(data));
1139
1370
  return hash.digest();
1140
1371
  };
1141
1372
  //#endregion
@@ -1157,9 +1388,9 @@ var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
1157
1388
  var getPayloadHash = async ({ headers, body }, hashConstructor) => {
1158
1389
  for (const headerName of Object.keys(headers)) if (headerName.toLowerCase() === "x-amz-content-sha256") return headers[headerName];
1159
1390
  if (body == void 0) return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
1160
- else if (typeof body === "string" || ArrayBuffer.isView(body) || require_date_utils.isArrayBuffer(body)) {
1391
+ else if (typeof body === "string" || ArrayBuffer.isView(body) || require_toUtf8.isArrayBuffer(body)) {
1161
1392
  const hashCtor = new hashConstructor();
1162
- hashCtor.update(require_serde.toUint8Array(body));
1393
+ hashCtor.update(toUint8Array(body));
1163
1394
  return require_stream_collector.toHex(await hashCtor.digest());
1164
1395
  }
1165
1396
  return UNSIGNED_PAYLOAD;
@@ -1170,7 +1401,7 @@ var HeaderFormatter = class {
1170
1401
  format(headers) {
1171
1402
  const chunks = [];
1172
1403
  for (const headerName of Object.keys(headers)) {
1173
- const bytes = require_date_utils.fromUtf8(headerName);
1404
+ const bytes = require_toUtf8.fromUtf8(headerName);
1174
1405
  chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
1175
1406
  }
1176
1407
  const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
@@ -1196,7 +1427,7 @@ var HeaderFormatter = class {
1196
1427
  intView.setInt32(1, header.value, false);
1197
1428
  return new Uint8Array(intView.buffer);
1198
1429
  case "long":
1199
- const longBytes = new Uint8Array(9);
1430
+ const longBytes = /* @__PURE__ */ new Uint8Array(9);
1200
1431
  longBytes[0] = 5;
1201
1432
  longBytes.set(header.value.bytes, 1);
1202
1433
  return longBytes;
@@ -1208,7 +1439,7 @@ var HeaderFormatter = class {
1208
1439
  binBytes.set(header.value, 3);
1209
1440
  return binBytes;
1210
1441
  case "string":
1211
- const utf8Bytes = require_date_utils.fromUtf8(header.value);
1442
+ const utf8Bytes = require_toUtf8.fromUtf8(header.value);
1212
1443
  const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
1213
1444
  strView.setUint8(0, 7);
1214
1445
  strView.setUint16(1, utf8Bytes.byteLength, false);
@@ -1216,13 +1447,13 @@ var HeaderFormatter = class {
1216
1447
  strBytes.set(utf8Bytes, 3);
1217
1448
  return strBytes;
1218
1449
  case "timestamp":
1219
- const tsBytes = new Uint8Array(9);
1450
+ const tsBytes = /* @__PURE__ */ new Uint8Array(9);
1220
1451
  tsBytes[0] = 8;
1221
1452
  tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
1222
1453
  return tsBytes;
1223
1454
  case "uuid":
1224
1455
  if (!UUID_PATTERN.test(header.value)) throw new Error(`Invalid UUID received: ${header.value}`);
1225
- const uuidBytes = new Uint8Array(17);
1456
+ const uuidBytes = /* @__PURE__ */ new Uint8Array(17);
1226
1457
  uuidBytes[0] = 9;
1227
1458
  uuidBytes.set(require_stream_collector.fromHex(header.value.replace(/\-/g, "")), 1);
1228
1459
  return uuidBytes;
@@ -1251,7 +1482,7 @@ var Int64 = class Int64 {
1251
1482
  }
1252
1483
  static fromNumber(number) {
1253
1484
  if (number > 0x8000000000000000 || number < -0x8000000000000000) throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
1254
- const bytes = new Uint8Array(8);
1485
+ const bytes = /* @__PURE__ */ new Uint8Array(8);
1255
1486
  for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) bytes[i] = remaining;
1256
1487
  if (number < 0) negate(bytes);
1257
1488
  return new Int64(bytes);
@@ -1369,7 +1600,7 @@ ${payloadHash}`;
1369
1600
  }
1370
1601
  async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
1371
1602
  const hash = new this.sha256();
1372
- hash.update(require_serde.toUint8Array(canonicalRequest));
1603
+ hash.update(toUint8Array(canonicalRequest));
1373
1604
  return `${algorithmIdentifier}
1374
1605
  ${longDate}
1375
1606
  ${credentialScope}
@@ -1490,7 +1721,7 @@ var SignatureV4 = class extends SignatureV4Base {
1490
1721
  const region = signingRegion ?? await this.regionProvider();
1491
1722
  const { shortDate } = this.formatDate(signingDate);
1492
1723
  const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
1493
- hash.update(require_serde.toUint8Array(stringToSign));
1724
+ hash.update(toUint8Array(stringToSign));
1494
1725
  return require_stream_collector.toHex(await hash.digest());
1495
1726
  }
1496
1727
  async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
@@ -1512,7 +1743,7 @@ var SignatureV4 = class extends SignatureV4Base {
1512
1743
  async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
1513
1744
  const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
1514
1745
  const hash = new this.sha256(await keyPromise);
1515
- hash.update(require_serde.toUint8Array(stringToSign));
1746
+ hash.update(toUint8Array(stringToSign));
1516
1747
  return require_stream_collector.toHex(await hash.digest());
1517
1748
  }
1518
1749
  getSigningKey(credentials, region, shortDate, service) {
@@ -3939,7 +4170,7 @@ var NODEJS_NETWORK_ERROR_CODES = [
3939
4170
  var isRetryableByTrait = (error) => error?.$retryable !== void 0;
3940
4171
  var isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;
3941
4172
  var isBrowserNetworkError = (error) => {
3942
- const errorMessages = new Set([
4173
+ const errorMessages = /* @__PURE__ */ new Set([
3943
4174
  "Failed to fetch",
3944
4175
  "NetworkError when attempting to fetch resource",
3945
4176
  "The Internet connection appears to be offline",
@@ -3967,7 +4198,7 @@ var randomUUID = crypto$1.default.randomUUID.bind(crypto$1.default);
3967
4198
  var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
3968
4199
  var v4 = () => {
3969
4200
  if (randomUUID) return randomUUID();
3970
- const rnds = new Uint8Array(16);
4201
+ const rnds = /* @__PURE__ */ new Uint8Array(16);
3971
4202
  crypto.getRandomValues(rnds);
3972
4203
  rnds[6] = rnds[6] & 15 | 64;
3973
4204
  rnds[8] = rnds[8] & 63 | 128;
@@ -4270,7 +4501,7 @@ var Hash = class {
4270
4501
  this.reset();
4271
4502
  }
4272
4503
  update(toHash, encoding) {
4273
- this.hash.update(require_serde.toUint8Array(castSourceData(toHash, encoding)));
4504
+ this.hash.update(toUint8Array(castSourceData(toHash, encoding)));
4274
4505
  }
4275
4506
  digest() {
4276
4507
  return Promise.resolve(this.hash.digest());
@@ -4281,9 +4512,9 @@ var Hash = class {
4281
4512
  };
4282
4513
  function castSourceData(toCast, encoding) {
4283
4514
  if (buffer.Buffer.isBuffer(toCast)) return toCast;
4284
- if (typeof toCast === "string") return require_date_utils.fromString(toCast, encoding);
4285
- if (ArrayBuffer.isView(toCast)) return require_date_utils.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
4286
- return require_date_utils.fromArrayBuffer(toCast);
4515
+ if (typeof toCast === "string") return require_toUtf8.fromString(toCast, encoding);
4516
+ if (ArrayBuffer.isView(toCast)) return require_toUtf8.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
4517
+ return require_toUtf8.fromArrayBuffer(toCast);
4287
4518
  }
4288
4519
  //#endregion
4289
4520
  //#region ../../../node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js
@@ -4431,6 +4662,12 @@ Object.defineProperty(exports, "HttpRequest", {
4431
4662
  return HttpRequest;
4432
4663
  }
4433
4664
  });
4665
+ Object.defineProperty(exports, "LazyJsonString", {
4666
+ enumerable: true,
4667
+ get: function() {
4668
+ return LazyJsonString;
4669
+ }
4670
+ });
4434
4671
  Object.defineProperty(exports, "NODE_APP_ID_CONFIG_OPTIONS", {
4435
4672
  enumerable: true,
4436
4673
  get: function() {
@@ -4491,6 +4728,12 @@ Object.defineProperty(exports, "NormalizedSchema", {
4491
4728
  return NormalizedSchema;
4492
4729
  }
4493
4730
  });
4731
+ Object.defineProperty(exports, "NumericValue", {
4732
+ enumerable: true,
4733
+ get: function() {
4734
+ return NumericValue;
4735
+ }
4736
+ });
4494
4737
  Object.defineProperty(exports, "ProtocolLib", {
4495
4738
  enumerable: true,
4496
4739
  get: function() {
@@ -4617,6 +4860,12 @@ Object.defineProperty(exports, "extendedEncodeURIComponent", {
4617
4860
  return extendedEncodeURIComponent;
4618
4861
  }
4619
4862
  });
4863
+ Object.defineProperty(exports, "generateIdempotencyToken", {
4864
+ enumerable: true,
4865
+ get: function() {
4866
+ return generateIdempotencyToken;
4867
+ }
4868
+ });
4620
4869
  Object.defineProperty(exports, "getAwsRegionExtensionConfiguration", {
4621
4870
  enumerable: true,
4622
4871
  get: function() {
@@ -4809,6 +5058,24 @@ Object.defineProperty(exports, "setFeature", {
4809
5058
  return setFeature$1;
4810
5059
  }
4811
5060
  });
5061
+ Object.defineProperty(exports, "splitHeader", {
5062
+ enumerable: true,
5063
+ get: function() {
5064
+ return splitHeader;
5065
+ }
5066
+ });
5067
+ Object.defineProperty(exports, "toBase64", {
5068
+ enumerable: true,
5069
+ get: function() {
5070
+ return toBase64;
5071
+ }
5072
+ });
5073
+ Object.defineProperty(exports, "toUint8Array", {
5074
+ enumerable: true,
5075
+ get: function() {
5076
+ return toUint8Array;
5077
+ }
5078
+ });
4812
5079
  Object.defineProperty(exports, "translateTraits", {
4813
5080
  enumerable: true,
4814
5081
  get: function() {