@aws-sdk/middleware-sdk-api-gateway 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.
- package/dist-cjs/index.js +27 -57
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -1,63 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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.
|
|
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-sdk-api-gateway",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/types": "3.
|
|
28
|
-
"@smithy/protocol-http": "^5.3.
|
|
29
|
-
"@smithy/types": "^4.
|
|
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": {
|