Socket
Socket
Sign inDemoInstall

@aws-sdk/client-swf

Package Overview
Dependencies
138
Maintainers
5
Versions
362
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.525.0 to 3.529.0

41

dist-es/protocols/Aws_json1_0.js

@@ -0,1 +1,2 @@

import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";

@@ -1054,41 +1055,1 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";

}
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
return JSON.parse(encoded);
}
return {};
});
const parseErrorBody = async (errorBody, context) => {
const value = await parseBody(errorBody, context);
value.message = value.message ?? value.Message;
return value;
};
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (typeof cleanValue === "number") {
cleanValue = cleanValue.toString();
}
if (cleanValue.indexOf(",") >= 0) {
cleanValue = cleanValue.split(",")[0];
}
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
};

8

package.json
{
"name": "@aws-sdk/client-swf",
"description": "AWS SDK for JavaScript Swf Client for Node.js, Browser and React Native",
"version": "3.525.0",
"version": "3.529.0",
"scripts": {

@@ -23,5 +23,5 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

"@aws-crypto/sha256-js": "3.0.0",
"@aws-sdk/client-sts": "3.525.0",
"@aws-sdk/core": "3.525.0",
"@aws-sdk/credential-provider-node": "3.525.0",
"@aws-sdk/client-sts": "3.529.0",
"@aws-sdk/core": "3.529.0",
"@aws-sdk/credential-provider-node": "3.529.0",
"@aws-sdk/middleware-host-header": "3.523.0",

@@ -28,0 +28,0 @@ "@aws-sdk/middleware-logger": "3.523.0",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc