dsh-vidlens 1.2.0 → 1.2.1

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/README.md +1 -1
  2. package/RELEASING.md +25 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -205,7 +205,7 @@ git tag v1.2.0 && git push origin v1.2.0
205
205
 
206
206
  `release.yml` 会 `npm pack`、`npm publish --access public`,走 **Trusted Publishing(OIDC)**——
207
207
  CI 里没有任何长期 token。npm 的 publisher 只能在包存在后配置,所以**首次发布要在本地做一次**
208
- (`npm login` → `npm publish`,见 `RELEASING.md`),之后打 tag 即可。
208
+ (`npm stage publish` → `npm stage approve`,全程不需要把 token 交给 CI,见 `RELEASING.md`),之后打 tag 即可。
209
209
 
210
210
  > 注意:PowerShell 5.1 不支持 `&&`,用 `;` 或分行。
211
211
 
package/RELEASING.md CHANGED
@@ -1,22 +1,37 @@
1
1
  # 发布(维护者)
2
2
 
3
- 两步:**首次发布只能在本地做一次**(包还不存在,npm 没有「包设置」页可配 Trusted Publisher),
4
- **之后全部走 OIDC**,CI 里没有任何长期 token。
3
+ 首次发布用 **staged publishing**(`npm stage publish` **不需要 2FA**,批准时才要);
4
+ 之后全部走 **OIDC Trusted Publishing**,CI 里没有任何长期 token。
5
5
 
6
- ## 1. 首次发布(只做一次 · 本地)
6
+ > 别用 `npm publish` 做首次发布:npm 现在对它强制 2FA,CLI 的 `--otp` 也常被同样拒绝
7
+ > (`403 ... bypass 2fa enabled is required`)。
8
+
9
+ ## 1. 首次发布:stage(不需要 2FA)
7
10
 
8
11
  ```powershell
12
+ npm --version # 需要 >= 11.15.0,低了就 npm i -g npm@latest
9
13
  cd D:\vidlens\vidlens-mcp-dsh
10
- npm login # 浏览器授权,或按提示输入 OTP
11
- npm publish --access public # 账号开了 2FA 会要一次 OTP;这是交互式的,不需要 token
14
+ npm stage publish --access public
15
+ npm stage list # 记下 id,等 status 变成 staged
12
16
  ```
13
17
 
14
- 成功后包就有了:<https://www.npmjs.com/package/dsh-vidlens>
18
+ 新包会先在 registry 上生成一个 `0.0.0-stage` 占位版本(公开可见),
19
+ 真正要发的版本留在 staging 区,**批准后才上线**。
20
+
21
+ ## 2. 批准(要 2FA,只有你能做)
22
+
23
+ **用命令行,最可靠**(网页的 Staged Packages 入口时有时无,`/package/<name>/staged` 可能 404):
24
+
25
+ ```powershell
26
+ npm stage approve <stage-id> # 会提示输入 6 位 OTP
27
+ npm view dsh-vidlens versions # 批准后应能看到目标版本
28
+ ```
15
29
 
16
- > 为什么不走 CI:npm 的 Trusted Publisher 配置在**包设置**里,包不存在时没有这个页面。
17
- > 这一步也**不需要**把任何 token 交给 CI。
30
+ > OTP 只有 30 秒有效,输慢了就重来。
31
+ > 如果 2FA 是「安全密钥(WebAuthn)」而不是验证器 App,CLI 无法输入 OTP——
32
+ > 先把 npm 账号的 2FA 改成 TOTP(Authenticator app)再重试。
18
33
 
19
- ## 2. 配置 Trusted Publisher(一次性)
34
+ ## 3. 配置 Trusted Publisher(一次性)
20
35
 
21
36
  1. 打开 <https://www.npmjs.com/package/dsh-vidlens/access>
22
37
  (或包页 → **Settings** → **Trusted Publisher**)
@@ -24,7 +39,7 @@ npm publish --access public # 账号开了 2FA 会要一次 OTP;这是交互
24
39
 
25
40
  | 字段 | 值 |
26
41
  |---|---|
27
- | Organization or user | `cctv2333` |
42
+ | Organization or user | `cctv2333` ← **GitHub** 用户名(不是 npm 的 `ghost120`) |
28
43
  | Repository | `dsh-vidlens` |
29
44
  | Workflow filename | `release.yml`(只写文件名,带 `.yml`) |
30
45
  | Environment name | 留空 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-vidlens",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "description": "VidLens for DeepSeek Harness: turn a public video into an evidence table (timecoded transcript, sampling sheets, sound events, comments) without downloading the whole file. 18 native tools backed by the local vidlens Python core.",
6
6
  "keywords": [