@aws-sdk/client-launch-wizard 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 +11 -51
- package/dist-es/protocols/Aws_restJson1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -341,6 +341,7 @@ var GetDeploymentOutputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
341
341
|
}), "GetDeploymentOutputFilterSensitiveLog");
|
|
342
342
|
|
|
343
343
|
// src/protocols/Aws_restJson1.ts
|
|
344
|
+
var import_core2 = require("@aws-sdk/core");
|
|
344
345
|
|
|
345
346
|
|
|
346
347
|
var se_CreateDeploymentCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -481,7 +482,7 @@ var de_CreateDeploymentCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
481
482
|
const contents = (0, import_smithy_client.map)({
|
|
482
483
|
$metadata: deserializeMetadata(output)
|
|
483
484
|
});
|
|
484
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
485
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
485
486
|
const doc = (0, import_smithy_client.take)(data, {
|
|
486
487
|
deploymentId: import_smithy_client.expectString
|
|
487
488
|
});
|
|
@@ -495,7 +496,7 @@ var de_DeleteDeploymentCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
495
496
|
const contents = (0, import_smithy_client.map)({
|
|
496
497
|
$metadata: deserializeMetadata(output)
|
|
497
498
|
});
|
|
498
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
499
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
499
500
|
const doc = (0, import_smithy_client.take)(data, {
|
|
500
501
|
status: import_smithy_client.expectString,
|
|
501
502
|
statusReason: import_smithy_client.expectString
|
|
@@ -510,7 +511,7 @@ var de_GetDeploymentCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
510
511
|
const contents = (0, import_smithy_client.map)({
|
|
511
512
|
$metadata: deserializeMetadata(output)
|
|
512
513
|
});
|
|
513
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
514
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
514
515
|
const doc = (0, import_smithy_client.take)(data, {
|
|
515
516
|
deployment: (_) => de_DeploymentData(_, context)
|
|
516
517
|
});
|
|
@@ -524,7 +525,7 @@ var de_GetWorkloadCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
524
525
|
const contents = (0, import_smithy_client.map)({
|
|
525
526
|
$metadata: deserializeMetadata(output)
|
|
526
527
|
});
|
|
527
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
528
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
528
529
|
const doc = (0, import_smithy_client.take)(data, {
|
|
529
530
|
workload: import_smithy_client._json
|
|
530
531
|
});
|
|
@@ -538,7 +539,7 @@ var de_ListDeploymentEventsCommand = /* @__PURE__ */ __name(async (output, conte
|
|
|
538
539
|
const contents = (0, import_smithy_client.map)({
|
|
539
540
|
$metadata: deserializeMetadata(output)
|
|
540
541
|
});
|
|
541
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
542
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
542
543
|
const doc = (0, import_smithy_client.take)(data, {
|
|
543
544
|
deploymentEvents: (_) => de_DeploymentEventDataSummaryList(_, context),
|
|
544
545
|
nextToken: import_smithy_client.expectString
|
|
@@ -553,7 +554,7 @@ var de_ListDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
553
554
|
const contents = (0, import_smithy_client.map)({
|
|
554
555
|
$metadata: deserializeMetadata(output)
|
|
555
556
|
});
|
|
556
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
557
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
557
558
|
const doc = (0, import_smithy_client.take)(data, {
|
|
558
559
|
deployments: (_) => de_DeploymentDataSummaryList(_, context),
|
|
559
560
|
nextToken: import_smithy_client.expectString
|
|
@@ -568,7 +569,7 @@ var de_ListWorkloadDeploymentPatternsCommand = /* @__PURE__ */ __name(async (out
|
|
|
568
569
|
const contents = (0, import_smithy_client.map)({
|
|
569
570
|
$metadata: deserializeMetadata(output)
|
|
570
571
|
});
|
|
571
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
572
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
572
573
|
const doc = (0, import_smithy_client.take)(data, {
|
|
573
574
|
nextToken: import_smithy_client.expectString,
|
|
574
575
|
workloadDeploymentPatterns: import_smithy_client._json
|
|
@@ -583,7 +584,7 @@ var de_ListWorkloadsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
583
584
|
const contents = (0, import_smithy_client.map)({
|
|
584
585
|
$metadata: deserializeMetadata(output)
|
|
585
586
|
});
|
|
586
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
587
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
587
588
|
const doc = (0, import_smithy_client.take)(data, {
|
|
588
589
|
nextToken: import_smithy_client.expectString,
|
|
589
590
|
workloads: import_smithy_client._json
|
|
@@ -594,9 +595,9 @@ var de_ListWorkloadsCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
594
595
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
595
596
|
const parsedOutput = {
|
|
596
597
|
...output,
|
|
597
|
-
body: await
|
|
598
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
598
599
|
};
|
|
599
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
600
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
600
601
|
switch (errorCode) {
|
|
601
602
|
case "InternalServerException":
|
|
602
603
|
case "com.amazonaws.launchwizard#InternalServerException":
|
|
@@ -722,47 +723,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
722
723
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
723
724
|
cfId: output.headers["x-amz-cf-id"]
|
|
724
725
|
}), "deserializeMetadata");
|
|
725
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
726
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
727
|
-
if (encoded.length) {
|
|
728
|
-
return JSON.parse(encoded);
|
|
729
|
-
}
|
|
730
|
-
return {};
|
|
731
|
-
}), "parseBody");
|
|
732
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
733
|
-
const value = await parseBody(errorBody, context);
|
|
734
|
-
value.message = value.message ?? value.Message;
|
|
735
|
-
return value;
|
|
736
|
-
}, "parseErrorBody");
|
|
737
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
738
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
739
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
740
|
-
let cleanValue = rawValue;
|
|
741
|
-
if (typeof cleanValue === "number") {
|
|
742
|
-
cleanValue = cleanValue.toString();
|
|
743
|
-
}
|
|
744
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
745
|
-
cleanValue = cleanValue.split(",")[0];
|
|
746
|
-
}
|
|
747
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
748
|
-
cleanValue = cleanValue.split(":")[0];
|
|
749
|
-
}
|
|
750
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
751
|
-
cleanValue = cleanValue.split("#")[1];
|
|
752
|
-
}
|
|
753
|
-
return cleanValue;
|
|
754
|
-
}, "sanitizeErrorCode");
|
|
755
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
756
|
-
if (headerKey !== void 0) {
|
|
757
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
758
|
-
}
|
|
759
|
-
if (data.code !== void 0) {
|
|
760
|
-
return sanitizeErrorCode(data.code);
|
|
761
|
-
}
|
|
762
|
-
if (data["__type"] !== void 0) {
|
|
763
|
-
return sanitizeErrorCode(data["__type"]);
|
|
764
|
-
}
|
|
765
|
-
}, "loadRestJsonErrorCode");
|
|
766
726
|
|
|
767
727
|
// src/commands/CreateDeploymentCommand.ts
|
|
768
728
|
var _CreateDeploymentCommand = class _CreateDeploymentCommand 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 { LaunchWizardServiceException as __BaseException } from "../models/LaunchWizardServiceException";
|
|
@@ -375,43 +376,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
375
376
|
value !== "" &&
|
|
376
377
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
377
378
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
378
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
379
|
-
if (encoded.length) {
|
|
380
|
-
return JSON.parse(encoded);
|
|
381
|
-
}
|
|
382
|
-
return {};
|
|
383
|
-
});
|
|
384
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
385
|
-
const value = await parseBody(errorBody, context);
|
|
386
|
-
value.message = value.message ?? value.Message;
|
|
387
|
-
return value;
|
|
388
|
-
};
|
|
389
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
390
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
391
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
392
|
-
let cleanValue = rawValue;
|
|
393
|
-
if (typeof cleanValue === "number") {
|
|
394
|
-
cleanValue = cleanValue.toString();
|
|
395
|
-
}
|
|
396
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
397
|
-
cleanValue = cleanValue.split(",")[0];
|
|
398
|
-
}
|
|
399
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
400
|
-
cleanValue = cleanValue.split(":")[0];
|
|
401
|
-
}
|
|
402
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
403
|
-
cleanValue = cleanValue.split("#")[1];
|
|
404
|
-
}
|
|
405
|
-
return cleanValue;
|
|
406
|
-
};
|
|
407
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
408
|
-
if (headerKey !== undefined) {
|
|
409
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
410
|
-
}
|
|
411
|
-
if (data.code !== undefined) {
|
|
412
|
-
return sanitizeErrorCode(data.code);
|
|
413
|
-
}
|
|
414
|
-
if (data["__type"] !== undefined) {
|
|
415
|
-
return sanitizeErrorCode(data["__type"]);
|
|
416
|
-
}
|
|
417
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-launch-wizard",
|
|
3
3
|
"description": "AWS SDK for JavaScript Launch Wizard 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-launch-wizard",
|
|
@@ -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",
|