dsh-config-sync-plugin 0.3.86 → 0.3.88
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 +6 -1
- package/README.md +6 -1
- package/client.js +6 -0
- package/index.js +22 -6
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -19,7 +19,7 @@ The package name is **`dsh-config-sync-plugin`** (the `dsh-config-sync` name on
|
|
|
19
19
|
|
|
20
20
|
| Way | Command / entry | Notes |
|
|
21
21
|
|---|---|---|
|
|
22
|
-
| npm | `npm i dsh-config-sync-plugin` | Use it as a dependency, or add `"dsh-config-sync-plugin": "^0.3.
|
|
22
|
+
| npm | `npm i dsh-config-sync-plugin` | Use it as a dependency, or add `"dsh-config-sync-plugin": "^0.3.88"` to the profile's `package.json` and run `pnpm i`. The name matches the `cordis.patch.yml` insert name and the install folder `dsh-config-sync-plugin-<ver>` |
|
|
23
23
|
| Marketplace | client → Plugins → Discover → “Config Sync” | Installs from the git commit registered in `market-index.json` |
|
|
24
24
|
| Offline tgz | `releases\dsh-config-sync-plugin-<ver>.tgz` | GitHub Release asset for air-gapped machines; the panel's Update button downloads the same file |
|
|
25
25
|
|
|
@@ -253,6 +253,10 @@ Two display fixes on top of 0.3.77:
|
|
|
253
253
|
1. **Jump order matches section order**: the quick-jump tabs now follow the exact render order of the sections (Overview / Sync conflicts [when present] / Local paths [when expanded] / Targets / Automation & updates / Scripts / Restore / Content / Plugin data / Workspace visibility / Feedback). The two conditional sections (conflicts, local paths) appear in the tabs only when their cards are shown.
|
|
254
254
|
2. **Scroll lands below the title**: the sticky title bar now uses an opaque background (same fill as panel cards), so content no longer shows through it; jumping to a tab sets the scroll offset from the title bar's actual height, so the target section lands fully below the title instead of being covered.
|
|
255
255
|
|
|
256
|
+
### Plugin update falls back to npm download (0.3.88)
|
|
257
|
+
|
|
258
|
+
The "Plugin update" card now shows an **npm download URL** line with the actual fallback address (`https://registry.npmmirror.com/dsh-config-sync-plugin/-/dsh-config-sync-plugin-<ver>.tgz`). When the GitHub release download is unreachable (common in mainland China), the update package automatically falls back to the npm mirror. It is still verified against the authoritative sha256 in `version.json` — switching source never relaxes verification. The npm tarball is byte-identical to the GitHub release tgz (same sha256).
|
|
259
|
+
|
|
256
260
|
### Local data moved into To-do, grouped by sync content, sessions shown by name (0.3.86)
|
|
257
261
|
|
|
258
262
|
The "Local data" row in the "Local repo" card moved into "Overview → To-do", with its presentation reorganised:
|
|
@@ -677,6 +681,7 @@ The log shows which path ran: `文件比较(快筛):比对 N 个,深哈
|
|
|
677
681
|
|
|
678
682
|
| Date | Version | Summary |
|
|
679
683
|
|---|---|---|
|
|
684
|
+
| 2026-11-24 | 0.3.88 | Plugin update card shows an "npm download URL"; falls back to the npm mirror when GitHub release is unreachable, still verified against the authoritative sha256 |
|
|
680
685
|
| 2026-11-23 | 0.3.86 | Moved "Local data" into Overview / To-do, grouped pending files by the twelve sync-content groups, and show session names instead of session ids in the sample |
|
|
681
686
|
| 2026-11-23 | 0.3.85 | Removed the tinted banner above the workspace list in edit mode; edit state is read from the Edit/Done button in the header |
|
|
682
687
|
| 2026-11-23 | 0.3.84 | Workspace visibility card uses one Edit button for the whole card; each session row carries its own toggle with a background and divider, hidden names struck through |
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ DSH 插件:左侧栏多一行「配置同步」,点开是整页体检面板
|
|
|
15
15
|
|
|
16
16
|
| 方式 | 命令 / 入口 | 说明 |
|
|
17
17
|
|---|---|---|
|
|
18
|
-
| npm | `npm i dsh-config-sync-plugin` | 适合把它当依赖管理,或在 profile 的 `package.json` 里写 `"dsh-config-sync-plugin": "^0.3.
|
|
18
|
+
| npm | `npm i dsh-config-sync-plugin` | 适合把它当依赖管理,或在 profile 的 `package.json` 里写 `"dsh-config-sync-plugin": "^0.3.88"` 后 `pnpm i`;包名与 `cordis.patch.yml` 里注册的名字、插件目录 `dsh-config-sync-plugin-<ver>` 一致 |
|
|
19
19
|
| 插件市场 | 客户端「插件市场 → 发现」搜「配置同步」 | 走 `market-index.json` 登记的 git 提交,版本与 README 对齐 |
|
|
20
20
|
| 离线 tgz | `releases\dsh-config-sync-plugin-<ver>.tgz` | GitHub Release 附件,适合内网机器;面板「更新」按钮下载的也是它 |
|
|
21
21
|
|
|
@@ -273,6 +273,10 @@ pwsh -File runtime\sync.ps1 pull `
|
|
|
273
273
|
1. **跳转顺序对齐卡片**:快捷标签顺序改为与分区实际渲染顺序完全一致(概览 / 同步冲突[有冲突时] / 本机路径[展开时] / 同步目标 / 自动化与插件更新 / 生成脚本 / 还原备份 / 同步内容 / 插件数据 / 工作区显示 / 问题反馈)。同步冲突、本机路径两个条件分区只在卡片存在时才出现在标签里。
|
|
274
274
|
2. **滚动落点在标题下方**:标题栏改为不透明背景(面板卡片同色),滚动时内容不再从标题背后透出;点标签跳转时按标题栏实际高度设置滚动落点,目标分区完整显示在标题下方,不再被遮住。
|
|
275
275
|
|
|
276
|
+
### 插件更新支持 npm 兜底下载(0.3.88)
|
|
277
|
+
|
|
278
|
+
「插件更新」卡新增一行 **npm 下载路径**,直接显示实际兜底地址(`https://registry.npmmirror.com/dsh-config-sync-plugin/-/dsh-config-sync-plugin-<ver>.tgz`)。GitHub release 整段不通时(国内常见),更新包会自动兜底从 npm 镜像下载;仍按 `version.json` 里的权威 sha256 校验,换源不放宽校验。实测 npm tarball 与 GitHub release tgz 是同一份产物、sha256 完全一致。
|
|
279
|
+
|
|
276
280
|
### 本机数据挪进待办 + 按同步内容分组 + 会话显示会话名(0.3.86)
|
|
277
281
|
|
|
278
282
|
把「本机仓库」卡里的「本机数据」行移到了「概览 → 待办」,并重新组织它的呈现:
|
|
@@ -659,6 +663,7 @@ pwsh -File sync.ps1 push -ScanHistory
|
|
|
659
663
|
|
|
660
664
|
| 日期 | 版本 | 要点 |
|
|
661
665
|
|---|---|---|
|
|
666
|
+
| 2026-11-24 | 0.3.88 | 插件更新卡新增「npm 下载路径」;GitHub release 不通时兜底 npm 镜像下载,仍按权威 sha256 校验 |
|
|
662
667
|
| 2026-11-23 | 0.3.86 | 「本机数据」挪进概览-待办,按同步内容的 12 组口径分类统计,会话样本显示会话标题而非 session id |
|
|
663
668
|
| 2026-11-23 | 0.3.85 | 去掉工作区显示卡片编辑态的强调色说明条,编辑与否只看标题行「修改」/「完成」按钮 |
|
|
664
669
|
| 2026-11-23 | 0.3.84 | 工作区显示卡片改成整卡一个「修改」按钮;会话行自带开关、加底色与分隔线,隐藏态删除线 |
|
package/client.js
CHANGED
|
@@ -2560,6 +2560,12 @@ window.__ModuleLoader__.load({
|
|
|
2560
2560
|
? M('已配置(只存本机)', 'Set (stored on this machine only)')
|
|
2561
2561
|
: M('未配置(私有库会读不到清单)', 'Not set (private repos cannot be read)'),
|
|
2562
2562
|
}),
|
|
2563
|
+
u.remote && u.remote.npmTgz
|
|
2564
|
+
? h(Kv, {
|
|
2565
|
+
k: M('npm 下载路径', 'npm download URL'),
|
|
2566
|
+
v: u.remote.npmTgz,
|
|
2567
|
+
})
|
|
2568
|
+
: null,
|
|
2563
2569
|
),
|
|
2564
2570
|
h('div', { style: S.footnote },
|
|
2565
2571
|
M(
|
package/index.js
CHANGED
|
@@ -2151,14 +2151,28 @@ function compareVersion(a, b) {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
|
|
2153
2153
|
/**
|
|
2154
|
-
*
|
|
2155
|
-
*
|
|
2154
|
+
* 0.3.88:npm registry 的 tarball 地址。npm 包与 GitHub release 的 tgz 是同一份发布产物
|
|
2155
|
+
* (实测两者 sha256 完全一致),所以 GitHub release 下载不通时能自动从 npm 镜像取,
|
|
2156
|
+
* 清单里的权威 sha256 照常校验,不会因换源而放松校验。
|
|
2157
|
+
*/
|
|
2158
|
+
function npmTgzUrl(version) {
|
|
2159
|
+
const v = String(version || '').replace(/[^0-9A-Za-z.+\-]/g, '')
|
|
2160
|
+
return v ? `https://registry.npmmirror.com/dsh-config-sync-plugin/-/dsh-config-sync-plugin-${v}.tgz` : ''
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* 清单里 tgz 可以写相对路径(releases/xxx.tgz),也可以是绝对 GitHub release 地址。
|
|
2165
|
+
* 下载地址按"读到清单的那个源"优先,其余镜像依次兜底;末尾追加 npm 镜像作为最终兜底
|
|
2166
|
+
* —— GitHub release 整段不通时(国内常见),仍能走 npm 把包下下来。
|
|
2156
2167
|
*/
|
|
2157
2168
|
function resolveTgzCandidates(manifest, manifestUrl = '') {
|
|
2158
2169
|
const tgz = String((manifest && manifest.tgz) || '')
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2170
|
+
const npmTgz = npmTgzUrl(manifest && manifest.version)
|
|
2171
|
+
const withNpm = (list) => (npmTgz && !list.includes(npmTgz) ? [...list, npmTgz] : list)
|
|
2172
|
+
// 清单没给 tgz 时,也留 npm 这一条路(有版本就能拼出 tarball)
|
|
2173
|
+
if (!tgz) return npmTgz ? [npmTgz] : []
|
|
2174
|
+
// 清单里写了绝对地址:先照它来,末尾追加 npm 兜底(0.3.88 起不再直接 return)
|
|
2175
|
+
if (/^https?:\/\//i.test(tgz)) return withNpm([tgz])
|
|
2162
2176
|
const rel = tgz.replace(/^\.?\//, '')
|
|
2163
2177
|
const bases = []
|
|
2164
2178
|
const actual = String(manifestUrl || '').replace(/[^/]*$/, '')
|
|
@@ -2167,7 +2181,7 @@ function resolveTgzCandidates(manifest, manifestUrl = '') {
|
|
|
2167
2181
|
const base = cand.replace(/[^/]*$/, '')
|
|
2168
2182
|
if (base && !bases.includes(base)) bases.push(base)
|
|
2169
2183
|
}
|
|
2170
|
-
return bases.map((base) => base + rel)
|
|
2184
|
+
return withNpm(bases.map((base) => base + rel))
|
|
2171
2185
|
}
|
|
2172
2186
|
|
|
2173
2187
|
/** version.json 里的 tgz 可以写相对路径(releases/xxx.tgz),拼在仓库 raw 根上。 */
|
|
@@ -2294,6 +2308,8 @@ function updatePayload(state, settings = {}) {
|
|
|
2294
2308
|
notesEn: String(remote.notesEn || ''),
|
|
2295
2309
|
releasedAt: String(remote.releasedAt || ''),
|
|
2296
2310
|
tgz: resolveTgzUrl(remote, state.url),
|
|
2311
|
+
// 0.3.88:GitHub release 不通时的 npm 兜底下载地址,面板上单独显示一行
|
|
2312
|
+
npmTgz: npmTgzUrl(remote.version),
|
|
2297
2313
|
sha256: String(remote.sha256 || ''),
|
|
2298
2314
|
} : null,
|
|
2299
2315
|
hasUpdate: remote ? compareVersion(remote.version, PLUGIN_VERSION) > 0 : false,
|
package/package.json
CHANGED