@aws-sdk/client-ecr-public 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 +26 -66
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -236,6 +236,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
236
236
|
var import_types = require("@smithy/types");
|
|
237
237
|
|
|
238
238
|
// src/protocols/Aws_json1_1.ts
|
|
239
|
+
var import_core2 = require("@aws-sdk/core");
|
|
239
240
|
|
|
240
241
|
|
|
241
242
|
|
|
@@ -832,7 +833,7 @@ var de_BatchCheckLayerAvailabilityCommand = /* @__PURE__ */ __name(async (output
|
|
|
832
833
|
if (output.statusCode >= 300) {
|
|
833
834
|
return de_CommandError(output, context);
|
|
834
835
|
}
|
|
835
|
-
const data = await
|
|
836
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
836
837
|
let contents = {};
|
|
837
838
|
contents = (0, import_smithy_client._json)(data);
|
|
838
839
|
const response = {
|
|
@@ -845,7 +846,7 @@ var de_BatchDeleteImageCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
845
846
|
if (output.statusCode >= 300) {
|
|
846
847
|
return de_CommandError(output, context);
|
|
847
848
|
}
|
|
848
|
-
const data = await
|
|
849
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
849
850
|
let contents = {};
|
|
850
851
|
contents = (0, import_smithy_client._json)(data);
|
|
851
852
|
const response = {
|
|
@@ -858,7 +859,7 @@ var de_CompleteLayerUploadCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
858
859
|
if (output.statusCode >= 300) {
|
|
859
860
|
return de_CommandError(output, context);
|
|
860
861
|
}
|
|
861
|
-
const data = await
|
|
862
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
862
863
|
let contents = {};
|
|
863
864
|
contents = (0, import_smithy_client._json)(data);
|
|
864
865
|
const response = {
|
|
@@ -871,7 +872,7 @@ var de_CreateRepositoryCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
871
872
|
if (output.statusCode >= 300) {
|
|
872
873
|
return de_CommandError(output, context);
|
|
873
874
|
}
|
|
874
|
-
const data = await
|
|
875
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
875
876
|
let contents = {};
|
|
876
877
|
contents = de_CreateRepositoryResponse(data, context);
|
|
877
878
|
const response = {
|
|
@@ -884,7 +885,7 @@ var de_DeleteRepositoryCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
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 = de_DeleteRepositoryResponse(data, context);
|
|
890
891
|
const response = {
|
|
@@ -897,7 +898,7 @@ var de_DeleteRepositoryPolicyCommand = /* @__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_DescribeImagesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
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 = de_DescribeImagesResponse(data, context);
|
|
916
917
|
const response = {
|
|
@@ -923,7 +924,7 @@ var de_DescribeImageTagsCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
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 = de_DescribeImageTagsResponse(data, context);
|
|
929
930
|
const response = {
|
|
@@ -936,7 +937,7 @@ var de_DescribeRegistriesCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
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 = {
|
|
@@ -949,7 +950,7 @@ var de_DescribeRepositoriesCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
949
950
|
if (output.statusCode >= 300) {
|
|
950
951
|
return de_CommandError(output, context);
|
|
951
952
|
}
|
|
952
|
-
const data = await
|
|
953
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
953
954
|
let contents = {};
|
|
954
955
|
contents = de_DescribeRepositoriesResponse(data, context);
|
|
955
956
|
const response = {
|
|
@@ -962,7 +963,7 @@ var de_GetAuthorizationTokenCommand = /* @__PURE__ */ __name(async (output, cont
|
|
|
962
963
|
if (output.statusCode >= 300) {
|
|
963
964
|
return de_CommandError(output, context);
|
|
964
965
|
}
|
|
965
|
-
const data = await
|
|
966
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
966
967
|
let contents = {};
|
|
967
968
|
contents = de_GetAuthorizationTokenResponse(data, context);
|
|
968
969
|
const response = {
|
|
@@ -975,7 +976,7 @@ var de_GetRegistryCatalogDataCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
975
976
|
if (output.statusCode >= 300) {
|
|
976
977
|
return de_CommandError(output, context);
|
|
977
978
|
}
|
|
978
|
-
const data = await
|
|
979
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
979
980
|
let contents = {};
|
|
980
981
|
contents = (0, import_smithy_client._json)(data);
|
|
981
982
|
const response = {
|
|
@@ -988,7 +989,7 @@ var de_GetRepositoryCatalogDataCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
988
989
|
if (output.statusCode >= 300) {
|
|
989
990
|
return de_CommandError(output, context);
|
|
990
991
|
}
|
|
991
|
-
const data = await
|
|
992
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
992
993
|
let contents = {};
|
|
993
994
|
contents = (0, import_smithy_client._json)(data);
|
|
994
995
|
const response = {
|
|
@@ -1001,7 +1002,7 @@ var de_GetRepositoryPolicyCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1001
1002
|
if (output.statusCode >= 300) {
|
|
1002
1003
|
return de_CommandError(output, context);
|
|
1003
1004
|
}
|
|
1004
|
-
const data = await
|
|
1005
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1005
1006
|
let contents = {};
|
|
1006
1007
|
contents = (0, import_smithy_client._json)(data);
|
|
1007
1008
|
const response = {
|
|
@@ -1014,7 +1015,7 @@ var de_InitiateLayerUploadCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1014
1015
|
if (output.statusCode >= 300) {
|
|
1015
1016
|
return de_CommandError(output, context);
|
|
1016
1017
|
}
|
|
1017
|
-
const data = await
|
|
1018
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1018
1019
|
let contents = {};
|
|
1019
1020
|
contents = (0, import_smithy_client._json)(data);
|
|
1020
1021
|
const response = {
|
|
@@ -1027,7 +1028,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1027
1028
|
if (output.statusCode >= 300) {
|
|
1028
1029
|
return de_CommandError(output, context);
|
|
1029
1030
|
}
|
|
1030
|
-
const data = await
|
|
1031
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1031
1032
|
let contents = {};
|
|
1032
1033
|
contents = (0, import_smithy_client._json)(data);
|
|
1033
1034
|
const response = {
|
|
@@ -1040,7 +1041,7 @@ var de_PutImageCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1040
1041
|
if (output.statusCode >= 300) {
|
|
1041
1042
|
return de_CommandError(output, context);
|
|
1042
1043
|
}
|
|
1043
|
-
const data = await
|
|
1044
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1044
1045
|
let contents = {};
|
|
1045
1046
|
contents = (0, import_smithy_client._json)(data);
|
|
1046
1047
|
const response = {
|
|
@@ -1053,7 +1054,7 @@ var de_PutRegistryCatalogDataCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1053
1054
|
if (output.statusCode >= 300) {
|
|
1054
1055
|
return de_CommandError(output, context);
|
|
1055
1056
|
}
|
|
1056
|
-
const data = await
|
|
1057
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1057
1058
|
let contents = {};
|
|
1058
1059
|
contents = (0, import_smithy_client._json)(data);
|
|
1059
1060
|
const response = {
|
|
@@ -1066,7 +1067,7 @@ var de_PutRepositoryCatalogDataCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1066
1067
|
if (output.statusCode >= 300) {
|
|
1067
1068
|
return de_CommandError(output, context);
|
|
1068
1069
|
}
|
|
1069
|
-
const data = await
|
|
1070
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1070
1071
|
let contents = {};
|
|
1071
1072
|
contents = (0, import_smithy_client._json)(data);
|
|
1072
1073
|
const response = {
|
|
@@ -1079,7 +1080,7 @@ var de_SetRepositoryPolicyCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
1079
1080
|
if (output.statusCode >= 300) {
|
|
1080
1081
|
return de_CommandError(output, context);
|
|
1081
1082
|
}
|
|
1082
|
-
const data = await
|
|
1083
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1083
1084
|
let contents = {};
|
|
1084
1085
|
contents = (0, import_smithy_client._json)(data);
|
|
1085
1086
|
const response = {
|
|
@@ -1092,7 +1093,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1092
1093
|
if (output.statusCode >= 300) {
|
|
1093
1094
|
return de_CommandError(output, context);
|
|
1094
1095
|
}
|
|
1095
|
-
const data = await
|
|
1096
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1096
1097
|
let contents = {};
|
|
1097
1098
|
contents = (0, import_smithy_client._json)(data);
|
|
1098
1099
|
const response = {
|
|
@@ -1105,7 +1106,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1105
1106
|
if (output.statusCode >= 300) {
|
|
1106
1107
|
return de_CommandError(output, context);
|
|
1107
1108
|
}
|
|
1108
|
-
const data = await
|
|
1109
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1109
1110
|
let contents = {};
|
|
1110
1111
|
contents = (0, import_smithy_client._json)(data);
|
|
1111
1112
|
const response = {
|
|
@@ -1118,7 +1119,7 @@ var de_UploadLayerPartCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1118
1119
|
if (output.statusCode >= 300) {
|
|
1119
1120
|
return de_CommandError(output, context);
|
|
1120
1121
|
}
|
|
1121
|
-
const data = await
|
|
1122
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
1122
1123
|
let contents = {};
|
|
1123
1124
|
contents = (0, import_smithy_client._json)(data);
|
|
1124
1125
|
const response = {
|
|
@@ -1130,9 +1131,9 @@ var de_UploadLayerPartCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1130
1131
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1131
1132
|
const parsedOutput = {
|
|
1132
1133
|
...output,
|
|
1133
|
-
body: await
|
|
1134
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1134
1135
|
};
|
|
1135
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1136
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1136
1137
|
switch (errorCode) {
|
|
1137
1138
|
case "InvalidParameterException":
|
|
1138
1139
|
case "com.amazonaws.ecrpublic#InvalidParameterException":
|
|
@@ -1566,7 +1567,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1566
1567
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1567
1568
|
cfId: output.headers["x-amz-cf-id"]
|
|
1568
1569
|
}), "deserializeMetadata");
|
|
1569
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1570
1570
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(ECRPUBLICServiceException);
|
|
1571
1571
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1572
1572
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1593,46 +1593,6 @@ function sharedHeaders(operation) {
|
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
1595
|
__name(sharedHeaders, "sharedHeaders");
|
|
1596
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1597
|
-
if (encoded.length) {
|
|
1598
|
-
return JSON.parse(encoded);
|
|
1599
|
-
}
|
|
1600
|
-
return {};
|
|
1601
|
-
}), "parseBody");
|
|
1602
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1603
|
-
const value = await parseBody(errorBody, context);
|
|
1604
|
-
value.message = value.message ?? value.Message;
|
|
1605
|
-
return value;
|
|
1606
|
-
}, "parseErrorBody");
|
|
1607
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1608
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1609
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1610
|
-
let cleanValue = rawValue;
|
|
1611
|
-
if (typeof cleanValue === "number") {
|
|
1612
|
-
cleanValue = cleanValue.toString();
|
|
1613
|
-
}
|
|
1614
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1615
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1616
|
-
}
|
|
1617
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1618
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1619
|
-
}
|
|
1620
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1621
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1622
|
-
}
|
|
1623
|
-
return cleanValue;
|
|
1624
|
-
}, "sanitizeErrorCode");
|
|
1625
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1626
|
-
if (headerKey !== void 0) {
|
|
1627
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1628
|
-
}
|
|
1629
|
-
if (data.code !== void 0) {
|
|
1630
|
-
return sanitizeErrorCode(data.code);
|
|
1631
|
-
}
|
|
1632
|
-
if (data["__type"] !== void 0) {
|
|
1633
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1634
|
-
}
|
|
1635
|
-
}, "loadRestJsonErrorCode");
|
|
1636
1596
|
|
|
1637
1597
|
// src/commands/BatchCheckLayerAvailabilityCommand.ts
|
|
1638
1598
|
var _BatchCheckLayerAvailabilityCommand = class _BatchCheckLayerAvailabilityCommand 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, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { ECRPUBLICServiceException as __BaseException } from "../models/ECRPUBLICServiceException";
|
|
@@ -910,43 +911,3 @@ function sharedHeaders(operation) {
|
|
|
910
911
|
"x-amz-target": `SpencerFrontendService.${operation}`,
|
|
911
912
|
};
|
|
912
913
|
}
|
|
913
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
914
|
-
if (encoded.length) {
|
|
915
|
-
return JSON.parse(encoded);
|
|
916
|
-
}
|
|
917
|
-
return {};
|
|
918
|
-
});
|
|
919
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
920
|
-
const value = await parseBody(errorBody, context);
|
|
921
|
-
value.message = value.message ?? value.Message;
|
|
922
|
-
return value;
|
|
923
|
-
};
|
|
924
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
925
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
926
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
927
|
-
let cleanValue = rawValue;
|
|
928
|
-
if (typeof cleanValue === "number") {
|
|
929
|
-
cleanValue = cleanValue.toString();
|
|
930
|
-
}
|
|
931
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
932
|
-
cleanValue = cleanValue.split(",")[0];
|
|
933
|
-
}
|
|
934
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
935
|
-
cleanValue = cleanValue.split(":")[0];
|
|
936
|
-
}
|
|
937
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
938
|
-
cleanValue = cleanValue.split("#")[1];
|
|
939
|
-
}
|
|
940
|
-
return cleanValue;
|
|
941
|
-
};
|
|
942
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
943
|
-
if (headerKey !== undefined) {
|
|
944
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
945
|
-
}
|
|
946
|
-
if (data.code !== undefined) {
|
|
947
|
-
return sanitizeErrorCode(data.code);
|
|
948
|
-
}
|
|
949
|
-
if (data["__type"] !== undefined) {
|
|
950
|
-
return sanitizeErrorCode(data["__type"]);
|
|
951
|
-
}
|
|
952
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ecr-public",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ecr Public 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-ecr-public",
|
|
@@ -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",
|