dsh-code-server-app 0.2.12 → 0.2.13

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 CHANGED
@@ -209,9 +209,12 @@ state preserved (no full reload). Full evidence and probe scripts: `docs/analysi
209
209
  "Install the plugin (script-free install; code-server bundled)" below — `pnpm install` → `pnpm run build:client` →
210
210
  `pnpm run vendor:vscode` → `pnpm pack` + `dsh plugin --profile web add`.
211
211
 
212
- > Verified locally (BM: Windows 11 ARM64): `code-server@4.136.2` (with Code 1.136.1) bundled in the plugin,
213
- > placed offline at activation VS Code internal deps installed started → healthz 200 →
214
- > cwd switch restart while running stopped fully recycled.
212
+ > Verified locally (BM: Windows 11 ARM64): the whole tree/dependency chain is supplied by per-platform
213
+ > sub-packages the tree package `@jinsiyu/dshcs-vscode-server` (currently 4.137.0, a 50.8 MB tarball),
214
+ > the pure-JS inner dependencies directly in the plugin's `dependencies`, and 16 prebuilt native modules
215
+ > re-exported under their original names by the aggregator `@jinsiyu/dsh-code-server-runtime-win32-<arch>`
216
+ > (picked by os/cpu) → healthz 200 → stopped → fully recycled.
217
+ > (The 0.1.37-era "one big platform package" layout is gone — see "Upgrading the VS Code tree" below.)
215
218
 
216
219
  ## Packaging (how to build the tarball)
217
220
 
@@ -249,7 +252,7 @@ pnpm run promote -- <version>
249
252
  | Goal | Command |
250
253
  |---|---|
251
254
  | **Build from the latest upstream release** | `pnpm run vendor:latest` (= `--force`): pulls `code-server@latest`'s tree into `vendor/vscode`; afterwards you **must** re-run `repack:build` and republish every sub-package |
252
- | **Pin a version** | `pnpm run vendor:vscode -- --version 4.136.2` |
255
+ | **Pin a version** | `pnpm run vendor:vscode -- --version 4.137.0` |
253
256
  | **Snapshot from an existing tree** | `pnpm run vendor:vscode -- --from <code-server dir>` (seconds) |
254
257
  | **Rebuild every sub-package** | `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack` (without `--from` it npm-installs and compiles the source tree itself — slow) |
255
258
  | **Rebuild only the tree/aggregator packages** | `node scripts/vendor-repacks.mjs --reuse --target win32-arm64,win32-x64 --pack` (reuses the natives already in `repack/build`) |
@@ -381,8 +384,17 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
381
384
  ### Upgrading the VS Code tree (upstream = a code-server release)
382
385
 
383
386
  - **The version is decided at pack time**: `pnpm run vendor:latest` (= `--force`) pulls the tree of the npm **latest**
384
- release; or use `pnpm run vendor:vscode -- --version 4.136.2` / `DSHCS_CODE_SERVER_VERSION`.
387
+ release; or use `pnpm run vendor:vscode -- --version 4.137.0` / `DSHCS_CODE_SERVER_VERSION`.
385
388
  With an existing `vendor/vscode`, a plain `pnpm pack` never upgrades (it is a no-op).
389
+ **Source-tree precedence (fixed in 0.2.13)**: an explicit `--from` uses that tree, while an explicit
390
+ `--force`/`--version` now **always goes to the registry** — before the fix a local source tree won
391
+ (`defaultSourceTree()` hit `vendor/code-server` or an installed profile tree first), so the documented
392
+ "`vendor:latest` takes latest from the registry" silently kept the old version (hit while upgrading to 0.2.13:
393
+ the bundled tree stayed at 4.136.2). A run with neither flag still reuses a local tree to save the download.
394
+ - **Sync the inner dependency pins when the tree changes**: in `--reuse` mode the pure-JS install set is read from
395
+ the **plugin's package.json**, so update those pins from the new tree's `lib/vscode/package.json` first
396
+ (this time: 10 `@xterm/*` beta bumps). The rule is "only move a pin that no longer satisfies the new range",
397
+ which keeps already-newer pins such as `cookie`/`ws`/`tar`/`node-addon-api` from being downgraded.
386
398
  - **Check first**: `pnpm run vendor:check` prints the bundled version / upstream latest.
387
399
  - **A version bump means rebuilding and republishing the sub-packages** (all with the same script):
388
400
  1. `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack` → the new tree package
@@ -393,7 +405,7 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
393
405
  - `productPath` (`<quality>-<commit>`, part of the client WebSocket path) is **computed from `lib/vscode/product.json`**,
394
406
  so upgrading the tree needs no code change — but the routes are registered at activation, so restart `dsh web` afterwards.
395
407
  - **No runtime auto-upgrade anymore**: nothing fetches latest at startup; the version is fully determined by the bundled artifact.
396
- - Bundled locally right now: the tree of `code-server@4.136.2` (VS Code 1.136.1, `productPath=stable-8d5f383f…`).
408
+ - Bundled locally right now: the tree of `code-server@4.137.0` (VS Code 1.137.0, `productPath=stable-b11dabda…`).
397
409
 
398
410
  ### Compatibility with the old install locations
399
411
 
package/README.md CHANGED
@@ -205,10 +205,11 @@ DSH 用**资源地址**命名文件,`openFile` 只负责把地址交给右侧栏
205
205
  "打包(如何出包)"执行 `pnpm install` → `pnpm run build:client` → `pnpm run vendor:vscode` →
206
206
  (发布预编译原生包)→ `pnpm pack` + `dsh plugin --profile web add` 即可。
207
207
 
208
- > 本机(BM: Windows 11 ARM64)实测:`code-server@4.136.2`(with Code 1.136.1)由平台子包
209
- > `@jinsiyu/dshcs-code-server-win32-arm64` 提供(主包 0.1.37 105KB),
210
- > 35 个纯 JS 内部依赖 + 16 个预编译原生包(经平台聚合包装回原名)由 pnpm 一条命令装好 →
211
- > healthz 200运行中切换 cwd 重启 → 停止 → 回收全链路验证。
208
+ > 本机(BM: Windows 11 ARM64)实测:树/依赖全链路是"平台子包 + 聚合包"供给 ——
209
+ > 树包 `@jinsiyu/dshcs-vscode-server`(当前 4.137.0,50.8 MB tgz)、纯 JS 内部依赖直接进插件
210
+ > `dependencies`、16 个预编译原生包经平台聚合包 `@jinsiyu/dsh-code-server-runtime-win32-<arch>`
211
+ > (按 os/cpu 自动选)装回原名 healthz 200 → 停止 → 回收全链路验证。
212
+ > (0.1.37 时代的主包形态已废弃,见下方"升级 VS Code 树"。)
212
213
 
213
214
  ## 打包(如何出包)
214
215
 
@@ -246,7 +247,7 @@ pnpm run promote -- <version>
246
247
  | 目标 | 命令 |
247
248
  |---|---|
248
249
  | **打最新版(上游 code-server 发行版)** | `pnpm run vendor:latest`(= `--force`):从 registry 取 `code-server@latest` 的树到 `vendor/vscode`;之后**必须**重跑 `repack:build` 并重发全部子包 |
249
- | **指定版本** | `pnpm run vendor:vscode -- --version 4.136.2` |
250
+ | **指定版本** | `pnpm run vendor:vscode -- --version 4.137.0` |
250
251
  | **从已装好的树快照** | `pnpm run vendor:vscode -- --from <code-server 目录>`(秒级) |
251
252
  | **开发期让树可直接跑** | `pnpm run vendor:vscode -- --dev-links`(额外把 `lib/vscode/node_modules` 用 junction 补上) |
252
253
  | **完整重打子包** | `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack`(不给 `--from` 会自动 npm install 解包 + 编译,耗时) |
@@ -384,8 +385,15 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
384
385
  ### 升级 VS Code 树(上游 = code-server 发行版)
385
386
 
386
387
  - **打包期决定版本**:`pnpm run vendor:latest`(= `--force`)取 npm **最新版 code-server** 的树并重建 `vendor/vscode`;
387
- 也可 `pnpm run vendor:vscode -- --version 4.136.2` 或设 `DSHCS_CODE_SERVER_VERSION`。
388
+ 也可 `pnpm run vendor:vscode -- --version 4.137.0` 或设 `DSHCS_CODE_SERVER_VERSION`。
388
389
  已有 `vendor/vscode` 时,不带 `--force`/`--version` 不会升级(日常 `pnpm pack` 是 no-op)。
390
+ **源树优先级(0.2.13 修正)**:显式 `--from` 用给定树;显式 `--force`/`--version` **一定走 registry**
391
+ —— 修正前它们会被"本机已有源树"抢走(`defaultSourceTree()` 先命中 `vendor/code-server` 或 profile 里的旧树),
392
+ 于是 README 写的"`vendor:latest` 从 registry 取 latest"实际拿不到新版本(0.2.13 升级时踩到:内置树一直停在 4.136.2);
393
+ 只有既没 `--force` 也没 `--version` 时才复用本机源树省一次下载。
394
+ - **换版本时同步树内依赖 pin**:`--reuse` 模式下纯 JS 直装集是从**插件 package.json 现读**的,
395
+ 所以要先按新树的 `lib/vscode/package.json` 更新 pin(本次 10 个 `@xterm/*` 的 beta 跳号;
396
+ 判定规则是"现有 pin 不满足新范围才动",避免把 `cookie`/`ws`/`tar`/`node-addon-api` 这类已有更高版本降级)。
389
397
  - **先查再升**:`pnpm run vendor:check` 打印「内置版本 / 上游 latest」。
390
398
  - **换版本后重新出子包并发布**(全部由同一个脚本):
391
399
  1. `pnpm run repack:build -- --target win32-arm64,win32-x64 --pack` → 新的树包
@@ -395,7 +403,7 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
395
403
  - `productPath`(`<quality>-<commit>`,客户端 WS 路径的组成)**从 `lib/vscode/product.json` 现算**,
396
404
  升级树后无需改代码 —— 但也意味着切版本后必须重启 dsh web(路由在激活期注册)。
397
405
  - **不再有运行期自动升级**:不会在启动时联网取 latest;版本完全由内置产物决定。
398
- - 本机当前内置:`code-server@4.136.2` 的树(VS Code 1.136.1,`productPath=stable-8d5f383f…`)。
406
+ - 本机当前内置:`code-server@4.137.0` 的树(VS Code 1.137.0,`productPath=stable-b11dabda…`)。
399
407
 
400
408
  ### 兼容旧安装位
401
409
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-code-server-app",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs). The tab claims DSH file addresses (dsh-resource://file/**) by file type (setting claimExtensions), so the product's own produced-file chips, delivered-file previews and inline prose mentions open in the workbench. The IDE is a resident surface moved with Element.moveBefore instead of being remounted, so switching sidebar tabs no longer reloads it. Opening the tab switches the right sidebar to fullscreen by default (setting fullscreenOnOpen). Following a workspace switch is lightweight: the workbench re-navigates with the new ?folder= and the IDE process is not restarted (since 0.2.12). Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions get a single upgrade notice on the settings page and no other UI. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). No code-server Node layer, no argon2, no C++ toolchain.",
5
5
  "homepage": "https://github.com/jinsiyu/dsh-code-server-app",
6
6
  "repository": {
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "license": "MIT",
64
64
  "dependencies": {
65
- "@jinsiyu/dshcs-vscode-server": "4.136.2",
65
+ "@jinsiyu/dshcs-vscode-server": "4.137.0",
66
66
  "@microsoft/1ds-core-js": "3.2.13",
67
67
  "@microsoft/1ds-post-js": "3.2.13",
68
68
  "@vscode/iconv-lite-umd": "0.7.1",
@@ -70,16 +70,16 @@
70
70
  "@vscode/sandbox-runtime": "0.0.1",
71
71
  "@vscode/tree-sitter-wasm": "0.3.1",
72
72
  "@vscode/vscode-languagedetection": "1.0.23",
73
- "@xterm/addon-clipboard": "0.3.0-beta.301",
74
- "@xterm/addon-image": "0.10.0-beta.299",
75
- "@xterm/addon-ligatures": "0.11.0-beta.299",
76
- "@xterm/addon-progress": "0.3.0-beta.299",
77
- "@xterm/addon-search": "0.17.0-beta.299",
78
- "@xterm/addon-serialize": "0.15.0-beta.299",
79
- "@xterm/addon-unicode11": "0.10.0-beta.299",
80
- "@xterm/addon-webgl": "0.20.0-beta.298",
81
- "@xterm/headless": "6.1.0-beta.301",
82
- "@xterm/xterm": "6.1.0-beta.302",
73
+ "@xterm/addon-clipboard": "0.3.0-beta.302",
74
+ "@xterm/addon-image": "0.10.0-beta.300",
75
+ "@xterm/addon-ligatures": "0.11.0-beta.300",
76
+ "@xterm/addon-progress": "0.3.0-beta.300",
77
+ "@xterm/addon-search": "0.17.0-beta.300",
78
+ "@xterm/addon-serialize": "0.15.0-beta.300",
79
+ "@xterm/addon-unicode11": "0.10.0-beta.300",
80
+ "@xterm/addon-webgl": "0.20.0-beta.299",
81
+ "@xterm/headless": "6.1.0-beta.302",
82
+ "@xterm/xterm": "6.1.0-beta.303",
83
83
  "cookie": "0.7.2",
84
84
  "detect-libc": "2.1.2",
85
85
  "http-proxy-agent": "7.0.0",
@@ -100,8 +100,8 @@
100
100
  "zod": "4.4.3"
101
101
  },
102
102
  "optionalDependencies": {
103
- "@jinsiyu/dsh-code-server-runtime-win32-arm64": "^0.2.0",
104
- "@jinsiyu/dsh-code-server-runtime-win32-x64": "^0.2.0"
103
+ "@jinsiyu/dsh-code-server-runtime-win32-arm64": "^0.2.13",
104
+ "@jinsiyu/dsh-code-server-runtime-win32-x64": "^0.2.13"
105
105
  },
106
106
  "scripts": {
107
107
  "vendor:vscode": "node scripts/vendor-vscode-server.mjs",
@@ -200,14 +200,19 @@ async function main() {
200
200
  }
201
201
 
202
202
  const skip = existing !== null && !FORCE && FROM === null && PINNED === null;
203
+ // 源树优先级(0.2.13 修正):显式 `--from` 用给定树;显式 `--force`/`--version` 表示"就是要换版本"
204
+ // → 只认 registry;其余情况才复用本机已有源树(省一次 53MB 下载)。
205
+ // 修正前:`--force`/`--version` 也会被本机源树抢先,导致 README 写的
206
+ // 「vendor:latest(= --force)从 registry 取 latest」实际拿不到新版本(本次升级踩到)。
207
+ const localSource = FROM === null && !FORCE && PINNED === null ? defaultSourceTree() : null;
203
208
  let codeServerVersion = existing;
204
209
  let sourceKind = 'registry';
205
210
  let sourceTree = null;
206
211
 
207
212
  if (skip) {
208
213
  console.log(`[vendor] vendor/vscode 已存在(code-server@${existing});跳过(用 --force 重建)`);
209
- } else if (FROM !== null || (sourceTree = defaultSourceTree()) !== null) {
210
- const src = FROM ?? sourceTree;
214
+ } else if (FROM !== null || localSource !== null) {
215
+ const src = FROM ?? localSource;
211
216
  codeServerVersion = readJson(join(src, 'package.json'))?.version ?? null;
212
217
  if (codeServerVersion === null) throw new Error(`--from ${src} 不是一棵 code-server 树`);
213
218
  console.log(`[vendor] 源树 ${src}(code-server@${codeServerVersion})→ vendor/vscode/`);
@@ -1,12 +1,12 @@
1
1
  {
2
- "codeServerVersion": "4.136.2",
3
- "vscodeVersion": "1.136.1",
4
- "productPath": "stable-8d5f383f301ca20681f5b6606b8207d9dc87bdd8",
2
+ "codeServerVersion": "4.137.0",
3
+ "vscodeVersion": "1.137.0",
4
+ "productPath": "stable-b11dabdaca0d3369986975be285db92c8795cea5",
5
5
  "layout": "vscode-only",
6
- "preparedAt": "2026-09-11T13:53:46.670Z",
6
+ "preparedAt": "2026-09-11T14:13:32.827Z",
7
7
  "source": "registry",
8
8
  "node": "v24.13.1",
9
9
  "platform": "win32",
10
10
  "arch": "arm64",
11
- "sizeMB": 197.2
11
+ "sizeMB": 197.9
12
12
  }