Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/middleware-serde

Package Overview
Dependencies
Maintainers
5
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-serde - npm Package Compare versions

Comparing version 3.183.0 to 3.186.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
**Note:** Version bump only for package @aws-sdk/middleware-serde
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)

@@ -8,0 +16,0 @@

46

dist-es/deserializerMiddleware.js

@@ -1,16 +0,32 @@

export const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
const { response } = await next(args);
try {
const parsed = await deserializer(response, options);
return {
response,
output: parsed,
};
}
catch (error) {
Object.defineProperty(error, "$response", {
value: response,
});
throw error;
}
import { __awaiter, __generator } from "tslib";
export var deserializerMiddleware = function (options, deserializer) {
return function (next, context) {
return function (args) { return __awaiter(void 0, void 0, void 0, function () {
var response, parsed, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, next(args)];
case 1:
response = (_a.sent()).response;
_a.label = 2;
case 2:
_a.trys.push([2, 4, , 5]);
return [4, deserializer(response, options)];
case 3:
parsed = _a.sent();
return [2, {
response: response,
output: parsed,
}];
case 4:
error_1 = _a.sent();
Object.defineProperty(error_1, "$response", {
value: response,
});
throw error_1;
case 5: return [2];
}
});
}); };
};
};
import { deserializerMiddleware } from "./deserializerMiddleware";
import { serializerMiddleware } from "./serializerMiddleware";
export const deserializerMiddlewareOption = {
export var deserializerMiddlewareOption = {
name: "deserializerMiddleware",

@@ -9,3 +9,3 @@ step: "deserialize",

};
export const serializerMiddlewareOption = {
export var serializerMiddlewareOption = {
name: "serializerMiddleware",

@@ -18,3 +18,3 @@ step: "serialize",

return {
applyToStack: (commandStack) => {
applyToStack: function (commandStack) {
commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);

@@ -21,0 +21,0 @@ commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);

@@ -1,13 +0,26 @@

export const serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
const endpoint = context.endpointV2?.url && options.urlParser
? async () => options.urlParser(context.endpointV2.url)
: options.endpoint;
if (!endpoint) {
throw new Error("No valid endpoint provider available.");
}
const request = await serializer(args.input, { ...options, endpoint });
return next({
...args,
request,
});
import { __assign, __awaiter, __generator } from "tslib";
export var serializerMiddleware = function (options, serializer) {
return function (next, context) {
return function (args) { return __awaiter(void 0, void 0, void 0, function () {
var endpoint, request;
var _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
endpoint = ((_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.url) && options.urlParser
? function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
return [2, options.urlParser(context.endpointV2.url)];
}); }); }
: options.endpoint;
if (!endpoint) {
throw new Error("No valid endpoint provider available.");
}
return [4, serializer(args.input, __assign(__assign({}, options), { endpoint: endpoint }))];
case 1:
request = _b.sent();
return [2, next(__assign(__assign({}, args), { request: request }))];
}
});
}); };
};
};
{
"name": "@aws-sdk/middleware-serde",
"version": "3.183.0",
"version": "3.186.0",
"scripts": {

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

"dependencies": {
"@aws-sdk/types": "3.183.0",
"@aws-sdk/types": "3.186.0",
"tslib": "^2.3.1"

@@ -26,0 +26,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc