umijs / plugin-access

Umi plugin for access management.
MIT License
32 stars 3 forks source link

增强:showWarning 选项,路由可访问性继承和测试用例 #9

Closed jtsang4 closed 4 years ago

jtsang4 commented 4 years ago

变化:

  1. 增加 showWarning 选项,当值为 true 时,插件才会检测 src/access.js 文件的"合法性"并给出相应警告
  2. 路由的 unaccessible 属性默认继承父路由
  3. 增加测试用例
sorrycc commented 4 years ago

配置项功能原子化,options.integrated -> options.showWarning 或者 logLevel、silent 之类的。

codecov[bot] commented 4 years ago

Codecov Report

Merging #9 into master will increase coverage by 100%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #9     +/-   ##
=======================================
+ Coverage       0%   100%   +100%     
=======================================
  Files           6      6             
  Lines          40     44      +4     
  Branches        5      7      +2     
=======================================
+ Hits            0     44     +44     
+ Misses         40      0     -40
Impacted Files Coverage Δ
src/index.ts 100% <100%> (+100%) :arrow_up:
src/utils/getAccessProviderContent.ts 100% <100%> (+100%) :arrow_up:
src/utils/index.ts 100% <100%> (+100%) :arrow_up:
src/utils/getRootContainerContent.ts 100% <0%> (+100%) :arrow_up:
src/utils/getAccessContent.ts 100% <0%> (+100%) :arrow_up:
src/utils/getContextContent.ts 100% <0%> (+100%) :arrow_up:

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 d1e18a0...23d8e36. Read the comment docs.

jtsang4 commented 4 years ago

@sorrycc 已调整为原子级的 showWarning 选项