@smithy/middleware-content-length 4.0.5 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  contentLengthMiddleware: () => contentLengthMiddleware,
24
24
  contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,
25
25
  getContentLengthPlugin: () => getContentLengthPlugin
26
26
  });
27
- module.exports = __toCommonJS(src_exports);
27
+ module.exports = __toCommonJS(index_exports);
28
28
  var import_protocol_http = require("@smithy/protocol-http");
29
29
  var CONTENT_LENGTH_HEADER = "content-length";
30
30
  function contentLengthMiddleware(bodyLengthChecker) {
@@ -57,9 +57,9 @@ var contentLengthMiddlewareOptions = {
57
57
  override: true
58
58
  };
59
59
  var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({
60
- applyToStack: (clientStack) => {
60
+ applyToStack: /* @__PURE__ */ __name((clientStack) => {
61
61
  clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
62
- }
62
+ }, "applyToStack")
63
63
  }), "getContentLengthPlugin");
64
64
  // Annotate the CommonJS export names for ESM import in node:
65
65
 
@@ -1,4 +1,4 @@
1
- import { BodyLengthCalculator, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types";
1
+ import type { BodyLengthCalculator, BuildHandlerOptions, BuildMiddleware, Pluggable } from "@smithy/types";
2
2
  export declare function contentLengthMiddleware(bodyLengthChecker: BodyLengthCalculator): BuildMiddleware<any, any>;
3
3
  export declare const contentLengthMiddlewareOptions: BuildHandlerOptions;
4
4
  export declare const getContentLengthPlugin: (options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/middleware-content-length",
3
- "version": "4.0.5",
3
+ "version": "4.1.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline middleware-content-length",
@@ -12,8 +12,8 @@
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
13
13
  "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
14
14
  "test": "exit 0",
15
- "test:integration": "yarn g:vitest run -c vitest.config.integ.ts",
16
- "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.ts"
15
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
16
+ "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
17
17
  },
18
18
  "main": "./dist-cjs/index.js",
19
19
  "module": "./dist-es/index.js",
@@ -23,9 +23,10 @@
23
23
  "url": "https://aws.amazon.com/javascript/"
24
24
  },
25
25
  "license": "Apache-2.0",
26
+ "sideEffects": false,
26
27
  "dependencies": {
27
- "@smithy/protocol-http": "^5.1.3",
28
- "@smithy/types": "^4.3.2",
28
+ "@smithy/protocol-http": "^5.2.0",
29
+ "@smithy/types": "^4.4.0",
29
30
  "tslib": "^2.6.2"
30
31
  },
31
32
  "engines": {