@aws-sdk/middleware-recursion-detection 3.972.11 → 3.972.12
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recursionDetectionMiddleware = void 0;
|
|
4
|
+
const recursionDetectionMiddleware = () => (next) => async (args) => next(args);
|
|
5
|
+
exports.recursionDetectionMiddleware = recursionDetectionMiddleware;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.recursionDetectionMiddleware = void 0;
|
|
4
4
|
const lambda_invoke_store_1 = require("@aws/lambda-invoke-store");
|
|
5
|
-
const
|
|
5
|
+
const protocols_1 = require("@smithy/core/protocols");
|
|
6
6
|
const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
|
|
7
7
|
const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
8
8
|
const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
|
|
9
9
|
const recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
10
10
|
const { request } = args;
|
|
11
|
-
if (!
|
|
11
|
+
if (!protocols_1.HttpRequest.isInstance(request)) {
|
|
12
12
|
return next(args);
|
|
13
13
|
}
|
|
14
14
|
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ??
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InvokeStore } from "@aws/lambda-invoke-store";
|
|
2
|
-
import { HttpRequest } from "@smithy/
|
|
2
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
3
|
const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
|
|
4
4
|
const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
5
5
|
const ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-recursion-detection",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.12",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-recursion-detection",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/types": "^3.973.8",
|
|
28
28
|
"@aws/lambda-invoke-store": "^0.2.2",
|
|
29
|
-
"@smithy/
|
|
29
|
+
"@smithy/core": "^3.24.1",
|
|
30
30
|
"@smithy/types": "^4.14.1",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
@@ -59,5 +59,8 @@
|
|
|
59
59
|
"browser": {
|
|
60
60
|
"./dist-es/recursionDetectionMiddleware": "./dist-es/recursionDetectionMiddleware.browser"
|
|
61
61
|
},
|
|
62
|
-
"react-native": {
|
|
62
|
+
"react-native": {
|
|
63
|
+
"./dist-es/recursionDetectionMiddleware": "./dist-es/recursionDetectionMiddleware.native",
|
|
64
|
+
"./dist-cjs/recursionDetectionMiddleware": "./dist-cjs/recursionDetectionMiddleware.native"
|
|
65
|
+
}
|
|
63
66
|
}
|