dsh-file-activity 0.5.1 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  本文件记录 dsh-file-activity 的所有版本变更。格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.5.3] - 2026-09-01
6
+
7
+ ### 变更
8
+
9
+ - fix(ui): 9 个插件未定义 token danger-primary 改用 error-primary(DSH 主题仅定义 business/error/success/warn)
10
+
11
+ ## [0.5.2] - 2026-08-31
12
+
13
+ ### 变更
14
+
15
+ - fix(ui): dsh-file-activity 移除页签选中态品牌蓝覆盖,回归宿主默认样式(issue #60)
16
+ - feat(ui): dsh-mermaid-render 卡片翻新——图标/前缀/状态(issue #54)
17
+ - feat(ui): dsh-my-guard 安全护栏面板翻新——图标/前缀/状态/交互(issue #54)
18
+ - feat(ui): 共享图标系统 + UI 规范文档(issue #54 阶段0)
19
+ - refactor(shared): 抽取 dsh-shared 共享工具包,10 个插件迁移消除重复实现(issue #45)
20
+ - chore(deps): 升级 react 19 兼容性——13 个插件 peer 声明 ^18.2.0 || ^19.2.0(issue #49)
21
+ - style(format): 全仓 prettier 格式化(issue #44)
22
+
5
23
  ## [0.5.1] - 2026-08-27
6
24
 
7
25
  ### 变更
package/README.md CHANGED
@@ -38,7 +38,6 @@
38
38
 
39
39
  > 💡 **npm 安装(普通用户推荐)**:`dsh plugin --profile web add dsh-file-activity`——无需克隆本仓库;以下 link 方式供本仓库开发者使用。
40
40
 
41
-
42
41
  前置:已安装 `dsh-better-sidebar`(v0.12+,推荐 v0.14)。
43
42
 
44
43
  ```sh
@@ -93,10 +92,10 @@ dsh plugin --profile web add link:<仓库路径>/plugins/dsh-file-activity
93
92
 
94
93
  ## 依赖
95
94
 
96
- | 依赖 | 用途 | 可选 |
97
- |---|---|---|
95
+ | 依赖 | 用途 | 可选 |
96
+ | -------------------- | --------------------------------- | ------------------------------ |
98
97
  | `dsh-better-sidebar` | 侧边栏页签注册 + 浮窗 file viewer | 否(前置,v0.12+,推荐 v0.14) |
99
- | `cordis` | 插件运行时 | 是(宿主提供) |
98
+ | `cordis` | 插件运行时 | 是(宿主提供) |
100
99
 
101
100
  ## 相关文档
102
101
 
package/lib/api-route.js CHANGED
@@ -3,7 +3,8 @@
3
3
  * Every request passes the trust fence first; responses are JSON with
4
4
  * cache-control: no-cache.
5
5
  */
6
- import { readJsonBody, sessionCwdOf, writeError, writeJson } from './http.js'
6
+ import { readJsonBody, writeError, writeJson } from 'dsh-shared'
7
+ import { sessionCwdOf } from './cwd.js'
7
8
  import { mapOp } from './state.js'
8
9
 
9
10
  export function createApiHandler({ ctx, store, fence }) {
@@ -27,7 +28,10 @@ export function createApiHandler({ ctx, store, fence }) {
27
28
  await handleClear(store, request, response)
28
29
  return
29
30
  }
30
- writeJson(response, 404, { ok: false, error: { message: 'unknown file-activity API method' } })
31
+ writeJson(response, 404, {
32
+ ok: false,
33
+ error: { message: 'unknown file-activity API method' },
34
+ })
31
35
  } catch (error) {
32
36
  writeError(response, error)
33
37
  }
@@ -61,10 +65,20 @@ function handleStats(ctx, store, url, response) {
61
65
  return
62
66
  }
63
67
  // Snapshot the leaf fields only — no live objects cross the wire.
64
- const recent = session.recent.map((entry) => ({ path: entry.path, op: entry.op, time: entry.time }))
68
+ const recent = session.recent.map((entry) => ({
69
+ path: entry.path,
70
+ op: entry.op,
71
+ time: entry.time,
72
+ }))
65
73
  const counts = {}
66
74
  for (const [path, counter] of Object.entries(session.counts)) {
67
- counts[path] = { read: counter.read, create: counter.create, modify: counter.modify, firstSeen: counter.firstSeen, lastSeen: counter.lastSeen }
75
+ counts[path] = {
76
+ read: counter.read,
77
+ create: counter.create,
78
+ modify: counter.modify,
79
+ firstSeen: counter.firstSeen,
80
+ lastSeen: counter.lastSeen,
81
+ }
68
82
  }
69
83
  writeJson(response, 200, { ok: true, value: { recent, counts, cwd } })
70
84
  }