@aws-sdk/client-inspector 3.525.0 → 3.529.0
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/dist-cjs/index.js +31 -71
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -259,6 +259,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
259
259
|
var import_types = require("@smithy/types");
|
|
260
260
|
|
|
261
261
|
// src/protocols/Aws_json1_1.ts
|
|
262
|
+
var import_core2 = require("@aws-sdk/core");
|
|
262
263
|
|
|
263
264
|
|
|
264
265
|
|
|
@@ -884,7 +885,7 @@ var de_AddAttributesToFindingsCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
884
885
|
if (output.statusCode >= 300) {
|
|
885
886
|
return de_CommandError(output, context);
|
|
886
887
|
}
|
|
887
|
-
const data = await
|
|
888
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
888
889
|
let contents = {};
|
|
889
890
|
contents = (0, import_smithy_client._json)(data);
|
|
890
891
|
const response = {
|
|
@@ -897,7 +898,7 @@ var de_CreateAssessmentTargetCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
897
898
|
if (output.statusCode >= 300) {
|
|
898
899
|
return de_CommandError(output, context);
|
|
899
900
|
}
|
|
900
|
-
const data = await
|
|
901
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
901
902
|
let contents = {};
|
|
902
903
|
contents = (0, import_smithy_client._json)(data);
|
|
903
904
|
const response = {
|
|
@@ -910,7 +911,7 @@ var de_CreateAssessmentTemplateCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
910
911
|
if (output.statusCode >= 300) {
|
|
911
912
|
return de_CommandError(output, context);
|
|
912
913
|
}
|
|
913
|
-
const data = await
|
|
914
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
914
915
|
let contents = {};
|
|
915
916
|
contents = (0, import_smithy_client._json)(data);
|
|
916
917
|
const response = {
|
|
@@ -923,7 +924,7 @@ var de_CreateExclusionsPreviewCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
923
924
|
if (output.statusCode >= 300) {
|
|
924
925
|
return de_CommandError(output, context);
|
|
925
926
|
}
|
|
926
|
-
const data = await
|
|
927
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
927
928
|
let contents = {};
|
|
928
929
|
contents = (0, import_smithy_client._json)(data);
|
|
929
930
|
const response = {
|
|
@@ -936,7 +937,7 @@ var de_CreateResourceGroupCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
936
937
|
if (output.statusCode >= 300) {
|
|
937
938
|
return de_CommandError(output, context);
|
|
938
939
|
}
|
|
939
|
-
const data = await
|
|
940
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
940
941
|
let contents = {};
|
|
941
942
|
contents = (0, import_smithy_client._json)(data);
|
|
942
943
|
const response = {
|
|
@@ -979,7 +980,7 @@ var de_DescribeAssessmentRunsCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
979
980
|
if (output.statusCode >= 300) {
|
|
980
981
|
return de_CommandError(output, context);
|
|
981
982
|
}
|
|
982
|
-
const data = await
|
|
983
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
983
984
|
let contents = {};
|
|
984
985
|
contents = de_DescribeAssessmentRunsResponse(data, context);
|
|
985
986
|
const response = {
|
|
@@ -992,7 +993,7 @@ var de_DescribeAssessmentTargetsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
992
993
|
if (output.statusCode >= 300) {
|
|
993
994
|
return de_CommandError(output, context);
|
|
994
995
|
}
|
|
995
|
-
const data = await
|
|
996
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
996
997
|
let contents = {};
|
|
997
998
|
contents = de_DescribeAssessmentTargetsResponse(data, context);
|
|
998
999
|
const response = {
|
|
@@ -1005,7 +1006,7 @@ var de_DescribeAssessmentTemplatesCommand = /* @__PURE__ */ __name(async (output
|
|
|
1005
1006
|
if (output.statusCode >= 300) {
|
|
1006
1007
|
return de_CommandError(output, context);
|
|
1007
1008
|
}
|
|
1008
|
-
const data = await
|
|
1009
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1009
1010
|
let contents = {};
|
|
1010
1011
|
contents = de_DescribeAssessmentTemplatesResponse(data, context);
|
|
1011
1012
|
const response = {
|
|
@@ -1018,7 +1019,7 @@ var de_DescribeCrossAccountAccessRoleCommand = /* @__PURE__ */ __name(async (out
|
|
|
1018
1019
|
if (output.statusCode >= 300) {
|
|
1019
1020
|
return de_CommandError(output, context);
|
|
1020
1021
|
}
|
|
1021
|
-
const data = await
|
|
1022
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1022
1023
|
let contents = {};
|
|
1023
1024
|
contents = de_DescribeCrossAccountAccessRoleResponse(data, context);
|
|
1024
1025
|
const response = {
|
|
@@ -1031,7 +1032,7 @@ var de_DescribeExclusionsCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1031
1032
|
if (output.statusCode >= 300) {
|
|
1032
1033
|
return de_CommandError(output, context);
|
|
1033
1034
|
}
|
|
1034
|
-
const data = await
|
|
1035
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1035
1036
|
let contents = {};
|
|
1036
1037
|
contents = (0, import_smithy_client._json)(data);
|
|
1037
1038
|
const response = {
|
|
@@ -1044,7 +1045,7 @@ var de_DescribeFindingsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1044
1045
|
if (output.statusCode >= 300) {
|
|
1045
1046
|
return de_CommandError(output, context);
|
|
1046
1047
|
}
|
|
1047
|
-
const data = await
|
|
1048
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1048
1049
|
let contents = {};
|
|
1049
1050
|
contents = de_DescribeFindingsResponse(data, context);
|
|
1050
1051
|
const response = {
|
|
@@ -1057,7 +1058,7 @@ var de_DescribeResourceGroupsCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1057
1058
|
if (output.statusCode >= 300) {
|
|
1058
1059
|
return de_CommandError(output, context);
|
|
1059
1060
|
}
|
|
1060
|
-
const data = await
|
|
1061
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1061
1062
|
let contents = {};
|
|
1062
1063
|
contents = de_DescribeResourceGroupsResponse(data, context);
|
|
1063
1064
|
const response = {
|
|
@@ -1070,7 +1071,7 @@ var de_DescribeRulesPackagesCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1070
1071
|
if (output.statusCode >= 300) {
|
|
1071
1072
|
return de_CommandError(output, context);
|
|
1072
1073
|
}
|
|
1073
|
-
const data = await
|
|
1074
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1074
1075
|
let contents = {};
|
|
1075
1076
|
contents = (0, import_smithy_client._json)(data);
|
|
1076
1077
|
const response = {
|
|
@@ -1083,7 +1084,7 @@ var de_GetAssessmentReportCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1083
1084
|
if (output.statusCode >= 300) {
|
|
1084
1085
|
return de_CommandError(output, context);
|
|
1085
1086
|
}
|
|
1086
|
-
const data = await
|
|
1087
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1087
1088
|
let contents = {};
|
|
1088
1089
|
contents = (0, import_smithy_client._json)(data);
|
|
1089
1090
|
const response = {
|
|
@@ -1096,7 +1097,7 @@ var de_GetExclusionsPreviewCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1096
1097
|
if (output.statusCode >= 300) {
|
|
1097
1098
|
return de_CommandError(output, context);
|
|
1098
1099
|
}
|
|
1099
|
-
const data = await
|
|
1100
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1100
1101
|
let contents = {};
|
|
1101
1102
|
contents = (0, import_smithy_client._json)(data);
|
|
1102
1103
|
const response = {
|
|
@@ -1109,7 +1110,7 @@ var de_GetTelemetryMetadataCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
1109
1110
|
if (output.statusCode >= 300) {
|
|
1110
1111
|
return de_CommandError(output, context);
|
|
1111
1112
|
}
|
|
1112
|
-
const data = await
|
|
1113
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1113
1114
|
let contents = {};
|
|
1114
1115
|
contents = (0, import_smithy_client._json)(data);
|
|
1115
1116
|
const response = {
|
|
@@ -1122,7 +1123,7 @@ var de_ListAssessmentRunAgentsCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1122
1123
|
if (output.statusCode >= 300) {
|
|
1123
1124
|
return de_CommandError(output, context);
|
|
1124
1125
|
}
|
|
1125
|
-
const data = await
|
|
1126
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1126
1127
|
let contents = {};
|
|
1127
1128
|
contents = (0, import_smithy_client._json)(data);
|
|
1128
1129
|
const response = {
|
|
@@ -1135,7 +1136,7 @@ var de_ListAssessmentRunsCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1135
1136
|
if (output.statusCode >= 300) {
|
|
1136
1137
|
return de_CommandError(output, context);
|
|
1137
1138
|
}
|
|
1138
|
-
const data = await
|
|
1139
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1139
1140
|
let contents = {};
|
|
1140
1141
|
contents = (0, import_smithy_client._json)(data);
|
|
1141
1142
|
const response = {
|
|
@@ -1148,7 +1149,7 @@ var de_ListAssessmentTargetsCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
1148
1149
|
if (output.statusCode >= 300) {
|
|
1149
1150
|
return de_CommandError(output, context);
|
|
1150
1151
|
}
|
|
1151
|
-
const data = await
|
|
1152
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1152
1153
|
let contents = {};
|
|
1153
1154
|
contents = (0, import_smithy_client._json)(data);
|
|
1154
1155
|
const response = {
|
|
@@ -1161,7 +1162,7 @@ var de_ListAssessmentTemplatesCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
1161
1162
|
if (output.statusCode >= 300) {
|
|
1162
1163
|
return de_CommandError(output, context);
|
|
1163
1164
|
}
|
|
1164
|
-
const data = await
|
|
1165
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1165
1166
|
let contents = {};
|
|
1166
1167
|
contents = (0, import_smithy_client._json)(data);
|
|
1167
1168
|
const response = {
|
|
@@ -1174,7 +1175,7 @@ var de_ListEventSubscriptionsCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1174
1175
|
if (output.statusCode >= 300) {
|
|
1175
1176
|
return de_CommandError(output, context);
|
|
1176
1177
|
}
|
|
1177
|
-
const data = await
|
|
1178
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1178
1179
|
let contents = {};
|
|
1179
1180
|
contents = de_ListEventSubscriptionsResponse(data, context);
|
|
1180
1181
|
const response = {
|
|
@@ -1187,7 +1188,7 @@ var de_ListExclusionsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1187
1188
|
if (output.statusCode >= 300) {
|
|
1188
1189
|
return de_CommandError(output, context);
|
|
1189
1190
|
}
|
|
1190
|
-
const data = await
|
|
1191
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1191
1192
|
let contents = {};
|
|
1192
1193
|
contents = (0, import_smithy_client._json)(data);
|
|
1193
1194
|
const response = {
|
|
@@ -1200,7 +1201,7 @@ var de_ListFindingsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1200
1201
|
if (output.statusCode >= 300) {
|
|
1201
1202
|
return de_CommandError(output, context);
|
|
1202
1203
|
}
|
|
1203
|
-
const data = await
|
|
1204
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1204
1205
|
let contents = {};
|
|
1205
1206
|
contents = (0, import_smithy_client._json)(data);
|
|
1206
1207
|
const response = {
|
|
@@ -1213,7 +1214,7 @@ var de_ListRulesPackagesCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1213
1214
|
if (output.statusCode >= 300) {
|
|
1214
1215
|
return de_CommandError(output, context);
|
|
1215
1216
|
}
|
|
1216
|
-
const data = await
|
|
1217
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1217
1218
|
let contents = {};
|
|
1218
1219
|
contents = (0, import_smithy_client._json)(data);
|
|
1219
1220
|
const response = {
|
|
@@ -1226,7 +1227,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1226
1227
|
if (output.statusCode >= 300) {
|
|
1227
1228
|
return de_CommandError(output, context);
|
|
1228
1229
|
}
|
|
1229
|
-
const data = await
|
|
1230
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1230
1231
|
let contents = {};
|
|
1231
1232
|
contents = (0, import_smithy_client._json)(data);
|
|
1232
1233
|
const response = {
|
|
@@ -1239,7 +1240,7 @@ var de_PreviewAgentsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1239
1240
|
if (output.statusCode >= 300) {
|
|
1240
1241
|
return de_CommandError(output, context);
|
|
1241
1242
|
}
|
|
1242
|
-
const data = await
|
|
1243
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1243
1244
|
let contents = {};
|
|
1244
1245
|
contents = (0, import_smithy_client._json)(data);
|
|
1245
1246
|
const response = {
|
|
@@ -1262,7 +1263,7 @@ var de_RemoveAttributesFromFindingsCommand = /* @__PURE__ */ __name(async (outpu
|
|
|
1262
1263
|
if (output.statusCode >= 300) {
|
|
1263
1264
|
return de_CommandError(output, context);
|
|
1264
1265
|
}
|
|
1265
|
-
const data = await
|
|
1266
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1266
1267
|
let contents = {};
|
|
1267
1268
|
contents = (0, import_smithy_client._json)(data);
|
|
1268
1269
|
const response = {
|
|
@@ -1285,7 +1286,7 @@ var de_StartAssessmentRunCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
1285
1286
|
if (output.statusCode >= 300) {
|
|
1286
1287
|
return de_CommandError(output, context);
|
|
1287
1288
|
}
|
|
1288
|
-
const data = await
|
|
1289
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1289
1290
|
let contents = {};
|
|
1290
1291
|
contents = (0, import_smithy_client._json)(data);
|
|
1291
1292
|
const response = {
|
|
@@ -1337,9 +1338,9 @@ var de_UpdateAssessmentTargetCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1337
1338
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1338
1339
|
const parsedOutput = {
|
|
1339
1340
|
...output,
|
|
1340
|
-
body: await
|
|
1341
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1341
1342
|
};
|
|
1342
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1343
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1343
1344
|
switch (errorCode) {
|
|
1344
1345
|
case "AccessDeniedException":
|
|
1345
1346
|
case "com.amazonaws.inspector#AccessDeniedException":
|
|
@@ -1729,7 +1730,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1729
1730
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1730
1731
|
cfId: output.headers["x-amz-cf-id"]
|
|
1731
1732
|
}), "deserializeMetadata");
|
|
1732
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1733
1733
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(InspectorServiceException);
|
|
1734
1734
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1735
1735
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1756,46 +1756,6 @@ function sharedHeaders(operation) {
|
|
|
1756
1756
|
};
|
|
1757
1757
|
}
|
|
1758
1758
|
__name(sharedHeaders, "sharedHeaders");
|
|
1759
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1760
|
-
if (encoded.length) {
|
|
1761
|
-
return JSON.parse(encoded);
|
|
1762
|
-
}
|
|
1763
|
-
return {};
|
|
1764
|
-
}), "parseBody");
|
|
1765
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1766
|
-
const value = await parseBody(errorBody, context);
|
|
1767
|
-
value.message = value.message ?? value.Message;
|
|
1768
|
-
return value;
|
|
1769
|
-
}, "parseErrorBody");
|
|
1770
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1771
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1772
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1773
|
-
let cleanValue = rawValue;
|
|
1774
|
-
if (typeof cleanValue === "number") {
|
|
1775
|
-
cleanValue = cleanValue.toString();
|
|
1776
|
-
}
|
|
1777
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1778
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1779
|
-
}
|
|
1780
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1781
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1782
|
-
}
|
|
1783
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1784
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1785
|
-
}
|
|
1786
|
-
return cleanValue;
|
|
1787
|
-
}, "sanitizeErrorCode");
|
|
1788
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1789
|
-
if (headerKey !== void 0) {
|
|
1790
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1791
|
-
}
|
|
1792
|
-
if (data.code !== void 0) {
|
|
1793
|
-
return sanitizeErrorCode(data.code);
|
|
1794
|
-
}
|
|
1795
|
-
if (data["__type"] !== void 0) {
|
|
1796
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1797
|
-
}
|
|
1798
|
-
}, "loadRestJsonErrorCode");
|
|
1799
1759
|
|
|
1800
1760
|
// src/commands/AddAttributesToFindingsCommand.ts
|
|
1801
1761
|
var _AddAttributesToFindingsCommand = class _AddAttributesToFindingsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { InspectorServiceException as __BaseException } from "../models/InspectorServiceException";
|
|
@@ -1116,43 +1117,3 @@ function sharedHeaders(operation) {
|
|
|
1116
1117
|
"x-amz-target": `InspectorService.${operation}`,
|
|
1117
1118
|
};
|
|
1118
1119
|
}
|
|
1119
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1120
|
-
if (encoded.length) {
|
|
1121
|
-
return JSON.parse(encoded);
|
|
1122
|
-
}
|
|
1123
|
-
return {};
|
|
1124
|
-
});
|
|
1125
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1126
|
-
const value = await parseBody(errorBody, context);
|
|
1127
|
-
value.message = value.message ?? value.Message;
|
|
1128
|
-
return value;
|
|
1129
|
-
};
|
|
1130
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1131
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1132
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1133
|
-
let cleanValue = rawValue;
|
|
1134
|
-
if (typeof cleanValue === "number") {
|
|
1135
|
-
cleanValue = cleanValue.toString();
|
|
1136
|
-
}
|
|
1137
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1138
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1139
|
-
}
|
|
1140
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1141
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1142
|
-
}
|
|
1143
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1144
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1145
|
-
}
|
|
1146
|
-
return cleanValue;
|
|
1147
|
-
};
|
|
1148
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1149
|
-
if (headerKey !== undefined) {
|
|
1150
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1151
|
-
}
|
|
1152
|
-
if (data.code !== undefined) {
|
|
1153
|
-
return sanitizeErrorCode(data.code);
|
|
1154
|
-
}
|
|
1155
|
-
if (data["__type"] !== undefined) {
|
|
1156
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1157
|
-
}
|
|
1158
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-inspector",
|
|
3
3
|
"description": "AWS SDK for JavaScript Inspector Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-inspector",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.0",
|
|
24
|
+
"@aws-sdk/core": "3.529.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|