dsh-go-plugin-sync 0.4.2 → 0.4.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/lib/index.js +113 -62
  3. package/package.json +102 -102
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.3 — 2026-12-04
4
+
5
+ ### 改进
6
+ - dsh-go 面板按钮精简:「全选/取消全选」合并成一个切换;去掉「导出清单」「工作区导入」;「清空清单」改名「重置清单」;「重试失败」只在有失败项时出现并带数量;「使用引导」保留
7
+ - 「使用引导」改成纯文字说明,不再带操作按钮;安装失败日志补充 target(装的是哪个目录或哪个包)
8
+ - 安装失败会自动补一行「原因:」白话结论(超时、断网、权限、缺文件、包不存在、依赖冲突、该端不支持),电脑端和 dsh-go 面板都能看到;日志尾部展示行数增加(dsh-go 8 行、电脑端 12 行);修复「没有可安装来源」时原因写在失败标记之后导致读不到的顺序问题
9
+ - 失败归因更准:404 与版本不兼容不再误判成缺文件;pnpm 原文只在 packageResult.output 里时也能归因;结果行优先显示「target + 原因」,超长时保留尾部
10
+ - 取消任务改为按轮次隔离(run token):取消后旧循环不能再写日志/状态,也不会把剩余项装进新任务;取消结果行显示「任务被用户取消」而不是 stop 时间戳
11
+ - pnpm 原文与安装器 logPath 会写进任务日志(原因行之前),日志尾部能看到原始错误
12
+ - dsh-go 面板只列清单里的待处理插件:新增「待处理插件(N)」标题,去掉本机插件列表,清单外(仅本机有)的插件也不再显示;复制同步码在没选插件时默认带上全部本机插件
13
+ - dsh-go 面板的清单列表按电脑端风格精简:每行只显示名称和一句短状态,不再重复版本号与动作后缀;状态文案改为「可安装」「本地已有」「本地已有,版本不同」「仅dshgo」「仅电脑/网页」「缺文件」等;未选中项不再显示圆圈,选中后才出现 ✓
14
+ - 本地插件列表同样只保留名称 + 版本,可安装项排在前面
15
+
3
16
  ## 0.4.2 — 2026-12-04
4
17
 
5
18
  ### 修复
package/lib/index.js CHANGED
@@ -758,11 +758,18 @@ function readTaskResults() {
758
758
  continue
759
759
  }
760
760
  if (current && current.action === action && current.name === name) {
761
+ const targetLine = current.lines.find((line) => line.startsWith('target '))
762
+ const hintLine = current.lines.find((line) => line.startsWith('原因:'))
763
+ const others = current.lines.filter((line) => line.trim() !== '' && !line.startsWith('target ') && !line.startsWith('原因:') && !line.startsWith('stop '))
764
+ const parts = [targetLine, hintLine]
765
+ if (!hintLine && others.length > 0) parts.push(others[others.length - 1])
761
766
  results.push({
762
767
  action,
763
768
  name,
764
769
  ok: phase === 'ok',
765
- message: phase === 'fail' ? current.lines.slice(-2).join(' ').slice(0, 140) : '',
770
+ message: phase === 'fail'
771
+ ? (parts.filter(Boolean).join(' ').slice(-200) || current.lines.slice(-3).join(' ').slice(-200))
772
+ : '',
766
773
  })
767
774
  current = undefined
768
775
  }
@@ -798,6 +805,10 @@ function taskRunning() {
798
805
  return Boolean(status?.running && Date.now() - status.startedAt < 15 * 60 * 1000)
799
806
  }
800
807
 
808
+ /** Per-run token: cancelling marks the current run so it can never write into the next task. */
809
+ let installRun = 0
810
+ let cancelledRun = -1
811
+
801
812
  /** Kill the running task (its status line carries the pid) and mark it cancelled. */
802
813
  function stopTask() {
803
814
  const status = readTaskStatus()
@@ -812,16 +823,18 @@ function stopTask() {
812
823
  }
813
824
  } catch {}
814
825
  }
826
+ cancelledRun = installRun
815
827
  const current = readTaskCurrent()
