Socket
Socket
Sign inDemoInstall

@szegedsw/lib-node

Package Overview
Dependencies
554
Maintainers
4
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.50 to 2.0.51

21

dist/controller/controller.class.d.ts

@@ -22,8 +22,19 @@ import { Request, Response } from "express";

export declare abstract class Controller extends Routed {
abstract get(req: Request, res: Response, data?: any): Promise<void>;
abstract post(req: Request, res: Response, data?: any): Promise<void>;
abstract patch(req: Request, res: Response, data?: any): Promise<void>;
abstract put(req: Request, res: Response, data?: any): Promise<void>;
abstract delete(req: Request, res: Response, data?: any): Promise<void>;
abstract get(req: Request, res: Response, data?: {
[key: string]: string;
}): Promise<void>;
abstract post(req: Request, res: Response, data?: {
[key: string]: string;
}): Promise<void>;
abstract patch(req: Request, res: Response, data?: {
[key: string]: string;
}): Promise<void>;
abstract put(req: Request, res: Response, data?: {
[key: string]: string;
}): Promise<void>;
abstract delete(req: Request, res: Response, data?: {
[key: string]: string;
}): Promise<void>;
errors?: IErrors;
splitter?: string;
onError?: OnError;

@@ -30,0 +41,0 @@ validator(req: Request, res: Response): Promise<boolean>;

@@ -25,2 +25,8 @@ "use strict";

});
Object.defineProperty(this, "splitter", {
enumerable: true,
configurable: true,
writable: true,
value: "#"
});
Object.defineProperty(this, "onError", {

@@ -27,0 +33,0 @@ enumerable: true,

@@ -11,2 +11,3 @@ import { Request, Response, Router } from "express";

errors?: IErrors;
splitter?: string;
onError?: OnError;

@@ -13,0 +14,0 @@ toRouter(): Router;

@@ -20,2 +20,8 @@ "use strict";

});
Object.defineProperty(this, "splitter", {
enumerable: true,
configurable: true,
writable: true,
value: "#"
});
Object.defineProperty(this, "onError", {

@@ -30,3 +36,3 @@ enumerable: true,

const router = express_1.Router();
const tryIt = (req, res, func) => try_1._try(res, async () => func(req, res, request_1.requestParams(req)), this.errors, this.onError);
const tryIt = (req, res, func) => try_1._try(res, async () => func(req, res, request_1.requestParams(req)), this.errors, this.onError, this.splitter);
router.get("/", async (req, res) => tryIt(req, res, (req, res, data) => this.get(req, res, data)));

@@ -33,0 +39,0 @@ router.get("/:_id", async (req, res) => tryIt(req, res, (req, res, data) => this.get(req, res, data)));

{
"name": "@szegedsw/lib-node",
"version": "2.0.50",
"version": "2.0.51",
"description": "A little framework published by Szeged Software Zrt. in order to enhance api endpoint security and create reuseable code. Email module, Logging system, and much more. Further improvements are expected.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc