@smithy/middleware-stack
Advanced tools
Comparing version 3.0.11 to 4.0.0
@@ -85,3 +85,2 @@ var __defProp = Object.defineProperty; | ||
const cloneTo = /* @__PURE__ */ __name((toStack) => { | ||
var _a; | ||
absoluteEntries.forEach((entry) => { | ||
@@ -93,3 +92,3 @@ toStack.add(entry.middleware, { ...entry }); | ||
}); | ||
(_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve()); | ||
toStack.identifyOnResolve?.(stack.identifyOnResolve()); | ||
return toStack; | ||
@@ -186,6 +185,3 @@ }, "cloneTo"); | ||
const toOverrideIndex = absoluteEntries.findIndex( | ||
(entry2) => { | ||
var _a; | ||
return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); | ||
} | ||
(entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) | ||
); | ||
@@ -223,6 +219,3 @@ if (toOverrideIndex === -1) { | ||
const toOverrideIndex = relativeEntries.findIndex( | ||
(entry2) => { | ||
var _a; | ||
return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias)); | ||
} | ||
(entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) | ||
); | ||
@@ -276,7 +269,6 @@ if (toOverrideIndex === -1) { | ||
concat: (from) => { | ||
var _a; | ||
const cloned = cloneTo(constructStack()); | ||
cloned.use(from); | ||
cloned.identifyOnResolve( | ||
identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false) | ||
identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) | ||
); | ||
@@ -283,0 +275,0 @@ return cloned; |
import { MiddlewareStack } from "@smithy/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare const constructStack: <Input extends object, Output extends object>() => MiddlewareStack<Input, Output>; |
import { MiddlewareStack } from "@smithy/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare const constructStack: <Input extends object, Output extends object>() => MiddlewareStack<Input, Output>; |
{ | ||
"name": "@smithy/middleware-stack", | ||
"version": "3.0.11", | ||
"version": "4.0.0", | ||
"description": "Provides a means for composing multiple middleware functions into a single handler", | ||
@@ -29,3 +29,3 @@ "scripts": { | ||
"dependencies": { | ||
"@smithy/types": "^3.7.2", | ||
"@smithy/types": "^4.0.0", | ||
"tslib": "^2.6.2" | ||
@@ -40,3 +40,3 @@ }, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "typesVersions": { |
1
42816
650
+ Added@smithy/types@4.1.0(transitive)
- Removed@smithy/types@3.7.2(transitive)
Updated@smithy/types@^4.0.0