1 | import { Class, Configuration, RouteInfo } from "@plumjs/core";
|
2 | import { ClassReflection } from "@plumjs/reflect";
|
3 | import { Context } from "koa";
|
4 | interface Issue {
|
5 | type: "error" | "warning" | "success";
|
6 | message?: string;
|
7 | }
|
8 | interface TestResult {
|
9 | route: RouteInfo;
|
10 | issues: Issue[];
|
11 | }
|
12 | export declare function striveController(name: string): string;
|
13 | export declare function getControllerRoute(controller: ClassReflection): string;
|
14 | export declare function transformController(object: ClassReflection | Class): RouteInfo[];
|
15 | export declare function transformModule(path: string, extensions: string[]): RouteInfo[];
|
16 | export declare function router(infos: RouteInfo[], config: Configuration, handler: (ctx: Context) => Promise<void>): (ctx: Context, next: () => Promise<void>) => Promise<void>;
|
17 | export declare function analyzeRoutes(routes: RouteInfo[]): TestResult[];
|
18 | export declare function printAnalysis(results: TestResult[]): void;
|
19 | export {};
|