@smithy/core 3.18.0 → 3.18.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.
@@ -770,7 +770,12 @@ class ToStringShapeSerializer extends SerdeContext {
770
770
  this.stringBuffer = value;
771
771
  break;
772
772
  default:
773
- this.stringBuffer = String(value);
773
+ if (ns.isIdempotencyToken()) {
774
+ this.stringBuffer = serde.generateIdempotencyToken();
775
+ }
776
+ else {
777
+ this.stringBuffer = String(value);
778
+ }
774
779
  }
775
780
  }
776
781
  flush() {
@@ -1,5 +1,5 @@
1
1
  import { NormalizedSchema } from "@smithy/core/schema";
2
- import { dateToUtcString, LazyJsonString, quoteHeader } from "@smithy/core/serde";
2
+ import { dateToUtcString, generateIdempotencyToken, LazyJsonString, quoteHeader } from "@smithy/core/serde";
3
3
  import { toBase64 } from "@smithy/util-base64";
4
4
  import { SerdeContext } from "../SerdeContext";
5
5
  import { determineTimestampFormat } from "./determineTimestampFormat";
@@ -75,7 +75,12 @@ export class ToStringShapeSerializer extends SerdeContext {
75
75
  this.stringBuffer = value;
76
76
  break;
77
77
  default:
78
- this.stringBuffer = String(value);
78
+ if (ns.isIdempotencyToken()) {
79
+ this.stringBuffer = generateIdempotencyToken();
80
+ }
81
+ else {
82
+ this.stringBuffer = String(value);
83
+ }
79
84
  }
80
85
  }
81
86
  flush() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.18.0",
3
+ "version": "3.18.1",
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",