@jiyr0119/dsh-service-console 0.5.0 → 0.6.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/dsh.plugin.json +2 -2
- package/dynamic/host.js +11 -7
- package/lib/client.js +54 -54
- package/manifest.json +1 -1
- package/package.json +7 -8
package/dsh.plugin.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-service-console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"description": "本地开发服务控制台:发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
|
|
6
6
|
"engines": {
|
|
7
|
-
"dsh": ">=0.
|
|
7
|
+
"dsh": ">=0.2.0-rc.2"
|
|
8
8
|
},
|
|
9
9
|
"contributes": {
|
|
10
10
|
"tools": [],
|
package/dynamic/host.js
CHANGED
|
@@ -37,13 +37,17 @@ return {
|
|
|
37
37
|
|
|
38
38
|
async function runCommand(command, timeoutMs) {
|
|
39
39
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
40
|
+
// DSH 0.2.0:ShellExecutor.run()/start() 已移除,统一走 execute() + result();
|
|
41
|
+
// 结果的 stdout/stderr 是 CollectedOutput({ text, truncated })而非字符串。
|
|
42
|
+
const spec = shell.resolve({ command, timeoutMs: timeoutMs || 5000 })
|
|
43
|
+
const execution = await shell.execute(spec)
|
|
44
|
+
const res = await execution.result()
|
|
45
|
+
const pick = (v) => typeof v === 'string' ? v
|
|
46
|
+
: v && typeof v.text === 'string' ? v.text : ''
|
|
47
|
+
const stdout = pick(res.stdout)
|
|
48
|
+
const stderr = pick(res.stderr)
|
|
49
|
+
const code = res.exitCode !== undefined && res.exitCode !== null ? res.exitCode
|
|
50
|
+
: res.code !== undefined ? res.code : null
|
|
47
51
|
return { stdout, stderr, code }
|
|
48
52
|
} catch (e) { return { stdout: '', stderr: String((e && e.message) || e), code: null } }
|
|
49
53
|
}
|
package/lib/client.js
CHANGED
|
@@ -39,71 +39,71 @@ window.__ModuleLoader__.load({
|
|
|
39
39
|
document.head.appendChild(tag);
|
|
40
40
|
}
|
|
41
41
|
var service_console_module_css_default = {
|
|
42
|
-
"
|
|
43
|
-
"rowAct": "PuSt5a_rowAct",
|
|
44
|
-
"confirmRow": "PuSt5a_confirmRow",
|
|
45
|
-
"head": "PuSt5a_head",
|
|
46
|
-
"detailHead": "PuSt5a_detailHead",
|
|
47
|
-
"tabBody": "PuSt5a_tabBody",
|
|
42
|
+
"rowMain": "PuSt5a_rowMain",
|
|
48
43
|
"detailGrid": "PuSt5a_detailGrid",
|
|
44
|
+
"rowName": "PuSt5a_rowName",
|
|
45
|
+
"detailLabel": "PuSt5a_detailLabel",
|
|
46
|
+
"rowAct": "PuSt5a_rowAct",
|
|
47
|
+
"headerBtnOn": "PuSt5a_headerBtnOn",
|
|
49
48
|
"sc-spin": "PuSt5a_sc-spin",
|
|
50
|
-
"setRow": "PuSt5a_setRow",
|
|
51
|
-
"starRow": "PuSt5a_starRow",
|
|
52
|
-
"setInput": "PuSt5a_setInput",
|
|
53
|
-
"switch": "PuSt5a_switch",
|
|
54
|
-
"setLabel": "PuSt5a_setLabel",
|
|
55
|
-
"filter": "PuSt5a_filter",
|
|
56
|
-
"headTitle": "PuSt5a_headTitle",
|
|
57
|
-
"headIco": "PuSt5a_headIco",
|
|
58
|
-
"note": "PuSt5a_note",
|
|
59
|
-
"spacer": "PuSt5a_spacer",
|
|
60
|
-
"starInfo": "PuSt5a_starInfo",
|
|
61
49
|
"spin": "PuSt5a_spin",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
50
|
+
"filter": "PuSt5a_filter",
|
|
51
|
+
"rowMeta": "PuSt5a_rowMeta",
|
|
52
|
+
"starLink": "PuSt5a_starLink",
|
|
53
|
+
"setNote": "PuSt5a_setNote",
|
|
65
54
|
"errText": "PuSt5a_errText",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"rowSub": "PuSt5a_rowSub",
|
|
69
|
-
"detailLabel": "PuSt5a_detailLabel",
|
|
55
|
+
"badge": "PuSt5a_badge",
|
|
56
|
+
"setLabel": "PuSt5a_setLabel",
|
|
70
57
|
"detailAccent": "PuSt5a_detailAccent",
|
|
71
|
-
"tab": "PuSt5a_tab",
|
|
72
|
-
"starSection": "PuSt5a_starSection",
|
|
73
|
-
"setNote": "PuSt5a_setNote",
|
|
74
|
-
"noteErr": "PuSt5a_noteErr",
|
|
75
|
-
"noteWarn": "PuSt5a_noteWarn",
|
|
76
|
-
"detailBox": "PuSt5a_detailBox",
|
|
77
|
-
"setPage": "PuSt5a_setPage",
|
|
78
|
-
"rowMain": "PuSt5a_rowMain",
|
|
79
|
-
"rowDot": "PuSt5a_rowDot",
|
|
80
|
-
"tabOn": "PuSt5a_tabOn",
|
|
81
|
-
"prevBtn": "PuSt5a_prevBtn",
|
|
82
|
-
"headerBtnOn": "PuSt5a_headerBtnOn",
|
|
83
|
-
"icoBtn": "PuSt5a_icoBtn",
|
|
84
|
-
"tabs": "PuSt5a_tabs",
|
|
85
58
|
"setFooter": "PuSt5a_setFooter",
|
|
59
|
+
"starLabel": "PuSt5a_starLabel",
|
|
60
|
+
"tabOn": "PuSt5a_tabOn",
|
|
86
61
|
"filterClear": "PuSt5a_filterClear",
|
|
87
|
-
"starLink": "PuSt5a_starLink",
|
|
88
|
-
"filterRow": "PuSt5a_filterRow",
|
|
89
|
-
"confirmCancel": "PuSt5a_confirmCancel",
|
|
90
|
-
"liveDot": "PuSt5a_liveDot",
|
|
91
|
-
"layer": "PuSt5a_layer",
|
|
92
|
-
"rowMeta": "PuSt5a_rowMeta",
|
|
93
|
-
"okText": "PuSt5a_okText",
|
|
94
|
-
"rowBtn": "PuSt5a_rowBtn",
|
|
95
|
-
"empty": "PuSt5a_empty",
|
|
96
|
-
"headerBtn": "PuSt5a_headerBtn",
|
|
97
62
|
"tabInd": "PuSt5a_tabInd",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
63
|
+
"head": "PuSt5a_head",
|
|
64
|
+
"evidenceItem": "PuSt5a_evidenceItem",
|
|
65
|
+
"noteWarn": "PuSt5a_noteWarn",
|
|
66
|
+
"okText": "PuSt5a_okText",
|
|
102
67
|
"confirmTxt": "PuSt5a_confirmTxt",
|
|
103
|
-
"
|
|
68
|
+
"tab": "PuSt5a_tab",
|
|
69
|
+
"evidenceArrow": "PuSt5a_evidenceArrow",
|
|
70
|
+
"headerBtn": "PuSt5a_headerBtn",
|
|
71
|
+
"prevBtn": "PuSt5a_prevBtn",
|
|
72
|
+
"popup": "PuSt5a_popup",
|
|
73
|
+
"headIco": "PuSt5a_headIco",
|
|
104
74
|
"hintLine": "PuSt5a_hintLine",
|
|
75
|
+
"setRow": "PuSt5a_setRow",
|
|
76
|
+
"confirmRow": "PuSt5a_confirmRow",
|
|
77
|
+
"starRow": "PuSt5a_starRow",
|
|
78
|
+
"detailHead": "PuSt5a_detailHead",
|
|
79
|
+
"liveDot": "PuSt5a_liveDot",
|
|
80
|
+
"noteErr": "PuSt5a_noteErr",
|
|
105
81
|
"evidenceBlock": "PuSt5a_evidenceBlock",
|
|
106
|
-
"
|
|
82
|
+
"starInfo": "PuSt5a_starInfo",
|
|
83
|
+
"setInput": "PuSt5a_setInput",
|
|
84
|
+
"rowSub": "PuSt5a_rowSub",
|
|
85
|
+
"rowBtn": "PuSt5a_rowBtn",
|
|
86
|
+
"tabs": "PuSt5a_tabs",
|
|
87
|
+
"setInfo": "PuSt5a_setInfo",
|
|
88
|
+
"rowDot": "PuSt5a_rowDot",
|
|
89
|
+
"row": "PuSt5a_row",
|
|
90
|
+
"setPage": "PuSt5a_setPage",
|
|
91
|
+
"confirmOk": "PuSt5a_confirmOk",
|
|
92
|
+
"headTitle": "PuSt5a_headTitle",
|
|
93
|
+
"setSection": "PuSt5a_setSection",
|
|
94
|
+
"spacer": "PuSt5a_spacer",
|
|
95
|
+
"note": "PuSt5a_note",
|
|
96
|
+
"starSection": "PuSt5a_starSection",
|
|
97
|
+
"tabBody": "PuSt5a_tabBody",
|
|
98
|
+
"switch": "PuSt5a_switch",
|
|
99
|
+
"empty": "PuSt5a_empty",
|
|
100
|
+
"icoBtn": "PuSt5a_icoBtn",
|
|
101
|
+
"filterRow": "PuSt5a_filterRow",
|
|
102
|
+
"detailBox": "PuSt5a_detailBox",
|
|
103
|
+
"confirmCancel": "PuSt5a_confirmCancel",
|
|
104
|
+
"popupOn": "PuSt5a_popupOn",
|
|
105
|
+
"setCap": "PuSt5a_setCap",
|
|
106
|
+
"layer": "PuSt5a_layer"
|
|
107
107
|
};
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/client/ServiceConsole.tsx
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiyr0119/dsh-service-console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "DeepSeek Harness 本地开发服务控制台(原生插件):发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -77,12 +77,11 @@
|
|
|
77
77
|
"test": "npm run build && node --test test/*.test.mjs"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@deepseek-ai/cordis": "
|
|
81
|
-
"@deepseek-ai/dsh-client-locale": "^0.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.
|
|
84
|
-
"@deepseek-ai/dsh-host-webserver": "^0.
|
|
85
|
-
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
|
|
80
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
81
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.0-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
|
|
86
85
|
"@types/node": "^22.0.0",
|
|
87
86
|
"@types/react": "^18.3.1",
|
|
88
87
|
"cordis": "^4.0.0-rc.7",
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"typescript": "^5.6.0"
|
|
94
93
|
},
|
|
95
94
|
"peerDependencies": {
|
|
96
|
-
"@deepseek-ai/cordis": "
|
|
95
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
97
96
|
"react": "^18.2.0"
|
|
98
97
|
}
|
|
99
98
|
}
|