@aws-sdk/middleware-sdk-sqs
Advanced tools
Comparing version 3.226.0 to 3.254.0
@@ -5,2 +5,3 @@ "use strict"; | ||
const util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding"); | ||
const util_utf8_1 = require("@aws-sdk/util-utf8"); | ||
function receiveMessageMiddleware(options) { | ||
@@ -15,3 +16,3 @@ return (next) => async (args) => { | ||
const hash = new options.md5(); | ||
hash.update(message.Body || ""); | ||
hash.update((0, util_utf8_1.toUint8Array)(message.Body || "")); | ||
if (md5 !== (0, util_hex_encoding_1.toHex)(await hash.digest())) { | ||
@@ -18,0 +19,0 @@ messageIds.push(message.MessageId); |
@@ -5,2 +5,3 @@ "use strict"; | ||
const util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding"); | ||
const util_utf8_1 = require("@aws-sdk/util-utf8"); | ||
const sendMessageBatchMiddleware = (options) => (next) => async (args) => { | ||
@@ -22,3 +23,3 @@ const resp = await next({ ...args }); | ||
const hash = new options.md5(); | ||
hash.update(entry.MessageBody || ""); | ||
hash.update((0, util_utf8_1.toUint8Array)(entry.MessageBody || "")); | ||
if (md5 !== (0, util_hex_encoding_1.toHex)(await hash.digest())) { | ||
@@ -25,0 +26,0 @@ messageIds.push(entries[entry.Id].MessageId); |
@@ -5,2 +5,3 @@ "use strict"; | ||
const util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding"); | ||
const util_utf8_1 = require("@aws-sdk/util-utf8"); | ||
const sendMessageMiddleware = (options) => (next) => async (args) => { | ||
@@ -10,3 +11,3 @@ const resp = await next({ ...args }); | ||
const hash = new options.md5(); | ||
hash.update(args.input.MessageBody || ""); | ||
hash.update((0, util_utf8_1.toUint8Array)(args.input.MessageBody || "")); | ||
if (output.MD5OfMessageBody !== (0, util_hex_encoding_1.toHex)(await hash.digest())) { | ||
@@ -13,0 +14,0 @@ throw new Error("InvalidChecksumError"); |
import { toHex } from "@aws-sdk/util-hex-encoding"; | ||
import { toUint8Array } from "@aws-sdk/util-utf8"; | ||
export function receiveMessageMiddleware(options) { | ||
@@ -11,3 +12,3 @@ return (next) => async (args) => { | ||
const hash = new options.md5(); | ||
hash.update(message.Body || ""); | ||
hash.update(toUint8Array(message.Body || "")); | ||
if (md5 !== toHex(await hash.digest())) { | ||
@@ -14,0 +15,0 @@ messageIds.push(message.MessageId); |
import { toHex } from "@aws-sdk/util-hex-encoding"; | ||
import { toUint8Array } from "@aws-sdk/util-utf8"; | ||
export const sendMessageBatchMiddleware = (options) => (next) => async (args) => { | ||
@@ -18,3 +19,3 @@ const resp = await next({ ...args }); | ||
const hash = new options.md5(); | ||
hash.update(entry.MessageBody || ""); | ||
hash.update(toUint8Array(entry.MessageBody || "")); | ||
if (md5 !== toHex(await hash.digest())) { | ||
@@ -21,0 +22,0 @@ messageIds.push(entries[entry.Id].MessageId); |
import { toHex } from "@aws-sdk/util-hex-encoding"; | ||
import { toUint8Array } from "@aws-sdk/util-utf8"; | ||
export const sendMessageMiddleware = (options) => (next) => async (args) => { | ||
@@ -6,3 +7,3 @@ const resp = await next({ ...args }); | ||
const hash = new options.md5(); | ||
hash.update(args.input.MessageBody || ""); | ||
hash.update(toUint8Array(args.input.MessageBody || "")); | ||
if (output.MD5OfMessageBody !== toHex(await hash.digest())) { | ||
@@ -9,0 +10,0 @@ throw new Error("InvalidChecksumError"); |
@@ -1,4 +0,4 @@ | ||
import { HashConstructor } from "@aws-sdk/types"; | ||
import { ChecksumConstructor, HashConstructor } from "@aws-sdk/types"; | ||
export interface PreviouslyResolved { | ||
md5: HashConstructor; | ||
md5: ChecksumConstructor | HashConstructor; | ||
} |
@@ -1,4 +0,4 @@ | ||
import { HashConstructor } from "@aws-sdk/types"; | ||
import { ChecksumConstructor, HashConstructor } from "@aws-sdk/types"; | ||
export interface PreviouslyResolved { | ||
md5: HashConstructor; | ||
md5: ChecksumConstructor | HashConstructor; | ||
} |
{ | ||
"name": "@aws-sdk/middleware-sdk-sqs", | ||
"version": "3.226.0", | ||
"version": "3.254.0", | ||
"scripts": { | ||
@@ -23,4 +23,5 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.226.0", | ||
"@aws-sdk/types": "3.254.0", | ||
"@aws-sdk/util-hex-encoding": "3.201.0", | ||
"@aws-sdk/util-utf8": "3.254.0", | ||
"tslib": "^2.3.1" | ||
@@ -27,0 +28,0 @@ }, |
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
25086
289
4
+ Added@aws-sdk/util-utf8@3.254.0
+ Added@aws-sdk/is-array-buffer@3.201.0(transitive)
+ Added@aws-sdk/types@3.254.0(transitive)
+ Added@aws-sdk/util-buffer-from@3.208.0(transitive)
+ Added@aws-sdk/util-utf8@3.254.0(transitive)
- Removed@aws-sdk/types@3.226.0(transitive)
Updated@aws-sdk/types@3.254.0