@smithy/middleware-stack
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -7,2 +7,3 @@ "use strict"; | ||
let relativeEntries = []; | ||
let identifyOnResolve = false; | ||
const entriesNameSet = new Set(); | ||
@@ -47,2 +48,3 @@ const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || | ||
}); | ||
toStack.identifyOnResolve(stack.identifyOnResolve()); | ||
return toStack; | ||
@@ -196,2 +198,3 @@ }; | ||
cloned.use(from); | ||
cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || from.identifyOnResolve()); | ||
return cloned; | ||
@@ -202,5 +205,14 @@ }, | ||
return getMiddlewareList(true).map((mw) => { | ||
return mw.name + ": " + (mw.tags || []).join(","); | ||
var _a; | ||
const step = (_a = mw.step) !== null && _a !== void 0 ? _a : mw.relation + | ||
" " + | ||
mw.toMiddleware; | ||
return mw.name + " - " + step; | ||
}); | ||
}, | ||
identifyOnResolve(toggle) { | ||
if (typeof toggle === "boolean") | ||
identifyOnResolve = toggle; | ||
return identifyOnResolve; | ||
}, | ||
resolve: (handler, context) => { | ||
@@ -212,2 +224,5 @@ for (const middleware of getMiddlewareList() | ||
} | ||
if (identifyOnResolve) { | ||
console.log(stack.identify()); | ||
} | ||
return handler; | ||
@@ -214,0 +229,0 @@ }, |
export const constructStack = () => { | ||
let absoluteEntries = []; | ||
let relativeEntries = []; | ||
let identifyOnResolve = false; | ||
const entriesNameSet = new Set(); | ||
@@ -43,2 +44,3 @@ const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || | ||
}); | ||
toStack.identifyOnResolve(stack.identifyOnResolve()); | ||
return toStack; | ||
@@ -192,2 +194,3 @@ }; | ||
cloned.use(from); | ||
cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || from.identifyOnResolve()); | ||
return cloned; | ||
@@ -198,5 +201,14 @@ }, | ||
return getMiddlewareList(true).map((mw) => { | ||
return mw.name + ": " + (mw.tags || []).join(","); | ||
const step = mw.step ?? | ||
mw.relation + | ||
" " + | ||
mw.toMiddleware; | ||
return mw.name + " - " + step; | ||
}); | ||
}, | ||
identifyOnResolve(toggle) { | ||
if (typeof toggle === "boolean") | ||
identifyOnResolve = toggle; | ||
return identifyOnResolve; | ||
}, | ||
resolve: (handler, context) => { | ||
@@ -208,2 +220,5 @@ for (const middleware of getMiddlewareList() | ||
} | ||
if (identifyOnResolve) { | ||
console.log(stack.identify()); | ||
} | ||
return handler; | ||
@@ -210,0 +225,0 @@ }, |
{ | ||
"name": "@smithy/middleware-stack", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Provides a means for composing multiple middleware functions into a single handler", | ||
@@ -28,3 +28,3 @@ "scripts": { | ||
"dependencies": { | ||
"@smithy/types": "^2.3.2", | ||
"@smithy/types": "^2.3.3", | ||
"tslib": "^2.5.0" | ||
@@ -31,0 +31,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38635
534
Updated@smithy/types@^2.3.3