@luolingp/request-doctor 0.12.6 → 0.12.7

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
4
  **产品标识**:request-doctor
5
- **版本**:0.12.6
5
+ **版本**:0.12.7
6
6
 
7
7
  ---
8
8
 
@@ -1,7 +1,7 @@
1
1
  # 软件设计说明
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
- **版本**:0.12.6
4
+ **版本**:0.12.7
5
5
  **编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.2
6
6
 
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  # 软件测试报告
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
- **版本**:0.12.6
4
+ **版本**:0.12.7
5
5
  **编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.6;GB/T 8566-2007 验证与确认过程
6
6
 
7
7
  ---
@@ -62,8 +62,8 @@
62
62
  | `test/client-half.test.mjs` | 5 | 客户端半:模块身份、注入声明、apply 注册、组件能渲染 |
63
63
  | `test/diagnostics.test.mjs` | 3 | 快照可选写入:不配置不写盘、突发合并、坏路径不致命 |
64
64
  | `test/restart-notice.test.mjs` | 3 |
65
- | `test/verdict-report.test.mjs` | 19 | why 与 list:判定、理由、环境摘要、自动扫描、分组排序 | 缺导出判为需要重启;其它失败不误判;多次累积不覆盖 |
66
- | **合计** | **180** | **全部通过** |
65
+ | `test/verdict-report.test.mjs` | 24 | why 与 list:判定、理由、环境摘要、自动扫描、分组、共同缺口 | 缺导出判为需要重启;其它失败不误判;多次累积不覆盖 |
66
+ | **合计** | **185** | **全部通过** |
67
67
 
68
68
  执行结果:
69
69
 
@@ -108,6 +108,7 @@
108
108
  | FR-4.9 建完必须核对 | `verify-roundtrip.test.mjs` — 建完必能验过 | 通过 |
109
109
  | FR-4.10 不可核对不算失败 | `env-verify.test.mjs` — 目标不可读记为未核对 | 通过 |
110
110
  | FR-4.11 坏垫片能被发现 | `verify-roundtrip.test.mjs` — 手工破坏的垫片验不过 | 通过 |
111
+ | FR-7.5 共同缺口要点出 | `verdict-report.test.mjs` — 同一符号缺两次即汇总,按涉及数排序 | 通过 |
111
112
  | FR-7.4 why 能解释判定 | `verdict-report.test.mjs` — 五种情形各有用例 | 通过 |
112
113
  | FR-4.13 需要重启要说明 | `restart-notice.test.mjs` — 缺导出归入重启提示 | 通过 |
113
114
  | FR-4.12 不用占位 | `compat-env.test.mjs` — 装真实旧版本;旧版本也没有则拒绝 | 通过 |
@@ -213,4 +214,4 @@
213
214
 
214
215
  ### 7.2 分文件执行结果
215
216
 
216
- 31 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计 180。
217
+ 31 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计 185。
@@ -1,7 +1,7 @@
1
1
  # 软件安装部署说明
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
- **版本**:0.12.6
4
+ **版本**:0.12.7
5
5
  **编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.7
6
6
 
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  # 软件用户手册
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
- **版本**:0.12.6
4
+ **版本**:0.12.7
5
5
  **编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.5
6
6
 
7
7
  ---
@@ -232,4 +232,12 @@ dsh-hyper-tools@0.1.0:incompatible
232
232
 
233
233
  需要处理的排在前面,兼容的排在后面。
234
234
 
235
+ 多个插件缺同一个符号时会单独点出来:
236
+
237
+ ```
238
+ 先修这个:2 个插件都缺 offloadRequestImagesWithPolicy(a, b)
239
+ ```
240
+
241
+ 这种情况修一次能同时解开几个插件,所以值得先处理。
242
+
235
243
  列表里只留环境提示的前半句,完整内容用 `/doctor why` 看。
@@ -1,7 +1,7 @@
1
1
  # 软件质量度量报告
2
2
 
3
3
  **产品名称**:request-doctor(请求急救员)
