dsh-request-doctor 0.12.9 → 0.13.0
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/client.js +11 -0
- 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 +11 -2
- 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 +15 -8
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -27,6 +27,9 @@ window.__ModuleLoader__.load({
|
|
|
27
27
|
failed: '没能装上',
|
|
28
28
|
rescan: '重新扫描',
|
|
29
29
|
restartTitle: '需要重启后生效',
|
|
30
|
+
sourceManager: '来源:插件管理器拒装',
|
|
31
|
+
sourceAudit: '来源:本插件审计',
|
|
32
|
+
sourceUnknown: '来源:未知',
|
|
30
33
|
offline: '连不上 Host 侧的安装路由,可以改用命令:',
|
|
31
34
|
}
|
|
32
35
|
|
|
@@ -59,6 +62,13 @@ window.__ModuleLoader__.load({
|
|
|
59
62
|
return response.json()
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
// 这条是谁给的:管理器拒装和本插件审计,含义完全不同。
|
|
66
|
+
function sourceLabel(source) {
|
|
67
|
+
if (source === 'manager') return TEXT.sourceManager
|
|
68
|
+
if (source === 'audit') return TEXT.sourceAudit
|
|
69
|
+
return TEXT.sourceUnknown
|
|
70
|
+
}
|
|
71
|
+
|
|
62
72
|
// 读一次被拒插件清单。Host 侧已经把不可用的行筛掉了,
|
|
63
73
|
// 顺带回一段「已经修好但需要重启」的提示。
|
|
64
74
|
async function loadPanel() {
|
|
@@ -149,6 +159,7 @@ window.__ModuleLoader__.load({
|
|
|
149
159
|
},
|
|
150
160
|
h('div', { style: style.title }, `${row.name}@${row.version}`),
|
|
151
161
|
h('div', { style: style.hush }, `${TEXT.requires} ${row.runtimeVersion || '?'}`),
|
|
162
|
+
h('div', { style: style.hush }, sourceLabel(row.source)),
|
|
152
163
|
h('button', {
|
|
153
164
|
type: 'button', style: style.press, disabled: busy,
|
|
154
165
|
onClick: () => run(`${row.name}@${row.version}`, () => postInstall(`${row.name}@${row.version}`)),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 软件测试报告
|
|
2
2
|
|
|
3
3
|
**产品名称**:request-doctor(请求急救员)
|
|
4
|
-
**版本**:0.
|
|
4
|
+
**版本**:0.13.0
|
|
5
5
|
**编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.6;GB/T 8566-2007 验证与确认过程
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
| `test/pinned-peers.test.mjs` | 1 | peer 钉死成上一补丁版本:六条全对齐、只给导入的建垫片 |
|
|
60
60
|
| `test/install-rescue.test.mjs` | 4 | 从失败里取出包名与版本,供授权使用 |
|
|
61
61
|
| `test/install-in-place.test.mjs` | 2 | 已装着的包就地修复,不再重复安装 |
|
|
62
|
-
| `test/client-half.test.mjs` |
|
|
62
|
+
| `test/client-half.test.mjs` | 7 | 客户端半:模块身份、注入声明、apply 注册、组件能渲染 |
|
|
63
63
|
| `test/diagnostics.test.mjs` | 3 | 快照可选写入:不配置不写盘、突发合并、坏路径不致命 |
|
|
64
64
|
| `test/restart-notice.test.mjs` | 3 |
|
|
65
65
|
| `test/verdict-report.test.mjs` | 29 | why 与 list:判定、理由、环境摘要、自动扫描、分组、缺口、按形态给建议 | 缺导出判为需要重启;其它失败不误判;多次累积不覆盖 |
|
|
66
|
-
| **合计** | **
|
|
66
|
+
| **合计** | **191** | **全部通过** |
|
|
67
67
|
|
|
68
68
|
执行结果:
|
|
69
69
|
|
|
@@ -214,4 +214,4 @@
|
|
|
214
214
|
|
|
215
215
|
### 7.2 分文件执行结果
|
|
216
216
|
|
|
217
|
-
31 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计
|
|
217
|
+
31 个测试文件逐个单独执行,每个都有用例且全部通过,不存在因导入失败而静默跳过的文件。用例数分布:compat.test.mjs 17、plugin.test.mjs 15、compat-env.test.mjs 14、classify.test.mjs 13,其余按职能分散,合计 191。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 软件用户手册
|
|
2
2
|
|
|
3
3
|
**产品名称**:request-doctor(请求急救员)
|
|
4
|
-
**版本**:0.
|
|
4
|
+
**版本**:0.13.0
|
|
5
5
|
**编制依据**:GB/T 8567-2006《计算机软件文档编制规范》6.5
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -195,7 +195,16 @@ Plugin xxx@1.0.0 is incompatible with dsh 0.2.1-rc.3
|
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
看到这条说明修复本身已经完成,缺的只是一次重启——不要重复触发修复,那不会加快任何事。
|
|
198
|
-
## 8
|
|
198
|
+
## 8 界面里每行的来源
|
|
199
|
+
|
|
200
|
+
插件页那一栏每行都标出来源:
|
|
201
|
+
|
|
202
|
+
- `来源:插件管理器拒装` —— DSH 自己的检查没过,通常需要先授权版本
|
|
203
|
+
- `来源:本插件审计` —— 本插件判定它与当前运行时不兼容,修复由本插件负责
|
|
204
|
+
|
|
205
|
+
同一个插件两处都出现时只显示管理器那条,因为它是「现在真的装不上」。
|
|
206
|
+
|
|
207
|
+
## 9 查某个插件为什么装不上
|
|
199
208
|
|
|
200
209
|
```
|
|
201
210
|
/doctor why dsh-hyper-tools
|
package/docs/quality-report.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"standard": "GB/T 45717-2025 信息技术 软件测量 软件质量测量 自动化的源代码质量测度",
|
|
3
|
-
"generatedAt": "2026-10-29T15:
|
|
3
|
+
"generatedAt": "2026-10-29T15:54:49.008Z",
|
|
4
4
|
"scope": {
|
|
5
5
|
"files": 31,
|
|
6
|
-
"totalLines":
|
|
7
|
-
"sourceLines":
|
|
8
|
-
"commentLines":
|
|
6
|
+
"totalLines": 5198,
|
|
7
|
+
"sourceLines": 3767,
|
|
8
|
+
"commentLines": 952
|
|
9
9
|
},
|
|
10
10
|
"measures": {
|
|
11
|
-
"commentDensity": 25.
|
|
12
|
-
"duplicationPercent": 4.
|
|
13
|
-
"functionCount":
|
|
11
|
+
"commentDensity": 25.27,
|
|
12
|
+
"duplicationPercent": 4.88,
|
|
13
|
+
"functionCount": 396,
|
|
14
14
|
"maxComplexity": 10,
|
|
15
15
|
"maxFunctionLines": 59,
|
|
16
16
|
"maxFileLines": 500,
|
package/index.js
CHANGED
|
@@ -232,25 +232,32 @@ function refusedRowsOf(result) {
|
|
|
232
232
|
|
|
233
233
|
// 汇总当前需要处理的插件:本插件扫描的审计结果,加上管理器的拒装记录,按名去重。
|
|
234
234
|
async function collectPanelRows(deps, manager) {
|
|
235
|
+
const runtimeVersion = deps.probe.runtimeFacts().runtimeVersion;
|
|
235
236
|
const rows = [];
|
|
236
237
|
for (const item of deps.diagnostics?.versionScan?.audited ?? []) {
|
|
237
238
|
if (item.verdict === 'compatible') continue;
|
|
238
|
-
rows.push({ name: item.name, version: item.version, runtimeVersion:
|
|
239
|
+
rows.push({ name: item.name, version: item.version, runtimeVersion, source: 'audit' });
|
|
239
240
|
}
|
|
240
241
|
if (manager !== undefined) {
|
|
241
242
|
try {
|
|
242
|
-
|
|
243
|
+
for (const row of refusedRowsOf(await manager.listBundles())) rows.push({ ...row, source: 'manager' });
|
|
243
244
|
} catch {
|
|
244
245
|
// 管理器读不动就只报审计结果,页面仍然有内容。
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
return dedupeRows(rows);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 同一个插件可能既在本插件审计里、也在管理器的拒装清单里。
|
|
252
|
+
// 管理器那条是「现在真的装不上」,信息更强,所以优先保留它。
|
|
253
|
+
function dedupeRows(rows) {
|
|
254
|
+
const byKey = new Map();
|
|
255
|
+
for (const row of rows) {
|
|
249
256
|
const key = `${row.name}@${row.version}`;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
257
|
+
const existing = byKey.get(key);
|
|
258
|
+
if (existing === undefined || (existing.source !== 'manager' && row.source === 'manager')) byKey.set(key, row);
|
|
259
|
+
}
|
|
260
|
+
return [...byKey.values()];
|
|
254
261
|
}
|
|
255
262
|
|
|
256
263
|
// 界面要的一份数据:待处理的行,加上「修好了但需要重启」的提示。
|