@smithy/core 3.20.4 → 3.20.6

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.
@@ -856,6 +856,13 @@ class CborShapeSerializer extends protocols.SerdeContext {
856
856
  const [k, v] = sourceObject.$unknown;
857
857
  newObject[k] = v;
858
858
  }
859
+ else if (typeof sourceObject.__type === "string") {
860
+ for (const [k, v] of Object.entries(sourceObject)) {
861
+ if (!(k in newObject)) {
862
+ newObject[k] = this.serialize(15, v);
863
+ }
864
+ }
865
+ }
859
866
  }
860
867
  else if (ns.isDocumentSchema()) {
861
868
  for (const key of Object.keys(sourceObject)) {
@@ -960,6 +967,13 @@ class CborShapeDeserializer extends protocols.SerdeContext {
960
967
  const k = keys.values().next().value;
961
968
  newObject.$unknown = [k, value[k]];
962
969
  }
970
+ else if (typeof value.__type === "string") {
971
+ for (const [k, v] of Object.entries(value)) {
972
+ if (!(k in newObject)) {
973
+ newObject[k] = v;
974
+ }
975
+ }
976
+ }
963
977
  }
964
978
  else if (value instanceof serde.NumericValue) {
965
979
  return value;
@@ -81,6 +81,13 @@ export class CborShapeSerializer extends SerdeContext {
81
81
  const [k, v] = sourceObject.$unknown;
82
82
  newObject[k] = v;
83
83
  }
84
+ else if (typeof sourceObject.__type === "string") {
85
+ for (const [k, v] of Object.entries(sourceObject)) {
86
+ if (!(k in newObject)) {
87
+ newObject[k] = this.serialize(15, v);
88
+ }
89
+ }
90
+ }
84
91
  }
85
92
  else if (ns.isDocumentSchema()) {
86
93
  for (const key of Object.keys(sourceObject)) {
@@ -185,6 +192,13 @@ export class CborShapeDeserializer extends SerdeContext {
185
192
  const k = keys.values().next().value;
186
193
  newObject.$unknown = [k, value[k]];
187
194
  }
195
+ else if (typeof value.__type === "string") {
196
+ for (const [k, v] of Object.entries(value)) {
197
+ if (!(k in newObject)) {
198
+ newObject[k] = v;
199
+ }
200
+ }
201
+ }
188
202
  }
189
203
  else if (value instanceof NumericValue) {
190
204
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.20.4",
3
+ "version": "3.20.6",
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",
@@ -79,13 +79,13 @@
79
79
  "license": "Apache-2.0",
80
80
  "sideEffects": false,
81
81
  "dependencies": {
82
- "@smithy/middleware-serde": "^4.2.8",
83
- "@smithy/protocol-http": "^5.3.7",
84
- "@smithy/types": "^4.11.0",
82
+ "@smithy/middleware-serde": "^4.2.9",
83
+ "@smithy/protocol-http": "^5.3.8",
84
+ "@smithy/types": "^4.12.0",
85
85
  "@smithy/util-base64": "^4.3.0",
86
86
  "@smithy/util-body-length-browser": "^4.2.0",
87
- "@smithy/util-middleware": "^4.2.7",
88
- "@smithy/util-stream": "^4.5.9",
87
+ "@smithy/util-middleware": "^4.2.8",
88
+ "@smithy/util-stream": "^4.5.10",
89
89
  "@smithy/util-utf8": "^4.2.0",
90
90
  "@smithy/uuid": "^1.1.0",
91
91
  "tslib": "^2.6.2"
@@ -120,7 +120,7 @@
120
120
  "directory": "packages/core"
121
121
  },
122
122
  "devDependencies": {
123
- "@smithy/eventstream-serde-node": "^4.2.7",
123
+ "@smithy/eventstream-serde-node": "^4.2.8",
124
124
  "@types/node": "^18.11.9",
125
125
  "concurrently": "7.0.0",
126
126
  "downlevel-dts": "0.10.1",