Gathering detailed insights and metrics for think-router-plus
Gathering detailed insights and metrics for think-router-plus
Gathering detailed insights and metrics for think-router-plus
Gathering detailed insights and metrics for think-router-plus
npm install think-router-plus
Typescript
Module System
Min. Node Version
Node Version
NPM Version
64.1
Supply Chain
80
Quality
73.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,228
Last Day
1
Last Week
4
Last Month
5
Last Year
96
2 Stars
4 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
1.0.3
Package Id
think-router-plus@1.0.3
Unpacked Size
9.48 kB
Size
3.37 kB
File Count
6
NPM Version
6.4.1
Node Version
8.14.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
-16.7%
5
Compared to previous month
Last year
-31.4%
96
Compared to previous year
5
forked from egg-router-plus 1.3.0
1// src/config/middleware.ts 2import {router} from 'think-router-plus'; 3 4export = [ 5 '...other middlewares', 6 { 7 handle: router, 8 options: { 9 defaultModule: 'home', // default thinkjs Module 10 defaultController: 'index', // default thinkjs Controller 11 defaultAction: 'index', // default thinkjs Action 12 enableDefaultRouter: true, // enable default thinkjs router 13 optimizeHomepageRouter: true, // optimize homepage Router 14 denyModules: [], // deny Modules 15 router: {}, // new Router(options.router) 16 allowed: {}, // router.allowedMethods(options.allowed) 17 } 18 }, 19 'controller' 20];
1// src/config/router.ts 2import {Application} from "thinkjs"; 3import {RouterPlus, nextController} from 'think-router-plus'; 4 5export = [ 6 (router: RouterPlus, app: Application) => { 7 const subRouter = router.namespace('/proxy'); 8 subRouter.all('/api/:url*', nextController("index", "index")); 9 // nextController("controller", "action", "module") 10 } 11];
1import * as Router from 'koa-router'; 2import {Application} from "thinkjs"; 3 4interface RouterPlus extends Router { 5 namespace(prefix: string, ...middlewares: ((ctx: Context, next: () => Promise<any>) => any)[]): Router; 6} 7 8declare module "think-router-plus" { 9 export let router: (options: any, app: Application) => Router.IMiddleware; 10 export let nextController: (controller: string, action?: string, module?: string) => Router.IMiddleware; 11}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More