-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Allen Zhang (张涛)
committed
Feb 13, 2024
1 parent
3ddca81
commit 24c1c8d
Showing
18 changed files
with
533 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as path from 'path'; | ||
import { createCoverageMap } from 'istanbul-lib-coverage'; | ||
|
||
import * as libReport from 'istanbul-lib-report'; | ||
|
||
import * as reports from 'istanbul-reports'; | ||
|
||
import * as AdmZip from 'adm-zip'; | ||
export async function download(instrumentCmd, coverageMapData) { | ||
const obj = {}; | ||
for (const objKey in coverageMapData) { | ||
obj[objKey.replace('~', instrumentCmd)] = { | ||
...coverageMapData[objKey], | ||
path: objKey.replace('~', instrumentCmd), | ||
}; | ||
} | ||
const coverageMap = createCoverageMap(obj); | ||
|
||
const context = libReport.createContext({ | ||
dir: path.join(__dirname, '../../public/coverage'), | ||
defaultSummarizer: 'nested', | ||
coverageMap, | ||
}); | ||
const report = reports.create('html', {}); | ||
report.execute(context); | ||
const zip = new AdmZip(); | ||
zip.addLocalFolder(path.join(__dirname, '../../public/coverage')); | ||
zip.writeZip(path.join(__dirname, '../../public/coverage.zip')); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,103 @@ | ||
{ | ||
"welcome": { | ||
"hello": "你好,", | ||
"copywriter": "欢迎来到Canyon。", | ||
"desc": "您将被重定向到源代码控制管理系统进行身份验证。", | ||
"continue": "继续" | ||
}, | ||
"menus": { | ||
"projects": "项目", | ||
"settings": "设置", | ||
"docs": "文档" | ||
}, | ||
"projects": { | ||
"create": "创建项目", | ||
"desc": "查看与您的账户相关的所有项目", | ||
"table": { | ||
"name": "名称", | ||
"description": "描述", | ||
"created_at": "创建时间", | ||
"updated_at": "更新时间", | ||
"option": "操作", | ||
"delete": "删除", | ||
"detail": "详情" | ||
}, | ||
"name": "名称", | ||
"report_times": "上报次数", | ||
"max_coverage": "最大覆盖率", | ||
"latest_report_time": "最近上报时间", | ||
"latest_report_coverage": "最近上报覆盖率", | ||
"no_data": "{{msg}}个项目没数据", | ||
"trends_in_coverage": "覆盖率趋势", | ||
"record": "记录", | ||
"overview": "概览" | ||
"overview": "概览", | ||
"branch": "分支", | ||
"compare_target": "对比目标", | ||
"message": "提交信息", | ||
"functions": "函数", | ||
"branches": "分支", | ||
"statements": "语句", | ||
"lines": "行", | ||
"newlines": "新增行", | ||
"reported_details": "上报细节", | ||
"reporter": "上报人", | ||
"search_keywords": "搜索关键字", | ||
"overview_search_keywords": "搜索关键字" | ||
}, | ||
"settings": { | ||
"desc": "设置您的账户信息", | ||
"form": { | ||
"name": "名称", | ||
"email": "邮箱", | ||
"password": "密码", | ||
"password_confirmation": "确认密码", | ||
"submit": "提交" | ||
} | ||
"user_auth_tokens": "用户授权令牌", | ||
"copied_to_clipboard": "已复制到剪贴板" | ||
}, | ||
"common": { | ||
"option": "操作", | ||
"detail": "详情", | ||
"delete": "删除", | ||
"language": "语言", | ||
"confirm": "确认", | ||
"cancel": "取消", | ||
"copy": "复制", | ||
"search": "搜索", | ||
"no_data": "暂无数据", | ||
"no_result": "暂无结果", | ||
"created_at": "创建时间" | ||
}, | ||
"app": { | ||
"logout": "退出登录", | ||
"welcome_copywriter": "欢迎", | ||
"name": "名称", | ||
"version": "版本", | ||
"desc": "描述", | ||
"latest_report_time": "最近上报时间", | ||
"report_times": "上报次数", | ||
"max_coverage": "最大覆盖率", | ||
"record": "记录", | ||
"overview": "概览", | ||
"report": "上报", | ||
"report_time": "上报时间", | ||
"coverage": "覆盖率", | ||
"line": "行", | ||
"branch": "分支", | ||
"function": "函数", | ||
"statement": "语句", | ||
"report_detail": "上报详情", | ||
"report_files": "上报文件", | ||
"file_path": "文件路径", | ||
"file_name": "文件名", | ||
"file_detail": "文件详情", | ||
"file_report_times": "上报次数", | ||
"file_max_coverage": "最大覆盖率", | ||
"file_latest_report_time": "最近上报时间", | ||
"file_record": "文件记录", | ||
"file_overview": "文件概览", | ||
"file_report": "文件上报", | ||
"file_report_time": "文件上报时间", | ||
"file_coverage": "文件覆盖率", | ||
"file_line": "文件行", | ||
"file_branch": "文件分支", | ||
"file_function": "文件函数", | ||
"file_statement": "文件语句", | ||
"file_report_detail": "文件上报详情", | ||
"file_report_files": "文件上报文件", | ||
"file_file_path": "文件文件路径", | ||
"file_file_name": "文件文件名", | ||
"file_file_coverage": "文件覆盖率", | ||
"file_file_line": "文件行", | ||
"file_file_branch": "文件分支", | ||
"file_file_function": "文件函数", | ||
"file_file_statement": "文件语句", | ||
"file_file_detail": "文件文件详情", | ||
"file_file_report_times": "文件上报次数" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.