New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/middleware-flexible-checksums

Package Overview
Dependencies
Maintainers
5
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-flexible-checksums - npm Package Compare versions

Comparing version 3.749.0 to 3.750.0

23

dist-cjs/index.js

@@ -133,2 +133,3 @@ "use strict";

var import_protocol_http = require("@smithy/protocol-http");
var import_util_stream = require("@smithy/util-stream");

@@ -292,9 +293,12 @@ // src/types.ts

const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
updatedBody = getAwsChunkedEncodingStream(requestBody, {
base64Encoder,
bodyLengthChecker,
checksumLocationName,
checksumAlgorithmFn,
streamHasher
});
updatedBody = getAwsChunkedEncodingStream(
typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024 ? (0, import_util_stream.createBufferedReadable)(requestBody, config.requestStreamBufferSize, context.logger) : requestBody,
{
base64Encoder,
bodyLengthChecker,
checksumLocationName,
checksumAlgorithmFn,
streamHasher
}
);
updatedHeaders = {

@@ -397,4 +401,4 @@ ...headers,

// src/validateChecksumFromResponse.ts
var import_util_stream = require("@smithy/util-stream");
// src/getChecksum.ts

@@ -502,3 +506,4 @@ var getChecksum = /* @__PURE__ */ __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum");

input.responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION
)
),
requestStreamBufferSize: Number(input.requestStreamBufferSize ?? 0)
}), "resolveFlexibleChecksumsConfig");

@@ -505,0 +510,0 @@ // Annotate the CommonJS export names for ESM import in node:

import { setFeature } from "@aws-sdk/core";
import { HttpRequest } from "@smithy/protocol-http";
import { createBufferedReadable } from "@smithy/util-stream";
import { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from "./constants";

@@ -68,3 +69,5 @@ import { getChecksumAlgorithmForRequest } from "./getChecksumAlgorithmForRequest";

const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
updatedBody = getAwsChunkedEncodingStream(requestBody, {
updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024
? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)
: requestBody, {
base64Encoder,

@@ -71,0 +74,0 @@ bodyLengthChecker,

@@ -7,2 +7,3 @@ import { normalizeProvider } from "@smithy/util-middleware";

responseChecksumValidation: normalizeProvider(input.responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),
requestStreamBufferSize: Number(input.requestStreamBufferSize ?? 0),
});

@@ -49,2 +49,6 @@ import { BodyLengthCalculator, ChecksumConstructor, Encoder, GetAwsChunkedEncodingStream, HashConstructor, Provider, StreamCollector, StreamHasher } from "@smithy/types";

streamCollector: StreamCollector;
/**
* Minimum bytes from a stream to buffer into a chunk before passing to chunked encoding.
*/
requestStreamBufferSize: number;
}

@@ -12,2 +12,18 @@ import { Provider } from "@smithy/types";

responseChecksumValidation?: ResponseChecksumValidation | Provider<ResponseChecksumValidation>;
/**
* Default 0 (off).
*
* When set to a value greater than or equal to 8192, sets the minimum number
* of bytes to buffer into a chunk when processing input streams
* with chunked encoding (that is, when request checksums are enabled).
* A minimum of 8kb = 8 * 1024 is required, and 64kb or higher is recommended.
*
* See https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html.
*
* This has a slight performance penalty because it must wrap and buffer
* your input stream.
* You do not need to set this value if your stream already flows chunks
* of 8kb or greater.
*/
requestStreamBufferSize?: number | false;
}

@@ -17,3 +33,4 @@ export interface FlexibleChecksumsResolvedConfig {

responseChecksumValidation: Provider<ResponseChecksumValidation>;
requestStreamBufferSize: number;
}
export declare const resolveFlexibleChecksumsConfig: <T>(input: T & FlexibleChecksumsInputConfig) => T & FlexibleChecksumsResolvedConfig;

@@ -26,2 +26,3 @@ import {

streamCollector: StreamCollector;
requestStreamBufferSize: number;
}

@@ -13,2 +13,3 @@ import { Provider } from "@smithy/types";

| Provider<ResponseChecksumValidation>;
requestStreamBufferSize?: number | false;
}

@@ -18,2 +19,3 @@ export interface FlexibleChecksumsResolvedConfig {

responseChecksumValidation: Provider<ResponseChecksumValidation>;
requestStreamBufferSize: number;
}

@@ -20,0 +22,0 @@ export declare const resolveFlexibleChecksumsConfig: <T>(

{
"name": "@aws-sdk/middleware-flexible-checksums",
"version": "3.749.0",
"version": "3.750.0",
"scripts": {

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

"@aws-crypto/util": "5.2.0",
"@aws-sdk/core": "3.749.0",
"@aws-sdk/core": "3.750.0",
"@aws-sdk/types": "3.734.0",

@@ -46,3 +46,3 @@ "@smithy/is-array-buffer": "^4.0.0",

"@smithy/util-middleware": "^4.0.1",
"@smithy/util-stream": "^4.1.0",
"@smithy/util-stream": "^4.1.1",
"@smithy/util-utf8": "^4.0.0",

@@ -49,0 +49,0 @@ "tslib": "^2.6.2"

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