@cdklabs/cdk-ecs-codedeploy 0.0.415 → 0.0.417

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.
Files changed (80) hide show
  1. package/.jsii +3 -3
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  6. package/node_modules/@aws-sdk/client-codedeploy/dist-types/endpoint/EndpointParameters.d.ts +8 -8
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.browser.d.ts +2 -2
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-types/runtimeConfig.native.d.ts +2 -2
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +11 -8
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  12. package/node_modules/@aws-sdk/client-codedeploy/package.json +13 -13
  13. package/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts +8 -8
  14. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -2
  15. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -2
  16. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +11 -8
  17. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -2
  18. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -2
  19. package/node_modules/@aws-sdk/client-sso/package.json +11 -11
  20. package/node_modules/@aws-sdk/core/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  22. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  23. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  24. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  25. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  26. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  27. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  28. package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
  29. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +8 -8
  30. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -2
  31. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -2
  32. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/EndpointParameters.d.ts +10 -10
  33. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +3 -3
  34. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -1
  35. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +3 -3
  36. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +11 -8
  37. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +4 -2
  38. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +4 -2
  39. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/EndpointParameters.d.ts +13 -10
  40. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +8 -3
  41. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +4 -1
  42. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +8 -3
  43. package/node_modules/@aws-sdk/nested-clients/package.json +11 -11
  44. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  45. package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
  46. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +55 -8
  47. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +34 -2
  48. package/node_modules/@smithy/core/dist-es/submodules/cbor/byte-printer.js +3 -0
  49. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +24 -4
  50. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +33 -3
  51. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +32 -2
  52. package/node_modules/@smithy/core/dist-types/submodules/cbor/byte-printer.d.ts +6 -0
  53. package/node_modules/@smithy/core/dist-types/submodules/serde/value/NumericValue.d.ts +3 -1
  54. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/byte-printer.d.ts +6 -0
  55. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/value/NumericValue.d.ts +3 -1
  56. package/node_modules/@smithy/core/package.json +1 -1
  57. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +16 -1
  58. package/node_modules/@smithy/middleware-endpoint/dist-cjs/resolveEndpointRequiredConfig.js +1 -0
  59. package/node_modules/@smithy/middleware-endpoint/dist-es/index.js +1 -0
  60. package/node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointRequiredConfig.js +9 -0
  61. package/node_modules/@smithy/middleware-endpoint/dist-types/index.d.ts +1 -0
  62. package/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointRequiredConfig.d.ts +32 -0
  63. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/index.d.ts +1 -0
  64. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointRequiredConfig.d.ts +32 -0
  65. package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
  66. package/node_modules/@smithy/middleware-retry/package.json +4 -4
  67. package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +2 -1
  68. package/node_modules/@smithy/service-error-classification/dist-es/constants.js +1 -0
  69. package/node_modules/@smithy/service-error-classification/dist-es/index.js +2 -1
  70. package/node_modules/@smithy/service-error-classification/dist-types/constants.d.ts +4 -0
  71. package/node_modules/@smithy/service-error-classification/dist-types/ts3.4/constants.d.ts +4 -0
  72. package/node_modules/@smithy/service-error-classification/package.json +1 -1
  73. package/node_modules/@smithy/smithy-client/package.json +3 -3
  74. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  75. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  76. package/node_modules/@smithy/util-retry/package.json +2 -2
  77. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +27 -8
  78. package/node_modules/@smithy/util-waiter/dist-es/createWaiter.js +27 -8
  79. package/node_modules/@smithy/util-waiter/package.json +1 -1
  80. package/package.json +4 -4
