dsh-remote-vs 0.11.0 → 0.12.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 +30 -2
- package/README.md +24 -2
- package/lib/client.js +653 -126
- package/lib/index.js +252 -2
- package/lib/p2-router-fs.js +1 -1
- package/lib/types/archive.d.ts +30 -0
- package/lib/types/client/DownloadDock.d.ts +15 -0
- package/lib/types/client/api.d.ts +21 -6
- package/lib/types/client/download.d.ts +69 -0
- package/lib/types/client/downloads.d.ts +63 -0
- package/lib/types/client/i18n.d.ts +1 -1
- package/lib/types/protocol.d.ts +14 -0
- package/lib/types/sftp.d.ts +38 -0
- package/lib/{worlds-a8nqW9mi.js → worlds-oj65Hic-.js} +171 -1
- package/package.json +1 -1
- package/src/archive.ts +60 -0
- package/src/client/DownloadDock.tsx +89 -0
- package/src/client/RemoteExplorer.tsx +31 -1
- package/src/client/RemoteRoot.tsx +2 -0
- package/src/client/SearchView.tsx +8 -0
- package/src/client/api.ts +39 -10
- package/src/client/download.ts +212 -0
- package/src/client/downloads.ts +175 -0
- package/src/client/i18n.ts +23 -0
- package/src/client/vsc/vsc.css +124 -0
- package/src/protocol.ts +492 -474
- package/src/routes.ts +221 -2
- package/src/sftp.ts +213 -0
package/README.en.md
CHANGED
|
@@ -41,7 +41,8 @@ Requires DSH `0.2.2-alpha.2` or newer (`engines.dsh` enforces the range; **the t
|
|
|
41
41
|
baseline is `0.2.2-alpha.2`**). Older Hosts (`0.2.1-rc.2` generation) need plugin `0.9.3`: the
|
|
42
42
|
Remote preset of this version uses the `0.2.2-alpha.2` tool schema. `--profile web` selects which profile to install into —
|
|
43
43
|
this is a Web plugin, so it has to go into the profile your Web GUI runs from (`web` is
|
|
44
|
-
the common name; use your own profile's name).
|
|
44
|
+
the common name; use your own profile's name). Desktop uses the reserved `desktop`
|
|
45
|
+
profile instead — see [Desktop](#desktop-dsh-desktop) below.
|
|
45
46
|
|
|
46
47
|
**That one command is all it takes — no build scripts have to be approved.** The package
|
|
47
48
|
has no `prepare`/`postinstall` and no package in the dependency tree carries an install
|
|
@@ -52,6 +53,33 @@ with lifecycle scripts (`ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED` / `ERR_PNPM_IGNOR
|
|
|
52
53
|
it cannot be waived from the dependency side, only removed from the tree. Then restart
|
|
53
54
|
`dsh web` and open Settings → Remote hosts to configure.
|
|
54
55
|
|
|
56
|
+
### Desktop (DSH Desktop)
|
|
57
|
+
|
|
58
|
+
The Desktop app is an Electron shell around the complete dsh Web application, but it runs
|
|
59
|
+
in its own reserved profile, `desktop`, managed by the app itself: it does **not** share
|
|
60
|
+
`node_modules`, lockfiles, or plugin activation with the `web` profile of `dsh web`, so the
|
|
61
|
+
plugin has to be installed once for Desktop too. Sessions, settings, credentials and the
|
|
62
|
+
`dsh-remote.json` host configuration under `$DSH_HOME` are shared, so the host list needs
|
|
63
|
+
no re-setup.
|
|
64
|
+
|
|
65
|
+
Install either way:
|
|
66
|
+
|
|
67
|
+
1. **Desktop's Plugins page**: launch Desktop once → enter `dsh-remote-vs` (a pinned
|
|
68
|
+
version works too) on the Plugins page → install → **fully quit** Desktop (tray Quit /
|
|
69
|
+
application menu exit; the window close button only hides it) and reopen it.
|
|
70
|
+
2. **Desktop's bundled dsh command**: application menu → **Manage dsh Command… →
|
|
71
|
+
Install**, fully quit Desktop, run `dsh plugin --profile desktop add dsh-remote-vs`,
|
|
72
|
+
then reopen Desktop.
|
|
73
|
+
|
|
74
|
+
`desktop` is reserved for the Electron application: an **npm-installed `dsh` cannot manage
|
|
75
|
+
it** (it answers `profile "desktop" is managed exclusively by the Electron application`),
|
|
76
|
+
so one of the two routes above is required. The Desktop release version equals the DSH
|
|
77
|
+
runtime it bundles, and it must satisfy `engines.dsh` (`>=0.2.2-alpha.2`; check About);
|
|
78
|
+
older releases make the Plugins page refuse the install. Desktop opens no visible Web
|
|
79
|
+
port, but the plugin's HTTP routes and terminal socket are forwarded through Desktop's
|
|
80
|
+
Host (the terminal resolves its address from `__DSH_TRANSPORT__.streamBaseUrl`), so no
|
|
81
|
+
extra configuration is needed.
|
|
82
|
+
|
|
55
83
|
> The package carries the prebuilt helper (`vendor/dsh-remote-helpers/`, ~45 MB), so the
|
|
56
84
|
> first install is a large download — it is the **only** channel that delivers a helper
|
|
57
85
|
> (the official releases ship no helper executable), and dropping it would leave new hosts
|
|
@@ -63,7 +91,7 @@ it cannot be waived from the dependency side, only removed from the tree. Then r
|
|
|
63
91
|
|
|
64
92
|
| Capability | Notes |
|
|
65
93
|
| --- | --- |
|
|
66
|
-
| Explorer | Lazy tree + expand/collapse + hidden-files toggle; context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference; git status colours and folder roll-up marks |
|
|
94
|
+
| Explorer | Lazy tree + expand/collapse + hidden-files toggle; context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference / **download to local** (files stream to this machine; a directory **or a multi-selection** is archived on the remote host as one `.tar.gz` and streamed, so nothing is buffered in Host memory; a native **Save as** dialog picks the destination when the browser supports it, otherwise the browser's download folder; a bottom-right **download panel** shows live progress, allows cancel, and reports completion/failure; the search-hit menu offers it too); git status colours and folder roll-up marks |
|
|
67
95
|
| Search | Two modes: **file names** (remote `find`) and **contents** (remote `grep`). Content mode has a scope folder, `Aa` (case) / `ab_` (whole word) / `.*` (regex), results grouped per file with match highlights, and clicking a hit jumps to that line |
|
|
68
96
|
| Source control | **Repository-folder picker** (for workspaces whose git repository lives in a sub-folder: browse the remote tree, one-click jump to any repository discovered inside the workspace, type a relative or absolute path, and see which repository each folder resolves to); changes / staged / untracked / ignored buckets; **untracked directory rows expand on click**; per-file AND **per-hunk** stage / unstage / discard (behind a confirm) / commit; branches, remotes and stash panes; sync (fetch/pull/push), with **push refspec support** (Gerrit style `HEAD:refs/for/<branch>`; empty = plain `git push`, a non-empty value is remembered); fetch/pull/push/sync get a **live output panel** (server-sent events showing git/remote output, a running clock, **cancel** that kills the remote process group, and the full log for copying afterwards; an older Host without the streaming route falls back to the one-shot result) |
|
|
69
97
|
| Session change review | The **collapsible** panel above the composer: what THIS SESSION changed (one row per file, file-type icon, `+a −b` on the right); clicking a file opens it in the remote editor with **line shading plus character-level inline diff**, `n/N ↑↓` jumps between change points, and hovering a changed line offers **Undo this change** (remote `git apply -R`). See "Session change review" below |
|
package/README.md
CHANGED
|
@@ -37,7 +37,8 @@ dsh plugin --profile web add dsh-remote-vs
|
|
|
37
37
|
要求 DSH `0.2.2-alpha.2` 及以上(`engines.dsh` 门到底;**当前实测基线 `0.2.2-alpha.2`**)。
|
|
38
38
|
旧 Host(`0.2.1-rc.2` 一代)请用插件 `0.9.3`:新版的 Remote 预设用了 `0.2.2-alpha.2` 的工具 schema。
|
|
39
39
|
`--profile web` 指明装进哪个 profile —— 本插件是 Web 插件,
|
|
40
|
-
|
|
40
|
+
要装进 Web GUI 所用的那个(`web` 是常见命名,以你自己的 profile 名为准);
|
|
41
|
+
桌面端用的是保留 profile `desktop`,见下面「桌面端」。
|
|
41
42
|
|
|
42
43
|
**这一条命令就够了,不需要放行任何构建脚本**:包本身没有 `prepare`/`postinstall`,依赖树里也没有任何
|
|
43
44
|
带安装脚本的包(`ssh2` 是**打进产物**的,不是依赖);走仓库安装时还带着构建好的 `lib/`。
|
|
@@ -45,6 +46,27 @@ dsh plugin --profile web add dsh-remote-vs
|
|
|
45
46
|
「带安装脚本的依赖」的硬策略门(`ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED` / `ERR_PNPM_IGNORED_BUILDS`),
|
|
46
47
|
依赖侧无法豁免,只能从树里消掉。装完重启 `dsh web`,打开设置 → 远程主机开配。
|
|
47
48
|
|
|
49
|
+
### 桌面端(DSH Desktop)
|
|
50
|
+
|
|
51
|
+
桌面端是 Electron 壳 + 完整的 dsh Web 应用,但它跑在**独立的保留 profile `desktop`**
|
|
52
|
+
里(由桌面端自身管理):和 `dsh web` 的 `web` profile **不共享** `node_modules`、锁文件
|
|
53
|
+
和插件激活,需要在桌面端再装一次。`$DSH_HOME` 下的会话、设置、凭据和
|
|
54
|
+
`~/.dsh/dsh-remote.json` 主机配置是共享的,所以主机列表不用重配。
|
|
55
|
+
|
|
56
|
+
安装(二选一):
|
|
57
|
+
|
|
58
|
+
1. **桌面端「插件」页面**:完全启动桌面端一次 → 插件页输入 `dsh-remote-vs`(可钉版本)
|
|
59
|
+
安装 → **完全退出**桌面端(托盘 Quit / 菜单退出;点窗口 × 只是隐藏到托盘)再重开。
|
|
60
|
+
2. **桌面端自带的 dsh 命令**:应用菜单 → **Manage dsh Command… → Install**,然后
|
|
61
|
+
完全退出桌面端,执行 `dsh plugin --profile desktop add dsh-remote-vs`,再重开。
|
|
62
|
+
|
|
63
|
+
注意:`desktop` 是桌面端独占的保留 profile,**npm 全局安装的 `dsh` 不能管理它**
|
|
64
|
+
(会报 `profile "desktop" is managed exclusively by the Electron application`),
|
|
65
|
+
只能走上面两条路径。桌面端的版本号等于它捆绑的 DSH 运行时版本,同样要满足
|
|
66
|
+
`engines.dsh` 要求(`>=0.2.2-alpha.2`,关于面板可看);低于该版本时插件页会直接拒绝
|
|
67
|
+
安装。桌面端没有可见的 Web 端口,但本插件的 HTTP 路由与终端 socket 都经桌面端的
|
|
68
|
+
Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无需额外设置。
|
|
69
|
+
|
|
48
70
|
> 包内含预编译的 helper(`vendor/dsh-remote-helpers/`,约 45 MB),所以首次安装下载量偏大 ——
|
|
49
71
|
> 它是**唯一**的 helper 投放渠道(官方 Release 不带 helper 可执行文件),去掉它就没法给新主机部署。
|
|
50
72
|
|
|
@@ -54,7 +76,7 @@ dsh plugin --profile web add dsh-remote-vs
|
|
|
54
76
|
|
|
55
77
|
| 能力 | 说明 |
|
|
56
78
|
| --- | --- |
|
|
57
|
-
| 资源管理器 | 懒加载目录树 + 展开折叠 + 隐藏文件开关;右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@`
|
|
79
|
+
| 资源管理器 | 懒加载目录树 + 展开折叠 + 隐藏文件开关;右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@` 引用/**下载到本地**(文件流式下载、目录或**多选**在远端打包成 `.tar.gz` 流式下载,不占 Host 内存;浏览器支持时先弹**另存为**对话框选保存路径,不支持时落到默认下载目录;右下角**下载面板**显示实时进度、可取消,并提示完成/失败;搜索结果右键同样支持);git 状态色与文件夹聚合标记 |
|
|
58
80
|
| 搜索 | 两档:**文件名**(远端 `find`)与**内容**(远端 `grep`)。内容档带范围目录、`Aa`(大小写)/`ab_`(全字)/`.*`(正则)、结果按文件分组、命中高亮,点条目跳到该行 |
|
|
59
81
|
| 源代码管理 | **仓库目录选择器**(工作区里的 git 在子目录时用:浏览远端目录、一键跳到工作区内发现的仓库、手输相对/绝对路径,并逐目录提示会落在哪个仓库);变更/暂存/未跟踪/忽略分桶,**未跟踪目录行可点击展开**,逐文件与**逐 hunk** 暂存/还原、丢弃(带确认)、提交;分支/远程/stash 面板;同步(fetch/pull/push),**推送支持自定义 refspec**(如 Gerrit `HEAD:refs/for/<分支>`;留空 = 普通 `git push`,非空值会记住);fetch/pull/push/sync 有**实时输出面板**(SSE 流式显示 git/远端输出、运行计时、**可取消**(杀掉远端进程组)、完成后可复制完整输出;老 Host 无流式路由时自动回退到一次性结果) |
|
|
60
82
|
| 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+a −b`);点文件在远程编辑器里打开并画**整行着色 + 行内字符级差异**,右上角 `n/N ↑↓` 跳改动点,悬浮改动行可**撤销**这处改动(远端 `git apply -R`)。详见下文「会话改动审阅」 |
|