@pipemd-core/pipemd 1.0.0
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/AI_SETUP_PIPEMD.md +184 -0
- package/CHANGELOG.md +47 -0
- package/LICENSE +15 -0
- package/README.md +535 -0
- package/dist/index.js +6647 -0
- package/dist/plugins/opencode-server.js +235 -0
- package/dist/plugins/opencode-tui.js +914 -0
- package/dist/templates/agent-decision-tree.md +113 -0
- package/dist/templates/static-rules.md +7 -0
- package/package.json +68 -0
- package/scripts/C-CPP/architecture/arch.sh +229 -0
- package/scripts/C-CPP/lib/limit.sh +146 -0
- package/scripts/C-CPP/project/class-diagram.sh +96 -0
- package/scripts/C-CPP/project/cmake-targets.sh +68 -0
- package/scripts/C-CPP/project/deps.sh +44 -0
- package/scripts/C-CPP/project/find-todos.sh +6 -0
- package/scripts/C-CPP/project/include-graph.sh +110 -0
- package/scripts/C-CPP/project/interfaces.sh +108 -0
- package/scripts/C-CPP/project/tree.sh +5 -0
- package/scripts/C-CPP/quality/lint.sh +14 -0
- package/scripts/C-CPP/quality/test-summary.sh +22 -0
- package/scripts/C-CPP/quality/type-check.sh +26 -0
- package/scripts/DevOps/architecture/arch.sh +186 -0
- package/scripts/DevOps/devops/aws-context.sh +34 -0
- package/scripts/DevOps/devops/docker-stats.sh +42 -0
- package/scripts/DevOps/devops/k8s-unhealthy.sh +41 -0
- package/scripts/DevOps/devops/tf-state.sh +65 -0
- package/scripts/DevOps/lib/limit.sh +143 -0
- package/scripts/Generic/architecture/arch.sh +570 -0
- package/scripts/Generic/lib/limit.sh +140 -0
- package/scripts/Go/architecture/arch.sh +79 -0
- package/scripts/Go/lib/limit.sh +142 -0
- package/scripts/Go/project/deps.sh +35 -0
- package/scripts/Go/project/find-todos.sh +6 -0
- package/scripts/Go/project/go-interfaces.sh +18 -0
- package/scripts/Go/project/go-packages.sh +28 -0
- package/scripts/Go/project/tree.sh +5 -0
- package/scripts/Go/quality/lint.sh +16 -0
- package/scripts/Go/quality/test-summary.sh +16 -0
- package/scripts/Go/quality/type-check.sh +16 -0
- package/scripts/Node-TypeScript/api/express-routes.sh +14 -0
- package/scripts/Node-TypeScript/api/nest-controllers.sh +18 -0
- package/scripts/Node-TypeScript/architecture/arch.sh +174 -0
- package/scripts/Node-TypeScript/frontend/angular-routes.sh +15 -0
- package/scripts/Node-TypeScript/frontend/nextjs-app-router.sh +13 -0
- package/scripts/Node-TypeScript/frontend/react-components.sh +20 -0
- package/scripts/Node-TypeScript/lib/limit.sh +146 -0
- package/scripts/Node-TypeScript/project/deps.sh +15 -0
- package/scripts/Node-TypeScript/project/find-todos.sh +6 -0
- package/scripts/Node-TypeScript/quality/lint.sh +10 -0
- package/scripts/Node-TypeScript/quality/test-summary.sh +39 -0
- package/scripts/Node-TypeScript/quality/type-check.sh +10 -0
- package/scripts/Python/api/fastapi-routes.sh +12 -0
- package/scripts/Python/architecture/arch.sh +220 -0
- package/scripts/Python/db/django-models.sh +12 -0
- package/scripts/Python/db/sqlalchemy.sh +17 -0
- package/scripts/Python/lib/limit.sh +144 -0
- package/scripts/Python/project/deps.sh +28 -0
- package/scripts/Python/project/find-todos.sh +6 -0
- package/scripts/Python/quality/lint.sh +13 -0
- package/scripts/Python/quality/test-summary.sh +11 -0
- package/scripts/Python/quality/type-check.sh +10 -0
- package/scripts/Rust/architecture/arch.sh +176 -0
- package/scripts/Rust/lib/limit.sh +142 -0
- package/scripts/Rust/project/cargo-deps.sh +42 -0
- package/scripts/Rust/project/cargo-features.sh +26 -0
- package/scripts/Rust/project/find-todos.sh +6 -0
- package/scripts/Rust/project/tree.sh +5 -0
- package/scripts/Rust/quality/lint.sh +16 -0
- package/scripts/Rust/quality/test-summary.sh +16 -0
- package/scripts/Rust/quality/type-check.sh +16 -0
- package/scripts/Shared/api/express-routes.sh +11 -0
- package/scripts/Shared/api/fastapi-routes.sh +10 -0
- package/scripts/Shared/api/nest-controllers.sh +22 -0
- package/scripts/Shared/architecture/normalize.sh +178 -0
- package/scripts/Shared/crew/crew.sh +15 -0
- package/scripts/Shared/db/django-models.sh +11 -0
- package/scripts/Shared/db/prisma.sh +33 -0
- package/scripts/Shared/db/sqlalchemy.sh +12 -0
- package/scripts/Shared/frontend/angular-routes.sh +11 -0
- package/scripts/Shared/frontend/nextjs-app-router.sh +13 -0
- package/scripts/Shared/frontend/react-components.sh +11 -0
- package/scripts/Shared/git/diff-stat.sh +6 -0
- package/scripts/Shared/git/git-branch.sh +16 -0
- package/scripts/Shared/git/git-log.sh +6 -0
- package/scripts/Shared/git/git-status.sh +6 -0
- package/scripts/Shared/lib/limit.sh +144 -0
- package/scripts/Shared/project/compose-md.sh +182 -0
- package/scripts/Shared/project/deps.sh +69 -0
- package/scripts/Shared/project/find-todos.sh +6 -0
- package/scripts/Shared/project/tree.sh +5 -0
- package/scripts/Shared/quality/lint.sh +81 -0
- package/scripts/Shared/quality/test-summary.sh +103 -0
- package/scripts/Shared/quality/type-check.sh +114 -0
- package/scripts/copy-plugins.mjs +4 -0
- package/scripts/copy-templates.mjs +5 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -uo pipefail
|
|
3
|
+
# Auto-detect type checker and run, prioritizing detected ecosystem
|
|
4
|
+
source "$(dirname "$0")/../lib/limit.sh"
|
|
5
|
+
|
|
6
|
+
eco="${PMD_ECOSYSTEM:-}"
|
|
7
|
+
|
|
8
|
+
case "$eco" in
|
|
9
|
+
Node-TypeScript)
|
|
10
|
+
if [ -f tsconfig.json ] && command -v npx &>/dev/null; then
|
|
11
|
+
out=$(npx tsc --noEmit 2>&1 | head -20)
|
|
12
|
+
if [ -z "$out" ]; then
|
|
13
|
+
echo "No type errors"
|
|
14
|
+
exit 0
|
|
15
|
+
fi
|
|
16
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more type errors')"
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
echo "No TypeScript compiler found"
|
|
20
|
+
exit 0
|
|
21
|
+
;;
|
|
22
|
+
Python)
|
|
23
|
+
if command -v mypy &>/dev/null || command -v python &>/dev/null; then
|
|
24
|
+
out=$(python -m mypy . 2>&1 | head -20)
|
|
25
|
+
if [ -z "$out" ]; then
|
|
26
|
+
echo "No type errors"
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more mypy errors')"
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
echo "No mypy found"
|
|
33
|
+
exit 0
|
|
34
|
+
;;
|
|
35
|
+
C-CPP)
|
|
36
|
+
if [ -f CMakeLists.txt ] && [ -d build ]; then
|
|
37
|
+
out=$(cmake --build build 2>&1 | grep -E 'warning:|error:' | head -20)
|
|
38
|
+
if [ -z "$out" ]; then
|
|
39
|
+
echo "No compiler warnings"
|
|
40
|
+
exit 0
|
|
41
|
+
fi
|
|
42
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more compiler warnings')"
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
echo "No CMake build directory found"
|
|
46
|
+
exit 0
|
|
47
|
+
;;
|
|
48
|
+
Rust)
|
|
49
|
+
if command -v cargo &>/dev/null && [ -f Cargo.toml ]; then
|
|
50
|
+
out=$(cargo check 2>&1 | grep -E '^error' | head -20)
|
|
51
|
+
if [ -z "$out" ]; then
|
|
52
|
+
echo "No type errors"
|
|
53
|
+
exit 0
|
|
54
|
+
fi
|
|
55
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more type errors')"
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
echo "No cargo found"
|
|
59
|
+
exit 0
|
|
60
|
+
;;
|
|
61
|
+
Go)
|
|
62
|
+
if command -v go &>/dev/null && [ -f go.mod ]; then
|
|
63
|
+
out=$(go build ./... 2>&1 | head -20)
|
|
64
|
+
if [ -z "$out" ]; then
|
|
65
|
+
echo "No build errors"
|
|
66
|
+
exit 0
|
|
67
|
+
fi
|
|
68
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more build errors')"
|
|
69
|
+
exit 0
|
|
70
|
+
fi
|
|
71
|
+
echo "No go found"
|
|
72
|
+
exit 0
|
|
73
|
+
;;
|
|
74
|
+
esac
|
|
75
|
+
|
|
76
|
+
# Generic: auto-detect
|
|
77
|
+
if [ -f tsconfig.json ] && command -v npx &>/dev/null; then
|
|
78
|
+
out=$(npx tsc --noEmit 2>&1 | head -20)
|
|
79
|
+
if [ -z "$out" ]; then
|
|
80
|
+
echo "No type errors"
|
|
81
|
+
exit 0
|
|
82
|
+
fi
|
|
83
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more type errors')"
|
|
84
|
+
elif command -v mypy &>/dev/null || [ -f pyproject.toml ]; then
|
|
85
|
+
out=$(python -m mypy . 2>&1 | head -20)
|
|
86
|
+
if [ -z "$out" ]; then
|
|
87
|
+
echo "No type errors"
|
|
88
|
+
exit 0
|
|
89
|
+
fi
|
|
90
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -5 && echo '... more mypy errors')"
|
|
91
|
+
elif [ -f CMakeLists.txt ] && [ -d build ]; then
|
|
92
|
+
out=$(cmake --build build 2>&1 | grep -E 'warning:|error:' | head -20)
|
|
93
|
+
if [ -z "$out" ]; then
|
|
94
|
+
echo "No compiler warnings"
|
|
95
|
+
exit 0
|
|
96
|
+
fi
|
|
97
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more compiler warnings')"
|
|
98
|
+
elif command -v cargo &>/dev/null && [ -f Cargo.toml ]; then
|
|
99
|
+
out=$(cargo check 2>&1 | grep -E '^error' | head -20)
|
|
100
|
+
if [ -z "$out" ]; then
|
|
101
|
+
echo "No type errors"
|
|
102
|
+
exit 0
|
|
103
|
+
fi
|
|
104
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more type errors')"
|
|
105
|
+
elif command -v go &>/dev/null && [ -f go.mod ]; then
|
|
106
|
+
out=$(go build ./... 2>&1 | head -20)
|
|
107
|
+
if [ -z "$out" ]; then
|
|
108
|
+
echo "No build errors"
|
|
109
|
+
exit 0
|
|
110
|
+
fi
|
|
111
|
+
limit_output "$out" "$MAX_TYPECHECK" "$(echo "$out" | head -3 && echo '... more build errors')"
|
|
112
|
+
else
|
|
113
|
+
echo "No type checker configured for this ecosystem"
|
|
114
|
+
fi
|