convexpress
Advanced tools
| /// <reference types="body-parser" /> | ||
| /// <reference types="express" /> | ||
| import { OptionsJson } from "body-parser"; | ||
| import { RequestHandler, Router } from "express"; | ||
| declare namespace convexpress { | ||
| interface IResponseDefinition { | ||
| description?: string; | ||
| schema?: any; | ||
| headers?: any; | ||
| examples?: any; | ||
| } | ||
| interface IParameter { | ||
| name: string; | ||
| description?: string; | ||
| in: "body" | "path" | "query" | "header"; | ||
| required?: boolean; | ||
| type?: string; | ||
| schema?: any; | ||
| } | ||
| interface IConvRoute { | ||
| path: string; | ||
| method: string; | ||
| handler: RequestHandler; | ||
| parameters?: IParameter[]; | ||
| middleware?: RequestHandler[]; | ||
| description?: string; | ||
| tags?: string[]; | ||
| responses?: { | ||
| [statusCode: string]: IResponseDefinition; | ||
| }; | ||
| } | ||
| interface IConvRouter extends Router { | ||
| convroute: (route: IConvRoute) => this; | ||
| serveSwagger: () => this; | ||
| loadFrom: (pattern: string) => this; | ||
| } | ||
| interface IOptions { | ||
| host: string; | ||
| basePath?: string; | ||
| info: string; | ||
| bodyParserOptions?: { | ||
| limit?: OptionsJson["limit"]; | ||
| strict?: OptionsJson["strict"]; | ||
| verify?: OptionsJson["verify"]; | ||
| }; | ||
| } | ||
| } | ||
| declare function convexpress( | ||
| options: convexpress.IOptions | ||
| ): convexpress.IConvRouter; | ||
| export = convexpress; |
+6
-0
@@ -0,1 +1,7 @@ | ||
| ## 2.1.0 (November 19, 2017) | ||
| Features: | ||
| * add TypeScript type definitions | ||
| ## 2.0.0 (November 19, 2017) | ||
@@ -2,0 +8,0 @@ |
+4
-1
| { | ||
| "name": "convexpress", | ||
| "version": "2.0.0", | ||
| "version": "2.1.0", | ||
| "description": "Employ conventions to register express routes", | ||
| "main": "src/index.js", | ||
| "typings": "src/index.d.ts", | ||
| "files": [ | ||
@@ -47,2 +48,4 @@ "src" | ||
| "dependencies": { | ||
| "@types/body-parser": "^1.16.8", | ||
| "@types/express": "^4.0.39", | ||
| "ajv": "^5.3.0", | ||
@@ -49,0 +52,0 @@ "body-parser": "^1.18.2", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
20843
8.44%11
10%384
15.32%1
-50%10
25%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added