Socket
Socket
Sign inDemoInstall

@nestjs/swagger

Package Overview
Dependencies
Maintainers
2
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/swagger - npm Package Compare versions

Comparing version 5.0.6 to 5.0.8

24

dist/plugin/visitors/controller-class.visitor.js

@@ -32,5 +32,10 @@ "use strict";

}
const apiOperationDecoratorsArray = this.createApiOperationDecorator(factory, compilerNode, compilerNode.decorators, options, sourceFile, typeChecker);
const removeExistingApiOperationDecorator = apiOperationDecoratorsArray.length > 0;
const existingDecorators = removeExistingApiOperationDecorator
? compilerNode.decorators.filter((item) => ast_utils_1.getDecoratorName(item) !== decorators_1.ApiOperation.name)
: compilerNode.decorators;
return factory.updateMethodDeclaration(compilerNode, [
...this.createApiOperationDecorator(factory, compilerNode, compilerNode.decorators, options, sourceFile, typeChecker),
...compilerNode.decorators,
...apiOperationDecoratorsArray,
...existingDecorators,
factory.createDecorator(factory.createCallExpression(factory.createIdentifier(`${plugin_constants_1.OPENAPI_NAMESPACE}.${decorators_1.ApiResponse.name}`), undefined, [

@@ -66,5 +71,14 @@ this.createDecoratorObjectLiteralExpr(factory, compilerNode, typeChecker, factory.createNodeArray(), hostFilename)

]);
return [
factory.createDecorator(factory.createCallExpression(factory.createIdentifier(`${plugin_constants_1.OPENAPI_NAMESPACE}.${decorators_1.ApiOperation.name}`), undefined, apiOperationDecoratorArguments))
];
if (apiOperationDecorator) {
const expr = apiOperationDecorator.expression;
const updatedCallExpr = factory.updateCallExpression(expr, expr.expression, undefined, apiOperationDecoratorArguments);
return [
factory.updateDecorator(apiOperationDecorator, updatedCallExpr)
];
}
else {
return [
factory.createDecorator(factory.createCallExpression(factory.createIdentifier(`${plugin_constants_1.OPENAPI_NAMESPACE}.${decorators_1.ApiOperation.name}`), undefined, apiOperationDecoratorArguments))
];
}
}

@@ -71,0 +85,0 @@ return [];

{
"name": "@nestjs/swagger",
"version": "5.0.6",
"version": "5.0.8",
"description": "Nest - modern, fast, powerful node.js web framework (@swagger)",

@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec",

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