@aws-sdk/middleware-serde
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.1.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.0.0...v3.1.0) (2020-12-23) | ||
### Features | ||
* **middleware-logger:** log clientName, commandName, input, output ([#1788](https://github.com/aws/aws-sdk-js-v3/issues/1788)) ([4f9e56f](https://github.com/aws/aws-sdk-js-v3/commit/4f9e56f1b7fd1cd9374b2577786e4ab0f6602aaa)) | ||
# [3.0.0](https://github.com/aws/aws-sdk-js-v3/compare/v1.0.0-rc.10...v3.0.0) (2020-12-15) | ||
@@ -8,0 +19,0 @@ |
@@ -5,12 +5,4 @@ "use strict"; | ||
const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { | ||
const { logger, outputFilterSensitiveLog } = context; | ||
const { response } = await next(args); | ||
const parsed = await deserializer(response, options); | ||
// Log parsed after $metadata is removed in https://github.com/aws/aws-sdk-js-v3/issues/1490 | ||
const { $metadata, ...outputWithoutMetadata } = parsed; | ||
if (typeof (logger === null || logger === void 0 ? void 0 : logger.info) === "function") { | ||
logger.info({ | ||
output: outputFilterSensitiveLog(outputWithoutMetadata), | ||
}); | ||
} | ||
return { | ||
@@ -22,2 +14,2 @@ response, | ||
exports.deserializerMiddleware = deserializerMiddleware; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzZXJpYWxpemVyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVNPLE1BQU0sc0JBQXNCLEdBQUcsQ0FDcEMsT0FBcUIsRUFDckIsWUFBMEQsRUFDcEIsRUFBRSxDQUFDLENBQ3pDLElBQXVDLEVBQ3ZDLE9BQWdDLEVBQ0csRUFBRSxDQUFDLEtBQUss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GxlckV4ZWN1dGlvbkNvbnRleHQsXG4gIFJlc3BvbnNlRGVzZXJpYWxpemVyLFxufSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGNvbnN0IGRlc2VyaWFsaXplck1pZGRsZXdhcmUgPSA8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91dHB1dCBleHRlbmRzIG9iamVjdCwgUnVudGltZVV0aWxzID0gYW55PihcbiAgb3B0aW9uczogUnVudGltZVV0aWxzLFxuICBkZXNlcmlhbGl6ZXI6IFJlc3BvbnNlRGVzZXJpYWxpemVyPGFueSwgYW55LCBSdW50aW1lVXRpbHM+XG4pOiBEZXNlcmlhbGl6ZU1pZGRsZXdhcmU8SW5wdXQsIE91dHB1dD4gPT4gKFxuICBuZXh0OiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBEZXNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBEZXNlcmlhbGl6ZUhhbmRsZXJBcmd1bWVudHM8SW5wdXQ+XG4pOiBQcm9taXNlPERlc2VyaWFsaXplSGFuZGxlck91dHB1dDxPdXRwdXQ+PiA9PiB7XG4gIGNvbnN0IHsgcmVzcG9uc2UgfSA9IGF3YWl0IG5leHQoYXJncyk7XG4gIGNvbnN0IHBhcnNlZCA9IGF3YWl0IGRlc2VyaWFsaXplcihyZXNwb25zZSwgb3B0aW9ucyk7XG4gIHJldHVybiB7XG4gICAgcmVzcG9uc2UsXG4gICAgb3V0cHV0OiBwYXJzZWQgYXMgT3V0cHV0LFxuICB9O1xufTtcbiJdfQ== |
@@ -5,8 +5,2 @@ "use strict"; | ||
const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { | ||
const { logger, inputFilterSensitiveLog } = context; | ||
if (typeof (logger === null || logger === void 0 ? void 0 : logger.info) === "function") { | ||
logger.info({ | ||
input: inputFilterSensitiveLog(args.input), | ||
}); | ||
} | ||
const request = await serializer(args.input, options); | ||
@@ -19,2 +13,2 @@ return next({ | ||
exports.serializerMiddleware = serializerMiddleware; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWFsaXplck1pZGRsZXdhcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VyaWFsaXplck1pZGRsZXdhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBVU8sTUFBTSxvQkFBb0IsR0FBRyxDQUNsQyxPQUFxQixFQUNyQixVQUFnRCxFQUNaLEVBQUUsQ0FBQyxDQUN2QyxJQUFxQyxFQUNyQyxPQUFnQyxFQUNDLEVBQUUsQ0FBQyxLQUFLLEVBQ3pDLElBQXNDLEVBQ0csRUFBRTtJQUMzQyxNQUFNLEVBQUUsTUFBTSxFQUFFLHVCQUF1QixFQUFFLEdBQUcsT0FBTyxDQUFDO0lBRXBELElBQUksUUFBTyxNQUFNLGFBQU4sTUFBTSx1QkFBTixNQUFNLENBQUUsSUFBSSxDQUFBLEtBQUssVUFBVSxFQUFFO1FBQ3RDLE1BQU0sQ0FBQyxJQUFJLENBQUM7WUFDVixLQUFLLEVBQUUsdUJBQXVCLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztTQUMzQyxDQUFDLENBQUM7S0FDSjtJQUVELE1BQU0sT0FBTyxHQUFHLE1BQU0sVUFBVSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFFdEQsT0FBTyxJQUFJLENBQUM7UUFDVixHQUFHLElBQUk7UUFDUCxPQUFPO0tBQ1IsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBdkJXLFFBQUEsb0JBQW9CLHdCQXVCL0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcn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l6ZUhhbmRsZXJPdXRwdXQsXG4gIFNlcmlhbGl6ZU1pZGRsZXdhcmUsXG59IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuXG5leHBvcnQgY29uc3Qgc2VyaWFsaXplck1pZGRsZXdhcmUgPSA8SW5wdXQgZXh0ZW5kcyBvYmplY3QsIE91dHB1dCBleHRlbmRzIG9iamVjdCwgUnVudGltZVV0aWxzIGV4dGVuZHMgRW5kcG9pbnRCZWFyZXI+KFxuICBvcHRpb25zOiBSdW50aW1lVXRpbHMsXG4gIHNlcmlhbGl6ZXI6IFJlcXVlc3RTZXJpYWxpemVyPGFueSwgUnVudGltZVV0aWxzPlxuKTogU2VyaWFsaXplTWlkZGxld2FyZTxJbnB1dCwgT3V0cHV0PiA9PiAoXG4gIG5leHQ6IFNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4sXG4gIGNvbnRleHQ6IEhhbmRsZXJFeGVjdXRpb25Db250ZXh0XG4pOiBTZXJpYWxpemVIYW5kbGVyPElucHV0LCBPdXRwdXQ+ID0+IGFzeW5jIChcbiAgYXJnczogU2VyaWFsaXplSGFuZGxlckFyZ3VtZW50czxJbnB1dD5cbik6IFByb21pc2U8U2VyaWFsaXplSGFuZGxlck91dHB1dDxPdXRwdXQ+PiA9PiB7XG4gIGNvbnN0IHJlcXVlc3QgPSBhd2FpdCBzZXJpYWxpemVyKGFyZ3MuaW5wdXQsIG9wdGlvbnMpO1xuICByZXR1cm4gbmV4dCh7XG4gICAgLi4uYXJncyxcbiAgICByZXF1ZXN0LFxuICB9KTtcbn07XG4iXX0= |
@@ -1,9 +0,7 @@ | ||
import { __awaiter, __generator, __rest } from "tslib"; | ||
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 logger, outputFilterSensitiveLog, response, parsed, $metadata, outputWithoutMetadata; | ||
var response, parsed; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
logger = context.logger, outputFilterSensitiveLog = context.outputFilterSensitiveLog; | ||
return [4 /*yield*/, next(args)]; | ||
case 0: return [4 /*yield*/, next(args)]; | ||
case 1: | ||
@@ -14,8 +12,2 @@ response = (_a.sent()).response; | ||
parsed = _a.sent(); | ||
$metadata = parsed.$metadata, outputWithoutMetadata = __rest(parsed, ["$metadata"]); | ||
if (typeof (logger === null || logger === void 0 ? void 0 : logger.info) === "function") { | ||
logger.info({ | ||
output: outputFilterSensitiveLog(outputWithoutMetadata), | ||
}); | ||
} | ||
return [2 /*return*/, { | ||
@@ -28,2 +20,2 @@ response: response, | ||
}); }; }; }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVzZXJpYWxpemVyTWlkZGxld2FyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZXNlcmlhbGl6ZXJNaWRkbGV3YXJlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFTQSxNQUFNLENBQUMsSUFBTSxzQkFBc0IsR0FBRyxVQUNwQyxPQUFxQixFQUNyQixZQUEwRCxJQUNqQixPQUFBLFVBQ3pDLElBQXVDLEVBQ3ZDLE9BQWdDLElBQ00sT0FBQSxVQUN0QyxJQUF3Qzs7Ozs7Z0JBRWhDLE1BQU0sR0FBK0IsT0FBTyxPQUF0QyxFQUFFLHdCQUF3QixHQUFLLE9BQU8seUJBQVosQ0FBYTtnQkFFaEMscUJBQU0sSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFBOztnQkFBN0IsUUFBUSxHQUFLLENBQUEsU0FBZ0IsQ0FBQSxTQUFyQjtnQkFFRCxxQkFBTSxZQUFZLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxFQUFBOztnQkFBOUMsTUFBTSxHQUFHLFNBQXFDO2dCQUc1QyxTQUFTLEdBQStCLE1BQU0sVUFBck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Rpb25zOiBSdW50aW1lVXRpbHMsXG4gIGRlc2VyaWFsaXplcjogUmVzcG9uc2VEZXNlcmlhbGl6ZXI8YW55LCBhbnksIFJ1bnRpbWVVdGlscz5cbik6IERlc2VyaWFsaXplTWlkZGxld2FyZTxJbnB1dCwgT3V0cHV0PiA9PiAoXG4gIG5leHQ6IERlc2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PixcbiAgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHRcbik6IERlc2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PiA9PiBhc3luYyAoXG4gIGFyZ3M6IERlc2VyaWFsaXplSGFuZGxlckFyZ3VtZW50czxJbnB1dD5cbik6IFByb21pc2U8RGVzZXJpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgeyByZXNwb25zZSB9ID0gYXdhaXQgbmV4dChhcmdzKTtcbiAgY29uc3QgcGFyc2VkID0gYXdhaXQgZGVzZXJpYWxpemVyKHJlc3BvbnNlLCBvcHRpb25zKTtcbiAgcmV0dXJuIHtcbiAgICByZXNwb25zZSxcbiAgICBvdXRwdXQ6IHBhcnNlZCBhcyBPdXRwdXQsXG4gIH07XG59O1xuIl19 |
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 logger, inputFilterSensitiveLog, request; | ||
var request; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
logger = context.logger, inputFilterSensitiveLog = context.inputFilterSensitiveLog; | ||
if (typeof (logger === null || logger === void 0 ? void 0 : logger.info) === "function") { | ||
logger.info({ | ||
input: inputFilterSensitiveLog(args.input), | ||
}); | ||
} | ||
return [4 /*yield*/, serializer(args.input, options)]; | ||
case 0: return [4 /*yield*/, serializer(args.input, options)]; | ||
case 1: | ||
@@ -20,2 +13,2 @@ request = _a.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HRlbmRzIG9iamVjdCwgT3V0cHV0IGV4dGVuZHMgb2JqZWN0LCBSdW50aW1lVXRpbHMgZXh0ZW5kcyBFbmRwb2ludEJlYXJlcj4oXG4gIG9wdGlvbnM6IFJ1bnRpbWVVdGlscyxcbiAgc2VyaWFsaXplcjogUmVxdWVzdFNlcmlhbGl6ZXI8YW55LCBSdW50aW1lVXRpbHM+XG4pOiBTZXJpYWxpemVNaWRkbGV3YXJlPElucHV0LCBPdXRwdXQ+ID0+IChcbiAgbmV4dDogU2VyaWFsaXplSGFuZGxlcjxJbnB1dCwgT3V0cHV0PixcbiAgY29udGV4dDogSGFuZGxlckV4ZWN1dGlvbkNvbnRleHRcbik6IFNlcmlhbGl6ZUhhbmRsZXI8SW5wdXQsIE91dHB1dD4gPT4gYXN5bmMgKFxuICBhcmdzOiBTZXJpYWxpemVIYW5kbGVyQXJndW1lbnRzPElucHV0PlxuKTogUHJvbWlzZTxTZXJpYWxpemVIYW5kbGVyT3V0cHV0PE91dHB1dD4+ID0+IHtcbiAgY29uc3QgcmVxdWVzdCA9IGF3YWl0IHNlcmlhbGl6ZXIoYXJncy5pbnB1dCwgb3B0aW9ucyk7XG4gIHJldHVybiBuZXh0KHtcbiAgICAuLi5hcmdzLFxuICAgIHJlcXVlc3QsXG4gIH0pO1xufTtcbiJdfQ== |
{ | ||
"name": "@aws-sdk/middleware-serde", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"scripts": { | ||
@@ -24,3 +24,3 @@ "prepublishOnly": "yarn build:cjs && yarn build:es", | ||
"devDependencies": { | ||
"@aws-sdk/types": "3.0.0", | ||
"@aws-sdk/types": "3.1.0", | ||
"@types/jest": "^26.0.4", | ||
@@ -27,0 +27,0 @@ "jest": "^26.1.0", |
@@ -19,17 +19,4 @@ import { | ||
): Promise<DeserializeHandlerOutput<Output>> => { | ||
const { logger, outputFilterSensitiveLog } = context; | ||
const { response } = await next(args); | ||
const parsed = await deserializer(response, options); | ||
// Log parsed after $metadata is removed in https://github.com/aws/aws-sdk-js-v3/issues/1490 | ||
const { $metadata, ...outputWithoutMetadata } = parsed; | ||
if (typeof logger?.info === "function") { | ||
logger.info({ | ||
output: outputFilterSensitiveLog(outputWithoutMetadata), | ||
}); | ||
} | ||
return { | ||
@@ -36,0 +23,0 @@ response, |
@@ -20,12 +20,3 @@ import { | ||
): Promise<SerializeHandlerOutput<Output>> => { | ||
const { logger, inputFilterSensitiveLog } = context; | ||
if (typeof logger?.info === "function") { | ||
logger.info({ | ||
input: inputFilterSensitiveLog(args.input), | ||
}); | ||
} | ||
const request = await serializer(args.input, options); | ||
return next({ | ||
@@ -32,0 +23,0 @@ ...args, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61332
238