@hyzyn/dsh-tty 0.20.2 → 0.21.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/README.en.md +28 -1
- package/README.md +13 -3
- package/client.js +24 -24
- package/lib/index.js +6 -1
- package/lib/index.js.map +1 -1
- package/lib/sftp.js +29 -13
- package/lib/sftp.js.map +1 -1
- package/lib/tunnels.d.ts +2 -0
- package/lib/tunnels.js +32 -2
- package/lib/tunnels.js.map +1 -1
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -3883,6 +3883,7 @@ const plugin = definePlugin({
|
|
|
3883
3883
|
bookName: { type: 'string', required: true },
|
|
3884
3884
|
state: { type: 'string', required: true },
|
|
3885
3885
|
error: { type: 'string' },
|
|
3886
|
+
fatal: { type: 'boolean', required: true },
|
|
3886
3887
|
connections: { type: 'number', required: true },
|
|
3887
3888
|
totalConnections: { type: 'number', required: true },
|
|
3888
3889
|
},
|
|
@@ -3896,7 +3897,10 @@ const plugin = definePlugin({
|
|
|
3896
3897
|
if (tunnels.length === 0)
|
|
3897
3898
|
return [{ type: 'text', text: '当前没有配置端口转发隧道(插件配置 → 终端面板 卡片可添加)' }];
|
|
3898
3899
|
const text = '端口转发隧道:' + tunnels.map((t) => {
|
|
3899
|
-
|
|
3900
|
+
// fatal 单独措辞(D58):这类故障不会自愈,不说清就会一直等「正在连」
|
|
3901
|
+
const tail = t.error !== null && t.error !== undefined
|
|
3902
|
+
? (t.fatal === true ? `(错误: ${t.error} —— 不会自动重试,需修配置)` : `(错误: ${t.error})`)
|
|
3903
|
+
: t.lastForwardError !== null && t.lastForwardError !== undefined ? `(最近转发失败: ${t.lastForwardError})` : `(连接 ${String(t.connections)})`;
|
|
3900
3904
|
return `\n- ${t.name} [${t.direction}] ${t.rule} — ${t.state}${tail}`;
|
|
3901
3905
|
}).join('');
|
|
3902
3906
|
return [{ type: 'text', text }];
|
|
@@ -3917,6 +3921,7 @@ const plugin = definePlugin({
|
|
|
3917
3921
|
rule: t.rule,
|
|
3918
3922
|
state: t.state,
|
|
3919
3923
|
...(t.error === null || t.error === undefined ? {} : { error: t.error }),
|
|
3924
|
+
fatal: t.fatal,
|
|
3920
3925
|
connections: t.connections,
|
|
3921
3926
|
totalConnections: t.totalConnections,
|
|
3922
3927
|
})),
|