dsh-profile-config-sync 0.6.45 → 0.6.47
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 +10 -7
- package/README.md +17 -14
- package/client.js +32 -117
- package/docs/CHANGELOG.md +6 -4
- package/index.js +384 -150
- package/package.json +3 -2
- package/release-notes.json +6 -0
- package/runtime/install-plugin.ps1 +60 -1
- package/runtime/post-exit.ps1 +80 -1
package/README.en.md
CHANGED
|
@@ -32,7 +32,7 @@ Based on [QcWyGm/dsh-config-sync-plugin](https://github.com/QcWyGm/dsh-config-sy
|
|
|
32
32
|
- **Panel health check**: local / cloud badges (cloud re-checked every two minutes), version contract, bundle, dependencies, backup snapshots, last sync, and a to-do list with jump links.
|
|
33
33
|
- **Safety boundaries**: browser profiles and credential stores are blocked at three independent layers (capture, upload, engine); three per-file size tiers (>100 MB skipped at capture, ≥95 MB dropped before commit, 50–95 MB warn only); both sides of a conflict are kept; path-traversal guards.
|
|
34
34
|
- **Pending counts match the executor**: 12 groups on Windows, only the four groups the engine really syncs on macOS/Linux.
|
|
35
|
-
- **Self-update**:
|
|
35
|
+
- **Self-update**: checks the npm registry only (never GitHub) and downloads / installs from the panel.
|
|
36
36
|
|
|
37
37
|
**Four keywords**: **configure** · **back up** · **sync** · **restore**.
|
|
38
38
|
|
|
@@ -44,11 +44,11 @@ Package name **`dsh-profile-config-sync`** (the npm package `dsh-config-sync` is
|
|
|
44
44
|
|
|
45
45
|
| Method | Entry |
|
|
46
46
|
|---|---|
|
|
47
|
-
| npm | `npm i dsh-profile-config-sync` — **
|
|
48
|
-
| Plugin market | Search “Config Backup & Sync” in the client's plugin market
|
|
49
|
-
| Offline tgz | `pnpm add ./dsh-profile-config-sync-0.6.
|
|
47
|
+
| npm | `npm i dsh-profile-config-sync` — **the same version the panel self-update checks**; the `latest` tag points at it |
|
|
48
|
+
| Plugin market | Search “Config Backup & Sync” in the client's plugin market — `market-index.json` registers `source.type: npm`, so the online registry version is what gets installed |
|
|
49
|
+
| Offline tgz | `pnpm add ./dsh-profile-config-sync-0.6.46.tgz` |
|
|
50
50
|
|
|
51
|
-
**Release status**: the latest release is [`v0.6.
|
|
51
|
+
**Release status**: the latest release is [`v0.6.46`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.46) (2026-11-27); the repository is public and the npm package publishes alongside (`npm i dsh-profile-config-sync`).
|
|
52
52
|
|
|
53
53
|
## HTTP route admission
|
|
54
54
|
|
|
@@ -175,9 +175,12 @@ Details (process detection, lock file, environment cleanup, exit codes): [docs/R
|
|
|
175
175
|
|
|
176
176
|
## Self-update
|
|
177
177
|
|
|
178
|
-
The panel card shows local
|
|
178
|
+
The panel card shows the local version and the version on **npm only — GitHub is never checked**. Status is one of: up to date / update available / downloaded (in `~\.dsh\update-staging\`) / installed pending restart / check failed.
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
- The version comes from npm's `dist-tags.latest`; the download URL and checksums come from that version's document (`dist.tarball` / `dist.integrity` / `dist.shasum`); release notes come from `version.json` inside the package. The old GitHub manifest sources (`gh-proxy` / `ghfast` / raw / API) are retired.
|
|
181
|
+
- **The checksum comes from the same source as the artifact.** The npm tarball is not the same byte stream as the GitHub release asset — measured: `npm pack` is byte-identical to the registry tarball, but both differ from the `pnpm pack` asset. Verifying an npm download against the packaging-time sha256 can therefore never succeed; the registry's own `integrity` (sha512 SRI) / `shasum` (sha1) is used instead.
|
|
182
|
+
- The registry can be overridden (`updateRegistry` setting, or the `DSH_CONFIG_SYNC_NPM_REGISTRY` env var) — still npm-only, just a different registry.
|
|
183
|
+
- Download and install are separate steps, and installing quits the client, backs up the old directory, overwrites and relaunches once.
|
|
181
184
|
|
|
182
185
|
## Upstream & license
|
|
183
186
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](#同步内容勾选)
|
|
9
9
|
[](#同步内容勾选)
|
|
10
|
-
[](#自检)
|
|
11
11
|
|
|
12
12
|
中文 | [English](README.en.md)
|
|
13
13
|
|
|
@@ -34,7 +34,7 @@ DSH 的配置散在 `~/.dsh` 的十几处:profile、全局提示、Skills、Ag
|
|
|
34
34
|
- **面板体检**:本机 / 云端双徽标(云端每 2 分钟复查)、版本契约、bundle、依赖、备份快照、上次同步、待办跳转。
|
|
35
35
|
- **安全边界**:浏览器剖面与凭据库在抓取、上传、引擎三处独立硬拦;单文件上限三档(>100 MB 抓取即跳过、≥95 MB 提交前剔除、50–95 MB 只警告);冲突两侧留副本;路径遍历防护。
|
|
36
36
|
- **待推送口径跟执行体一致**:Windows 按 12 组统计,macOS / Linux 只统计引擎真会同步的 4 组,不虚报。
|
|
37
|
-
-
|
|
37
|
+
- **自更新**:只查 npm registry(不看 GitHub),面板内检查、下载、安装。
|
|
38
38
|
|
|
39
39
|
**四个关键词**:**配置**(12 组按需抓取)· **备份**(仓库即快照,Git 有历史)· **同步**(一台推、一台拉)· **还原**(铺回本机,可回滚)。
|
|
40
40
|
|
|
@@ -62,10 +62,10 @@ DSH 的配置散在 `~/.dsh` 的十几处:profile、全局提示、Skills、Ag
|
|
|
62
62
|
| 方式 | 命令 / 入口 |
|
|
63
63
|
|---|---|
|
|
64
64
|
| npm | `npm i dsh-profile-config-sync`(**已发布到与 GitHub Release 相同的版本**,`latest` 标签指的就是它) |
|
|
65
|
-
| 插件市场 | 客户端「插件市场 →
|
|
66
|
-
| 离线 tgz | `pnpm add ./dsh-profile-config-sync-0.6.
|
|
65
|
+
| 插件市场 | 客户端「插件市场 → 发现」搜「配置备份与同步」(`market-index.json` 登记的 `source.type` 是 `npm`,装的就是 registry 上的在线版) |
|
|
66
|
+
| 离线 tgz | `pnpm add ./dsh-profile-config-sync-0.6.47.tgz`(内网机器用这个) |
|
|
67
67
|
|
|
68
|
-
**发布状态**:最新 Release 是 [`v0.6.
|
|
68
|
+
**发布状态**:最新 Release 是 [`v0.6.46`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.46)(2026-11-27),仓库已公开;npm 上的同名包同步发布(`npm i dsh-profile-config-sync`)。
|
|
69
69
|
|
|
70
70
|
要正式发布时(需要有权限的账号,我不会擅自 push):
|
|
71
71
|
|
|
@@ -74,7 +74,7 @@ gh release create v<版本> dsh-profile-config-sync-<版本>.tgz \
|
|
|
74
74
|
--repo huanyu-a/dsh-profile-config-sync --title "v<版本>" --notes-file <发布说明.md>
|
|
75
75
|
# tag 与包名必须是同一个版本号,别像旧文档那样写成 v0.6.39 配 0.6.44 的包
|
|
76
76
|
git tag -a v<版本> -m "v<版本>" && git push origin v<版本>
|
|
77
|
-
# 发布后把仓库根的 version.json
|
|
77
|
+
# 发布后把仓库根的 version.json 更新到新版本并推上去:它随 npm 包一起发布(files 里有它),面板读的是包内那份
|
|
78
78
|
# (version.json 不在 npm 包里,files 字段没有它)
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -188,7 +188,7 @@ pwsh -File runtime\sync.ps1 pull -RepoRoot <仓库目录> -DshHome <~\.dsh> -A
|
|
|
188
188
|
| 认证 | SSH 填私钥路径;HTTPS 用 Git 凭据管理器,插件不存密码 |
|
|
189
189
|
| 单文件上限 | 三档:源头 >100 MB 抓取时跳过、≥95 MB 提交前剔除、50–95 MB 只警告 |
|
|
190
190
|
|
|
191
|
-
私有库:优先 SSH
|
|
191
|
+
私有库:优先 SSH 地址。插件**自身更新**只查 npm,与本机配置的 Git 远端无关,所以换成私有库也不影响自更新(也不用再为它配令牌)。
|
|
192
192
|
|
|
193
193
|
## 有文件没同步上时
|
|
194
194
|
|
|
@@ -363,19 +363,20 @@ push 失败时会**按真实远端地址归因**:https 走 `ls-remote` 检查
|
|
|
363
363
|
|
|
364
364
|
## 插件自更新
|
|
365
365
|
|
|
366
|
-
|
|
366
|
+
面板「插件更新」卡:**只查 npm registry,不看 GitHub**。挂载查一次、之后每 30 分钟复查。
|
|
367
367
|
|
|
368
368
|
| 状态 | 含义 |
|
|
369
369
|
|---|---|
|
|
370
|
-
| 绿色「已是最新」 | 本地版本 ≥
|
|
371
|
-
| 橙色「有新版本」 |
|
|
370
|
+
| 绿色「已是最新」 | 本地版本 ≥ npm 上的 `latest` |
|
|
371
|
+
| 橙色「有新版本」 | npm 上更大,附说明与「下载更新」 |
|
|
372
372
|
| 橙色「已下载,待安装」 | 包在 `~\.dsh\update-staging\`,插件目录一字节没改,点「重启并安装」生效 |
|
|
373
373
|
| 橙色「已安装,待重启」 | 运行中装过但没重启 |
|
|
374
|
-
| 红色「检查失败」 |
|
|
374
|
+
| 红色「检查失败」 | npm 读不到,附「检查更新」列出失败原因 |
|
|
375
375
|
|
|
376
|
-
-
|
|
377
|
-
-
|
|
378
|
-
-
|
|
376
|
+
- **只查 npm**:版本取 `dist-tags.latest`(几十字节),下载地址与校验值取该版本单版本文档的 `dist.tarball` / `dist.integrity` / `dist.shasum`,发布说明取包内 `version.json`。GitHub 的 raw / API / gh-proxy / ghfast 四条清单源已整体退休。
|
|
377
|
+
- **校验值与被校验物同源**:npm 上的 tarball 与 GitHub release 资产**不是同一份字节流**(实测 `npm pack` 与 registry 上的 tarball 逐字节一致,但与 `pnpm pack` 的资产不同)。所以校验用 registry 自己给的 `integrity`(sha512 SRI)/ `shasum`(sha1),不用打包时算的 sha256 —— 后者对 npm 下载必然对不上。
|
|
378
|
+
- **registry 可换镜像**:设置 `updateRegistry` 或环境变量 `DSH_CONFIG_SYNC_NPM_REGISTRY`。换了也仍然只查 npm(只是换了个 registry)。
|
|
379
|
+
- **下载与安装分开**:下载只落 `update-staging` 并校验,宿主不碰插件目录;点安装才退出 → 备份旧目录 → 覆盖 → 自动拉起,全程只重启一次(运行中覆盖会让宿主把面板卸载掉,0.3.4–0.3.6 踩过)。
|
|
379
380
|
|
|
380
381
|
<a id="api"></a>
|
|
381
382
|
|
|
@@ -393,6 +394,8 @@ push 失败时会**按真实远端地址归因**:https 走 `ls-remote` 检查
|
|
|
393
394
|
|
|
394
395
|
| 日期 | 版本 | 要点 |
|
|
395
396
|
|---|---|---|
|
|
397
|
+
| 2026-11-27 | 0.6.47 | **更新只查 npm + 在线安装**:更新检查整体换成读 npm registry(dist-tags 定版本、单版本文档取 dist.tarball / dist.integrity、说明取包内 version.json),GitHub 的 raw / API / gh-proxy / ghfast 四条清单源与「更新清单 / 更新令牌」两项设置一起退休;市场索引 `source.type` 从 git 改成 npm,装的就是在线版。顺带修两个真 bug:① 旧「清单记 pnpm pack 的 sha256、npm 当兜底下载」在校验那步必然失败(实测 npm pack 与 registry 上的 tarball 逐字节一致,但与 pnpm pack 的资产不同),现在校验值取自 registry 自己;② 市场索引 publishTimestamp 写成毫秒而非 Unix 秒,DSH 的 parseMarketIndex 会拒掉整个索引——插件市场里此前根本读不出这个插件。功能代码改动集中在更新链路,同步/还原逻辑未动。验收:64 套隔离夹具共 1064 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
398
|
+
| 2026-11-27 | 0.6.46 | **徽章数字接回计数**:0.6.41 手工写死的「64 套 · 1065 条」两版没再动,与同页验收声明(1061)打脸;现在 finalize 从 `last-count.json` 直接生成,口径与验收声明一模一样(只算非元套件:64 套 · 1061 条),人手不再参与。功能代码无改动。验收:64 套隔离夹具共 1061 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
396
399
|
| 2026-11-27 | 0.6.45 | **文档对齐现实**:① 中英 README 去掉「npm 上只到 0.4.1」的陈旧说法(改为「与 GitHub Release 同版本」,`dist-tags.latest` 即它);② 发布命令块改成同版本占位,修掉「v0.6.39 配 0.6.44 的包」的自相矛盾;③ 写清 `version.json` 不在 npm 包里、面板更新检查读的是仓库里那份。功能代码无改动。验收:64 套隔离夹具共 1061 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
397
400
|
| 2026-11-27 | 0.6.44 | **一致性**:历史字段 `dsh.engines.dsh` 对齐顶层 `>=0.2.2-rc.5`;README 中英去掉写死的 10297,改 `127.0.0.1:<端口>`(以 `DSH_WEB_URL` 为准);审计补 2 条断言。验收:64 套隔离夹具共 1061 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
398
401
|
| 2026-11-27 | 0.6.43 | **修正下限**:0.6.42 的 `engines.dsh: ">=0.2.3"` 会在 0.2.2-rc.5 运行时上被 DSH 按兼容性规则拒绝加载,改为 `">=0.2.2-rc.5"`(准入接口在该版本已存在,实测假插件复现拒绝流程);准入代码不变。验收:64 套隔离夹具共 1059 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
package/client.js
CHANGED
|
@@ -2742,10 +2742,8 @@ window.__ModuleLoader__.load({
|
|
|
2742
2742
|
const [toast, setToast] = react.useState('')
|
|
2743
2743
|
const [upd, setUpd] = react.useState(null)
|
|
2744
2744
|
const [updBusy, setUpdBusy] = react.useState(false)
|
|
2745
|
-
//
|
|
2746
|
-
|
|
2747
|
-
const [updManifest, setUpdManifest] = react.useState('')
|
|
2748
|
-
const [updToken, setUpdToken] = react.useState('')
|
|
2745
|
+
// 0.6.47:更新源固定是 npm,「更新清单地址 / 更新令牌」两项配置撤掉,
|
|
2746
|
+
// 所以这里不再有编辑态与对应输入框。旧的本机设置仍留在配置文件里,不主动删。
|
|
2749
2747
|
const [updMsg, setUpdMsg] = react.useState('')
|
|
2750
2748
|
const [updErr, setUpdErr] = react.useState('')
|
|
2751
2749
|
// 「本机路径」平时不占版面:只在标题行按钮被点开时才渲染;按钮本身在
|
|
@@ -2910,40 +2908,9 @@ window.__ModuleLoader__.load({
|
|
|
2910
2908
|
setUpdBusy(false)
|
|
2911
2909
|
}
|
|
2912
2910
|
}
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
setUpdManifest(cfg.manifestUrlIsDefault ? '' : (cfg.manifestUrl || ''))
|
|
2917
|
-
setUpdToken('')
|
|
2918
|
-
setUpdErr('')
|
|
2919
|
-
setUpdMsg('')
|
|
2920
|
-
setUpdEdit(true)
|
|
2921
|
-
}
|
|
2922
|
-
const cancelEditUpd = () => { setUpdEdit(false); setUpdErr(''); setUpdToken('') }
|
|
2923
|
-
const saveUpdConfig = async () => {
|
|
2924
|
-
setUpdBusy(true); setUpdErr(''); setUpdMsg('')
|
|
2925
|
-
try {
|
|
2926
|
-
const payload = { updateManifestUrl: updManifest.trim() }
|
|
2927
|
-
if (updToken.trim()) payload.updateToken = updToken.trim()
|
|
2928
|
-
await callSettings(payload)
|
|
2929
|
-
setUpdEdit(false)
|
|
2930
|
-
setUpdToken('')
|
|
2931
|
-
setUpdMsg(M('已保存', 'Saved'))
|
|
2932
|
-
setUpd(await callUpdate({ action: 'check' }))
|
|
2933
|
-
} catch (e) {
|
|
2934
|
-
setUpdErr(String((e && e.message) || e))
|
|
2935
|
-
} finally { setUpdBusy(false) }
|
|
2936
|
-
}
|
|
2937
|
-
const clearUpdToken = async () => {
|
|
2938
|
-
setUpdBusy(true); setUpdErr(''); setUpdMsg('')
|
|
2939
|
-
try {
|
|
2940
|
-
await callSettings({ clearUpdateToken: true })
|
|
2941
|
-
setUpdMsg(M('已清除本机保存的更新令牌', 'Cleared the update token stored on this machine'))
|
|
2942
|
-
setUpd(await callUpdate({ action: 'check' }))
|
|
2943
|
-
} catch (e) {
|
|
2944
|
-
setUpdErr(String((e && e.message) || e))
|
|
2945
|
-
} finally { setUpdBusy(false) }
|
|
2946
|
-
}
|
|
2911
|
+
// 0.6.47:更新源固定是 npm,不再有「更新清单地址 / 更新令牌」可配。
|
|
2912
|
+
// 旧的设置项仍留在本机配置文件里(不主动删用户填过的东西),但更新检查不读它们。
|
|
2913
|
+
// 需要换源时用 npm 自己的 registry 配置(.npmrc),不在插件里另开一套。
|
|
2947
2914
|
|
|
2948
2915
|
// 打开面板就自动检查一次云端,之后每 2 分钟复查一次(只读,不改仓库、不动 profile)
|
|
2949
2916
|
react.useEffect(() => {
|
|
@@ -3131,8 +3098,8 @@ window.__ModuleLoader__.load({
|
|
|
3131
3098
|
`Current ${local} → can update to ${remote}${notesText ? ` · ${notesText}` : ''}`,
|
|
3132
3099
|
)
|
|
3133
3100
|
: (failed
|
|
3134
|
-
? M(
|
|
3135
|
-
: (u.checkedAt ? M(`当前 ${local}
|
|
3101
|
+
? M(`读不到 npm 上的版本信息:${u.error || '未知原因'}${sourceNote}`, `Cannot read the version info from npm: ${u.error || 'unknown reason'}${sourceNote}`)
|
|
3102
|
+
: (u.checkedAt ? M(`当前 ${local},npm 上没有更新的版本`, `Current ${local}; no newer version on npm`) : M('正在读 npm 上的版本…', 'Reading the version list from npm…')))))
|
|
3136
3103
|
return h('div', { style: S.card },
|
|
3137
3104
|
h('div', { style: S.cardHead },
|
|
3138
3105
|
h('div', { style: S.cardTitle }, M('插件更新', 'Plugin update')),
|
|
@@ -3154,90 +3121,38 @@ window.__ModuleLoader__.load({
|
|
|
3154
3121
|
onClick: downloadUpdate,
|
|
3155
3122
|
}, updBusy ? M('下载中…', 'Downloading…') : M(`下载更新 ${remote}`, `Download ${remote}`)) : null)),
|
|
3156
3123
|
h('button', { type: 'button', style: S.btn, disabled: updBusy, onClick: checkUpdateNow }, M('检查更新', 'Check for updates')),
|
|
3157
|
-
updEdit
|
|
3158
|
-
? null
|
|
3159
|
-
: h('button', { type: 'button', style: S.btn, disabled: !u.local, onClick: startEditUpd }, M('修改配置', 'Edit config')),
|
|
3160
3124
|
),
|
|
3161
3125
|
),
|
|
3162
3126
|
h('div', { style: S.hint }, text),
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
h('div', { style: S.actions },
|
|
3186
|
-
h('button', { type: 'button', style: S.btnPrimary, disabled: updBusy, onClick: saveUpdConfig }, updBusy ? M('保存中…', 'Saving…') : M('保存', 'Save')),
|
|
3187
|
-
h('button', { type: 'button', style: S.btn, disabled: updBusy, onClick: cancelEditUpd }, M('取消', 'Cancel')),
|
|
3188
|
-
cfg.tokenSaved
|
|
3189
|
-
? h('button', { type: 'button', style: S.btn, disabled: updBusy, onClick: clearUpdToken }, M('清除已存令牌', 'Clear stored token'))
|
|
3190
|
-
: null,
|
|
3191
|
-
),
|
|
3192
|
-
)
|
|
3193
|
-
: h('div', null,
|
|
3194
|
-
h(Kv, {
|
|
3195
|
-
k: M('更新清单', 'Manifest'),
|
|
3196
|
-
v: cfg.manifestUrlIsDefault
|
|
3197
|
-
? M('内置默认(GitHub API / gh-proxy / ghfast / GitHub raw 依次尝试)', 'Built-in default (GitHub API / gh-proxy / ghfast / GitHub raw in order)')
|
|
3198
|
-
: (cfg.manifestUrl || '…'),
|
|
3199
|
-
}),
|
|
3200
|
-
h(Kv, {
|
|
3201
|
-
k: M('更新源', 'Source'),
|
|
3202
|
-
v: u.sourceUsed
|
|
3203
|
-
? u.sourceUsed
|
|
3204
|
-
: M('本次检查还没读到清单', 'No source reached yet'),
|
|
3205
|
-
}),
|
|
3206
|
-
h(Kv, {
|
|
3207
|
-
k: M('更新令牌', 'Token'),
|
|
3208
|
-
v: cfg.tokenSource === 'env' && cfg.tokenEnv
|
|
3209
|
-
? M(`已从环境变量 ${cfg.tokenEnv} 读取(不落盘、绝不推送)`, `From env var ${cfg.tokenEnv} (not stored, never pushed)`)
|
|
3210
|
-
: cfg.tokenSource === 'git-credential'
|
|
3211
|
-
? M('已从本机 git 凭据自动读取(不落盘、绝不推送)', 'From local git credential (not stored, never pushed)')
|
|
3212
|
-
: cfg.tokenSource === 'gh-cli'
|
|
3213
|
-
? M('已从 GitHub CLI (gh) 自动读取(不落盘、绝不推送)', 'From GitHub CLI (gh) (not stored, never pushed)')
|
|
3214
|
-
: cfg.tokenSet
|
|
3215
|
-
? M('已配置(仅存本机,绝不推送)', 'Set (local only, never pushed)')
|
|
3216
|
-
: M('未配置(公开库可不填;私有库可用本机 GitHub 登录、$GITHUB_TOKEN 或填入令牌)', 'Not set (optional for public repos; private repos use local GitHub login, $GITHUB_TOKEN, or a token)'),
|
|
3217
|
-
}),
|
|
3218
|
-
u.remote && u.remote.npmTgzUrls && u.remote.npmTgzUrls.length
|
|
3219
|
-
? h(Kv, {
|
|
3220
|
-
k: M('npm 下载路径', 'npm download URL'),
|
|
3221
|
-
v: h('span', { style: { display: 'inline-flex', flexDirection: 'column', gap: '2px' } },
|
|
3222
|
-
u.remote.npmTgzUrls.map((url, i) =>
|
|
3223
|
-
h('span', { key: i, title: url }, url)
|
|
3224
|
-
)
|
|
3225
|
-
),
|
|
3226
|
-
})
|
|
3227
|
-
: u.remote && u.remote.npmTgz
|
|
3228
|
-
? h(Kv, {
|
|
3229
|
-
k: M('npm 下载路径', 'npm download URL'),
|
|
3230
|
-
v: u.remote.npmTgz,
|
|
3231
|
-
})
|
|
3232
|
-
: null,
|
|
3233
|
-
),
|
|
3127
|
+
h('div', null,
|
|
3128
|
+
h(Kv, {
|
|
3129
|
+
k: M('更新源', 'Source'),
|
|
3130
|
+
v: M('npm(只查 npm,不查 GitHub)', 'npm only (GitHub is not checked)'),
|
|
3131
|
+
}),
|
|
3132
|
+
h(Kv, {
|
|
3133
|
+
k: M('npm 包', 'npm package'),
|
|
3134
|
+
v: (cfg.packageName || 'dsh-profile-config-sync'),
|
|
3135
|
+
}),
|
|
3136
|
+
h(Kv, {
|
|
3137
|
+
k: M('本次查询', 'Last query'),
|
|
3138
|
+
v: u.sourceUsed
|
|
3139
|
+
? u.sourceUsed
|
|
3140
|
+
: M('本次检查还没读到版本信息', 'No version info reached yet'),
|
|
3141
|
+
}),
|
|
3142
|
+
u.remote && u.remote.npmTgz
|
|
3143
|
+
? h(Kv, {
|
|
3144
|
+
k: M('下载地址', 'Download URL'),
|
|
3145
|
+
v: u.remote.npmTgz,
|
|
3146
|
+
})
|
|
3147
|
+
: null,
|
|
3148
|
+
),
|
|
3234
3149
|
h('div', { style: S.footnote },
|
|
3235
3150
|
M(
|
|
3236
|
-
'
|
|
3237
|
-
'
|
|
3151
|
+
'更新只查 npm registry,不看 GitHub。下载只写 update-staging 并按 npm 给的 integrity 校验,插件目录不动;「重启并安装」在退出后覆盖安装并自动重开,失败自动回滚。',
|
|
3152
|
+
'Updates are checked against the npm registry only, never GitHub. The download only writes to update-staging and is verified with the integrity value npm provides; "Restart & install" overwrites after exit and relaunches, rolling back on failure.',
|
|
3238
3153
|
)),
|
|
3239
|
-
updErr ? h('div', { style: { ...S.footnote, color: 'var(--dsw-alias-state-error-primary)' } }, M(`保存失败:${updErr}`, `Save failed: ${updErr}`)) : null,
|
|
3240
3154
|
updMsg ? h('div', { style: { ...S.footnote, color: 'var(--dsw-alias-state-success-primary)' } }, updMsg) : null,
|
|
3155
|
+
updErr ? h('div', { style: { ...S.footnote, color: 'var(--dsw-alias-state-error-primary)' } }, updErr) : null,
|
|
3241
3156
|
)
|
|
3242
3157
|
})()
|
|
3243
3158
|
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 实测记录(按版本倒叙,)
|
|
2
2
|
|
|
3
3
|
> README 只留最新 8 条;这里是完整记录。每条都是真跑出来的数字,不是估算;标 `—` 的是早期还没有版本号时的验证。
|
|
4
4
|
|
|
5
5
|
| 日期 | 版本 | 要点 |
|
|
6
6
|
|---|---|---|
|
|
7
|
+
| 2026-11-27 | 0.6.47 | **更新只查 npm + 在线安装**:更新检查整体换成 npm registry(dist-tags 定版本、单版本文档取 tarball/integrity、说明取包内 version.json),GitHub 四条清单源与「清单/令牌」设置退休;市场索引 source.type 改 npm;修「pnpm sha256 校验 npm 包必然失败」与「市场索引 publishTimestamp 用了毫秒导致 DSH 拒整个索引」两个真 bug。 |
|
|
8
|
+
| 2026-11-27 | 0.6.46 | **徽章数字接回计数**:不再手写「64 套 · 1065 条」,改由 finalize 从 `last-count.json` 生成(64 套 · 1061 条,与验收声明同口径)。 |
|
|
7
9
|
| 2026-11-27 | 0.6.45 | **文档对齐现实**:去掉「npm 上只到 0.4.1」的陈旧说法;发布命令块修掉版本号与包名自相矛盾;写清 `version.json` 不在 npm 包里。 |
|
|
8
10
|
| 2026-11-27 | 0.6.44 | **一致性**:历史字段 `dsh.engines.dsh` 对齐顶层 `>=0.2.2-rc.5`;README 中英去掉写死的 10297;审计补 2 条断言。 |
|
|
9
11
|
| 2026-11-27 | 0.6.43 | **修正下限**:0.6.42 的 `engines.dsh >=0.2.3` 会让 0.2.2-rc.5 运行时拒绝加载,改为 `>=0.2.2-rc.5`(准入接口在该版本已存在,实测复现了拒绝流程)。 |
|
|
10
12
|
| 2026-11-27 | 0.6.42 | **安全修复**:13 条 HTTP 路由接进宿主准入(`requestRejection`),裸 curl 200→401;补 `engines.dsh >=0.2.3`;新增 `route-admission` 套件 16 条。 |
|
|
11
13
|
| 2026-11-26 | 0.6.41 | WebDAV 模式下不再渲染 `? @ ?`:无 .git 的仓库目录改为「WebDAV 模式:这个目录不是 git 仓库,没有分支」/「不比提交前后」,未提交数照常;元信息尾巴只在有分支时追加。市场图标换 180×180、撤 3 张旧截图、README 加 6 枚徽章。 |
|
|
12
14
|
| 2026-11-26 | 0.6.40 | 只修工具链:clientcheck 里一条按实现细节写的断言(`missing ? null :`)在 0.6.36 合并云端卡后失效,使 CI publish 门禁变红;改为盯实际那道门。插件行为与 0.6.39 一致。 |
|
|
13
|
-
| 2026-11-26 | 0.6.39 | 更名与文档:面板 / 侧栏 / 设置摘要行统一改成「**配置备份与同步**」(Config Backup & Sync),副标题改成「多端配置备份、同步与还原:本机 → 仓库 → 云端 → 另一台机器」,包描述改成多端备份/同步/还原口径并补 `backup` / `restore` / `webdav` / `multi-device` 关键词,退出后同步窗口标题一起改名(`== DSH 配置同步 / x ==` 这类日志 banner 不动——面板靠它解析结果;历史小标题保留当时的叫法)。README 重写头部:定位段、四件事表(配置 / 备份 / 同步 / 还原)、一张流程线、目录锚点、发布状态压成一张表、「已知限制」单独列;新增「来源与版权」(上游 QcWyGm/dsh-config-sync-plugin,MIT,LICENSE 同步列出两行版权);**实测记录改成版本倒叙**(同日期按版本号数值倒序);并修掉头部停在 0.6.14 的陈旧数字。验收:63
|
|
14
|
-
| 2026-11-26 | 0.6.38 | 安全必需项在 JS 侧补齐:`config-sync-extra.json` 的 exclude/skipDirs 是「整份替换」语义,本机存的是 50 条旧快照,0.6.12 新增的 browser-profiles 规则因此在面板与待推送里整条失效——capture 有 `Test-BlockedProfilePath` 硬拦(3,696 个文件 / 268MB 含密码库照样不进仓库),但待推送会把浏览器剖面里几千次 mtime 变动数成「待推送」,面板永远消不掉、退出自动推送每次白跑。现在 JS 也补同一份必需项(读时补、保存前再补一次,否则用户点一次保存又删掉),补齐会在插件数据卡片里明说,并加 PS↔JS 名单对拍。另外「会话记录」组在 capture 里是四块(sessions / attachments / projcache / policies),待推送以前只数 sessions:往附件里丢张图、某个会话的 projcache 更新,面板照样说「仓库与本机一致」,现已补齐(跳过名单里那条 `attachments` 一并去掉)。非 Windows 的待推送口径也改了:macOS/Linux 走 `runtime\sync-engine.mjs`,它只抓 profile / 提示 / Skills / 预设,面板以前却把会话记录、插件数据、额外路径也算成「待推送」(永远不会被推送的东西)。现在按执行体实际能力统计,并在状态里带上 `engineGroups` 让面板写明「这台机器只同步这四组」。剔除被拦的剖面与被排除文件后,本机 `status` 从 470ms 降到 220ms。验收:63
|
|
15
|
-
| 2026-11-26 | 0.6.37 | 待推送口径与 capture 对齐:补上插件数据 / 额外路径 / 本地插件包 / 技能市场台账 / 插件设置 / 记忆数据六组(原先只算 7 组,插件数据变了面板仍说「仓库与本机一致」);「插件设置与工作流」面板只列 4 条而 capture 抓 14 条 → 补齐 14 条并加对拍;post-exit 结果窗口改成可配置停留(验收不必等 6 分钟);`.ps1` 增加 BOM 断言(5.1 无 BOM 会把中文按 ANSI 解成乱码)。验收:63
|
|
15
|
+
| 2026-11-26 | 0.6.39 | 更名与文档:面板 / 侧栏 / 设置摘要行统一改成「**配置备份与同步**」(Config Backup & Sync),副标题改成「多端配置备份、同步与还原:本机 → 仓库 → 云端 → 另一台机器」,包描述改成多端备份/同步/还原口径并补 `backup` / `restore` / `webdav` / `multi-device` 关键词,退出后同步窗口标题一起改名(`== DSH 配置同步 / x ==` 这类日志 banner 不动——面板靠它解析结果;历史小标题保留当时的叫法)。README 重写头部:定位段、四件事表(配置 / 备份 / 同步 / 还原)、一张流程线、目录锚点、发布状态压成一张表、「已知限制」单独列;新增「来源与版权」(上游 QcWyGm/dsh-config-sync-plugin,MIT,LICENSE 同步列出两行版权);**实测记录改成版本倒叙**(同日期按版本号数值倒序);并修掉头部停在 0.6.14 的陈旧数字。验收:63 套隔离夹具断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
16
|
+
| 2026-11-26 | 0.6.38 | 安全必需项在 JS 侧补齐:`config-sync-extra.json` 的 exclude/skipDirs 是「整份替换」语义,本机存的是 50 条旧快照,0.6.12 新增的 browser-profiles 规则因此在面板与待推送里整条失效——capture 有 `Test-BlockedProfilePath` 硬拦(3,696 个文件 / 268MB 含密码库照样不进仓库),但待推送会把浏览器剖面里几千次 mtime 变动数成「待推送」,面板永远消不掉、退出自动推送每次白跑。现在 JS 也补同一份必需项(读时补、保存前再补一次,否则用户点一次保存又删掉),补齐会在插件数据卡片里明说,并加 PS↔JS 名单对拍。另外「会话记录」组在 capture 里是四块(sessions / attachments / projcache / policies),待推送以前只数 sessions:往附件里丢张图、某个会话的 projcache 更新,面板照样说「仓库与本机一致」,现已补齐(跳过名单里那条 `attachments` 一并去掉)。非 Windows 的待推送口径也改了:macOS/Linux 走 `runtime\sync-engine.mjs`,它只抓 profile / 提示 / Skills / 预设,面板以前却把会话记录、插件数据、额外路径也算成「待推送」(永远不会被推送的东西)。现在按执行体实际能力统计,并在状态里带上 `engineGroups` 让面板写明「这台机器只同步这四组」。剔除被拦的剖面与被排除文件后,本机 `status` 从 470ms 降到 220ms。验收:63 套隔离夹具断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
17
|
+
| 2026-11-26 | 0.6.37 | 待推送口径与 capture 对齐:补上插件数据 / 额外路径 / 本地插件包 / 技能市场台账 / 插件设置 / 记忆数据六组(原先只算 7 组,插件数据变了面板仍说「仓库与本机一致」);「插件设置与工作流」面板只列 4 条而 capture 抓 14 条 → 补齐 14 条并加对拍;post-exit 结果窗口改成可配置停留(验收不必等 6 分钟);`.ps1` 增加 BOM 断言(5.1 无 BOM 会把中文按 ANSI 解成乱码)。验收:63 套隔离夹具断言全绿(另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
|
|
16
18
|
| 2026-11-26 | 0.6.36 | 取消勾选真的挡住待推送与自动推送;删除云端副本对 WebDAV 生效;两张云端卡合并 |
|
|
17
19
|
| 2026-11-26 | 0.6.35 | cordis.yml / package.json 等改原子写;7 份脚本行尾统一 CRLF(LF-only 会把下一行吞进注释) |
|
|
18
20
|
| 2026-11-26 | 0.6.34 | post-exit 的 workspace.json 等四处改原子写(半截写入会让 DSH 读不出工作区) |
|