@smithy/core 3.18.5 → 3.18.7
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.
|
@@ -874,8 +874,15 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
874
874
|
}
|
|
875
875
|
readValue(_schema, value) {
|
|
876
876
|
const ns = schema.NormalizedSchema.of(_schema);
|
|
877
|
-
if (ns.isTimestampSchema()
|
|
878
|
-
|
|
877
|
+
if (ns.isTimestampSchema()) {
|
|
878
|
+
if (typeof value === "number") {
|
|
879
|
+
return serde._parseEpochTimestamp(value);
|
|
880
|
+
}
|
|
881
|
+
if (typeof value === "object") {
|
|
882
|
+
if (value.tag === 1 && "value" in value) {
|
|
883
|
+
return serde._parseEpochTimestamp(value.value);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
879
886
|
}
|
|
880
887
|
if (ns.isBlobSchema()) {
|
|
881
888
|
if (typeof value === "string") {
|
|
@@ -891,7 +898,7 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
891
898
|
typeof value === "symbol") {
|
|
892
899
|
return value;
|
|
893
900
|
}
|
|
894
|
-
else if (typeof value === "
|
|
901
|
+
else if (typeof value === "object") {
|
|
895
902
|
if (value === null) {
|
|
896
903
|
return null;
|
|
897
904
|
}
|
|
@@ -187,7 +187,6 @@ class EventStreamSerde {
|
|
|
187
187
|
const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
|
|
188
188
|
if (eventPayload) {
|
|
189
189
|
explicitPayloadMember = memberName;
|
|
190
|
-
break;
|
|
191
190
|
}
|
|
192
191
|
else if (eventHeader) {
|
|
193
192
|
const value = event[unionMember][memberName];
|
|
@@ -98,8 +98,15 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
98
98
|
}
|
|
99
99
|
readValue(_schema, value) {
|
|
100
100
|
const ns = NormalizedSchema.of(_schema);
|
|
101
|
-
if (ns.isTimestampSchema()
|
|
102
|
-
|
|
101
|
+
if (ns.isTimestampSchema()) {
|
|
102
|
+
if (typeof value === "number") {
|
|
103
|
+
return _parseEpochTimestamp(value);
|
|
104
|
+
}
|
|
105
|
+
if (typeof value === "object") {
|
|
106
|
+
if (value.tag === 1 && "value" in value) {
|
|
107
|
+
return _parseEpochTimestamp(value.value);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
103
110
|
}
|
|
104
111
|
if (ns.isBlobSchema()) {
|
|
105
112
|
if (typeof value === "string") {
|
|
@@ -115,7 +122,7 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
115
122
|
typeof value === "symbol") {
|
|
116
123
|
return value;
|
|
117
124
|
}
|
|
118
|
-
else if (typeof value === "
|
|
125
|
+
else if (typeof value === "object") {
|
|
119
126
|
if (value === null) {
|
|
120
127
|
return null;
|
|
121
128
|
}
|
|
@@ -184,7 +184,6 @@ export class EventStreamSerde {
|
|
|
184
184
|
const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
|
|
185
185
|
if (eventPayload) {
|
|
186
186
|
explicitPayloadMember = memberName;
|
|
187
|
-
break;
|
|
188
187
|
}
|
|
189
188
|
else if (eventHeader) {
|
|
190
189
|
const value = event[unionMember][memberName];
|
package/package.json
CHANGED