claude-sdlc 1.0.1 → 1.0.2
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/lib/installer.js +2 -2
- package/package.json +1 -1
- package/template/.claude/settings.json +3 -11
package/lib/installer.js
CHANGED
|
@@ -42,7 +42,7 @@ function copyFiles(srcDir, destDir, ext, label) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* 提取 hook 组的唯一标识(用于去重)
|
|
45
|
-
*
|
|
45
|
+
* 格式:{ matcher: "正则字符串", hooks: [{ type, command/prompt }] }
|
|
46
46
|
*/
|
|
47
47
|
function hookGroupKey(group) {
|
|
48
48
|
if (group.hooks && Array.isArray(group.hooks)) {
|
|
@@ -54,7 +54,7 @@ function hookGroupKey(group) {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* 智能合并 settings.json — 合并 hooks 数组(去重)
|
|
57
|
-
*
|
|
57
|
+
* 格式:{ matcher: "Write|Edit", hooks: [{ type, command/prompt }] }
|
|
58
58
|
*/
|
|
59
59
|
function mergeSettings(existing, template) {
|
|
60
60
|
const hookTypes = ['PreToolUse', 'PostToolUse', 'Stop', 'PreCompact'];
|
package/package.json
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
"hooks": {
|
|
3
3
|
"PreToolUse": [
|
|
4
4
|
{
|
|
5
|
-
"matcher":
|
|
6
|
-
"tools": ["Write", "Edit"]
|
|
7
|
-
},
|
|
5
|
+
"matcher": "Write|Edit",
|
|
8
6
|
"hooks": [
|
|
9
7
|
{
|
|
10
8
|
"type": "command",
|
|
@@ -13,9 +11,7 @@
|
|
|
13
11
|
]
|
|
14
12
|
},
|
|
15
13
|
{
|
|
16
|
-
"matcher":
|
|
17
|
-
"tools": ["Bash"]
|
|
18
|
-
},
|
|
14
|
+
"matcher": "Bash",
|
|
19
15
|
"hooks": [
|
|
20
16
|
{
|
|
21
17
|
"type": "command",
|
|
@@ -26,9 +22,7 @@
|
|
|
26
22
|
],
|
|
27
23
|
"PostToolUse": [
|
|
28
24
|
{
|
|
29
|
-
"matcher":
|
|
30
|
-
"tools": ["Write", "Edit"]
|
|
31
|
-
},
|
|
25
|
+
"matcher": "Write|Edit",
|
|
32
26
|
"hooks": [
|
|
33
27
|
{
|
|
34
28
|
"type": "prompt",
|
|
@@ -39,7 +33,6 @@
|
|
|
39
33
|
],
|
|
40
34
|
"Stop": [
|
|
41
35
|
{
|
|
42
|
-
"matcher": {},
|
|
43
36
|
"hooks": [
|
|
44
37
|
{
|
|
45
38
|
"type": "prompt",
|
|
@@ -50,7 +43,6 @@
|
|
|
50
43
|
],
|
|
51
44
|
"PreCompact": [
|
|
52
45
|
{
|
|
53
|
-
"matcher": {},
|
|
54
46
|
"hooks": [
|
|
55
47
|
{
|
|
56
48
|
"type": "prompt",
|