@smithy/core 3.29.7 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -169,7 +169,7 @@ function bytesToFloat16(a, b) {
169
169
  }
170
170
  function decodeMap(at, to) {
171
171
  const mapDataLength = decodeCount(at, to);
172
- if (mapDataLength < 15) {
172
+ if (mapDataLength < 25) {
173
173
  return decodeMapSmall(at, to, mapDataLength);
174
174
  }
175
175
  return decodeMapLarge(at, to, mapDataLength);
@@ -5,6 +5,7 @@ const { parseRfc7231DateTime, v4 } = require("@smithy/core/serde");
5
5
  const isStreamingPayload = (request) => request?.body instanceof ReadableStream;
6
6
 
7
7
  const CLOCK_SKEW_ERROR_CODES = [
8
+ "AccessDeniedException",
8
9
  "AuthFailure",
9
10
  "InvalidSignatureException",
10
11
  "RequestExpired",
@@ -7,6 +7,7 @@ const isStreamingPayload = (request) => request?.body instanceof Readable ||
7
7
  (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream);
8
8
 
9
9
  const CLOCK_SKEW_ERROR_CODES = [
10
+ "AccessDeniedException",
10
11
  "AuthFailure",
11
12
  "InvalidSignatureException",
12
13
  "RequestExpired",
@@ -775,7 +775,7 @@ const splitHeader = (value) => {
775
775
  });
776
776
  };
777
777
 
778
- const format = /^-?\d*(\.\d+)?$/;
778
+ const format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
779
779
  class NumericValue {
780
780
  string;
781
781
  type;
@@ -783,7 +783,7 @@ class NumericValue {
783
783
  this.string = string;
784
784
  this.type = type;
785
785
  if (!format.test(string)) {
786
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
786
+ throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
787
787
  }
788
788
  }
789
789
  toString() {
@@ -743,7 +743,7 @@ const splitHeader = (value) => {
743
743
  });
744
744
  };
745
745
 
746
- const format = /^-?\d*(\.\d+)?$/;
746
+ const format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
747
747
  class NumericValue {
748
748
  string;
749
749
  type;
@@ -751,7 +751,7 @@ class NumericValue {
751
751
  this.string = string;
752
752
  this.type = type;
753
753
  if (!format.test(string)) {
754
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
754
+ throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
755
755
  }
756
756
  }
757
757
  toString() {
@@ -775,7 +775,7 @@ const splitHeader = (value) => {
775
775
  });
776
776
  };
777
777
 
778
- const format = /^-?\d*(\.\d+)?$/;
778
+ const format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
779
779
  class NumericValue {
780
780
  string;
781
781
  type;
@@ -783,7 +783,7 @@ class NumericValue {
783
783
  this.string = string;
784
784
  this.type = type;
785
785
  if (!format.test(string)) {
786
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
786
+ throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
787
787
  }
788
788
  }
789
789
  toString() {
@@ -141,7 +141,7 @@ export function bytesToFloat16(a, b) {
141
141
  }
142
142
  function decodeMap(at, to) {
143
143
  const mapDataLength = decodeCount(at, to);
144
- if (mapDataLength < 15) {
144
+ if (mapDataLength < 25) {
145
145
  return decodeMapSmall(at, to, mapDataLength);
146
146
  }
147
147
  return decodeMapLarge(at, to, mapDataLength);
@@ -1,4 +1,5 @@
1
1
  export const CLOCK_SKEW_ERROR_CODES = [
2
+ "AccessDeniedException",
2
3
  "AuthFailure",
3
4
  "InvalidSignatureException",
4
5
  "RequestExpired",
@@ -1,4 +1,4 @@
1
- const format = /^-?\d*(\.\d+)?$/;
1
+ const format = /^-?((0|[1-9]\d*)(\.\d+)?|\.\d+)([eE][+-]?\d+)?$/;
2
2
  export class NumericValue {
3
3
  string;
4
4
  type;
@@ -6,7 +6,7 @@ export class NumericValue {
6
6
  this.string = string;
7
7
  this.type = type;
8
8
  if (!format.test(string)) {
9
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
9
+ throw new Error(`@smithy/core/serde - NumericValue string must conform to the Smithy bigDecimal format. Received: "${string}"`);
10
10
  }
11
11
  }
12
12
  toString() {
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * These errors are retryable, assuming the SDK has enabled clock skew
6
6
  * correction.
7
+ *
7
8
  */
8
9
  export declare const CLOCK_SKEW_ERROR_CODES: string[];
9
10
  /**
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * These errors are retryable, assuming the SDK has enabled clock skew
6
6
  * correction.
7
+ *
7
8
  */
8
9
  export declare const CLOCK_SKEW_ERROR_CODES: string[];
9
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.29.7",
3
+ "version": "3.30.0",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
5
5
  "license": "Apache-2.0",
6
6
  "author": {