@middy/validator 7.0.3 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <h1>Middy validator middleware</h1>
2
+ <h1>Middy `validator` middleware</h1>
3
3
  <img alt="Middy logo" src="https://raw.githubusercontent.com/middyjs/middy/main/docs/img/middy-logo.svg"/>
4
4
  <p><strong>Validator middleware for the middy framework, the stylish Node.js middleware engine for AWS Lambda</strong></p>
5
5
  <p>
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  import type middy from "@middy/core";
4
4
 
5
- interface Options {
5
+ export interface Options {
6
6
  eventSchema?: Function | any;
7
7
  contextSchema?: Function | any;
8
8
  responseSchema?: Function | any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/validator",
3
- "version": "7.0.3",
3
+ "version": "7.1.1",
4
4
  "description": "Validator middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -75,7 +75,7 @@
75
75
  "url": "https://github.com/sponsors/willfarrell"
76
76
  },
77
77
  "dependencies": {
78
- "@middy/util": "7.0.3",
78
+ "@middy/util": "7.1.1",
79
79
  "ajv": "8.18.0",
80
80
  "ajv-errors": "3.0.0",
81
81
  "ajv-formats": "3.0.1",
@@ -84,7 +84,8 @@
84
84
  "ajv-keywords": "5.1.0"
85
85
  },
86
86
  "devDependencies": {
87
- "@middy/core": "7.0.3",
87
+ "@middy/core": "7.1.1",
88
+ "@types/aws-lambda": "^8.0.0",
88
89
  "@types/http-errors": "^2.0.0",
89
90
  "ajv-bsontype": "^1.0.7",
90
91
  "ajv-cmd": "^0.8.0"
package/transpile.d.ts CHANGED
@@ -8,3 +8,5 @@ export function transpileSchema(
8
8
  ): Ajv;
9
9
 
10
10
  export function transpileLocale(src: string, options?: object | any): Function;
11
+
12
+ export function transpileFTL(src: string, options?: object | any): Function;
package/transpile.js CHANGED
@@ -29,11 +29,9 @@ import ajvFormats from "ajv-formats";
29
29
  import { transpile } from "ajv-ftl-i18n";
30
30
  import ajvKeywords from "ajv-keywords";
31
31
 
32
- // import transpileFTL from 'ajv-cmd/ftl'
33
32
  export const transpileFTL = transpile;
34
33
 
35
- // *** Start `ajv-cmd/compile` *** //
36
- // import compileSchema from 'ajv-cmd/compile'
34
+ // Inlined from `ajv-cmd/compile` to avoid extra dependency
37
35
 
38
36
  const instance = (options = {}) => {
39
37
  Object.assign(options, { keywords: [] });