ai-git-tools 2.0.28 → 2.0.29
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/bin/cli.js +32 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -34,7 +34,14 @@ program
|
|
|
34
34
|
program
|
|
35
35
|
.command('init')
|
|
36
36
|
.description('初始化配置檔案 (.ai-git-config.mjs)')
|
|
37
|
-
.action(
|
|
37
|
+
.action(async (options) => {
|
|
38
|
+
try {
|
|
39
|
+
await initCommand(options);
|
|
40
|
+
process.exit(0);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
38
45
|
|
|
39
46
|
// Commit 命令
|
|
40
47
|
program
|
|
@@ -44,7 +51,14 @@ program
|
|
|
44
51
|
.option('-v, --verbose', '顯示詳細輸出')
|
|
45
52
|
.option('--max-diff <number>', '最大 diff 長度')
|
|
46
53
|
.option('--max-retries <number>', '最大重試次數')
|
|
47
|
-
.action(
|
|
54
|
+
.action(async (options) => {
|
|
55
|
+
try {
|
|
56
|
+
await commitCommand(options);
|
|
57
|
+
process.exit(0);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
48
62
|
|
|
49
63
|
// Commit All 命令
|
|
50
64
|
program
|
|
@@ -54,7 +68,14 @@ program
|
|
|
54
68
|
.option('-v, --verbose', '顯示詳細輸出')
|
|
55
69
|
.option('--max-diff <number>', '最大 diff 長度')
|
|
56
70
|
.option('--max-retries <number>', '最大重試次數')
|
|
57
|
-
.action(
|
|
71
|
+
.action(async (options) => {
|
|
72
|
+
try {
|
|
73
|
+
await commitAllCommand(options);
|
|
74
|
+
process.exit(0);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
58
79
|
|
|
59
80
|
// PR 命令
|
|
60
81
|
program
|
|
@@ -66,6 +87,13 @@ program
|
|
|
66
87
|
.option('--no-confirm', '跳過確認直接創建')
|
|
67
88
|
.option('--auto-labels', '自動添加 Labels (預設啟用)')
|
|
68
89
|
.option('--include-impact', '在 PR 中包含影響範圍分析和注意事項 (預設關閉)')
|
|
69
|
-
.action(
|
|
90
|
+
.action(async (options) => {
|
|
91
|
+
try {
|
|
92
|
+
await prCommand(options);
|
|
93
|
+
process.exit(0);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
70
98
|
|
|
71
99
|
program.parse();
|