@aws-sdk/client-lightsail 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 +164 -204
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
|
@@ -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, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { LightsailServiceException as __BaseException } from "../models/LightsailServiceException";
|
|
@@ -5093,43 +5094,3 @@ function sharedHeaders(operation) {
|
|
|
5093
5094
|
"x-amz-target": `Lightsail_20161128.${operation}`,
|
|
5094
5095
|
};
|
|
5095
5096
|
}
|
|
5096
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
5097
|
-
if (encoded.length) {
|
|
5098
|
-
return JSON.parse(encoded);
|
|
5099
|
-
}
|
|
5100
|
-
return {};
|
|
5101
|
-
});
|
|
5102
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
5103
|
-
const value = await parseBody(errorBody, context);
|
|
5104
|
-
value.message = value.message ?? value.Message;
|
|
5105
|
-
return value;
|
|
5106
|
-
};
|
|
5107
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
5108
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
5109
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
5110
|
-
let cleanValue = rawValue;
|
|
5111
|
-
if (typeof cleanValue === "number") {
|
|
5112
|
-
cleanValue = cleanValue.toString();
|
|
5113
|
-
}
|
|
5114
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
5115
|
-
cleanValue = cleanValue.split(",")[0];
|
|
5116
|
-
}
|
|
5117
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
5118
|
-
cleanValue = cleanValue.split(":")[0];
|
|
5119
|
-
}
|
|
5120
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
5121
|
-
cleanValue = cleanValue.split("#")[1];
|
|
5122
|
-
}
|
|
5123
|
-
return cleanValue;
|
|
5124
|
-
};
|
|
5125
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
5126
|
-
if (headerKey !== undefined) {
|
|
5127
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
5128
|
-
}
|
|
5129
|
-
if (data.code !== undefined) {
|
|
5130
|
-
return sanitizeErrorCode(data.code);
|
|
5131
|
-
}
|
|
5132
|
-
if (data["__type"] !== undefined) {
|
|
5133
|
-
return sanitizeErrorCode(data["__type"]);
|
|
5134
|
-
}
|
|
5135
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lightsail",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lightsail 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-lightsail",
|
|
@@ -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",
|