codeant-cli 0.4.1 → 0.4.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeant-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Code review CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
".": "./src/reviewHeadless.js",
|
|
28
28
|
"./review": "./src/reviewHeadless.js",
|
|
29
|
-
"./push-protection": "./src/utils/installPushProtectionHook.js"
|
|
29
|
+
"./push-protection": "./src/utils/installPushProtectionHook.js",
|
|
30
|
+
"./config": "./src/utils/config.js"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
33
|
"src"
|
|
@@ -25,7 +25,10 @@ function buildHookBlock(cliPath) {
|
|
|
25
25
|
# Auto-installed by CodeAnt AI — blocks pushes containing secrets.
|
|
26
26
|
# To disable: delete this hook or run "codeant push-protection disable"
|
|
27
27
|
# Uses the CLI bundled with the VS Code extension.
|
|
28
|
-
|
|
28
|
+
# Reopen stdin from terminal so the CLI can show an interactive bypass prompt.
|
|
29
|
+
# In non-interactive environments (CI), this silently fails and the push is blocked.
|
|
30
|
+
exec < /dev/tty 2>/dev/null || true
|
|
31
|
+
if [ -f "${cliPath}" ] && command -v node >/dev/null 2>&1; then
|
|
29
32
|
node "${cliPath}" secrets --committed --hook
|
|
30
33
|
else
|
|
31
34
|
command -v codeant >/dev/null 2>&1 || exit 0
|
|
@@ -36,6 +39,7 @@ ${HOOK_MARKER_END}`;
|
|
|
36
39
|
return `${HOOK_MARKER}
|
|
37
40
|
# Auto-installed by CodeAnt AI — blocks pushes containing secrets.
|
|
38
41
|
# To disable: delete this hook or run "codeant push-protection disable"
|
|
42
|
+
exec < /dev/tty 2>/dev/null || true
|
|
39
43
|
command -v codeant >/dev/null 2>&1 || exit 0
|
|
40
44
|
codeant secrets --committed --hook
|
|
41
45
|
${HOOK_MARKER_END}`;
|