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

c2-http

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

c2-http - npm Package Compare versions

Comparing version 1.0.29 to 1.0.30

1

dist/model/Controller.d.ts

@@ -7,2 +7,3 @@ import { Router } from "express";

protected options: IControllerOptions;
static openApi: any;
constructor(_options: Partial<IControllerOptions>);

@@ -9,0 +10,0 @@ }

@@ -12,2 +12,4 @@ "use strict";

options;
// Propriedade estática compartilhada por todas as instâncias
static openApi = {};
constructor(_options) {

@@ -32,2 +34,53 @@ this.options = _options;

this.options.uri = `${this.options.basePath}${this.options.relativePath}`;
Controller.openApi = {
"openapi": "3.1.0",
"info": {
"version": "1.0.0",
"title": "REST API",
"description": ""
},
"servers": [
{
"url": "http://localhost:3000/"
}
],
"components": {
"schemas": {
"info": {
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "Sua API"
},
"version": {
"type": "string",
"example": "1.0.0"
},
"description": {
"type": "string",
"example": "Descrição da sua API"
}
}
},
"servers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"example": "http://localhost:3000"
},
"description": {
"type": "string",
"example": "Servidor local"
}
}
}
}
}
},
paths: {}
};
}

@@ -34,0 +87,0 @@ }

5

dist/model/Server.js

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

const swagger_ui_express_1 = __importDefault(require("swagger-ui-express"));
const Controller_1 = require("./Controller");
class Server {

@@ -21,5 +22,2 @@ app;

console.log(`Initializing server on ${this.config.port}...`);
if (this.config.openApiFileOutput) {
this.app.use("/docs", swagger_ui_express_1.default.serve, swagger_ui_express_1.default.setup(this.config.openApiFileOutput));
}
this.config.globalMiddleware(this.app);

@@ -33,2 +31,3 @@ for (const router of this.config.routes) {

}
this.app.use("/docs", swagger_ui_express_1.default.serve, swagger_ui_express_1.default.setup(Controller_1.Controller.openApi));
this.app.listen(this.config.port, async () => {

@@ -35,0 +34,0 @@ console.info(`Server running on port ${this.config.port}`);

{
"name": "c2-http",
"version": "1.0.29",
"version": "1.0.30",
"description": "Biblioteca Typescript para API NodeJS",

@@ -5,0 +5,0 @@ "repository": "https://cabralsilva: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@github.com/cabralsilva/c2-http.git",

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