@andyqiu/codeforge 0.5.21 → 0.5.22
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.
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14544,8 +14544,10 @@ var description29 = [
|
|
|
14544
14544
|
"**何时调用**:",
|
|
14545
14545
|
"- 用户说「给这个项目加 ADR / 装一下 ADR 检查 / 同步一下 ADR 模板」",
|
|
14546
14546
|
"- 新项目 init 流程中希望把决策记录体系一起带上",
|
|
14547
|
-
"
|
|
14548
|
-
"
|
|
14547
|
+
"- 已有 ADR 但文件内容不正确时,传 force=true 覆盖修正",
|
|
14548
|
+
"**特点**:零 npm 依赖(用 git config core.hooksPath 而非 husky);跟仓库走(提交 .githooks/ 进 git);幂等(默认 skip 已存在文件,force=true 自动 .bak.<ts> 备份)",
|
|
14549
|
+
"**何时不需要**:当前项目已有完整的 ADR + hooks(默认 skip 行为会保护)",
|
|
14550
|
+
"**\uD83D\uDEAB 失败时严禁绕过**:如果返回 ok=false reason=assets_not_found,必须停止并告知用户重装 codeforge(bash install.sh --global),**绝对不允许手动创建文件替代**——手动创建会产生格式错误的文件(如错误的数字编号前缀),破坏整个项目的 ADR 体系"
|
|
14549
14551
|
].join(`
|
|
14550
14552
|
`);
|
|
14551
14553
|
var ArgsSchema29 = z30.object({
|
|
@@ -16357,7 +16359,8 @@ var codeforgeToolsServer = async (ctx) => {
|
|
|
16357
16359
|
const v = projectValidate("adr_init", ArgsSchema29, args);
|
|
16358
16360
|
if (!v.ok)
|
|
16359
16361
|
return wrap(JSON.parse(v.output));
|
|
16360
|
-
const
|
|
16362
|
+
const dataWithCwd = { ...v.data, cwd: v.data.cwd ?? ctx.directory ?? process.cwd() };
|
|
16363
|
+
const result = await execute29(dataWithCwd);
|
|
16361
16364
|
return wrap(result, { title: "adr_init" });
|
|
16362
16365
|
});
|
|
16363
16366
|
}
|
|
@@ -21132,7 +21135,7 @@ import * as zlib from "node:zlib";
|
|
|
21132
21135
|
// lib/version-injected.ts
|
|
21133
21136
|
function getInjectedVersion() {
|
|
21134
21137
|
try {
|
|
21135
|
-
const v = "0.5.
|
|
21138
|
+
const v = "0.5.22";
|
|
21136
21139
|
if (typeof v === "string" && /^\d+\.\d+\.\d+/.test(v)) {
|
|
21137
21140
|
return v;
|
|
21138
21141
|
}
|