Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove DefineTrigger #188

Merged
merged 6 commits into from
Sep 6, 2022
Merged

refactor: remove DefineTrigger #188

merged 6 commits into from
Sep 6, 2022

Conversation

hyj1991
Copy link
Member

@hyj1991 hyj1991 commented Sep 5, 2022

此 PR 旨在移除 core 中提供的装饰器 DefineTrigger,但是保留 Trigger 的基类以供上层协议实现继承。

后续自定义的协议 Trigger 继承 core 提供的基类,纳入 IoC 容器管理,通过 Inject 注入使用即可,参见:测试样例

Reference

@hyj1991 hyj1991 requested review from atian25 and Beace September 6, 2022 00:06
@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2022

Codecov Report

Base: 90.00% // Head: 89.97% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (6290a72) compared to base (81cd280).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
- Coverage   90.00%   89.97%   -0.04%     
==========================================
  Files          51       50       -1     
  Lines        1131     1127       -4     
  Branches      196      196              
==========================================
- Hits         1018     1014       -4     
  Misses        113      113              
Impacted Files Coverage Δ
src/application.ts 91.17% <ø> (-0.26%) ⬇️
src/constant.ts 100.00% <ø> (ø)
src/decorator.ts 91.66% <ø> (-0.65%) ⬇️
src/loader/impl/module.ts 100.00% <ø> (ø)
src/trigger/index.ts 100.00% <100.00%> (ø)
src/logger/base.ts 58.62% <0.00%> (ø)
src/loader/impl/package.ts 100.00% <0.00%> (ø)
src/loader/impl/lifecycle.ts 100.00% <0.00%> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@noahziheng noahziheng left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] 需要有更合理的多 Trigger 方案
6 participants