Skip to content

Commit

Permalink
feat: use Reflect store meta info for controller
Browse files Browse the repository at this point in the history
feat: optimize logger & state
feat: upgrade example
feat: ensure sequence
feat: add name in trace for built-in middware
  • Loading branch information
orangemi committed Jun 30, 2023
1 parent 2bfb4b1 commit fa23093
Show file tree
Hide file tree
Showing 17 changed files with 3,115 additions and 6,497 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
cache: 'pnpm'
- run: pnpm install
- run: npm run build --if-present
- run: npm test
- run: npm run test:coverage
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ app.use(getRouterSync({
```

## Router
### Class: KoaRouterManager
Router Register Manager Class

### @controller(prefix?: string)
Register a route on a class for router as a controller.
Expand Down Expand Up @@ -69,10 +67,8 @@ Register a before middleware, a after middleware or a middleware for a route whi
if same decorator written 2 or more times, router will run in sequence from top to bottom.
Please see `test/router.test.ts` file to learn more about it.

- controller @middleware
- controller @before
- method @middleware
- method @before
- controller @middleware | @before
- method @middleware | @before
- method function
- method @after
- controller @after
Expand Down
6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@types/jaeger-client": "^3.18.3",
"nodemon": "^2.0.15"
"@types/jaeger-client": "^3.18.4",
"nodemon": "^2.0.20"
},
"dependencies": {
"jaeger-client": "^3.19.0",
"koa": "^2.13.4"
"koa": "^2.14.1"
}
}
Loading

0 comments on commit fa23093

Please sign in to comment.