文档记录发布链路进度与 registry 待办
已完成:Git 仓库、包配置、prepack/prepublishOnly、update.mjs、repair-profile.mjs、dry-run 通过。 待办:Gitea token 需 write:package 权限才能 publish;不阻塞使用(git 模式已可用)。
This commit is contained in:
1 parent
d3186b3cf6
commit
c4c183fa8c
1 file changed
+38
@@ -152,3 +152,41 @@ node scripts/update.mjs # 拉最新版 + 重建 client + 装进 prof
|
||||
DSH 自己的文件沙箱对 agent 只开放工作区,`~/.dsh` 写入一律 EPERM。
|
||||
这是保护机制(防 agent 误改用户配置),**不是 bug**,所以凡涉及 `~/.dsh` 的操作:
|
||||
代码由 agent 写、命令由人跑。
|
||||
|
||||
## 十二、当前进度与待办(2026-11-08 00:30)
|
||||
|
||||
### 已完成
|
||||
|
||||
| 项 | 状态 |
|
||||
|---|---|
|
||||
| 代码进 Gitea 私有仓库 | ✅ `sidaocai/dsh-markmag` |
|
||||
| 包名 / publishConfig / files 白名单 | ✅ |
|
||||
| `prepack` 自动构建 + `prepublishOnly` 七项检查 | ✅ |
|
||||
| `update.mjs`(git 模式更新) | ✅ 可用 |
|
||||
| `repair-profile.mjs`(bundles 恢复) | ✅ 可用 |
|
||||
| 发布 dry-run | ✅ 通过,10 文件 18.3 KB |
|
||||
|
||||
### 待办:npm registry 发布
|
||||
|
||||
**卡点**:Gitea 发布 npm 包需要带 `write:package` 权限的 token。
|
||||
现有 git 凭证里的 token 没有该权限,且 Gitea 不允许用它自建更大范围的 token(403)。
|
||||
|
||||
**要做**:
|
||||
1. Gitea → 设置 → 应用 → 生成令牌,勾 `write:package`(token 40 位十六进制,只显示一次)
|
||||
2. 写进 `~/.npmrc`(600 权限,**token 绝不进仓库、不进对话**):
|
||||
|
||||
```
|
||||
@sidaocai:registry=https://brain.sidaocai.cn/git/api/packages/sidaocai/npm/
|
||||
//brain.sidaocai.cn/git/api/packages/sidaocai/npm/:_authToken=<真 token>
|
||||
```
|
||||
|
||||
3. 跑 `npm publish`(记得 `NPM_CONFIG_CACHE=/tmp/npm-cache` 避开沙箱)
|
||||
4. 验证 `pnpm` 能从 registry 装,再把 profile 依赖从 `file:` 改成 `^0.1.0`
|
||||
|
||||
**注意**:这件事**不阻塞使用**。git 模式的 `update.mjs` 已经满足「不发文件包」的诉求,
|
||||
registry 的价值只在版本化和指定版本安装,团队铺开前搞定即可。
|
||||
|
||||
### 待办:桌面版 profile 能否被 pnpm 维护
|
||||
|
||||
这是切 registry 前的最后一个未知数:Electron 启动时会不会覆盖 `node_modules`。
|
||||
如果不认,就退回「从 registry 下包 + 手动解压」的折中路线。
|
||||
Reference in new issue
Block a user