chore(工作区): 全量入库 + 补齐 .gitignore(以工作区为准)
- 变更规模:新增 514 / 修改 62 / 重命名 155 / 删除 4(归档重组与文档轮次) - .gitignore 修:`归档/**/db-cwd归一-备份-*/` —— 原规则写绝对层级(归档/db-cwd归一-…), 目录搬进 归档/配置与备份/ 后**静默失效**,43 MB 的 DB 备份又变成未跟踪 - .gitignore 补:嵌套 git 内部数据(归档/内嵌git-20261008/、归档/skills-git-旧线-20261007/dotgit-原样移出/) - .gitignore 补:运行态与部署副本(.workbuddy/collab/、.workbuddy/tools/、.workbuddy/.load-pending、.workbuddy/tmp-*) - .gitignore 补:备份件(*.bak-*) - 未跟踪文件从 2190 降到 890(其余为 归档/ 归档件与 .workbuddy/memory/ 知识文件,按口径入库)
This commit is contained in:
1 parent
30b46dbd0c
commit
c1b5e4d966
735 files changed
+153192
-2415
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
import io
|
||||
p = '/opt/dshs/src/web/routes/admin.ts'
|
||||
s = io.open(p, encoding='utf-8').read()
|
||||
anchor = " app.get('/api/admin/users', { preHandler: requireAdmin },"
|
||||
assert anchor in s
|
||||
new = """ // 档案 28:存储用量面板(读取维护脚本生成的快照文件,避免每次请求都 du)
|
||||
app.get('/api/admin/storage', { preHandler: requireAdmin }, async () => {
|
||||
const { readFileSync } = await import('node:fs')
|
||||
try {
|
||||
return JSON.parse(readFileSync(process.env.DSH_STORAGE_REPORT ?? '/var/run/dsh-storage-report.json', 'utf8'))
|
||||
} catch {
|
||||
return { generatedAt: null, users: [], note: '报告尚未生成(cron 每小时刷新一次)' }
|
||||
}
|
||||
})
|
||||
|
||||
""" + anchor
|
||||
io.open(p, 'w', encoding='utf-8', newline='').write(s.replace(anchor, new, 1))
|
||||
print('D admin.ts 新端点已写入')
|
||||
Reference in new issue
Block a user