Skip to content

feat: add middlewares decorator#46

Merged
killagu merged 5 commits intoeggjs:masterfrom
412799755:feat--add-middlewares-decorator
Jul 28, 2022
Merged

feat: add middlewares decorator#46
killagu merged 5 commits intoeggjs:masterfrom
412799755:feat--add-middlewares-decorator

Conversation

@412799755
Copy link
Contributor

@412799755 412799755 commented Jul 26, 2022

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

add middlewares decorator

@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #46 (881b581) into master (5da127f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   91.89%   91.89%           
=======================================
  Files         198      198           
  Lines        4035     4037    +2     
  Branches      387      387           
=======================================
+ Hits         3708     3710    +2     
  Misses        326      326           
  Partials        1        1           
Impacted Files Coverage Δ
...e/controller-decorator/src/decorator/Middleware.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5da127f...881b581. Read the comment docs.

@mansonchor mansonchor removed the request for review from atian25 July 26, 2022 05:38
@killagu
Copy link
Contributor

killagu commented Jul 26, 2022

Middleware(...mws) 这样的函数签名是不是更简单?

@412799755
Copy link
Contributor Author

Middleware(...mws) 这样的函数签名是不是更简单?

我看readme里HTTPQuery/HTTPQueries 也是这么设计的

@killagu
Copy link
Contributor

killagu commented Jul 26, 2022

HTTPQuery/HTTPQueries 和 middleware 是两个含义。HTTPQuery/HTTPQueries 是指 http 请求中的 query 处理为 string 或者 string[],和 middleware 数组是不同的。

@412799755
Copy link
Contributor Author

ok 两种用法我都支持了

Copy link
Contributor

@killagu killagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@killagu killagu merged commit a4b55f7 into eggjs:master Jul 28, 2022
@killagu
Copy link
Contributor

killagu commented Jul 28, 2022

  • @eggjs/controller-decorator: 1.3.0 => 1.4.0
  • @eggjs/tegg: 1.3.3 => 1.3.4
  • @eggjs/tegg-aop-plugin: 1.3.3 => 1.3.4
  • @eggjs/tegg-controller-plugin: 1.3.3 => 1.4.0
  • @eggjs/tegg-eventbus-plugin: 1.3.3 => 1.3.4
  • @eggjs/tegg-orm-plugin: 2.1.1 => 2.1.2
  • @eggjs/tegg-plugin: 1.3.3 => 1.3.4
  • @eggjs/tegg-standalone: 1.3.3 => 1.3.4

@fengmk2 fengmk2 added the enhancement New feature or request label Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants