@smithy/core 3.38.0 → 3.38.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.
package/CHANGELOG.md
CHANGED
|
@@ -559,16 +559,22 @@ function schemaLogFilter(schema, data) {
|
|
|
559
559
|
return SENSITIVE_STRING$1;
|
|
560
560
|
}
|
|
561
561
|
if (ns.isListSchema()) {
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
562
|
+
const valueSchema = ns.getValueSchema();
|
|
563
|
+
if (valueSchema.getMergedTraits().sensitive) {
|
|
564
564
|
return SENSITIVE_STRING$1;
|
|
565
565
|
}
|
|
566
|
+
if (Array.isArray(data)) {
|
|
567
|
+
return data.map((value) => schemaLogFilter(valueSchema, value));
|
|
568
|
+
}
|
|
566
569
|
}
|
|
567
570
|
else if (ns.isMapSchema()) {
|
|
568
|
-
const
|
|
569
|
-
if (
|
|
571
|
+
const valueSchema = ns.getValueSchema();
|
|
572
|
+
if (ns.getKeySchema().getMergedTraits().sensitive || valueSchema.getMergedTraits().sensitive) {
|
|
570
573
|
return SENSITIVE_STRING$1;
|
|
571
574
|
}
|
|
575
|
+
if (typeof data === "object") {
|
|
576
|
+
return Object.fromEntries(Object.entries(data).map(([key, value]) => [key, schemaLogFilter(valueSchema, value)]));
|
|
577
|
+
}
|
|
572
578
|
}
|
|
573
579
|
else if (ns.isStructSchema() && typeof data === "object") {
|
|
574
580
|
const object = data;
|
|
@@ -9,16 +9,22 @@ export function schemaLogFilter(schema, data) {
|
|
|
9
9
|
return SENSITIVE_STRING;
|
|
10
10
|
}
|
|
11
11
|
if (ns.isListSchema()) {
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
12
|
+
const valueSchema = ns.getValueSchema();
|
|
13
|
+
if (valueSchema.getMergedTraits().sensitive) {
|
|
14
14
|
return SENSITIVE_STRING;
|
|
15
15
|
}
|
|
16
|
+
if (Array.isArray(data)) {
|
|
17
|
+
return data.map((value) => schemaLogFilter(valueSchema, value));
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
else if (ns.isMapSchema()) {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
21
|
+
const valueSchema = ns.getValueSchema();
|
|
22
|
+
if (ns.getKeySchema().getMergedTraits().sensitive || valueSchema.getMergedTraits().sensitive) {
|
|
20
23
|
return SENSITIVE_STRING;
|
|
21
24
|
}
|
|
25
|
+
if (typeof data === "object") {
|
|
26
|
+
return Object.fromEntries(Object.entries(data).map(([key, value]) => [key, schemaLogFilter(valueSchema, value)]));
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
29
|
else if (ns.isStructSchema() && typeof data === "object") {
|
|
24
30
|
const object = data;
|