egg-router-decorator2
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -21,10 +21,10 @@ import { Application } from 'egg'; | ||
}): void; | ||
export declare function GET(path: string, ...middlewares: string[]): any; | ||
export declare function POST(path: string, ...middlewares: string[]): any; | ||
export declare function PUT(path: string, ...middlewares: string[]): any; | ||
export declare function DELETE(path: string, ...middlewares: string[]): any; | ||
export declare function DEL(path: string, ...middlewares: string[]): any; | ||
export declare function HEAD(path: string, ...middlewares: string[]): any; | ||
export declare function PATCH(path: string, ...middlewares: string[]): any; | ||
export declare function OPTIONS(path: string, ...middlewares: string[]): any; | ||
export declare function GET(path?: string, ...middlewares: string[]): any; | ||
export declare function POST(path?: string, ...middlewares: string[]): any; | ||
export declare function PUT(path?: string, ...middlewares: string[]): any; | ||
export declare function DELETE(path?: string, ...middlewares: string[]): any; | ||
export declare function DEL(path?: string, ...middlewares: string[]): any; | ||
export declare function HEAD(path?: string, ...middlewares: string[]): any; | ||
export declare function PATCH(path?: string, ...middlewares: string[]): any; | ||
export declare function OPTIONS(path?: string, ...middlewares: string[]): any; | ||
export declare function Request(method: METHOD, path: string, ...middlewares: string[]): any; |
@@ -25,31 +25,31 @@ "use strict"; | ||
exports.initRouter = initRouter; | ||
function GET(path, ...middlewares) { | ||
function GET(path = '', ...middlewares) { | ||
return Request(METHOD.GET, path, ...middlewares); | ||
} | ||
exports.GET = GET; | ||
function POST(path, ...middlewares) { | ||
function POST(path = '', ...middlewares) { | ||
return Request(METHOD.POST, path, ...middlewares); | ||
} | ||
exports.POST = POST; | ||
function PUT(path, ...middlewares) { | ||
function PUT(path = '', ...middlewares) { | ||
return Request(METHOD.PUT, path, ...middlewares); | ||
} | ||
exports.PUT = PUT; | ||
function DELETE(path, ...middlewares) { | ||
function DELETE(path = '', ...middlewares) { | ||
return Request(METHOD.DELETE, path, ...middlewares); | ||
} | ||
exports.DELETE = DELETE; | ||
function DEL(path, ...middlewares) { | ||
function DEL(path = '', ...middlewares) { | ||
return Request(METHOD.DELETE, path, ...middlewares); | ||
} | ||
exports.DEL = DEL; | ||
function HEAD(path, ...middlewares) { | ||
function HEAD(path = '', ...middlewares) { | ||
return Request(METHOD.HEAD, path, ...middlewares); | ||
} | ||
exports.HEAD = HEAD; | ||
function PATCH(path, ...middlewares) { | ||
function PATCH(path = '', ...middlewares) { | ||
return Request(METHOD.PATCH, path, ...middlewares); | ||
} | ||
exports.PATCH = PATCH; | ||
function OPTIONS(path, ...middlewares) { | ||
function OPTIONS(path = '', ...middlewares) { | ||
return Request(METHOD.OPTIONS, path, ...middlewares); | ||
@@ -60,4 +60,9 @@ } | ||
assert(method); | ||
assert(path); | ||
return (target, propertyKey) => { | ||
if (!path || !path.startsWith('/')) { | ||
if (path) { | ||
middlewares.unshift(path); | ||
} | ||
path = `/${utils_1.trimControllerAndLower(target.constructor.name)}/${propertyKey.toLowerCase()}`; | ||
} | ||
routers.push({ method, path, controller: utils_1.trimController(target.constructor.name), handler: propertyKey, middlewares }); | ||
@@ -67,2 +72,2 @@ }; | ||
exports.Request = Request; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpQ0FBaUM7QUFFakMsbUNBQXlDO0FBRXpDLElBQVksTUFRWDtBQVJELFdBQVksTUFBTTtJQUNoQixxQkFBVyxDQUFBO0lBQ1gsdUJBQWEsQ0FBQTtJQUNiLHFCQUFXLENBQUE7SUFDWCwyQkFBaUIsQ0FBQTtJQUNqQix1QkFBYSxDQUFBO0lBQ2IsNkJBQW1CLENBQUE7SUFDbkIseUJBQWUsQ0FBQTtBQUNqQixDQUFDLEVBUlcsTUFBTSxHQUFOLGNBQU0sS0FBTixjQUFNLFFBUWpCO0FBVUQsTUFBTSxPQUFPLEdBQW1CLEVBQUUsQ0FBQztBQUVuQyxTQ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0lBQ2pFLE9BQU8sT0FBTyxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUUsSUFBSSxFQUFFLEdBQUcsV0FBVyxDQUFDLENBQUM7QUFDdkQsQ0FBQztBQUZELDBCQUVDO0FBRUQsU0FBZ0IsT0FBTyxDQUFDLE1BQWMsRUFBRSxJQUFZLEVBQUUsR0FBRyxXQUFxQjtJQUM1RSxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDZixPQUFPLENBQUMsTUFBTSxFQUFFLFdBQW1CLEVBQUUsRUFBRTtRQUNyQyxJQUFJLENBQUMsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxHQUFHLENBQUMsRUFBRTtZQUNsQyxJQUFJLElBQUksRUFBRTtnQkFDUixXQUFXLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO2FBQzNCO1lBQ0QsSUFBSSxHQUFHLElBQUksOEJBQXNCLENBQUMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsSUFBSSxXQUFXLENBQUMsV0FBVyxFQUFFLEVBQUUsQ0FBQztTQUMzRjtRQUNELE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLFVBQVUsRUFBRSxzQkFBYyxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLEVBQUUsT0FBTyxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsQ0FBQyxDQUFDO0lBQ3pILENBQUMsQ0FBQztBQUNKLENBQUM7QUFYRCwwQkFXQyJ9 |
export declare function trimController(str: string): string; | ||
export declare function trimControllerAndLower(str: string): string; |
@@ -13,2 +13,11 @@ "use strict"; | ||
exports.trimController = trimController; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxTQUFnQixjQUFjLENBQUMsR0FBVztJQUN4QyxNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3hDLE1BQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNyQixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUMsRUFBRTtRQUNkLEdBQUcsR0FBRyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxLQUFLLENBQUMsQ0FBQztLQUMvQjtJQUNELEdBQUcsR0FBRyxLQUFLLENBQUMsV0FBVyxFQUFFLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN6QyxPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUM7QUFSRCx3Q0FRQyJ9 | ||
function trimControllerAndLower(str) { | ||
const index = str.indexOf('Controller'); | ||
if (index > -1) { | ||
str = str.substring(0, index); | ||
} | ||
str = str.toLowerCase(); | ||
return str; | ||
} | ||
exports.trimControllerAndLower = trimControllerAndLower; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxTQUFnQixjQUFjLENBQUMsR0FBVztJQUN4QyxNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3hDLE1BQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNyQixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUMsRUFBRTtRQUNkLEdBQUcsR0FBRyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxLQUFLLENBQUMsQ0FBQztLQUMvQjtJQUNELEdBQUcsR0FBRyxLQUFLLENBQUMsV0FBVyxFQUFFLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN6QyxPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUM7QUFSRCx3Q0FRQztBQUVELFNBQWdCLHNCQUFzQixDQUFDLEdBQVc7SUFDaEQsTUFBTSxLQUFLLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQztJQUN4QyxJQUFJLEtBQUssR0FBRyxDQUFDLENBQUMsRUFBRTtRQUNkLEdBQUcsR0FBRyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxLQUFLLENBQUMsQ0FBQztLQUMvQjtJQUNELEdBQUcsR0FBRyxHQUFHLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDeEIsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDO0FBUEQsd0RBT0MifQ== |
{ | ||
"name": "egg-router-decorator2", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "egg.js router decorator", | ||
@@ -22,11 +22,11 @@ "main": "./dist/index.js", | ||
"@types/egg": "^1.5.0", | ||
"@types/node": "^12.0.7", | ||
"@types/node": "^12.6.2", | ||
"chai": "^4.2.0", | ||
"mocha": "^6.1.4", | ||
"ts-node": "^8.2.0", | ||
"tslint": "^5.17.0", | ||
"ts-node": "^8.3.0", | ||
"tslint": "^5.18.0", | ||
"tslint-config-egg": "^1.0.0", | ||
"typescript": "^3.5.1" | ||
"typescript": "^3.5.3" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -17,2 +17,15 @@ const { assert } = require('chai'); | ||
}); | ||
it('trimContollerAndLower should return success', () => { | ||
const str1 = utils.trimControllerAndLower('HomeController'); | ||
assert(str1 === 'home'); | ||
const str2 = utils.trimControllerAndLower('home'); | ||
assert(str2 === 'home'); | ||
const str3 = utils.trimControllerAndLower('Home'); | ||
assert(str3 === 'home'); | ||
const str4 = utils.trimControllerAndLower('HomeIndexController'); | ||
assert(str4 === 'homeindex'); | ||
const str5 = utils.trimControllerAndLower('homeIndexController'); | ||
assert(str5 === 'homeindex'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12501
188