@aws-sdk/middleware-sdk-api-gateway 3.901.0 → 3.914.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 +27 -57
  2. package/package.json +4 -4
package/dist-cjs/index.js CHANGED
@@ -1,63 +1,33 @@
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
- acceptHeaderMiddleware: () => acceptHeaderMiddleware,
25
- acceptHeaderMiddlewareOptions: () => acceptHeaderMiddlewareOptions,
26
- getAcceptHeaderPlugin: () => getAcceptHeaderPlugin
27
- });
28
- module.exports = __toCommonJS(index_exports);
29
- var import_protocol_http = require("@smithy/protocol-http");
30
5
  function acceptHeaderMiddleware() {
31
- return (next) => async (args) => {
32
- const { request } = args;
33
- if (import_protocol_http.HttpRequest.isInstance(request)) {
34
- if (request.headers?.accept === void 0) {
35
- request.headers.accept = "application/json";
36
- }
37
- }
38
- return next({
39
- ...args,
40
- request
41
- });
42
- };
6
+ return (next) => async (args) => {
7
+ const { request } = args;
8
+ if (protocolHttp.HttpRequest.isInstance(request)) {
9
+ if (request.headers?.accept === undefined) {
10
+ request.headers.accept = "application/json";
11
+ }
12
+ }
13
+ return next({
14
+ ...args,
15
+ request,
16
+ });
17
+ };
43
18
  }
44
- __name(acceptHeaderMiddleware, "acceptHeaderMiddleware");
45
- var acceptHeaderMiddlewareOptions = {
46
- step: "build",
47
- tags: ["SET_ACCEPT_HEADER", "ACCEPT_HEADER"],
48
- name: "acceptHeaderMiddleware",
49
- override: true
19
+ const acceptHeaderMiddlewareOptions = {
20
+ step: "build",
21
+ tags: ["SET_ACCEPT_HEADER", "ACCEPT_HEADER"],
22
+ name: "acceptHeaderMiddleware",
23
+ override: true,
50
24
  };
51
- var getAcceptHeaderPlugin = /* @__PURE__ */ __name((unused) => ({
52
- applyToStack: /* @__PURE__ */ __name((clientStack) => {
53
- clientStack.add(acceptHeaderMiddleware(), acceptHeaderMiddlewareOptions);
54
- }, "applyToStack")
55
- }), "getAcceptHeaderPlugin");
56
- // Annotate the CommonJS export names for ESM import in node:
57
-
58
- 0 && (module.exports = {
59
- acceptHeaderMiddlewareOptions,
60
- getAcceptHeaderPlugin,
61
- acceptHeaderMiddleware
25
+ const getAcceptHeaderPlugin = (unused) => ({
26
+ applyToStack: (clientStack) => {
27
+ clientStack.add(acceptHeaderMiddleware(), acceptHeaderMiddlewareOptions);
28
+ },
62
29
  });
63
30
 
31
+ exports.acceptHeaderMiddleware = acceptHeaderMiddleware;
32
+ exports.acceptHeaderMiddlewareOptions = acceptHeaderMiddlewareOptions;
33
+ exports.getAcceptHeaderPlugin = getAcceptHeaderPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-api-gateway",
3
- "version": "3.901.0",
3
+ "version": "3.914.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-sdk-api-gateway",
@@ -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.914.0",
28
+ "@smithy/protocol-http": "^5.3.3",
29
+ "@smithy/types": "^4.8.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "engines": {