4
- **版本**:0.12.6
4
+ **版本**:0.12.7
5
5
  **度量标准**:GB/T 45717-2025《信息技术 软件测量 软件质量测量 自动化的源代码质量测度》
6
6
  **度量工具**:`tools/quality-measure.mjs`(本仓库自带,可复现)
7
7
 
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "standard": "GB/T 45717-2025 信息技术 软件测量 软件质量测量 自动化的源代码质量测度",
3
- "generatedAt": "2026-10-29T15:40:53.188Z",
3
+ "generatedAt": "2026-10-29T15:45:25.564Z",
4
4
  "scope": {
5
5
  "files": 31,
6
- "totalLines": 5131,
7
- "sourceLines": 3720,
8
- "commentLines": 939
6
+ "totalLines": 5163,
7
+ "sourceLines": 3743,
8
+ "commentLines": 945
9
9
  },
10
10
  "measures": {
11
- "commentDensity": 25.24,
12
- "duplicationPercent": 4.94,
13
- "functionCount": 387,
11
+ "commentDensity": 25.25,
12
+ "duplicationPercent": 4.9,
13
+ "functionCount": 392,
14
14
  "maxComplexity": 10,
15
15
  "maxFunctionLines": 59,
16
16
  "maxFileLines": 500,
@@ -83,6 +83,10 @@ export function formatList(deps) {
83
83
  const lines = [`已审计 ${audited.length} 个插件:`];
84
84
  if (broken.length > 0) pushGroup(lines, `需要处理 ${broken.length} 个`, broken, width);
85
85
  if (fine.length > 0) pushGroup(lines, `可以直接用 ${fine.length} 个`, fine, width);
86
+
87
+ // 几个插件被同一个符号卡住时,修一次能全解开,值得单独点出来。
88
+ const gap = gapSummary(broken);
89
+ if (gap !== undefined) lines.push('', `先修这个:${gap}`);
86
90
  lines.push('', '用 /doctor why <包名> 看某个插件的完整理由。');
87
91
  return { kind: 'success', text: linesText(lines) };
88
92
  }
@@ -100,6 +104,34 @@ function rowOf(item, width) {
100
104
  return `${name} ${item.verdict}${where}`;
101
105
  }
102
106
 
107
+ // 哪些符号是多个插件共同缺的。
108
+ //
109
+ // 一个符号被两个以上插件需要、又都不在运行时里,这是最值得先处理的事:
110
+ // 修一次能同时解开好几个插件,用户不必逐个 /doctor why 去拼出这件事。
111
+ export function commonGaps(audited) {
112
+ const owners = new Map();
113
+ for (const item of audited ?? []) {
114
+ for (const symbol of item.missing ?? []) {
115
+ const list = owners.get(symbol) ?? [];
116
+ list.push(item.name);
117
+ owners.set(symbol, list);
118
+ }
119
+ }
120
+
121
+ const gaps = [];
122
+ for (const [symbol, names] of owners) {
123
+ if (names.length >= 2) gaps.push({ symbol, plugins: names });
124
+ }
125
+ return gaps.sort((a, b) => b.plugins.length - a.plugins.length);
126
+ }
127
+
128
+ // 把共同缺口说成一句话;没有时返回 undefined。
129
+ export function gapSummary(audited) {
130
+ const gaps = commonGaps(audited);
131
+ if (gaps.length === 0) return undefined;
132
+ const first = gaps[0];
133
+ return `${first.plugins.length} 个插件都缺 ${first.symbol}(${first.plugins.join(', ')})`;
134
+ }
103
135
  // 列表里只用环境的摘要:把包名列表整段丢掉,超长再截。
104
136
  //
105
137
  // 「真实旧版本 3 个(需重启):@deepseek…」把冒号和半截包名挤在一起,读起来别扭;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luolingp/request-doctor",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "description": "自动修复客户端引起的请求失败,并让版本不匹配的 DSH 插件能装上、能跑起来。",
5
5
  "keywords": [
6
6
  "dsh-plugin",