816
828
  try {
817
- let note = `@@ stop ${Math.floor(Date.now() / 1000)}\n`
829
+ let note = '任务被用户取消\n'
830
+ note += `stop ${Math.floor(Date.now() / 1000)}\n`
818
831
  if (current) note += `@@ ${current.action} ${current.name} fail\n`
819
- note += '任务被用户取消\n'
820
832
  appendFileSync(taskLogPath(), note)
821
833
  } catch {}
822
834
  const failed = readTaskResults().filter((result) => !result.ok).length
835
+ const stoppedFailed = status.kind === 'install' ? Math.max(1, failed) : failed
823
836
  try {
824
- writeFileSync(taskStatusPath(), `done ${Math.floor(Date.now() / 1000)} ${Math.max(1, failed)} ${status.kind || 'apply'}\n`)
837
+ writeFileSync(taskStatusPath(), `done ${Math.floor(Date.now() / 1000)} ${stoppedFailed} ${status.kind || 'apply'}\n`)
825
838
  } catch {}
826
839
  return { ok: true, pid }
827
840
  }
@@ -973,6 +986,22 @@ function installTimedOut(result) {
973
986
  return kind.toLowerCase().includes('timeout')
974
987
  }
975
988
 
989
+ /** Turn noisy pnpm / installer output into one plain-language cause (empty when nothing matches). */
990
+ function explainFailure(text) {
991
+ const raw = String(text || '')
992
+ if (!raw) return ''
993
+ if (/ENOTFOUND|EAI_AGAIN|getaddrinfo/i.test(raw)) return '域名解析失败,检查网络或 registry 地址'
994
+ if (/ERR_PNPM_FETCH_404|E404|404 Not Found|does not exist on the registry/i.test(raw)) return '包或版本在 registry 上不存在(404)'
995
+ if (/ECONNRESET|ECONNREFUSED|socket hang up|ERR_SOCKET|network error/i.test(raw)) return '网络连接被重置或拒绝,多为 registry 不可达'
996
+ if (/ETIMEDOUT|ESOCKETTIMEDOUT|timed out|timeout|600000ms/i.test(raw)) return '安装超时(安装器长时间没有输出,原因为网络或 registry 卡住)'
997
+ if (/EPERM|EACCES|permission denied/i.test(raw)) return '权限不足,无法写入安装目录'
998
+ if (/ENOENT|no such file/i.test(raw)) return '缺文件:同步码里的文件或包内容不完整'
999
+ if (/ERESOLVE|peer dep/i.test(raw)) return '依赖冲突(peer dependency 不匹配)'
1000
+ if (/incompatible|版本不兼容|requires .* but (?:got|found)/i.test(raw)) return '版本不兼容(插件与当前 DSH 版本不匹配)'
1001
+ if (/unsupported|not supported|does not support/i.test(raw)) return '当前端的安装器不支持这种来源'
1002
+ return ''
1003
+ }
1004
+
976
1005
  /** The desktop host runs `@deepseek-ai/dsh-desktop-host/lib/index.js`; its CLI is the sibling file. */
