@aws-sdk/middleware-expect-continue 3.901.0 → 3.910.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +30 -60
  2. package/package.json +4 -4
package/dist-cjs/index.js CHANGED
@@ -1,66 +1,36 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
2
+
3
+ var protocolHttp = require('@smithy/protocol-http');
20
4
 
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- addExpectContinueMiddleware: () => addExpectContinueMiddleware,
25
- addExpectContinueMiddlewareOptions: () => addExpectContinueMiddlewareOptions,
26
- getAddExpectContinuePlugin: () => getAddExpectContinuePlugin
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
- var import_protocol_http = require("@smithy/protocol-http");
30
5
  function addExpectContinueMiddleware(options) {
31
- return (next) => async (args) => {
32
- const { request } = args;
33
- if (import_protocol_http.HttpRequest.isInstance(request) && request.body && options.runtime === "node") {
34
- if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") {
35
- request.headers = {
36
- ...request.headers,
37
- Expect: "100-continue"
38
- };
39
- }
40
- }
41
- return next({
42
- ...args,
43
- request
44
- });
45
- };
6
+ return (next) => async (args) => {
7
+ const { request } = args;
8
+ if (protocolHttp.HttpRequest.isInstance(request) && request.body && options.runtime === "node") {
9
+ if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") {
10
+ request.headers = {
11
+ ...request.headers,
12
+ Expect: "100-continue",
13
+ };
14
+ }
15
+ }
16
+ return next({
17
+ ...args,
18
+ request,
19
+ });
20
+ };
46
21
  }
47
- __name(addExpectContinueMiddleware, "addExpectContinueMiddleware");
48
- var addExpectContinueMiddlewareOptions = {
49
- step: "build",
50
- tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"],
51
- name: "addExpectContinueMiddleware",
52
- override: true
22
+ const addExpectContinueMiddlewareOptions = {
23
+ step: "build",
24
+ tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"],
25
+ name: "addExpectContinueMiddleware",
26
+ override: true,
53
27
  };
54
- var getAddExpectContinuePlugin = /* @__PURE__ */ __name((options) => ({
55
- applyToStack: /* @__PURE__ */ __name((clientStack) => {
56
- clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);
57
- }, "applyToStack")
58
- }), "getAddExpectContinuePlugin");
59
- // Annotate the CommonJS export names for ESM import in node:
60
-
61
- 0 && (module.exports = {
62
- addExpectContinueMiddlewareOptions,
63
- getAddExpectContinuePlugin,
64
- addExpectContinueMiddleware
28
+ const getAddExpectContinuePlugin = (options) => ({
29
+ applyToStack: (clientStack) => {
30
+ clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);
31
+ },
65
32
  });
66
33
 
34
+ exports.addExpectContinueMiddleware = addExpectContinueMiddleware;
35
+ exports.addExpectContinueMiddlewareOptions = addExpectContinueMiddlewareOptions;
36
+ exports.getAddExpectContinuePlugin = getAddExpectContinuePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-expect-continue",
3
- "version": "3.901.0",
3
+ "version": "3.910.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-expect-continue",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/types": "3.901.0",
28
- "@smithy/protocol-http": "^5.3.0",
29
- "@smithy/types": "^4.6.0",
27
+ "@aws-sdk/types": "3.910.0",
28
+ "@smithy/protocol-http": "^5.3.2",
29
+ "@smithy/types": "^4.7.1",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {