dsh-usage-prism 0.1.1 → 0.1.2

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 (2) hide show
  1. package/README.md +6 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -70,7 +70,7 @@ dsh 的侧边栏用量面板:看 token 用量、时间去向与逐模型性能
70
70
 
71
71
  ## 安装
72
72
 
73
- 需要 dsh `^0.2.3-alpha.3`。打开 **Plugins** 页 → **Add plugin**,填 GitHub 地址或本地目录都可以:
73
+ 需要 dsh `^0.2.3-alpha.3`。打开 **Plugins** 页 → **Add plugin**,下面三种填法都行(npm 页面:https://www.npmjs.com/package/dsh-usage-prism):
74
74
 
75
75
  | 填什么 | 例子 |
76
76
  |---|---|
@@ -129,15 +129,13 @@ npm run demo # 重新生成 README 里的截图(需要本机 Chrom
129
129
 
130
130
  ## 发布
131
131
 
132
- 改 `package.json` 的 `version` 推到 `main` 就会发布——`.github/workflows/publish.yml` 会先跑测试,再看这个版本是不是已经在 registry 上。打 `v*` tag 走同一条流水线,也可以在 Actions 里手动触发。
132
+ 改 `package.json` 的 `version` 再 push 到 `main` 就发布,不需要在本地跑 `npm publish`:
133
133
 
134
- 用的是 npm 的 Trusted Publishing:仓库里不存任何长期令牌,发布权限来自 GitHub 的 OIDC 短期凭证。包还没在 npm 上注册时,流水线只留一条提示、不报错。
134
+ - `.github/workflows/publish.yml` 先跑测试,再确认这个版本还没在 registry 上,然后用 npm 的 Trusted Publishing(GitHub OIDC 短期凭证,仓库里没有任何 token)发布,并附上 provenance
135
+ - 版本已经发布过就跳过;打 `v*` tag 走同一条流水线,tag 与版本号不一致会直接失败
136
+ - npm 侧处理需要两三分钟,`npm view` 一时看不到新版本是正常的
135
137
 
136
- 第一次发布需要手动一次(registry 上还不存在的包无法绑定 Trusted Publisher):
137
-
138
- 1. 本地 `npm login`,然后 `npm publish`
139
- 2. 在 npm 的包设置 → Trusted Publishing 填:Organization or user `shizukunatsuki`、Repository `dsh-usage-prism`、Workflow filename `publish.yml`
140
- 3. 之后只改版本号、push
138
+ 发布权限绑定在 npm 的包设置里,`npm trust list dsh-usage-prism` 可以查看。
141
139
 
142
140
  ## 许可
143
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-usage-prism",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "侧边栏用量面板:按本日 / 本周 / 本月 / 本年把 token 用量、时间去向与逐模型性能拆开来看。只读本机会话日志。",
5
5
  "type": "module",
6
6
  "license": "MIT",