New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →

@egodigital/express-controllers

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egodigital/express-controllers - npm Package Compare versions

Comparing version

to
7.2.0

# Change Log (@egodigital/express-controllers)
# 7.2.0
* add `middlewares` property to [SwaggerPathDefinitionUpdaterContext](https://egodigital.github.io/express-controllers/interfaces/_swagger_.swaggerpathdefinitionupdatercontext.html) interface
# 7.1.0

@@ -4,0 +8,0 @@

@@ -563,11 +563,13 @@ "use strict";

const SI = VALUE[swagger_1.SWAGGER_INFO];
if (!_.isNil(SI)) {
p = normalizeRoutePath(path.join(SI.controllerRootPath, utils_1.toStringSafe(p)));
if (_.isNil(SI.groupedRouterMethods[p])) {
SI.groupedRouterMethods[p] = [];
}
if (SI.groupedRouterMethods[p].indexOf(method) < 0) {
SI.groupedRouterMethods[p].push(method);
}
if (_.isNil(SI)) {
return;
}
p = normalizeRoutePath(path.join(SI.controllerRootPath, utils_1.toStringSafe(p)));
if (_.isNil(SI.groupedRouterMethods[p])) {
SI.groupedRouterMethods[p] = [];
}
if (SI.groupedRouterMethods[p].indexOf(method) < 0) {
SI.groupedRouterMethods[p].push(method);
}
SI.middlewares = utils_1.asArray(routeMiddlewares);
};

@@ -574,0 +576,0 @@ createRouteInitializer(name, descriptor, opts, (controller, path, handler) => {

@@ -19,2 +19,3 @@ /**

import { Controller, DecoratorFunction, ExpressApp } from './index';
import { RequestHandler } from 'express';
/**

@@ -213,2 +214,6 @@ * Possible value for an API url scheme.

/**
* The middlewares, which are defined for that route.
*/
middlewares?: RequestHandler[];
/**
* Custom options.

@@ -262,2 +267,6 @@ */

/**
* The middlewares, which are defined for that route.
*/
middlewares: RequestHandler[];
/**
* The route path.

@@ -264,0 +273,0 @@ */

@@ -213,2 +213,3 @@ "use strict";

method: m.toUpperCase(),
middlewares: utils_1.asArray(si.middlewares),
path: routePath,

@@ -215,0 +216,0 @@ };

{
"name": "@egodigital/express-controllers",
"version": "7.1.0",
"version": "7.2.0",
"description": "Sets up controllers for Express framework.",

@@ -58,3 +58,3 @@ "author": "e.GO Digital GmbH, Aachen, Germany",

"tslint": "^6.1.3",
"typedoc": "^0.20.22",
"typedoc": "^0.20.23",
"typescript": "^4.1.3"

@@ -61,0 +61,0 @@ },