@aws-sdk/client-marketplace-deployment 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 +5 -45
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -194,6 +194,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
194
194
|
var import_types = require("@smithy/types");
|
|
195
195
|
|
|
196
196
|
// src/protocols/Aws_restJson1.ts
|
|
197
|
+
var import_core2 = require("@aws-sdk/core");
|
|
197
198
|
|
|
198
199
|
|
|
199
200
|
var import_uuid = require("uuid");
|
|
@@ -419,7 +420,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
419
420
|
const contents = (0, import_smithy_client.map)({
|
|
420
421
|
$metadata: deserializeMetadata(output)
|
|
421
422
|
});
|
|
422
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
423
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
423
424
|
const doc = (0, import_smithy_client.take)(data, {
|
|
424
425
|
tags: import_smithy_client._json
|
|
425
426
|
});
|
|
@@ -433,7 +434,7 @@ var de_PutDeploymentParameterCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
433
434
|
const contents = (0, import_smithy_client.map)({
|
|
434
435
|
$metadata: deserializeMetadata(output)
|
|
435
436
|
});
|
|
436
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
437
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
437
438
|
const doc = (0, import_smithy_client.take)(data, {
|
|
438
439
|
agreementId: import_smithy_client.expectString,
|
|
439
440
|
deploymentParameterId: import_smithy_client.expectString,
|
|
@@ -466,9 +467,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
466
467
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
467
468
|
const parsedOutput = {
|
|
468
469
|
...output,
|
|
469
|
-
body: await
|
|
470
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
470
471
|
};
|
|
471
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
472
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
472
473
|
switch (errorCode) {
|
|
473
474
|
case "AccessDeniedException":
|
|
474
475
|
case "com.amazonaws.marketplacedeployment#AccessDeniedException":
|
|
@@ -600,48 +601,7 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
600
601
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
601
602
|
cfId: output.headers["x-amz-cf-id"]
|
|
602
603
|
}), "deserializeMetadata");
|
|
603
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
604
604
|
var _tK = "tagKeys";
|
|
605
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
606
|
-
if (encoded.length) {
|
|
607
|
-
return JSON.parse(encoded);
|
|
608
|
-
}
|
|
609
|
-
return {};
|
|
610
|
-
}), "parseBody");
|
|
611
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
612
|
-
const value = await parseBody(errorBody, context);
|
|
613
|
-
value.message = value.message ?? value.Message;
|
|
614
|
-
return value;
|
|
615
|
-
}, "parseErrorBody");
|
|
616
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
617
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
618
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
619
|
-
let cleanValue = rawValue;
|
|
620
|
-
if (typeof cleanValue === "number") {
|
|
621
|
-
cleanValue = cleanValue.toString();
|
|
622
|
-
}
|
|
623
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
624
|
-
cleanValue = cleanValue.split(",")[0];
|
|
625
|
-
}
|
|
626
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
627
|
-
cleanValue = cleanValue.split(":")[0];
|
|
628
|
-
}
|
|
629
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
630
|
-
cleanValue = cleanValue.split("#")[1];
|
|
631
|
-
}
|
|
632
|
-
return cleanValue;
|
|
633
|
-
}, "sanitizeErrorCode");
|
|
634
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
635
|
-
if (headerKey !== void 0) {
|
|
636
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
637
|
-
}
|
|
638
|
-
if (data.code !== void 0) {
|
|
639
|
-
return sanitizeErrorCode(data.code);
|
|
640
|
-
}
|
|
641
|
-
if (data["__type"] !== void 0) {
|
|
642
|
-
return sanitizeErrorCode(data["__type"]);
|
|
643
|
-
}
|
|
644
|
-
}, "loadRestJsonErrorCode");
|
|
645
605
|
|
|
646
606
|
// src/commands/ListTagsForResourceCommand.ts
|
|
647
607
|
var _ListTagsForResourceCommand = class _ListTagsForResourceCommand 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, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -255,43 +256,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
255
256
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
256
257
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
257
258
|
const _tK = "tagKeys";
|
|
258
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
259
|
-
if (encoded.length) {
|
|
260
|
-
return JSON.parse(encoded);
|
|
261
|
-
}
|
|
262
|
-
return {};
|
|
263
|
-
});
|
|
264
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
265
|
-
const value = await parseBody(errorBody, context);
|
|
266
|
-
value.message = value.message ?? value.Message;
|
|
267
|
-
return value;
|
|
268
|
-
};
|
|
269
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
270
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
271
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
272
|
-
let cleanValue = rawValue;
|
|
273
|
-
if (typeof cleanValue === "number") {
|
|
274
|
-
cleanValue = cleanValue.toString();
|
|
275
|
-
}
|
|
276
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
277
|
-
cleanValue = cleanValue.split(",")[0];
|
|
278
|
-
}
|
|
279
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
280
|
-
cleanValue = cleanValue.split(":")[0];
|
|
281
|
-
}
|
|
282
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
283
|
-
cleanValue = cleanValue.split("#")[1];
|
|
284
|
-
}
|
|
285
|
-
return cleanValue;
|
|
286
|
-
};
|
|
287
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
288
|
-
if (headerKey !== undefined) {
|
|
289
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
290
|
-
}
|
|
291
|
-
if (data.code !== undefined) {
|
|
292
|
-
return sanitizeErrorCode(data.code);
|
|
293
|
-
}
|
|
294
|
-
if (data["__type"] !== undefined) {
|
|
295
|
-
return sanitizeErrorCode(data["__type"]);
|
|
296
|
-
}
|
|
297
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-marketplace-deployment",
|
|
3
3
|
"description": "AWS SDK for JavaScript Marketplace Deployment 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-marketplace-deployment",
|
|
@@ -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",
|