@rooode/dsh-suite 0.1.7 → 0.1.9
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/bin/cli.js +27 -1
- package/package.json +5 -5
package/bin/cli.js
CHANGED
|
@@ -123,8 +123,34 @@ function findDshEntry() {
|
|
|
123
123
|
return { type: 'npx' };
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
function normalizeArgs(args) {
|
|
127
|
+
const result = [];
|
|
128
|
+
for (let i = 0; i < args.length; i++) {
|
|
129
|
+
const arg = args[i];
|
|
130
|
+
// Filter out --open because DSH opens browser by default and Commander throws on unknown --open flag
|
|
131
|
+
if (arg === '--open') {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
// Intercept --host 0.0.0.0 / -H 0.0.0.0 and safely fall back to 127.0.0.1
|
|
135
|
+
if ((arg === '--host' || arg === '-H') && args[i + 1] === '0.0.0.0') {
|
|
136
|
+
console.warn('\x1b[33m⚠️ 注意: DSH 安全策略限制,已自动将 0.0.0.0 切换为 127.0.0.1 (本地回环)\x1b[0m');
|
|
137
|
+
result.push(arg);
|
|
138
|
+
result.push('127.0.0.1');
|
|
139
|
+
i++;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (typeof arg === 'string' && arg.startsWith('--host=0.0.0.0')) {
|
|
143
|
+
console.warn('\x1b[33m⚠️ 注意: DSH 安全策略限制,已自动将 0.0.0.0 切换为 127.0.0.1 (本地回环)\x1b[0m');
|
|
144
|
+
result.push('--host=127.0.0.1');
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
result.push(arg);
|
|
148
|
+
}
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
|
|
126
152
|
function execDsh(args) {
|
|
127
|
-
const cleanArgs = args[0] === '@deepseek-ai/dsh' ? args.slice(1) : args;
|
|
153
|
+
const cleanArgs = normalizeArgs(args[0] === '@deepseek-ai/dsh' ? args.slice(1) : args);
|
|
128
154
|
const dsh = findDshEntry();
|
|
129
155
|
|
|
130
156
|
if (dsh.type === 'node') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rooode/dsh-suite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "DeepSeek Harness 一键全功能增强套件 (自动化调度 + WebStorm Git 提交对比 + 代码文档多标签预览 + 对话快捷栏)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@deepseek-ai/dsh": "^0.1.1-rc.2",
|
|
45
|
-
"@rooode/dsh-plugin-automation": "^0.2.
|
|
46
|
-
"@rooode/dsh-plugin-git": "^0.1.
|
|
47
|
-
"@rooode/dsh-plugin-preview": "^0.1.
|
|
48
|
-
"@rooode/dsh-plugin-quickbar": "^0.1.
|
|
45
|
+
"@rooode/dsh-plugin-automation": "^0.2.4",
|
|
46
|
+
"@rooode/dsh-plugin-git": "^0.1.4",
|
|
47
|
+
"@rooode/dsh-plugin-preview": "^0.1.12",
|
|
48
|
+
"@rooode/dsh-plugin-quickbar": "^0.1.6"
|
|
49
49
|
},
|
|
50
50
|
"dsh": {
|
|
51
51
|
"bundle": {
|