Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/middleware-stack

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-stack - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

17

dist-cjs/MiddlewareStack.js

@@ -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 @@ },

4

package.json
{
"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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc