navori 0.2.18 → 0.2.19
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "cognitive",
|
|
3
3
|
"name": "Cognitive complexity guardrails",
|
|
4
4
|
"description": "Detección de complejidad cognitiva alta via ESLint rule SonarJS",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.4",
|
|
6
6
|
"managed": [
|
|
7
7
|
{
|
|
8
8
|
"id": "cognitive-protocol",
|
|
@@ -34,12 +34,6 @@
|
|
|
34
34
|
"command": "bash .claude/scripts/check-cognitive.sh",
|
|
35
35
|
"timeout": 180,
|
|
36
36
|
"statusMessage": "navori/cognitive: complexity scan"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"event": "Stop",
|
|
40
|
-
"command": "bash .claude/scripts/check-cognitive.sh",
|
|
41
|
-
"timeout": 180,
|
|
42
|
-
"statusMessage": "navori/cognitive: complexity scan (cierre de sesión)"
|
|
43
37
|
}
|
|
44
38
|
]
|
|
45
39
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "jscpd",
|
|
3
3
|
"name": "jscpd (code duplication detector)",
|
|
4
4
|
"description": "Detección de duplicación de código en el diff vs branch base",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.4",
|
|
6
6
|
"managed": [
|
|
7
7
|
{
|
|
8
8
|
"id": "jscpd-protocol",
|
|
@@ -33,12 +33,6 @@
|
|
|
33
33
|
"command": "bash .claude/scripts/check-jscpd.sh",
|
|
34
34
|
"timeout": 180,
|
|
35
35
|
"statusMessage": "navori/jscpd: dup check"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"event": "Stop",
|
|
39
|
-
"command": "bash .claude/scripts/check-jscpd.sh",
|
|
40
|
-
"timeout": 180,
|
|
41
|
-
"statusMessage": "navori/jscpd: dup check (cierre de sesión)"
|
|
42
36
|
}
|
|
43
37
|
]
|
|
44
38
|
}
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
# `{{branchBase}}`. Skips silently if jscpd or git are absent — the tool is
|
|
4
4
|
# optional, not a hard dependency of the project.
|
|
5
5
|
#
|
|
6
|
-
# Triggered as a PreToolUse(Bash) hook
|
|
7
|
-
#
|
|
6
|
+
# Triggered as a PreToolUse(Bash) hook, gated to git commit/push — so the
|
|
7
|
+
# duplication check runs right before code lands, not on every turn.
|
|
8
8
|
|
|
9
9
|
set -euo pipefail
|
|
10
10
|
|
|
11
|
-
# PreToolUse(Bash) passes the command — gate to commit/push.
|
|
12
|
-
# passes no command — run unconditionally at session close. Extract without
|
|
11
|
+
# PreToolUse(Bash) passes the command — gate to commit/push. Extract without
|
|
13
12
|
# hard-depending on jq (not preinstalled on macOS): try jq, then node (Claude
|
|
14
13
|
# Code's own runtime), then a best-effort sed unwrap. No command extracted →
|
|
15
|
-
# empty $cmd → runs unconditionally.
|
|
14
|
+
# empty $cmd → runs unconditionally (defensive: never silently skip a commit).
|
|
16
15
|
payload=$(cat)
|
|
17
16
|
extract_cmd() {
|
|
18
17
|
if command -v jq >/dev/null 2>&1; then
|
|
@@ -69,7 +68,7 @@ jscpd \
|
|
|
69
68
|
--min-tokens 100 \
|
|
70
69
|
--min-lines 10 \
|
|
71
70
|
--mode strict \
|
|
72
|
-
--threshold
|
|
71
|
+
--threshold {{jscpdThreshold}} \
|
|
73
72
|
--reporters console \
|
|
74
73
|
--output "$tmpdir" \
|
|
75
74
|
"${files[@]}"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "semgrep",
|
|
3
3
|
"name": "semgrep (security + pattern analysis)",
|
|
4
4
|
"description": "Detección de vulnerabilidades y patrones inseguros local opt-in",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.4",
|
|
6
6
|
"managed": [
|
|
7
7
|
{
|
|
8
8
|
"id": "semgrep-protocol",
|
|
@@ -32,12 +32,6 @@
|
|
|
32
32
|
"command": "bash .claude/scripts/check-semgrep.sh",
|
|
33
33
|
"timeout": 180,
|
|
34
34
|
"statusMessage": "navori/semgrep: security scan"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"event": "Stop",
|
|
38
|
-
"command": "bash .claude/scripts/check-semgrep.sh",
|
|
39
|
-
"timeout": 180,
|
|
40
|
-
"statusMessage": "navori/semgrep: security scan (cierre de sesión)"
|
|
41
35
|
}
|
|
42
36
|
]
|
|
43
37
|
}
|