dsh-request-doctor 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/01-/350/275/257/344/273/266/351/234/200/346/261/202/350/247/204/346/240/274/350/257/264/346/230/216.md +1 -1
- package/docs/02-/350/275/257/344/273/266/350/256/276/350/256/241/350/257/264/346/230/216.md +1 -1
- package/docs/03-/350/275/257/344/273/266/346/265/213/350/257/225/346/212/245/345/221/212.md +4 -4
- package/docs/04-/345/256/211/350/243/205/351/203/250/347/275/262/350/257/264/346/230/216.md +1 -1
- package/docs/05-/347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
- package/docs/06-/350/275/257/344/273/266/350/264/250/351/207/217/345/272/246/351/207/217/346/212/245/345/221/212.md +1 -1
- package/docs/quality-report.json +7 -7
- package/index.js +3 -2
- package/lib/panel-briefs.js +6 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 软件测试报告
|
|
2
2
|
|
|
3
3
|
**产品名称**:request-doctor(请求急救员)
|
|
4
|
-
**版本**:0.13.
|
|
4
|
+
**版本**:0.13.2
|
|
5
5
|
**编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.6;GB/T 8566-2007 验证与确认过程
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
| `test/client-half.test.mjs` | 9 | 客户端半:模块身份、注入声明、apply 注册、组件能渲染 |
|
|
63
63
|
| `test/diagnostics.test.mjs` | 3 | 快照可选写入:不配置不写盘、突发合并、坏路径不致命 |
|
|
64
64
|
| `test/restart-notice.test.mjs` | 3 |
|
|
65
|
-
| `test/panel-briefs.test.mjs` |
|
|
65
|
+
| `test/panel-briefs.test.mjs` | 6 | 界面摘要:按名索引、只送可见行、缺数据不抛、不污染诊断 |
|
|
66
66
|
| `test/verdict-report.test.mjs` | 29 | why 与 list:判定、理由、环境摘要、自动扫描、分组、缺口、按形态给建议 | 缺导出判为需要重启;其它失败不误判;多次累积不覆盖 |
|
|
67
|
-
| **合计** | **
|
|
67
|
+
| **合计** | **199** | **全部通过** |
|
|
68
68
|
|
|
69
69
|
执行结果:
|
|
70
70
|
|
|
@@ -217,4 +217,4 @@
|
|
|
217
217
|
|
|
218
218
|
### 7.2 分文件执行结果
|
|
219
219
|
|
|
220
|
-
32 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计
|
|
220
|
+
32 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计 199。
|
package/docs/quality-report.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"standard": "GB/T 45717-2025 信息技术 软件测量 软件质量测量 自动化的源代码质量测度",
|
|
3
|
-
"generatedAt": "2026-10-29T16:
|
|
3
|
+
"generatedAt": "2026-10-29T16:11:20.101Z",
|
|
4
4
|
"scope": {
|
|
5
5
|
"files": 32,
|
|
6
|
-
"totalLines":
|
|
7
|
-
"sourceLines":
|
|
8
|
-
"commentLines":
|
|
6
|
+
"totalLines": 5251,
|
|
7
|
+
"sourceLines": 3806,
|
|
8
|
+
"commentLines": 963
|
|
9
9
|
},
|
|
10
10
|
"measures": {
|
|
11
|
-
"commentDensity": 25.
|
|
12
|
-
"duplicationPercent": 4.
|
|
11
|
+
"commentDensity": 25.3,
|
|
12
|
+
"duplicationPercent": 4.88,
|
|
13
13
|
"functionCount": 400,
|
|
14
14
|
"maxComplexity": 10,
|
|
15
15
|
"maxFunctionLines": 59,
|
|
16
16
|
"maxFileLines": 500,
|
|
17
|
-
"averageComplexity": 3.
|
|
17
|
+
"averageComplexity": 3.88
|
|
18
18
|
},
|
|
19
19
|
"limits": {
|
|
20
20
|
"maxComplexity": 10,
|
package/index.js
CHANGED
|
@@ -264,11 +264,12 @@ function dedupeRows(rows) {
|
|
|
264
264
|
// 界面要的一份数据:待处理的行,加上「修好了但需要重启」的提示。
|
|
265
265
|
async function panelPayload(deps, manager) {
|
|
266
266
|
const box = deps.diagnostics?.diagnostics ?? {};
|
|
267
|
+
const rows = await collectPanelRows(deps, manager);
|
|
267
268
|
return {
|
|
268
269
|
ok: true,
|
|
269
|
-
rows
|
|
270
|
+
rows,
|
|
270
271
|
restart: box.restartRequired ?? [],
|
|
271
|
-
briefs: panelBriefs(box),
|
|
272
|
+
briefs: panelBriefs(box, rows.map((row) => row.name)),
|
|
272
273
|
};
|
|
273
274
|
}
|
|
274
275
|
// 界面用的 HTTP 路由。
|
package/lib/panel-briefs.js
CHANGED
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
// 命令行里 /doctor why 能看到判定理由,界面那一栏看不到,用户得切去敲命令。
|
|
4
4
|
// 这里把同一份结论按插件名整理好,随清单一起送过去。
|
|
5
5
|
|
|
6
|
+
// 只整理界面真的会显示的那几个插件:清单之外的摘要传过去也没人用。
|
|
7
|
+
//
|
|
6
8
|
// @param {object} diagnostics - 诊断对象。
|
|
9
|
+
// @param {string[]} names - 界面上要显示的行对应的插件名;省略表示全给。
|
|
7
10
|
// @returns {Record<string, {verdict: string, reasons: string[], missing: string[], environment?: string}>}
|
|
8
|
-
export function panelBriefs(diagnostics) {
|
|
11
|
+
export function panelBriefs(diagnostics, names) {
|
|
9
12
|
const audited = diagnostics?.versionScan?.audited ?? [];
|
|
13
|
+
const wanted = names === undefined ? undefined : new Set(names);
|
|
10
14
|
const briefs = {};
|
|
11
15
|
for (const item of audited) {
|
|
16
|
+
if (wanted !== undefined && !wanted.has(item.name)) continue;
|
|
12
17
|
briefs[item.name] = {
|
|
13
18
|
verdict: item.verdict,
|
|
14
19
|
reasons: [...(item.reasons ?? [])],
|