Files
dacli/package.json
T
sswandClaude 06506134d1 feat(storage): 新增 dacli storage 文件存储 (白皮书 5.16, 6 子命令)
白皮书 5.16 — 7 种后端 (local-plus/aliyun-oss/qiniu-kodo/tencent-cos/minio/
huawei-obs/jdcloud) 通过 dromara x-file-storage 配置走 application-*.yml
的 config.file-storage.* 段, 关键扫描结果: 无 CRUD API (dacli apis list
--keyword=oss/minio/storage 全部 0 端点), 即 storage 是部署期 yml 配置,
不是运行期 API。

6 子命令:
- list    列出所有 platform (含 enable-storage / active 状态)
- info    详细配置 (access-key/secret-key/secret-id/password/appSecret
          自动脱敏成 4***4 形式)
- test    走 JNPF /api/file/Uploader/{type} 上传 1KB 测试文件, 验证后端
          真通
- use     切换 default-platform (先备份 yml 到 .history/yml-backup-{ISO}.yml,
          写 yml, 提示手动重启 JNPF, 不自动重启 — initapp 才有 --restart 语义)
- backup  显式备份 yml
- diff    跟 git HEAD 对比 yml 变化 (yml 不在 git 仓库内时优雅报错)

yml 解析兼容 config.file-storage 嵌套 (实际 yml 配置如此) 和顶层
file-storage 两种位置, 写回走 yaml.stringify 保留其他无关字段。

依赖: 新增 yaml@^2.9.0 (3rd party 维护最好, 与 spring yml 兼容)。

Co-Authored-By: Claude <[email protected]>
2026-06-13 14:02:13 +08:00

43 lines
1.0 KiB
JSON

{
"name": "dacli-ts",
"version": "0.1.0",
"description": "TypeScript-based dacli CLI for JNPF platform — 0 差错 baseline replication.",
"type": "module",
"private": true,
"bin": {
"dacli": "src/cli.ts"
},
"scripts": {
"dacli": "tsx src/cli.ts",
"test": "vitest run",
"test:watch": "vitest",
"test:e2e": "playwright test",
"extract": "tsx scripts/extract-all.mjs",
"verify:baseline": "bash .claude/skills/dacli-ts/examples/baseline/all.sh",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@vue/compiler-sfc": "^3.5.0",
"commander": "^12.1.0",
"crypto-js": "^4.2.0",
"vue": "^3.5.0",
"yaml": "^2.9.0"
},
"optionalDependencies": {
"better-sqlite3": "^11.3.0"
},
"devDependencies": {
"@playwright/test": "^1.48.0",
"@types/better-sqlite3": "^7.6.11",
"@types/crypto-js": "^4.2.2",
"@types/node": "^22.0.0",
"pixelmatch": "^6.0.0",
"tsx": "^4.19.0",
"typescript": "^5.6.0",
"vitest": "^2.1.0"
},
"engines": {
"node": ">=20"
}
}