Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hooks/claude/test-rtk-rewrite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ test_rewrite "npx prisma migrate" \
"npx prisma migrate" \
"rtk prisma migrate"

test_rewrite "bunx prisma migrate" \
"bunx prisma migrate" \
"rtk prisma migrate"

test_rewrite "rtk git status" \
"rtk git status" \
"rtk git status"
Expand Down
2 changes: 2 additions & 0 deletions src/discover/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2584,6 +2584,7 @@ mod tests {
#[test]
fn test_classify_prisma() {
let commands = vec![
"bunx prisma",
"npm exec prisma",
"npm rum prisma",
"npm run prisma",
Expand Down Expand Up @@ -2618,6 +2619,7 @@ mod tests {
#[test]
fn test_rewrite_prisma() {
let commands = vec![
"bunx prisma",
"npm exec prisma",
"npm rum prisma",
"npm run prisma",
Expand Down
3 changes: 2 additions & 1 deletion src/discover/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ pub const RULES: &[RtkRule] = &[
subcmd_status: &[],
},
RtkRule {
pattern: r"^((p?np(m|x)|p?npm\s+(exec|run|run-script)|npm\s+(rum|urn|x)|pnpm\s+dlx)\s+)?prisma",
pattern: r"^((bunx|p?np(m|x)|p?npm\s+(exec|run|run-script)|npm\s+(rum|urn|x)|pnpm\s+dlx)\s+)?prisma",
rtk_cmd: "rtk prisma",
rewrite_prefixes: &[
"bunx prisma",
"npm exec prisma",
"npm prisma",
"npm rum prisma",
Expand Down
Loading