You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@lambda-middleware/class-validator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lambda-middleware/class-validator - npm Package Compare versions

Comparing version

to
2.0.0

23

CHANGELOG.json

@@ -5,2 +5,25 @@ {

{
"version": "2.0.0",
"tag": "@lambda-middleware/class-validator_v2.0.0",
"date": "Fri, 23 Oct 2020 15:23:13 GMT",
"comments": {
"major": [
{
"comment": "ast"
}
],
"dependency": [
{
"comment": "Updating dependency \"@lambda-middleware/utils\" from `^1.0.1` to `^1.0.2`"
},
{
"comment": "Updating dependency \"@lambda-middleware/compose\" from `^1.0.1` to `^1.1.0`"
},
{
"comment": "Updating dependency \"@lambda-middleware/http-error-handler\" from `^1.0.1` to `^2.0.0`"
}
]
}
},
{
"version": "1.0.1",

@@ -7,0 +30,0 @@ "tag": "@lambda-middleware/class-validator_v1.0.1",

9

CHANGELOG.md
# Change Log - @lambda-middleware/class-validator
This log was last generated on Thu, 13 Aug 2020 19:32:50 GMT and should not be manually modified.
This log was last generated on Fri, 23 Oct 2020 15:23:13 GMT and should not be manually modified.
## 2.0.0
Fri, 23 Oct 2020 15:23:13 GMT
### Breaking changes
- ast
## 1.0.1

@@ -6,0 +13,0 @@ Thu, 13 Aug 2020 19:32:50 GMT

6

lib/classValidator.d.ts
import { PromiseHandler } from "@lambda-middleware/utils";
import { Context } from "aws-lambda";
import { APIGatewayEvent, Context } from "aws-lambda";
import { ClassValidatorMiddlewareOptions } from "./interfaces/ClassValidatorMiddlewareOptions";

@@ -7,4 +7,2 @@ export declare type WithBody<Event, Body> = Omit<Event, "body"> & {

};
export declare const classValidator: <E extends {
body: string | null;
}, R, T extends object>(options: ClassValidatorMiddlewareOptions<T>) => (handler: PromiseHandler<WithBody<E, T>, R>) => (event: E, context: Context) => Promise<R>;
export declare const classValidator: <T extends object>(options: ClassValidatorMiddlewareOptions<T>) => <R>(handler: PromiseHandler<WithBody<import("aws-lambda").APIGatewayProxyEvent, T>, R>) => (event: import("aws-lambda").APIGatewayProxyEvent, context: Context) => Promise<R>;
{
"name": "@lambda-middleware/class-validator",
"version": "1.0.1",
"version": "2.0.0",
"description": "A validation middleware for AWS http lambda functions based on class-validator.",

@@ -29,3 +29,3 @@ "homepage": "https://dbartholomae.github.io/lambda-middleware/",

"dependencies": {
"@lambda-middleware/utils": "*",
"@lambda-middleware/utils": "^1.0.2",
"debug": ">=4.1.0",

@@ -50,4 +50,4 @@ "class-transformer": ">=0.2.3",

"devDependencies": {
"@lambda-middleware/compose": "*",
"@lambda-middleware/http-error-handler": "*",
"@lambda-middleware/compose": "^1.1.0",
"@lambda-middleware/http-error-handler": "^2.0.0",
"@types/debug": "^4.1.5",

@@ -78,7 +78,11 @@ "@types/jest": "^25.2.1",

"ts-loader": "^6.2.2",
"typescript": "^3.7.5",
"typescript": "^4.0.3",
"wait-on": "^5.2.0",
"webpack": "^4.41.5"
},
"repository": "git@github.com:dbartholomae/lambda-middleware.git"
"repository": {
"type": "git",
"url": "git@github.com:dbartholomae/lambda-middleware.git",
"directory": "packages/class-validator"
}
}

@@ -7,4 +7,4 @@ # @lambda-middleware/class-validator

[![debug](https://img.shields.io/badge/debug-blue.svg)](https://github.com/visionmedia/debug#readme)
[![build status](https://github.com/dbartholomae/lambda-middleware/workflows/.github/workflows/build.yml/badge.svg?branch=master)](https://github.com/dbartholomae/lambda-middleware/actions?query=workflow%3A.github%2Fworkflows%2Fbuild.yml)
[![codecov](https://codecov.io/gh/dbartholomae/lambda-middleware/branch/master/graph/badge.svg)](https://codecov.io/gh/dbartholomae/lambda-middleware)
[![build status](https://github.com/dbartholomae/lambda-middleware/workflows/.github/workflows/build.yml/badge.svg?branch=main)](https://github.com/dbartholomae/lambda-middleware/actions?query=workflow%3A.github%2Fworkflows%2Fbuild.yml)
[![codecov](https://codecov.io/gh/dbartholomae/lambda-middleware/branch/main/graph/badge.svg)](https://codecov.io/gh/dbartholomae/lambda-middleware)
[![dependency status](https://david-dm.org/dbartholomae/lambda-middleware.svg?theme=shields.io)](https://david-dm.org/dbartholomae/lambda-middleware)

@@ -51,3 +51,3 @@ [![devDependency status](https://david-dm.org/dbartholomae/lambda-middleware/dev-status.svg)](https://david-dm.org/dbartholomae/lambda-middleware?type=dev)

// Let's "middyfy" our handler, then we will be able to attach middlewares to it
// Let's add middleware to our handler, then we will be able to attach middlewares to it
export const handler = compose(

@@ -54,0 +54,0 @@ // The class validator throws validation errors from http-errors which are compatible with

Sorry, the diff of this file is not supported yet