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

@smithy/middleware-compression

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-compression - npm Package Compare versions

Comparing version 3.0.12 to 3.1.0

6

dist-cjs/index.js

@@ -61,2 +61,3 @@ var __defProp = Object.defineProperty;

// src/compressionMiddleware.ts
var import_core = require("@smithy/core");
var import_protocol_http = require("@smithy/protocol-http");

@@ -90,3 +91,3 @@

// src/compressionMiddleware.ts
var compressionMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next) => async (args) => {
var compressionMiddleware = /* @__PURE__ */ __name((config, middlewareConfig) => (next, context) => async (args) => {
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {

@@ -131,2 +132,5 @@ return next(args);

}
if (updatedHeaders["content-encoding"].includes("gzip")) {
(0, import_core.setFeature)(context, "GZIP_REQUEST_COMPRESSION", "L");
}
break;

@@ -133,0 +137,0 @@ }

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

import { setFeature } from "@smithy/core";
import { HttpRequest } from "@smithy/protocol-http";

@@ -6,3 +7,3 @@ import { compressStream } from "./compressStream";

import { isStreaming } from "./isStreaming";
export const compressionMiddleware = (config, middlewareConfig) => (next) => async (args) => {
export const compressionMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
if (!HttpRequest.isInstance(args.request)) {

@@ -50,2 +51,5 @@ return next(args);

}
if (updatedHeaders["content-encoding"].includes("gzip")) {
setFeature(context, "GZIP_REQUEST_COMPRESSION", "L");
}
break;

@@ -52,0 +56,0 @@ }

11

package.json
{
"name": "@smithy/middleware-compression",
"version": "3.0.12",
"version": "3.1.0",
"description": "Middleware and Plugin for request compression.",

@@ -18,8 +18,9 @@ "scripts": {

"dependencies": {
"@smithy/core": "^2.5.0",
"@smithy/is-array-buffer": "^3.0.0",
"@smithy/node-config-provider": "^3.1.8",
"@smithy/protocol-http": "^4.1.4",
"@smithy/types": "^3.5.0",
"@smithy/node-config-provider": "^3.1.9",
"@smithy/protocol-http": "^4.1.5",
"@smithy/types": "^3.6.0",
"@smithy/util-config-provider": "^3.0.0",
"@smithy/util-middleware": "^3.0.7",
"@smithy/util-middleware": "^3.0.8",
"@smithy/util-utf8": "^3.0.0",

@@ -26,0 +27,0 @@ "fflate": "0.8.1",

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