Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plumier/core

Package Overview
Dependencies
Maintainers
1
Versions
645
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plumier/core - npm Package Compare versions

Comparing version 1.0.0-dev.14 to 1.0.0-dev.15

10

lib/route-generator.d.ts
import { Class } from "./common";
import { HttpMethod, RouteInfo } from "./types";
import { HttpMethod, RouteInfo, RouteAnalyzerIssue, RouteAnalyzerFunction } from "./types";
interface RouteDecorator {

@@ -15,13 +15,9 @@ name: "Route";

}
interface Issue {
type: "error" | "warning" | "success";
message?: string;
}
interface TestResult {
route: RouteInfo;
issues: Issue[];
issues: RouteAnalyzerIssue[];
}
declare function generateRoutes(executionPath: string, controller: string | Class[] | Class): RouteInfo[];
declare function analyzeRoutes(routes: RouteInfo[]): TestResult[];
declare function analyzeRoutes(routes: RouteInfo[], extensions?: RouteAnalyzerFunction[]): TestResult[];
declare function printAnalysis(results: TestResult[]): void;
export { analyzeRoutes, generateRoutes, printAnalysis, RouteDecorator, IgnoreDecorator, RootDecorator };

@@ -224,3 +224,3 @@ "use strict";

}
function analyzeRoutes(routes) {
function analyzeRoutes(routes, extensions = []) {
const tests = [

@@ -231,3 +231,3 @@ backingParameterTest, metadataTypeTest,

];
return routes.map(x => analyzeRoute(x, tests, routes));
return routes.map(x => analyzeRoute(x, tests.concat(extensions), routes));
}

@@ -234,0 +234,0 @@ exports.analyzeRoutes = analyzeRoutes;

@@ -32,2 +32,7 @@ import Koa, { Context } from "koa";

}
export interface RouteAnalyzerIssue {
type: "error" | "warning" | "success";
message?: string;
}
export declare type RouteAnalyzerFunction = (route: RouteInfo, allRoutes: RouteInfo[]) => RouteAnalyzerIssue;
export interface Facility {

@@ -207,2 +212,3 @@ setup(app: Readonly<PlumierApplication>): void;

authorizer?: AuthorizeStore;
analyzers?: RouteAnalyzerFunction[];
}

@@ -209,0 +215,0 @@ export interface PlumierConfiguration extends Configuration {

{
"name": "@plumier/core",
"version": "1.0.0-dev.14+39f91e9",
"version": "1.0.0-dev.15+d2d1238",
"description": "Delightful Node.js Rest Framework",

@@ -41,3 +41,3 @@ "main": "lib/index.js",

},
"gitHead": "39f91e901a896446144a8ae7d6ef99593cf44cba",
"gitHead": "d2d123809c2b2cecdf3024fe2e87de489cb3cba3",
"devDependencies": {

@@ -44,0 +44,0 @@ "upath": "^1.2.0"

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