cc-safe-setup 1.8.4 → 1.8.5

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.
@@ -6,10 +6,10 @@
6
6
  # - Django: flush, sqlflush
7
7
  # - Rails: db:drop, db:reset
8
8
  # - Raw SQL: DROP DATABASE, TRUNCATE
9
+ # - Prisma: migrate reset, db push --force-reset
9
10
  # - PostgreSQL: dropdb
10
11
  #
11
- # Born from GitHub Issue #37405 (SQLite database wiped)
12
- # and #37439 (Laravel migrate:fresh on production DB)
12
+ # Born from GitHub Issues #37405, #37439, #34729
13
13
  #
14
14
  # Usage: Add to settings.json as a PreToolUse hook
15
15
  #
@@ -61,6 +61,12 @@ if echo "$COMMAND" | grep -qiE 'DROP\s+(DATABASE|TABLE|SCHEMA)|TRUNCATE\s+TABLE|
61
61
  exit 2
62
62
  fi
63
63
 
64
+ # Prisma destructive commands
65
+ if echo "$COMMAND" | grep -qiE 'prisma\s+migrate\s+reset|prisma\s+db\s+push\s+--force-reset'; then
66
+ echo "BLOCKED: Destructive Prisma database command" >&2
67
+ exit 2
68
+ fi
69
+
64
70
  # PostgreSQL CLI
65
71
  if echo "$COMMAND" | grep -qE '^\s*dropdb\s'; then
66
72
  echo "BLOCKED: dropdb command" >&2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "One command to make Claude Code safe for autonomous operation. 8 hooks: destructive blocker, branch guard, force-push protection, secret leak prevention, syntax checks, and more.",
5
5
  "main": "index.mjs",
6
6
  "bin": {