977
1006
  function dshCliEntry() {
978
1007
  const host = typeof process.argv[2] === 'string' ? process.argv[2] : ''
@@ -1017,25 +1046,32 @@ function startInstallTask(ctx, jobs) {
1017
1046
  try { writeFileSync(taskTotalPath(), '0\n') } catch {}
1018
1047
  writeFileSync(taskLogPath(), '')
1019
1048
  writeFileSync(taskStatusPath(), `running ${Math.floor(Date.now() / 1000)} apply\n`)
1049
+ const runId = ++installRun
1020
1050
  const installs = jobs.filter((job) => job.action === 'install')
1021
- const say = (line) => { try { writeFileSync(taskLogPath(), `${line}\n`, { flag: 'a' }) } catch {} }
1051
+ const say = (line) => {
1052
+ if (cancelledRun === runId) return
1053
+ try { writeFileSync(taskLogPath(), `${line}\n`, { flag: 'a' }) } catch {}
1054
+ }
1055
+ try { say(`host dshGo=${ctx.get?.('dshGo') === true} platform=${process.platform} profile=${profileName()}`) } catch {}
1022
1056
  ;(async () => {
1023
1057
  let failed = 0
1024
1058
  for (const job of installs) {
1059
+ if (cancelledRun === runId) break
1025
1060
  const name = markerName(job.name)
1026
1061
  const target = job.localDir || job.registrySpec
1027
1062
  say(`@@ install ${name} start`)
1028
1063
  if (!target) {
1029
1064
  failed += 1
1030
- say(`@@ install ${name} fail`)
1065
+ say('原因:这个插件既没有本地文件也没有 registry 地址,无法安装')
1031
1066
  say('no install source')
1067
+ say(`@@ install ${name} fail`)
1032
1068
  continue
1033
1069
  }
1034
1070
  try {
1035
1071
  const result = await manager.installBundle(target, { enabled: true })
1036
1072
  const failure = installFailure(result)
1037
1073
  if (failure && installTimedOut(result)) {
1038
- say(`@@ install ${name} timeout, retry via dsh cli`)
1074
+ say(`install ${name} timeout, retry via dsh cli`)
1039
1075
  const retry = await runCliInstall(target)
1040
1076
  if (retry.ok) {
1041
1077
  say(`@@ install ${name} ok`)
@@ -1044,13 +1080,23 @@ function startInstallTask(ctx, jobs) {
1044
1080
  say('重启 DSH 后生效')
1045
1081
  } else {
1046
1082
  failed += 1
1047
- say(`@@ install ${name} cli failed`)
1083
+ say(`install ${name} cli failed`)
1048
1084
  say(retry.output.slice(-1500))
1085
+ const hint = explainFailure(retry.output)
1086
+ if (hint) say(`原因:${hint}`)
1049
1087
  say(`@@ install ${name} fail`)
1050
1088
  }
1051
1089
  } else if (failure) {
1052
1090
  failed += 1
1053
- say(failure.slice(0, 2000))
1091
+ say(`target ${target}`)
1092
+ const rawFailure = [failure, result?.packageResult?.output, result?.error?.packageResult?.output]
1093
+ .filter((part) => typeof part === 'string' && part !== '')
1094
+ .join('\n') || failure
1095
+ say(rawFailure.length <= 2000 ? rawFailure : `${rawFailure.slice(0, 1200)}\n…\n${rawFailure.slice(-800)}`)
1096
+ const hint = explainFailure(rawFailure)
1097
+ if (hint) say(`原因:${hint}`)
1098
+ const logPath = result?.packageResult?.logPath || result?.error?.packageResult?.logPath
1099
+ if (logPath) say(`log ${logPath}`)
1054
1100
  say(`@@ install ${name} fail`)
1055
1101
  } else {
1056
1102
  say(`@@ install ${name} ok`)
@@ -1059,11 +1105,16 @@ function startInstallTask(ctx, jobs) {
1059
1105
  }
1060
1106
  } catch (error) {
1061
1107
  failed += 1
1062
- say(String(error && (error.stack || error.message) || error).slice(0, 2000))
1108
+ const text = String(error && (error.stack || error.message) || error).slice(0, 2000)
1109
+ say(text)
1110
+ const hint = explainFailure(text)
1111
+ if (hint) say(`原因:${hint}`)
1063
1112
  say(`@@ install ${name} fail`)
1064
1113
  }
1065
1114
  }
1066
- try { writeFileSync(taskStatusPath(), `done ${Math.floor(Date.now() / 1000)} ${failed} apply\n`) } catch {}
1115
+ if (cancelledRun !== runId) {
1116
+ try { writeFileSync(taskStatusPath(), `done ${Math.floor(Date.now() / 1000)} ${failed} apply\n`) } catch {}
1117
+ }
1067
1118
  })()
1068
1119
  return { ok: true }
1069
1120
  }
@@ -1375,15 +1426,15 @@ function enableText(caps) {
1375
1426
 
1376
1427
  function statusLine(row, en) {
1377
1428
  let text = {
1378
- same: en ? 'same' : '一致',
1379
- conflict: en ? 'local wins' : '本机优先',
1380
- install: en ? 'not installed' : '未安装',
1381
- installable: en ? 'ready' : '可安装',
1382
- missing: en ? 'no files' : '缺文件',
1383
- extra: en ? 'not listed' : '清单外',
1429
+ same: en ? 'already here' : '本地已有',
1430
+ conflict: en ? 'already here, different version' : '本地已有,版本不同',
1431
+ install: en ? 'already here, not enabled' : '本地已有,未启用',
1432
+ installable: en ? 'installable' : '可安装',
1433
+ missing: en ? 'missing files' : '缺文件',
1434
+ extra: en ? 'local only' : '仅本机有',
1384
1435
  push: en ? 'pushable' : '可推送',
1385
- 'native-only': en ? 'phone-only' : '手机专用',
1386
- 'web-only': en ? 'web-only' : '电脑/网页专用',
1436
+ 'native-only': en ? 'dsh-go only' : '仅dshgo',
1437
+ 'web-only': en ? 'desktop/web only' : '仅电脑/网页',
1387
1438
  }[row.status] || row.status
1388
1439
  if (row.status !== 'web-only' && row.status !== 'native-only') {
1389
1440
  if (row.action === 'install' && row.registrySpec) text = en ? 'via npm' : 'npm 安装'
@@ -1397,6 +1448,23 @@ function statusLine(row, en) {
1397
1448
  return `${version} · ${text}`
1398
1449
  }
1399
1450
 
1451
+ const STATUS_BRIEF = {
1452
+ same: ['本地已有', 'already here'],
1453
+ conflict: ['本地已有,版本不同', 'already here, different version'],
1454
+ install: ['本地已有,未启用', 'already here, not enabled'],
1455
+ installable: ['可安装', 'installable'],
1456
+ missing: ['缺文件', 'missing files'],
1457
+ extra: ['仅本机有', 'local only'],
1458
+ push: ['可推送', 'pushable'],
1459
+ 'native-only': ['仅dshgo', 'dsh-go only'],
1460
+ 'web-only': ['仅电脑/网页', 'desktop/web only'],
1461
+ }
1462
+
1463
+ function statusBrief(row, en) {
1464
+ const pair = STATUS_BRIEF[row.status]
1465
+ return pair ? pair[en ? 1 : 0] : row.status
1466
+ }
1467
+
1400
1468
  function statusTone(status) {
1401
1469
  if (status === 'conflict' || status === 'extra') return 'warn'
1402
1470
  if (status === 'installable' || status === 'install' || status === 'push') return 'info'
@@ -1510,20 +1578,8 @@ function buildView(scope, caps, ctx) {
1510
1578
 
1511
1579
  if (!state.manifest) {
1512
1580
  children.push({ type: 'callout', tone: 'info', text: en
1513
- ? 'Select plugins below, then Copy code; or import a manifest / pull the relay first.'
1514
- : '先在下面选中要同步的插件,再点复制同步码;也可以先导入清单或拉取中转。' })
1515
- if (local.length > 0) {
1516
- const shown = local.slice(0, 40)
1517
- children.push({ type: 'list', items: shown.map((plugin) => ({
1518
- title: plugin.name,
1519
- subtitle: `${plugin.version} · ${en ? 'tap to select' : '点选'}`,
1520
- trailing: state.selected.has(plugin.name) ? '✓' : '○',
1521
- action: { id: 'toggle', args: { name: plugin.name } },
1522
- })) })
1523
- if (local.length > shown.length) {
1524
- children.push({ type: 'text', text: en ? `…and ${local.length - shown.length} more` : `…还有 ${local.length - shown.length} 项` })
1525
- }
1526
- }
1581
+ ? 'Import a sync code or pull the relay/manifest first. This panel only lists plugins that still need action; Copy code uses all local plugins when nothing is selected.'
1582
+ : '先导入同步码或拉取中转。这里只列需要处理的插件;复制同步码在没选任何插件时会带上全部本机插件。' })
1527
1583
  } else {
1528
1584
  const when = state.manifest.exportedAt ? state.manifest.exportedAt.slice(0, 16).replace('T', ' ') : ''
1529
1585
  const source = state.sourceName || state.manifest.host?.profile || ''
@@ -1531,23 +1587,26 @@ function buildView(scope, caps, ctx) {
1531
1587
  ? `Manifest: ${source || 'imported'}${when ? ` · ${when}` : ''}`
1532
1588
  : `清单来源:${source || '已导入'}${when ? ` · ${when}` : ''}` })
1533
1589
 
1534
- const pending = rows.filter((row) => row.status !== 'same')
1590
+ const pending = rows.filter((row) => row.status !== 'same' && row.status !== 'extra')
1535
1591
  const installed = rows.filter((row) => row.status === 'same')
1536
- const visible = (state.showAll ? rows : pending).slice()
1592
+ const listable = rows.filter((row) => row.status !== 'extra')
1593
+ const visible = (state.showAll ? listable : pending).slice()
1537
1594
  .sort((a, b) => Number(Boolean(b.action)) - Number(Boolean(a.action)))
1538
- if (rows.length === 0) {
1595
+ if (listable.length === 0) {
1539
1596
  children.push({ type: 'callout', tone: 'good', text: en ? 'The two hosts match.' : '两边完全一致。' })
1540
1597
  } else {
1541
1598
  if (pending.length === 0) {
1542
1599
  children.push({ type: 'callout', tone: 'good', text: en ? 'Nothing pending; everything is in sync.' : '没有待处理项,已全部一致。' })
1600
+ } else {
1601
+ children.push({ type: 'text', text: en ? `Pending plugins (${pending.length})` : `待处理插件(${pending.length})` })
1543
1602
  }
1544
1603
  const shown = visible.slice(0, 40)
1545
1604
  if (shown.length > 0) {
1546
1605
  children.push({ type: 'list', items: shown.map((row) => {
1547
1606
  const item = {
1548
1607
  title: row.name,
1549
- subtitle: statusLine(row, en),
1550
- trailing: state.selected.has(row.name) ? '✓' : '○',
1608
+ subtitle: statusBrief(row, en),
1609
+ trailing: state.selected.has(row.name) ? '✓' : undefined,
1551
1610
  action: { id: 'toggle', args: { name: row.name } },
1552
1611
  }
1553
1612
  const tone = statusTone(row.status)
@@ -1567,29 +1626,32 @@ function buildView(scope, caps, ctx) {
1567
1626
 
1568
1627
  }
1569
1628
 
1629
+ const selectableNames = state.manifest
1630
+ ? rows.filter((row) => row.status !== 'extra').map((row) => row.name)
1631
+ : local.map((plugin) => plugin.name)
1632
+ const allSelected = selectableNames.length > 0 && selectableNames.every((name) => state.selected.has(name))
1633
+
1570
1634
  const primary = [
1571
1635
  ...(task?.running ? [{ label: en ? 'Stop task' : '取消任务', action: 'stop-task' }] : []),
1572
1636
  { label: en ? 'Copy code' : '复制同步码', action: 'copy-code' },
1573
- { label: en ? 'Select all' : '全选', action: 'select-all' },
1574
- { label: en ? 'Clear' : '清空', action: 'clear' },
1637
+ { label: allSelected ? (en ? 'Select none' : '取消全选') : (en ? 'Select all' : '全选'), action: allSelected ? 'clear' : 'select-all' },
1575
1638
  { label: state.showAll ? (en ? 'Pending only' : '只看待处理') : (en ? 'Show all' : '显示全部'), action: 'toggle-show-all' },
1576
1639
  { label: en ? 'Refresh' : '刷新', action: 'refresh' },
1577
1640
  ]
1578
1641
  children.push({ type: 'actions', items: primary })
1579
1642
 
1580
- children.push({ type: 'actions', items: [
1581
- { label: en ? 'Retry failed' : '重试失败', action: 'retry-failed' },
1582
- { label: en ? 'Export' : '导出清单', action: 'export' },
1583
- { label: en ? 'Read workspace' : '工作区导入', action: 'import-workspace' },
1584
- { label: en ? 'Clear list' : '清空清单', action: 'clear-all' },
1585
- { label: en ? 'Guide' : '使用引导', action: 'guide' },
1586
- ] })
1643
+ const failedCount = results.filter((result) => !result.ok).length
1644
+ const secondary = []
1645
+ if (failedCount > 0) secondary.push({ label: en ? `Retry failed (${failedCount})` : `重试失败(${failedCount})`, action: 'retry-failed' })
1646
+ secondary.push({ label: en ? 'Reset list' : '重置清单', action: 'clear-all' })
1647
+ secondary.push({ label: en ? 'Guide' : '使用引导', action: 'guide' })
1648
+ children.push({ type: 'actions', items: secondary })
1587
1649
 
1588
1650
  if (state.manifest && state.selected.size > 0) {
1589
1651
  children.push({ type: 'confirm', id: 'apply', confirmLabel: en ? 'Apply' : '应用所选', cancelLabel: en ? 'Cancel' : '取消' })
1590
1652
  }
1591
1653
 
1592
- const log = readLogTail()
1654
+ const log = readLogTail(8)
1593
1655
  if (log.length > 0) {
1594
1656
  children.push({ type: 'keyValue', items: log.map((line, index) => [en ? `log ${index + 1}` : `日志 ${index + 1}`, line]) })
1595
1657
  }
@@ -1648,19 +1710,8 @@ function buildGuide(scope, caps, ctx) {
1648
1710
  ['ssh.host', cfg.ssh.host || '—'],
1649
1711
  ] },
1650
1712
  { type: 'text', text: en
1651
- ? 'Advanced: large plugins or two-way file sync use the Git relay / SSH below.'
1652
- : '高级:大插件或双向文件同步用下面的 Git 中转 / SSH。' },
1653
- { type: 'actions', items: [
1654
- { label: en ? 'Copy code' : '复制同步码', action: 'copy-code' },
1655
- { label: en ? 'Config template' : '生成配置模板', action: 'copy-config' },
1656
- { label: en ? 'Back' : '返回同步', action: 'back' },
1657
- ] },
1658
- { type: 'actions', items: [
1659
- { label: en ? 'Push relay' : '推送中转', action: 'relay-push' },
1660
- { label: en ? 'Pull relay' : '拉取中转', action: 'relay-pull' },
1661
- { label: en ? 'Scan SSH' : '拉远端清单', action: 'ssh-scan' },
1662
- { label: en ? 'Test SSH' : '测试 SSH', action: 'ssh-test' },
1663
- ] },
1713
+ ? 'Advanced: large plugins or two-way file sync use the Git relay / SSH from the Sync panel.'
1714
+ : '高级:大插件或双向文件同步,在「插件同步」面板里用 Git 中转 / SSH。' },
1664
1715
  ],
1665
1716
  }
1666
1717
  }
@@ -1735,7 +1786,7 @@ function webSnapshot(ctx) {
1735
1786
  cleared,
1736
1787
  task: readTaskStatus(),
1737
1788
  results: readTaskResults(),
1738
- log: readLogTail(3),
1789
+ log: readLogTail(12),
1739
1790
  config: cfg,
1740
1791
  configPath: configPathFor(ctx, scope),
1741
1792
  }
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
- {
2
- "name": "dsh-go-plugin-sync",
3
- "version": "0.4.2",
4
- "type": "module",
5
- "main": "lib/index.js",
6
- "dsh": {
7
- "bundle": {
8
- "patch": "./cordis.patch.yml"
9
- },
10
- "client": {
11
- "platform": "web",
12
- "immediately": true,
13
- "inject": [
14
- "@deepseek-ai/dsh-client-ui-settings"
15
- ]
16
- }
17
- },
18
- "engines": {
19
- "dsh": ">=0.2.1-rc.2 <0.3.0-0"
20
- },
21
- "dshGo": {
22
- "v": 1,
23
- "title": {
24
- "zh": "插件同步",
25
- "en": "Plugin sync"
26
- },
27
- "icon": "refresh",
28
- "contributes": {
29
- "composer.actions": [
30
- {
31
- "id": "open-sync",
32
- "label": {
33
- "zh": "插件同步",
34
- "en": "Sync"
35
- },
36
- "icon": "refresh",
37
- "effect": {
38
- "type": "open",
39
- "page": "panel:sync"
40
- }
41
- }
42
- ],
43
- "composer.strip": [
44
- {
45
- "id": "pending",
46
- "icon": "refresh",
47
- "panel": "sync"
48
- }
49
- ],
50
- "panels": [
51
- {
52
- "id": "sync",
53
- "title": {
54
- "zh": "插件同步",
55
- "en": "Plugin sync"
56
- },
57
- "icon": "refresh",
58
- "placement": [
59
- "session.tab",
60
- "features"
61
- ],
62
- "presentation": "page"
63
- },
64
- {
65
- "id": "guide",
66
- "title": {
67
- "zh": "同步引导",
68
- "en": "Sync guide"
69
- },
70
- "icon": "book",
71
- "placement": [
72
- "features"
73
- ],
74
- "presentation": "page"
75
- }
76
- ]
77
- }
78
- },
79
- "repository": {
80
- "type": "git",
81
- "url": "https://gitee.com/o12354654/dshgochajiantongbucha.git"
82
- },
83
- "description": "dsh-go 插件同步:用同步码在手机与电脑之间安装 dsh-go / Cordis 插件;支持 Git 中转与 SSH。",
84
- "keywords": [
85
- "dsh",
86
- "dsh-plugin",
87
- "dsh-go",
88
- "plugin-sync"
89
- ],
90
- "homepage": "https://gitee.com/o12354654/dshgochajiantongbucha",
91
- "files": [
92
- "lib",
93
- "cordis.patch.yml",
94
- "README.md",
95
- "CHANGELOG.md"
96
- ],
97
- "exports": {
98
- ".": "./lib/index.js",
99
- "./client": "./lib/client.js",
100
- "./package.json": "./package.json"
101
- }
102
- }
1
+ {
2
+ "name": "dsh-go-plugin-sync",
3
+ "version": "0.4.3",
4
+ "type": "module",
5
+ "main": "lib/index.js",
6
+ "dsh": {
7
+ "bundle": {
8
+ "patch": "./cordis.patch.yml"
9
+ },
10
+ "client": {
11
+ "platform": "web",
12
+ "immediately": true,
13
+ "inject": [
14
+ "@deepseek-ai/dsh-client-ui-settings"
15
+ ]
16
+ }
17
+ },
18
+ "engines": {
19
+ "dsh": ">=0.2.1-rc.2 <0.3.0-0"
20
+ },
21
+ "dshGo": {
22
+ "v": 1,
23
+ "title": {
24
+ "zh": "插件同步",
25
+ "en": "Plugin sync"
26
+ },
27
+ "icon": "refresh",
28
+ "contributes": {
29
+ "composer.actions": [
30
+ {
31
+ "id": "open-sync",
32
+ "label": {
33
+ "zh": "插件同步",
34
+ "en": "Sync"
35
+ },
36
+ "icon": "refresh",
37
+ "effect": {
38
+ "type": "open",
39
+ "page": "panel:sync"
40
+ }
41
+ }
42
+ ],
43
+ "composer.strip": [
44
+ {
45
+ "id": "pending",
46
+ "icon": "refresh",
47
+ "panel": "sync"
48
+ }
49
+ ],
50
+ "panels": [
51
+ {
52
+ "id": "sync",
53
+ "title": {
54
+ "zh": "插件同步",
55
+ "en": "Plugin sync"
56
+ },
57
+ "icon": "refresh",
58
+ "placement": [
59
+ "session.tab",
60
+ "features"
61
+ ],
62
+ "presentation": "page"
63
+ },
64
+ {
65
+ "id": "guide",
66
+ "title": {
67
+ "zh": "同步引导",
68
+ "en": "Sync guide"
69
+ },
70
+ "icon": "book",
71
+ "placement": [
72
+ "features"
73
+ ],
74
+ "presentation": "page"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "https://gitee.com/o12354654/dshgochajiantongbucha.git"
82
+ },
83
+ "description": "dsh-go 插件同步:用同步码在手机与电脑之间安装 dsh-go / Cordis 插件;支持 Git 中转与 SSH。",
84
+ "keywords": [
85
+ "dsh",
86
+ "dsh-plugin",
87
+ "dsh-go",
88
+ "plugin-sync"
89
+ ],
90
+ "homepage": "https://gitee.com/o12354654/dshgochajiantongbucha",
91
+ "files": [
92
+ "lib",
93
+ "cordis.patch.yml",
94
+ "README.md",
95
+ "CHANGELOG.md"
96
+ ],
97
+ "exports": {
98
+ ".": "./lib/index.js",
99
+ "./client": "./lib/client.js",
100
+ "./package.json": "./package.json"
101
+ }
102
+ }