@@ -36,6 +36,7 @@ __export(cbor_exports, {
36
36
  module.exports = __toCommonJS(cbor_exports);
37
37
 
38
38
  // src/submodules/cbor/cbor-decode.ts
39
+ var import_serde = require("@smithy/core/serde");
39
40
  var import_util_utf8 = require("@smithy/util-utf8");
40
41
 
41
42
  // src/submodules/cbor/cbor-types.ts
@@ -131,10 +132,27 @@ function decode(at, to) {
131
132
  _offset = offset;
132
133
  return castBigInt(negativeInt);
133
134
  } else {
134
- const value = decode(at + offset, to);
135
- const valueOffset = _offset;
136
- _offset = offset + valueOffset;
137
- return tag({ tag: castBigInt(unsignedInt), value });
135
+ if (minor === 2 || minor === 3) {
136
+ const length = decodeCount(at + offset, to);
137
+ let b = BigInt(0);
138
+ const start = at + offset + _offset;
139
+ for (let i = start; i < start + length; ++i) {
140
+ b = b << BigInt(8) | BigInt(payload[i]);
141
+ }
142
+ _offset = offset + length;
143
+ return minor === 3 ? -b - BigInt(1) : b;
144
+ } else if (minor === 4) {
145
+ const decimalFraction = decode(at + offset, to);
146
+ const [exponent, mantissa] = decimalFraction;
147
+ const s = mantissa.toString();
148
+ const numericString = exponent === 0 ? s : s.slice(0, s.length + exponent) + "." + s.slice(exponent);
149
+ return new import_serde.NumericValue(numericString, "bigDecimal");
150
+ } else {
151
+ const value = decode(at + offset, to);
152
+ const valueOffset = _offset;
153
+ _offset = offset + valueOffset;
154
+ return tag({ tag: castBigInt(unsignedInt), value });
155
+ }
138
156
  }
139
157
  case majorUtf8String:
140
158
  case majorMap:
@@ -440,6 +458,7 @@ function castBigInt(bigInt) {
440
458
  }
441
459
 
442
460
  // src/submodules/cbor/cbor-encode.ts
461
+ var import_serde2 = require("@smithy/core/serde");
443
462
  var import_util_utf82 = require("@smithy/util-utf8");
444
463
  var USE_BUFFER2 = typeof Buffer !== "undefined";
445
464
  var initialSize = 2048;
@@ -557,10 +576,28 @@ function encode(_input) {
557
576
  data[cursor++] = major << 5 | extendedFloat32;
558
577
  dataView2.setUint32(cursor, n);
559
578
  cursor += 4;
560
- } else {
579
+ } else if (value < BigInt("18446744073709551616")) {
561
580
  data[cursor++] = major << 5 | extendedFloat64;
562
581
  dataView2.setBigUint64(cursor, value);
563
582
  cursor += 8;
583
+ } else {
584
+ const binaryBigInt = value.toString(2);
585
+ const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
586
+ let b = value;
587
+ let i = 0;
588
+ while (bigIntBytes.byteLength - ++i >= 0) {
589
+ bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
590
+ b >>= BigInt(8);
591
+ }
592
+ ensureSpace(bigIntBytes.byteLength * 2);
593
+ data[cursor++] = nonNegative ? 194 : 195;
594
+ if (USE_BUFFER2) {
595
+ encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
596
+ } else {
597
+ encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
598
+ }
599
+ data.set(bigIntBytes, cursor);
600
+ cursor += bigIntBytes.byteLength;
564
601
  }
565
602
  continue;
566
603
  } else if (input === null) {
@@ -584,6 +621,16 @@ function encode(_input) {
584
621
  cursor += input.byteLength;
585
622
  continue;
586
623
  } else if (typeof input === "object") {
624
+ if (input instanceof import_serde2.NumericValue) {
625
+ const decimalIndex = input.string.indexOf(".");
626
+ const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
627
+ const mantissa = BigInt(input.string.replace(".", ""));
628
+ data[cursor++] = 196;
629
+ encodeStack.push(mantissa);
630
+ encodeStack.push(exponent);
631
+ encodeHeader(majorList, 2);
632
+ continue;
633
+ }
587
634
  if (input[tagSymbol]) {
588
635
  if ("tag" in input && "value" in input) {
589
636
  encodeStack.push(input.value);
@@ -732,7 +779,7 @@ var import_util_middleware = require("@smithy/util-middleware");
732
779
 
733
780
  // src/submodules/cbor/CborCodec.ts
734
781
  var import_schema = require("@smithy/core/schema");
735
- var import_serde = require("@smithy/core/serde");
782
+ var import_serde3 = require("@smithy/core/serde");
736
783
  var CborCodec = class {
737
784
  createSerializer() {
738
785
  const serializer = new CborShapeSerializer();
@@ -753,7 +800,7 @@ var CborShapeSerializer = class {
753
800
  this.serdeContext = serdeContext;
754
801
  }
755
802
  write(schema, value) {
756
- this.value = (0, import_serde.copyDocumentWithTransform)(value, schema, (_, schemaRef) => {
803
+ this.value = (0, import_serde3.copyDocumentWithTransform)(value, schema, (_, schemaRef) => {
757
804
  if (_ instanceof Date) {
758
805
  return dateToTag(_);
759
806
  }
@@ -802,7 +849,7 @@ var CborShapeDeserializer = class {
802
849
  const schema = ns.getSchema();
803
850
  if (typeof schema === "number") {
804
851
  if (ns.isTimestampSchema()) {
805
- return (0, import_serde.parseEpochTimestamp)(value);
852
+ return (0, import_serde3.parseEpochTimestamp)(value);
806
853
  }
807
854
  if (ns.isBlobSchema()) {
808
855
  return value;
@@ -671,10 +671,42 @@ var NumericValue = class {
671
671
  constructor(string, type) {
672
672
  this.string = string;
673
673
  this.type = type;
674
+ let dot = 0;
675
+ for (let i = 0; i < string.length; ++i) {
676
+ const char = string.charCodeAt(i);
677
+ if (i === 0 && char === 45) {
678
+ continue;
679
+ }
680
+ if (char === 46) {
681
+ if (dot) {
682
+ throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
683
+ }
684
+ dot = 1;
685
+ continue;
686
+ }
687
+ if (char < 48 || char > 57) {
688
+ throw new Error(
689
+ `@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`
690
+ );
691
+ }
692
+ }
693
+ }
694
+ toString() {
695
+ return this.string;
696
+ }
697
+ [Symbol.hasInstance](object) {
698
+ if (!object || typeof object !== "object") {
699
+ return false;
700
+ }
701
+ const _nv = object;
702
+ if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") {
703
+ return true;
704
+ }
705
+ return false;
674
706
  }
675
707
  };
676
- function nv(string) {
677
- return new NumericValue(string, "bigDecimal");
708
+ function nv(input) {
709
+ return new NumericValue(String(input), "bigDecimal");
678
710
  }
679
711
  // Annotate the CommonJS export names for ESM import in node:
680
712
  0 && (module.exports = {
@@ -0,0 +1,3 @@
1
+ export function printBytes(bytes) {
2
+ return [...bytes].map((n) => ("0".repeat(8) + n.toString(2)).slice(-8) + ` (${n})`);
3
+ }
@@ -1,3 +1,4 @@
1
+ import { NumericValue } from "@smithy/core/serde";
1
2
  import { toUtf8 } from "@smithy/util-utf8";
2
3
  import { alloc, extendedFloat16, extendedFloat32, extendedFloat64, extendedOneByte, majorList, majorMap, majorNegativeInt64, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, minorIndefinite, specialFalse, specialNull, specialTrue, specialUndefined, tag, } from "./cbor-types";
3
4
  const USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
@@ -72,10 +73,29 @@ export function decode(at, to) {
72
73
  return castBigInt(negativeInt);
73
74
  }
74
75
  else {
75
- const value = decode(at + offset, to);
76
- const valueOffset = _offset;
77
- _offset = offset + valueOffset;
78
- return tag({ tag: castBigInt(unsignedInt), value });
76
+ if (minor === 2 || minor === 3) {
77
+ const length = decodeCount(at + offset, to);
78
+ let b = BigInt(0);
79
+ const start = at + offset + _offset;
80
+ for (let i = start; i < start + length; ++i) {
81
+ b = (b << BigInt(8)) | BigInt(payload[i]);
82
+ }
83
+ _offset = offset + length;
84
+ return minor === 3 ? -b - BigInt(1) : b;
85
+ }
86
+ else if (minor === 4) {
87
+ const decimalFraction = decode(at + offset, to);
88
+ const [exponent, mantissa] = decimalFraction;
89
+ const s = mantissa.toString();
90
+ const numericString = exponent === 0 ? s : s.slice(0, s.length + exponent) + "." + s.slice(exponent);
91
+ return new NumericValue(numericString, "bigDecimal");
92
+ }
93
+ else {
94
+ const value = decode(at + offset, to);
95
+ const valueOffset = _offset;
96
+ _offset = offset + valueOffset;
97
+ return tag({ tag: castBigInt(unsignedInt), value });
98
+ }
79
99
  }
80
100
  case majorUtf8String:
81
101
  case majorMap:
@@ -1,6 +1,6 @@
1
+ import { NumericValue } from "@smithy/core/serde";
1
2
  import { fromUtf8 } from "@smithy/util-utf8";
2
- import { extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from "./cbor-types";
3
- import { alloc } from "./cbor-types";
3
+ import { alloc, extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from "./cbor-types";
4
4
  const USE_BUFFER = typeof Buffer !== "undefined";
5
5
  const initialSize = 2048;
6
6
  let data = alloc(initialSize);
@@ -134,11 +134,31 @@ export function encode(_input) {
134
134
  dataView.setUint32(cursor, n);
135
135
  cursor += 4;
136
136
  }
137
- else {
137
+ else if (value < BigInt("18446744073709551616")) {
138
138
  data[cursor++] = (major << 5) | extendedFloat64;
139
139
  dataView.setBigUint64(cursor, value);
140
140
  cursor += 8;
141
141
  }
142
+ else {
143
+ const binaryBigInt = value.toString(2);
144
+ const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
145
+ let b = value;
146
+ let i = 0;
147
+ while (bigIntBytes.byteLength - ++i >= 0) {
148
+ bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
149
+ b >>= BigInt(8);
150
+ }
151
+ ensureSpace(bigIntBytes.byteLength * 2);
152
+ data[cursor++] = nonNegative ? 194 : 195;
153
+ if (USE_BUFFER) {
154
+ encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
155
+ }
156
+ else {
157
+ encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
158
+ }
159
+ data.set(bigIntBytes, cursor);
160
+ cursor += bigIntBytes.byteLength;
161
+ }
142
162
  continue;
143
163
  }
144
164
  else if (input === null) {
@@ -167,6 +187,16 @@ export function encode(_input) {
167
187
  continue;
168
188
  }
169
189
  else if (typeof input === "object") {
190
+ if (input instanceof NumericValue) {
191
+ const decimalIndex = input.string.indexOf(".");
192
+ const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
193
+ const mantissa = BigInt(input.string.replace(".", ""));
194
+ data[cursor++] = 196;
195
+ encodeStack.push(mantissa);
196
+ encodeStack.push(exponent);
197
+ encodeHeader(majorList, 2);
198
+ continue;
199
+ }
170
200
  if (input[tagSymbol]) {
171
201
  if ("tag" in input && "value" in input) {
172
202
  encodeStack.push(input.value);
@@ -2,8 +2,38 @@ export class NumericValue {
2
2
  constructor(string, type) {
3
3
  this.string = string;
4
4
  this.type = type;
5
+ let dot = 0;
6
+ for (let i = 0; i < string.length; ++i) {
7
+ const char = string.charCodeAt(i);
8
+ if (i === 0 && char === 45) {
9
+ continue;
10
+ }
11
+ if (char === 46) {
12
+ if (dot) {
13
+ throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
14
+ }
15
+ dot = 1;
16
+ continue;
17
+ }
18
+ if (char < 48 || char > 57) {
19
+ throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
20
+ }
21
+ }
22
+ }
23
+ toString() {
24
+ return this.string;
25
+ }
26
+ [Symbol.hasInstance](object) {
27
+ if (!object || typeof object !== "object") {
28
+ return false;
29
+ }
30
+ const _nv = object;
31
+ if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") {
32
+ return true;
33
+ }
34
+ return false;
5
35
  }
6
36
  }
7
- export function nv(string) {
8
- return new NumericValue(string, "bigDecimal");
37
+ export function nv(input) {
38
+ return new NumericValue(String(input), "bigDecimal");
9
39
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Prints bytes as binary string with numbers.
3
+ * @param bytes - to print.
4
+ * @deprecated for testing only, do not use in runtime.
5
+ */
6
+ export declare function printBytes(bytes: Uint8Array): string[];
@@ -23,9 +23,11 @@ export declare class NumericValue {
23
23
  readonly string: string;
24
24
  readonly type: NumericType;
25
25
  constructor(string: string, type: NumericType);
26
+ toString(): string;
27
+ [Symbol.hasInstance](object: unknown): boolean;
26
28
  }
27
29
  /**
28
30
  * Serde shortcut.
29
31
  * @internal
30
32
  */
31
- export declare function nv(string: string): NumericValue;
33
+ export declare function nv(input: string | unknown): NumericValue;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Prints bytes as binary string with numbers.
3
+ * @param bytes - to print.
4
+ * @deprecated for testing only, do not use in runtime.
5
+ */
6
+ export declare function printBytes(bytes: Uint8Array): string[];
@@ -23,9 +23,11 @@ export declare class NumericValue {
23
23
  readonly string: string;
24
24
  readonly type: NumericType;
25
25
  constructor(string: string, type: NumericType);
26
+ toString(): string;
27
+ [Symbol.hasInstance](object: unknown): boolean;
26
28
  }
27
29
  /**
28
30
  * Serde shortcut.
29
31
  * @internal
30
32
  */
31
- export declare function nv(string: string): NumericValue;
33
+ export declare function nv(input: string | unknown): NumericValue;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.5.3",
3
+ "version": "3.6.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -25,6 +25,7 @@ __export(src_exports, {
25
25
  getEndpointFromInstructions: () => getEndpointFromInstructions,
26
26
  getEndpointPlugin: () => getEndpointPlugin,
27
27
  resolveEndpointConfig: () => resolveEndpointConfig,
28
+ resolveEndpointRequiredConfig: () => resolveEndpointRequiredConfig,
28
29
  resolveParams: () => resolveParams,
29
30
  toEndpointV1: () => toEndpointV1
30
31
  });
@@ -265,6 +266,19 @@ var resolveEndpointConfig = /* @__PURE__ */ __name((input) => {
265
266
  };
266
267
  return resolvedConfig;
267
268
  }, "resolveEndpointConfig");
269
+
270
+ // src/resolveEndpointRequiredConfig.ts
271
+ var resolveEndpointRequiredConfig = /* @__PURE__ */ __name((input) => {
272
+ const { endpoint } = input;
273
+ if (endpoint === void 0) {
274
+ input.endpoint = async () => {
275
+ throw new Error(
276
+ "@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."
277
+ );
278
+ };
279
+ }
280
+ return input;
281
+ }, "resolveEndpointRequiredConfig");
268
282
  // Annotate the CommonJS export names for ESM import in node:
269
283
 
270
284
  0 && (module.exports = {
@@ -274,6 +288,7 @@ var resolveEndpointConfig = /* @__PURE__ */ __name((input) => {
274
288
  endpointMiddleware,
275
289
  endpointMiddlewareOptions,
276
290
  getEndpointPlugin,
277
- resolveEndpointConfig
291
+ resolveEndpointConfig,
292
+ resolveEndpointRequiredConfig
278
293
  });
279
294
 
@@ -0,0 +1 @@
1
+ module.exports = require("./index.js");
@@ -2,4 +2,5 @@ export * from "./adaptors";
2
2
  export * from "./endpointMiddleware";
3
3
  export * from "./getEndpointPlugin";
4
4
  export * from "./resolveEndpointConfig";
5
+ export * from "./resolveEndpointRequiredConfig";
5
6
  export * from "./types";
@@ -0,0 +1,9 @@
1
+ export const resolveEndpointRequiredConfig = (input) => {
2
+ const { endpoint } = input;
3
+ if (endpoint === undefined) {
4
+ input.endpoint = async () => {
5
+ throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
6
+ };
7
+ }
8
+ return input;
9
+ };
@@ -11,6 +11,7 @@ export * from "./endpointMiddleware";
11
11
  */
12
12
  export * from "./getEndpointPlugin";
13
13
  export * from "./resolveEndpointConfig";
14
+ export * from "./resolveEndpointRequiredConfig";
14
15
  /**
15
16
  * @internal
16
17
  */
@@ -0,0 +1,32 @@
1
+ import { Endpoint, EndpointV2, Provider } from "@smithy/types";
2
+ /**
3
+ * This is an additional config resolver layer for clients using the default
4
+ * endpoints ruleset. It modifies the input and output config types to make
5
+ * the endpoint configuration property required.
6
+ *
7
+ * It must be placed after the `resolveEndpointConfig`
8
+ * resolver. This replaces the "CustomEndpoints" config resolver, which was used
9
+ * prior to default endpoint rulesets.
10
+ *
11
+ * @public
12
+ */
13
+ export interface EndpointRequiredInputConfig {
14
+ endpoint: string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
15
+ }
16
+ /**
17
+ * @internal
18
+ */
19
+ interface PreviouslyResolved {
20
+ endpoint?: Provider<Endpoint>;
21
+ }
22
+ /**
23
+ * @internal
24
+ */
25
+ export interface EndpointRequiredResolvedConfig {
26
+ endpoint: Provider<Endpoint>;
27
+ }
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare const resolveEndpointRequiredConfig: <T>(input: T & EndpointRequiredInputConfig & PreviouslyResolved) => T & EndpointRequiredResolvedConfig;
32
+ export {};
@@ -11,6 +11,7 @@ export * from "./endpointMiddleware";
11
11
  */
12
12
  export * from "./getEndpointPlugin";
13
13
  export * from "./resolveEndpointConfig";
14
+ export * from "./resolveEndpointRequiredConfig";
14
15
  /**
15
16
  * @internal
16
17
  */
@@ -0,0 +1,32 @@
1
+ import { Endpoint, EndpointV2, Provider } from "@smithy/types";
2
+ /**
3
+ * This is an additional config resolver layer for clients using the default
4
+ * endpoints ruleset. It modifies the input and output config types to make
5
+ * the endpoint configuration property required.
6
+ *
7
+ * It must be placed after the `resolveEndpointConfig`
8
+ * resolver. This replaces the "CustomEndpoints" config resolver, which was used
9
+ * prior to default endpoint rulesets.
10
+ *
11
+ * @public
12
+ */
13
+ export interface EndpointRequiredInputConfig {
14
+ endpoint: string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
15
+ }
16
+ /**
17
+ * @internal
18
+ */
19
+ interface PreviouslyResolved {
20
+ endpoint?: Provider<Endpoint>;
21
+ }
22
+ /**
23
+ * @internal
24
+ */
25
+ export interface EndpointRequiredResolvedConfig {
26
+ endpoint: Provider<Endpoint>;
27
+ }
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare const resolveEndpointRequiredConfig: <T>(input: T & EndpointRequiredInputConfig & PreviouslyResolved) => T & EndpointRequiredResolvedConfig;
32
+ export {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-endpoint",
3
- "version": "4.1.11",
3
+ "version": "4.1.13",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-endpoint",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/core": "^3.5.3",
27
+ "@smithy/core": "^3.6.0",
28
28
  "@smithy/middleware-serde": "^4.0.8",
29
29
  "@smithy/node-config-provider": "^4.1.3",
30
30
  "@smithy/shared-ini-file-loader": "^4.0.4",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "4.1.12",
3
+ "version": "4.1.14",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-retry",
@@ -35,11 +35,11 @@
35
35
  "dependencies": {
36
36
  "@smithy/node-config-provider": "^4.1.3",
37
37
  "@smithy/protocol-http": "^5.1.2",
38
- "@smithy/service-error-classification": "^4.0.5",
39
- "@smithy/smithy-client": "^4.4.3",
38
+ "@smithy/service-error-classification": "^4.0.6",
39
+ "@smithy/smithy-client": "^4.4.5",
40
40
  "@smithy/types": "^4.3.1",
41
41
  "@smithy/util-middleware": "^4.0.4",
42
- "@smithy/util-retry": "^4.0.5",
42
+ "@smithy/util-retry": "^4.0.6",
43
43
  "tslib": "^2.6.2",
44
44
  "uuid": "^9.0.1"
45
45
  },
@@ -59,6 +59,7 @@ var THROTTLING_ERROR_CODES = [
59
59
  var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
60
60
  var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
61
61
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
62
+ var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"];
62
63
 
63
64
  // src/index.ts
64
65
  var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait");
@@ -84,7 +85,7 @@ var isBrowserNetworkError = /* @__PURE__ */ __name((error) => {
84
85
  return errorMessages.has(error.message);
85
86
  }, "isBrowserNetworkError");
86
87
  var isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, "isThrottlingError");
87
- var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), "isTransientError");
88
+ var isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), "isTransientError");
88
89
  var isServerError = /* @__PURE__ */ __name((error) => {
89
90
  if (error.$metadata?.httpStatusCode !== void 0) {
90
91
  const statusCode = error.$metadata.httpStatusCode;
@@ -25,3 +25,4 @@ export const THROTTLING_ERROR_CODES = [
25
25
  export const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
26
26
  export const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
27
27
  export const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
28
+ export const NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"];
@@ -1,4 +1,4 @@
1
- import { CLOCK_SKEW_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from "./constants";
1
+ import { CLOCK_SKEW_ERROR_CODES, NODEJS_NETWORK_ERROR_CODES, NODEJS_TIMEOUT_ERROR_CODES, THROTTLING_ERROR_CODES, TRANSIENT_ERROR_CODES, TRANSIENT_ERROR_STATUS_CODES, } from "./constants";
2
2
  export const isRetryableByTrait = (error) => error.$retryable !== undefined;
3
3
  export const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);
4
4
  export const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;
@@ -22,6 +22,7 @@ export const isThrottlingError = (error) => error.$metadata?.httpStatusCode ===
22
22
  export const isTransientError = (error, depth = 0) => isClockSkewCorrectedError(error) ||
23
23
  TRANSIENT_ERROR_CODES.includes(error.name) ||
24
24
  NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
25
+ NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
25
26
  TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
26
27
  isBrowserNetworkError(error) ||
27
28
  (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
@@ -24,3 +24,7 @@ export declare const TRANSIENT_ERROR_STATUS_CODES: number[];
24
24
  * Node.js system error codes that indicate timeout.
25
25
  */
26
26
  export declare const NODEJS_TIMEOUT_ERROR_CODES: string[];
27
+ /**
28
+ * Node.js system error codes that indicate network error.
29
+ */
30
+ export declare const NODEJS_NETWORK_ERROR_CODES: string[];
@@ -24,3 +24,7 @@ export declare const TRANSIENT_ERROR_STATUS_CODES: number[];
24
24
  * Node.js system error codes that indicate timeout.
25
25
  */
26
26
  export declare const NODEJS_TIMEOUT_ERROR_CODES: string[];
27
+ /**
28
+ * Node.js system error codes that indicate network error.
29
+ */
30
+ export declare const NODEJS_NETWORK_ERROR_CODES: string[];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/service-error-classification",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline service-error-classification",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "4.4.3",
3
+ "version": "4.4.5",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline smithy-client",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/core": "^3.5.3",
28
- "@smithy/middleware-endpoint": "^4.1.11",
27
+ "@smithy/core": "^3.6.0",
28
+ "@smithy/middleware-endpoint": "^4.1.13",
29
29
  "@smithy/middleware-stack": "^4.0.4",
30
30
  "@smithy/protocol-http": "^5.1.2",
31
31
  "@smithy/types": "^4.3.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-browser",
3
- "version": "4.0.19",
3
+ "version": "4.0.21",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-browser",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
26
  "@smithy/property-provider": "^4.0.4",
27
- "@smithy/smithy-client": "^4.4.3",
27
+ "@smithy/smithy-client": "^4.4.5",
28
28
  "@smithy/types": "^4.3.1",
29
29
  "bowser": "^2.11.0",
30
30
  "tslib": "^2.6.2"