@noob-stupid/dsh-plugin-console 0.3.46 → 0.3.47
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/README.md +314 -319
- package/README.zh.md +281 -286
- package/lib/client.js +4 -4
- package/lib/index.js +22 -4
- package/package.json +44 -44
package/lib/index.js
CHANGED
|
@@ -6085,14 +6085,22 @@ async function handle(ctx, req, res) {
|
|
|
6085
6085
|
const name = meta?.moduleName
|
|
6086
6086
|
if (typeof name === 'string' && name !== '' && (name === root || name.startsWith(root + '/'))) bundleRowIds.add(rowId)
|
|
6087
6087
|
}
|
|
6088
|
-
const
|
|
6089
|
-
if ((p.status ?? 'pending') !== 'pending') return false
|
|
6088
|
+
const inFamily = (p) => {
|
|
6090
6089
|
if (typeof p.moduleName === 'string' && p.moduleName !== '' && (p.moduleName === root || p.moduleName.startsWith(root + '/'))) return true
|
|
6091
6090
|
return bundleRowIds.has(p.rowId) || info.get(p.rowId)?.moduleName === root
|
|
6091
|
+
}
|
|
6092
|
+
// 目标 = ① 待适配(pending)② **已记已适配、但从没通过源码扫描**(check !== 'pass')。
|
|
6093
|
+
// ② 这类正是"账面上已适配、补丁里却还禁着"的行 —— 老逻辑只挑 pending,于是用户点「一键启用已适配」
|
|
6094
|
+
// 得到"没有待适配行、无需操作",可它们其实一行都没启用(实测就是这个)。
|
|
6095
|
+
const targets = (pending?.pending ?? []).filter((p) => {
|
|
6096
|
+
if (!inFamily(p)) return false
|
|
6097
|
+
const status = p.status ?? 'pending'
|
|
6098
|
+
if (status === 'pending') return true
|
|
6099
|
+
return status === 'adopted' && p.check !== 'pass'
|
|
6092
6100
|
})
|
|
6093
6101
|
if (targets.length === 0) {
|
|
6094
6102
|
// 无待适配行=全部已适配/已解锁,属正常状态:返回友好提示而非错误(点击「一键启用已适配」不应报"操作失败")
|
|
6095
|
-
sendJson(res, 200, { ok: true, unlocked: [], kept: [], note: '
|
|
6103
|
+
sendJson(res, 200, { ok: true, unlocked: [], kept: [], note: '该全家桶内没有待扫描/待解锁的行(全部已通过源码扫描或已解锁)' })
|
|
6096
6104
|
return
|
|
6097
6105
|
}
|
|
6098
6106
|
const fwVer = typeof pending.frameworkVersion === 'string' ? pending.frameworkVersion : '?'
|
|
@@ -6125,7 +6133,17 @@ async function handle(ctx, req, res) {
|
|
|
6125
6133
|
unlocked.push(p.rowId)
|
|
6126
6134
|
}
|
|
6127
6135
|
writeCompatPending(pending)
|
|
6128
|
-
|
|
6136
|
+
// kept = 扫描未通过(保持禁用,并带上原因);unlocked = 本次真解锁的行
|
|
6137
|
+
sendJson(res, 200, {
|
|
6138
|
+
ok: true,
|
|
6139
|
+
root,
|
|
6140
|
+
unlocked,
|
|
6141
|
+
kept,
|
|
6142
|
+
scanned: targets.length,
|
|
6143
|
+
note: kept.length === 0
|
|
6144
|
+
? `已重跑源码扫描并解锁 ${unlocked.length} 行`
|
|
6145
|
+
: `扫描 ${targets.length} 行:解锁 ${unlocked.length} 行,${kept.length} 行未通过(保持禁用,原因见下)`,
|
|
6146
|
+
})
|
|
6129
6147
|
return
|
|
6130
6148
|
}
|
|
6131
6149
|
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@noob-stupid/dsh-plugin-console",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "DSH plugin management panel & marketplace: one-click enable/disable, multi-source market (GitHub/Gitee/custom), static-index market (500+ plugins / 300 skills), skills, suites, and one-click framework upgrade.",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/Noob-stupid/dsh-plugin-hub"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"main": "./lib/index.js",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": "./lib/index.js",
|
|
13
|
-
"./client": "./lib/client.js",
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"dsh-plugin",
|
|
18
|
-
"deepseek-harness",
|
|
19
|
-
"plugin-manager"
|
|
20
|
-
],
|
|
21
|
-
"dsh": {
|
|
22
|
-
"bundle": {
|
|
23
|
-
"patch": "./cordis.patch.yml"
|
|
24
|
-
},
|
|
25
|
-
"client": {
|
|
26
|
-
"platform": "web",
|
|
27
|
-
"inject": [
|
|
28
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
29
|
-
"@deepseek-ai/dsh-client-locale",
|
|
30
|
-
"@deepseek-ai/dsh-client-ui-settings"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"files": [
|
|
35
|
-
"lib",
|
|
36
|
-
"cordis.patch.yml",
|
|
37
|
-
"SECURITY.md"
|
|
38
|
-
],
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"scripts": {
|
|
41
|
-
"checkBom": "node -e \"const fs=require('fs');const b=fs.readFileSync('package.json');if(b[0]===0xEF){console.error('BOM detected in package.json — strip it before publish');process.exit(1)};console.log('package.json BOM check OK')\"",
|
|
42
|
-
"prepublishOnly": "npm run checkBom"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@noob-stupid/dsh-plugin-console",
|
|
3
|
+
"version": "0.3.47",
|
|
4
|
+
"description": "DSH plugin management panel & marketplace: one-click enable/disable, multi-source market (GitHub/Gitee/custom), static-index market (500+ plugins / 300 skills), skills, suites, and one-click framework upgrade.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Noob-stupid/dsh-plugin-hub"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "./lib/index.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./lib/index.js",
|
|
13
|
+
"./client": "./lib/client.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"dsh-plugin",
|
|
18
|
+
"deepseek-harness",
|
|
19
|
+
"plugin-manager"
|
|
20
|
+
],
|
|
21
|
+
"dsh": {
|
|
22
|
+
"bundle": {
|
|
23
|
+
"patch": "./cordis.patch.yml"
|
|
24
|
+
},
|
|
25
|
+
"client": {
|
|
26
|
+
"platform": "web",
|
|
27
|
+
"inject": [
|
|
28
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
29
|
+
"@deepseek-ai/dsh-client-locale",
|
|
30
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"lib",
|
|
36
|
+
"cordis.patch.yml",
|
|
37
|
+
"SECURITY.md"
|
|
38
|
+
],
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"scripts": {
|
|
41
|
+
"checkBom": "node -e \"const fs=require('fs');const b=fs.readFileSync('package.json');if(b[0]===0xEF){console.error('BOM detected in package.json — strip it before publish');process.exit(1)};console.log('package.json BOM check OK')\"",
|
|
42
|
+
"prepublishOnly": "npm run checkBom"
|
|
43
|
+
}
|
|
44
|
+
}
|