@zhangfengshun/dsh-remote-ssh 1.9.0 → 1.9.2
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/CHANGELOG.md +9 -0
- package/README.md +16 -14
- package/cordis.patch.yml +14 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
本文件的版本号与 `package.json` 的 `version` 保持一致。每个版本对应一个 Cordis Package 快照(`pkg-N`)。
|
|
4
4
|
|
|
5
|
+
## [1.9.2] — 修复自动配置 patch 不生效(bundles 顺序)
|
|
6
|
+
### 修复
|
|
7
|
+
- **config 覆盖被跳过**:`cordis.patch.yml` 中的 `id: better-sidebar` config 覆盖需要在 `better-sidebar` 条目被 insert 之后才能生效。如果 `@zhangfengshun/dsh-remote-ssh` 在 bundles 列表中排在 `dsh-better-sidebar` 之前,patch 会因"entry not found"被跳过。
|
|
8
|
+
- **修复方式**:在 README 中明确要求安装顺序(`@zhangfengshun/dsh-remote-ssh` 必须在 `dsh-better-sidebar` 之后),并提供手动调整 `profile/package.json` 中 `dsh.profile.bundles` 顺序的说明。
|
|
9
|
+
|
|
10
|
+
## [1.9.1] — 安装时自动配置 better-sidebar shell
|
|
11
|
+
### 改进
|
|
12
|
+
- **安装即生效**:`cordis.patch.yml` 新增 `id: better-sidebar` 的 `config.shell` 覆盖,用 `!!js` 动态计算 wrapper 脚本路径(适配不同平台和用户主目录)。安装插件后无需手动编辑任何配置文件,重启 DSH 即可使用远程终端透明接入。
|
|
13
|
+
|
|
5
14
|
## [1.9.0] — 远程文件/终端合并到内置页签
|
|
6
15
|
### 重大变更
|
|
7
16
|
- **移除 `remssh:files` 和 `remssh:term` 页签**:远程文件和远程终端不再使用独立侧边栏页签。
|
package/README.md
CHANGED
|
@@ -29,18 +29,20 @@ dsh plugin --profile <name> add /absolute/path/to/dsh-remote-ssh
|
|
|
29
29
|
### 发布后安装
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
dsh plugin --profile <name> add @zhangfengshun/dsh-remote-ssh@1.9.
|
|
32
|
+
dsh plugin --profile <name> add @zhangfengshun/dsh-remote-ssh@1.9.2
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
> ⚠️ 安装后需**重启 DSH** 才生效;后续仅修改 Client 半边时刷新浏览器即可。
|
|
36
|
+
>
|
|
37
|
+
> ⚠️ **安装顺序**:本插件会自动覆盖 `dsh-better-sidebar` 的 `shell` 配置。为确保 patch 生效(config 覆盖在 insert 之后应用),`@zhangfengshun/dsh-remote-ssh` 必须在 bundles 列表中排在 `dsh-better-sidebar` **之后**。如果先安装了 `@zhangfengshun/dsh-remote-ssh`,再安装 `dsh-better-sidebar`,需手动调整 `profile/package.json` 中 `dsh.profile.bundles` 的顺序,把 `@zhangfengshun/dsh-remote-ssh` 移到最后。
|
|
36
38
|
|
|
37
39
|
## 快速开始
|
|
38
40
|
|
|
39
|
-
1. 安装插件并重启 DSH
|
|
41
|
+
1. 安装插件并重启 DSH(安装时自动配置 better-sidebar 的 shell 指向 wrapper 脚本)。
|
|
40
42
|
2. 打开 **设置 → 🖥️ 远程连接**,添加一条连接(主机 / 端口 / 用户名 / 密钥或密码),点「测试连接」验证。
|
|
41
43
|
3. 需要把远程目录当作工作区时:走 DSH 原生「添加工作区」流程,在弹窗中选择「**选择远程目录…**」→ 选择连接 → 浏览并选择远程目录。
|
|
42
44
|
4. 创建后远程文件自动同步到本地镜像,内置「文件」页签直接可见。
|
|
43
|
-
5.
|
|
45
|
+
5. 在远程工作区中打开内置「终端」页签 → 自动 SSH 到远程主机(仅密钥认证)。
|
|
44
46
|
|
|
45
47
|
## 使用指南
|
|
46
48
|
|
|
@@ -71,17 +73,18 @@ dsh plugin --profile <name> add @zhangfengshun/dsh-remote-ssh@1.9.0
|
|
|
71
73
|
|
|
72
74
|
通过 shell wrapper 实现:终端启动时自动检测当前工作目录下的 `.remote-ssh.json`,若存在且含密钥路径 → 自动 `ssh -tt` 连接远程主机;否则启动本地 shell。
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
**自动配置**:安装插件后,`cordis.patch.yml` 自动把 better-sidebar 的 `shell` 配置覆盖为 wrapper 脚本路径(用 `!!js` 动态计算,适配不同平台和用户主目录)。**无需手动编辑任何配置文件。**
|
|
75
77
|
|
|
78
|
+
工作流程:
|
|
76
79
|
1. 插件启动时自动在 `~/.dsh/remote-ssh/` 下生成 wrapper 脚本:
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- POSIX: `/home/<你>/.dsh/remote-ssh/dsh-remote-shell`
|
|
80
|
+
- `dsh-remote-shell.js`(核心逻辑:检测 `.remote-ssh.json` → `ssh -tt`;否则本地 shell)
|
|
81
|
+
- Windows: `dsh-remote-shell.cmd`(薄壳调用 .js)
|
|
82
|
+
- POSIX: `dsh-remote-shell`(薄壳调用 .js)
|
|
83
|
+
2. 安装时自动覆盖 better-sidebar 的 `shell` config 指向 wrapper 脚本。
|
|
82
84
|
3. 重启 DSH 后,在远程工作区中打开终端 → 自动 SSH 到远程主机;在本地工作区中打开终端 → 照常启动本地 shell。
|
|
83
85
|
|
|
84
86
|
> ⚠️ 终端透明接入仅支持**密钥认证**(密码无法安全传入 wrapper 脚本)。密码认证的连接仍可使用模型工具。
|
|
87
|
+
> 若需覆盖自动配置,在 profile 的 `cordis.patch.yml` 中加一条 `id: better-sidebar` 的 `config.shell` 即可(profile patch 优先于 bundle patch)。
|
|
85
88
|
|
|
86
89
|
### 4. 远程工作区(🌐)
|
|
87
90
|
|
|
@@ -158,11 +161,10 @@ dsh-remote-ssh/
|
|
|
158
161
|
## 已知限制
|
|
159
162
|
|
|
160
163
|
1. **终端透明接入仅限密钥认证**:shell wrapper 通过 `.remote-ssh.json` 读取密钥路径,密码认证无法安全传入。密码认证的连接仍可使用模型工具和远程文件操作。
|
|
161
|
-
2.
|
|
162
|
-
3.
|
|
163
|
-
4.
|
|
164
|
-
5.
|
|
165
|
-
6. **内置编辑器编辑的是本地镜像副本**,不会自动回传 —— 须在设置页点「推送」或调用 `remote_ssh_push` 同步回远端。
|
|
164
|
+
2. **文件操作依赖 GNU 工具**(`find -printf`、`base64 -w0`):目标为 Linux 超算时通用。
|
|
165
|
+
3. **密码认证需本机 `sshpass`**(Windows 默认没有);密钥认证无此依赖。
|
|
166
|
+
4. **同步为全量 tar**:`remote_ssh_sync` / `remote_ssh_push` 用 `tar` 流式全量同步,单次同步大目录耗时与传输量较高,后续可换 `rsync -e ssh` 增量。
|
|
167
|
+
5. **内置编辑器编辑的是本地镜像副本**,不会自动回传 —— 须在设置页点「推送」或调用 `remote_ssh_push` 同步回远端。
|
|
166
168
|
|
|
167
169
|
## 路线图
|
|
168
170
|
|
package/cordis.patch.yml
CHANGED
|
@@ -5,3 +5,17 @@
|
|
|
5
5
|
- insert:
|
|
6
6
|
- id: remote-ssh
|
|
7
7
|
name: '@zhangfengshun/dsh-remote-ssh'
|
|
8
|
+
# 自动覆盖 better-sidebar 的 shell 配置,指向本插件生成的 shell wrapper。
|
|
9
|
+
# wrapper 脚本在插件 apply() 时写入 ~/.dsh/remote-ssh/dsh-remote-shell[.cmd]:
|
|
10
|
+
# - 远程工作区(cwd 含 .remote-ssh.json 且 keyPath 非空)→ ssh -tt 连远程
|
|
11
|
+
# - 本地工作区 → 照常启动本地 shell
|
|
12
|
+
# 路径用 !!js 动态计算,适配不同平台和用户主目录。
|
|
13
|
+
- id: better-sidebar
|
|
14
|
+
config:
|
|
15
|
+
shell: !!js |
|
|
16
|
+
var os = require('os');
|
|
17
|
+
var path = require('path');
|
|
18
|
+
var dir = path.join(os.homedir(), '.dsh', 'remote-ssh');
|
|
19
|
+
var isWin = process.platform === 'win32';
|
|
20
|
+
var wrapper = isWin ? path.join(dir, 'dsh-remote-shell.cmd') : path.join(dir, 'dsh-remote-shell');
|
|
21
|
+
return wrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhangfengshun/dsh-remote-ssh",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "DSH web plugin: VSCode Remote-SSH-like remote development (SSH to supercomputers/servers, remote workspace, file explorer, integrated terminal), integrated with dsh-better-sidebar and DSH settings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|