@smithy/core 3.21.1 → 3.22.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.
|
@@ -323,7 +323,7 @@ class NormalizedSchema {
|
|
|
323
323
|
}
|
|
324
324
|
getSchema() {
|
|
325
325
|
const sc = this.schema;
|
|
326
|
-
if (sc[0] === 0) {
|
|
326
|
+
if (Array.isArray(sc) && sc[0] === 0) {
|
|
327
327
|
return sc[4];
|
|
328
328
|
}
|
|
329
329
|
return sc;
|
|
@@ -353,6 +353,9 @@ class NormalizedSchema {
|
|
|
353
353
|
}
|
|
354
354
|
isStructSchema() {
|
|
355
355
|
const sc = this.getSchema();
|
|
356
|
+
if (typeof sc !== "object") {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
356
359
|
const id = sc[0];
|
|
357
360
|
return (id === 3 ||
|
|
358
361
|
id === -3 ||
|
|
@@ -360,6 +363,9 @@ class NormalizedSchema {
|
|
|
360
363
|
}
|
|
361
364
|
isUnionSchema() {
|
|
362
365
|
const sc = this.getSchema();
|
|
366
|
+
if (typeof sc !== "object") {
|
|
367
|
+
return false;
|
|
368
|
+
}
|
|
363
369
|
return sc[0] === 4;
|
|
364
370
|
}
|
|
365
371
|
isBlobSchema() {
|
|
@@ -83,7 +83,7 @@ export class NormalizedSchema {
|
|
|
83
83
|
}
|
|
84
84
|
getSchema() {
|
|
85
85
|
const sc = this.schema;
|
|
86
|
-
if (sc[0] === 0) {
|
|
86
|
+
if (Array.isArray(sc) && sc[0] === 0) {
|
|
87
87
|
return sc[4];
|
|
88
88
|
}
|
|
89
89
|
return sc;
|
|
@@ -113,6 +113,9 @@ export class NormalizedSchema {
|
|
|
113
113
|
}
|
|
114
114
|
isStructSchema() {
|
|
115
115
|
const sc = this.getSchema();
|
|
116
|
+
if (typeof sc !== "object") {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
116
119
|
const id = sc[0];
|
|
117
120
|
return (id === 3 ||
|
|
118
121
|
id === -3 ||
|
|
@@ -120,6 +123,9 @@ export class NormalizedSchema {
|
|
|
120
123
|
}
|
|
121
124
|
isUnionSchema() {
|
|
122
125
|
const sc = this.getSchema();
|
|
126
|
+
if (typeof sc !== "object") {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
123
129
|
return sc[0] === 4;
|
|
124
130
|
}
|
|
125
131
|
isBlobSchema() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.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",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@smithy/util-base64": "^4.3.0",
|
|
86
86
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
87
87
|
"@smithy/util-middleware": "^4.2.8",
|
|
88
|
-
"@smithy/util-stream": "^4.5.
|
|
88
|
+
"@smithy/util-stream": "^4.5.11",
|
|
89
89
|
"@smithy/util-utf8": "^4.2.0",
|
|
90
90
|
"@smithy/uuid": "^1.1.0",
|
|
91
91
|
"tslib": "^2.6.2"
|