@aws-sdk/client-codeguru-reviewer 3.525.0 → 3.529.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/dist-cjs/index.js +14 -54
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -221,6 +221,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
221
221
|
var import_types = require("@smithy/types");
|
|
222
222
|
|
|
223
223
|
// src/protocols/Aws_restJson1.ts
|
|
224
|
+
var import_core2 = require("@aws-sdk/core");
|
|
224
225
|
|
|
225
226
|
|
|
226
227
|
var import_uuid = require("uuid");
|
|
@@ -634,7 +635,7 @@ var de_AssociateRepositoryCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
634
635
|
const contents = (0, import_smithy_client.map)({
|
|
635
636
|
$metadata: deserializeMetadata(output)
|
|
636
637
|
});
|
|
637
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
638
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
638
639
|
const doc = (0, import_smithy_client.take)(data, {
|
|
639
640
|
RepositoryAssociation: (_) => de_RepositoryAssociation(_, context),
|
|
640
641
|
Tags: import_smithy_client._json
|
|
@@ -649,7 +650,7 @@ var de_CreateCodeReviewCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
649
650
|
const contents = (0, import_smithy_client.map)({
|
|
650
651
|
$metadata: deserializeMetadata(output)
|
|
651
652
|
});
|
|
652
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
653
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
653
654
|
const doc = (0, import_smithy_client.take)(data, {
|
|
654
655
|
CodeReview: (_) => de_CodeReview(_, context)
|
|
655
656
|
});
|
|
@@ -663,7 +664,7 @@ var de_DescribeCodeReviewCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
663
664
|
const contents = (0, import_smithy_client.map)({
|
|
664
665
|
$metadata: deserializeMetadata(output)
|
|
665
666
|
});
|
|
666
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
667
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
667
668
|
const doc = (0, import_smithy_client.take)(data, {
|
|
668
669
|
CodeReview: (_) => de_CodeReview(_, context)
|
|
669
670
|
});
|
|
@@ -677,7 +678,7 @@ var de_DescribeRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (out
|
|
|
677
678
|
const contents = (0, import_smithy_client.map)({
|
|
678
679
|
$metadata: deserializeMetadata(output)
|
|
679
680
|
});
|
|
680
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
681
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
681
682
|
const doc = (0, import_smithy_client.take)(data, {
|
|
682
683
|
RecommendationFeedback: (_) => de_RecommendationFeedback(_, context)
|
|
683
684
|
});
|
|
@@ -691,7 +692,7 @@ var de_DescribeRepositoryAssociationCommand = /* @__PURE__ */ __name(async (outp
|
|
|
691
692
|
const contents = (0, import_smithy_client.map)({
|
|
692
693
|
$metadata: deserializeMetadata(output)
|
|
693
694
|
});
|
|
694
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
695
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
695
696
|
const doc = (0, import_smithy_client.take)(data, {
|
|
696
697
|
RepositoryAssociation: (_) => de_RepositoryAssociation(_, context),
|
|
697
698
|
Tags: import_smithy_client._json
|
|
@@ -706,7 +707,7 @@ var de_DisassociateRepositoryCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
706
707
|
const contents = (0, import_smithy_client.map)({
|
|
707
708
|
$metadata: deserializeMetadata(output)
|
|
708
709
|
});
|
|
709
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
710
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
710
711
|
const doc = (0, import_smithy_client.take)(data, {
|
|
711
712
|
RepositoryAssociation: (_) => de_RepositoryAssociation(_, context),
|
|
712
713
|
Tags: import_smithy_client._json
|
|
@@ -721,7 +722,7 @@ var de_ListCodeReviewsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
721
722
|
const contents = (0, import_smithy_client.map)({
|
|
722
723
|
$metadata: deserializeMetadata(output)
|
|
723
724
|
});
|
|
724
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
725
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
725
726
|
const doc = (0, import_smithy_client.take)(data, {
|
|
726
727
|
CodeReviewSummaries: (_) => de_CodeReviewSummaries(_, context),
|
|
727
728
|
NextToken: import_smithy_client.expectString
|
|
@@ -736,7 +737,7 @@ var de_ListRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (output,
|
|
|
736
737
|
const contents = (0, import_smithy_client.map)({
|
|
737
738
|
$metadata: deserializeMetadata(output)
|
|
738
739
|
});
|
|
739
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
740
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
740
741
|
const doc = (0, import_smithy_client.take)(data, {
|
|
741
742
|
NextToken: import_smithy_client.expectString,
|
|
742
743
|
RecommendationFeedbackSummaries: import_smithy_client._json
|
|
@@ -751,7 +752,7 @@ var de_ListRecommendationsCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
751
752
|
const contents = (0, import_smithy_client.map)({
|
|
752
753
|
$metadata: deserializeMetadata(output)
|
|
753
754
|
});
|
|
754
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
755
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
755
756
|
const doc = (0, import_smithy_client.take)(data, {
|
|
756
757
|
NextToken: import_smithy_client.expectString,
|
|
757
758
|
RecommendationSummaries: import_smithy_client._json
|
|
@@ -766,7 +767,7 @@ var de_ListRepositoryAssociationsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
766
767
|
const contents = (0, import_smithy_client.map)({
|
|
767
768
|
$metadata: deserializeMetadata(output)
|
|
768
769
|
});
|
|
769
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
770
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
770
771
|
const doc = (0, import_smithy_client.take)(data, {
|
|
771
772
|
NextToken: import_smithy_client.expectString,
|
|
772
773
|
RepositoryAssociationSummaries: (_) => de_RepositoryAssociationSummaries(_, context)
|
|
@@ -781,7 +782,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
781
782
|
const contents = (0, import_smithy_client.map)({
|
|
782
783
|
$metadata: deserializeMetadata(output)
|
|
783
784
|
});
|
|
784
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
785
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
785
786
|
const doc = (0, import_smithy_client.take)(data, {
|
|
786
787
|
Tags: import_smithy_client._json
|
|
787
788
|
});
|
|
@@ -821,9 +822,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
821
822
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
822
823
|
const parsedOutput = {
|
|
823
824
|
...output,
|
|
824
|
-
body: await
|
|
825
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
825
826
|
};
|
|
826
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
827
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
827
828
|
switch (errorCode) {
|
|
828
829
|
case "AccessDeniedException":
|
|
829
830
|
case "com.amazonaws.codegurureviewer#AccessDeniedException":
|
|
@@ -1039,7 +1040,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1039
1040
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1040
1041
|
cfId: output.headers["x-amz-cf-id"]
|
|
1041
1042
|
}), "deserializeMetadata");
|
|
1042
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1043
1043
|
var _MR = "MaxResults";
|
|
1044
1044
|
var _N = "Names";
|
|
1045
1045
|
var _NT = "NextToken";
|
|
@@ -1058,46 +1058,6 @@ var _TK = "TagKeys";
|
|
|
1058
1058
|
var _UI = "UserId";
|
|
1059
1059
|
var _UIs = "UserIds";
|
|
1060
1060
|
var _tK = "tagKeys";
|
|
1061
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1062
|
-
if (encoded.length) {
|
|
1063
|
-
return JSON.parse(encoded);
|
|
1064
|
-
}
|
|
1065
|
-
return {};
|
|
1066
|
-
}), "parseBody");
|
|
1067
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1068
|
-
const value = await parseBody(errorBody, context);
|
|
1069
|
-
value.message = value.message ?? value.Message;
|
|
1070
|
-
return value;
|
|
1071
|
-
}, "parseErrorBody");
|
|
1072
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1073
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1074
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1075
|
-
let cleanValue = rawValue;
|
|
1076
|
-
if (typeof cleanValue === "number") {
|
|
1077
|
-
cleanValue = cleanValue.toString();
|
|
1078
|
-
}
|
|
1079
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1080
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1081
|
-
}
|
|
1082
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1083
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1084
|
-
}
|
|
1085
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1086
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1087
|
-
}
|
|
1088
|
-
return cleanValue;
|
|
1089
|
-
}, "sanitizeErrorCode");
|
|
1090
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1091
|
-
if (headerKey !== void 0) {
|
|
1092
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1093
|
-
}
|
|
1094
|
-
if (data.code !== void 0) {
|
|
1095
|
-
return sanitizeErrorCode(data.code);
|
|
1096
|
-
}
|
|
1097
|
-
if (data["__type"] !== void 0) {
|
|
1098
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1099
|
-
}
|
|
1100
|
-
}, "loadRestJsonErrorCode");
|
|
1101
1061
|
|
|
1102
1062
|
// src/commands/AssociateRepositoryCommand.ts
|
|
1103
1063
|
var _AssociateRepositoryCommand = class _AssociateRepositoryCommand 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 { requestBuilder as rb } from "@smithy/core";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -628,43 +629,3 @@ const _TK = "TagKeys";
|
|
|
628
629
|
const _UI = "UserId";
|
|
629
630
|
const _UIs = "UserIds";
|
|
630
631
|
const _tK = "tagKeys";
|
|
631
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
632
|
-
if (encoded.length) {
|
|
633
|
-
return JSON.parse(encoded);
|
|
634
|
-
}
|
|
635
|
-
return {};
|
|
636
|
-
});
|
|
637
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
638
|
-
const value = await parseBody(errorBody, context);
|
|
639
|
-
value.message = value.message ?? value.Message;
|
|
640
|
-
return value;
|
|
641
|
-
};
|
|
642
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
643
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
644
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
645
|
-
let cleanValue = rawValue;
|
|
646
|
-
if (typeof cleanValue === "number") {
|
|
647
|
-
cleanValue = cleanValue.toString();
|
|
648
|
-
}
|
|
649
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
650
|
-
cleanValue = cleanValue.split(",")[0];
|
|
651
|
-
}
|
|
652
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
653
|
-
cleanValue = cleanValue.split(":")[0];
|
|
654
|
-
}
|
|
655
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
656
|
-
cleanValue = cleanValue.split("#")[1];
|
|
657
|
-
}
|
|
658
|
-
return cleanValue;
|
|
659
|
-
};
|
|
660
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
661
|
-
if (headerKey !== undefined) {
|
|
662
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
663
|
-
}
|
|
664
|
-
if (data.code !== undefined) {
|
|
665
|
-
return sanitizeErrorCode(data.code);
|
|
666
|
-
}
|
|
667
|
-
if (data["__type"] !== undefined) {
|
|
668
|
-
return sanitizeErrorCode(data["__type"]);
|
|
669
|
-
}
|
|
670
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-codeguru-reviewer",
|
|
3
3
|
"description": "AWS SDK for JavaScript Codeguru Reviewer Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
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-codeguru-reviewer",
|
|
@@ -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.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
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",
|