@vyuhlabs/dxkit 2.4.8 → 2.5.1
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/CHANGELOG.md +312 -0
- package/README.md +360 -439
- package/dist/analyzers/security/aggregator.d.ts.map +1 -1
- package/dist/analyzers/security/aggregator.js +4 -46
- package/dist/analyzers/security/aggregator.js.map +1 -1
- package/dist/analyzers/tools/fingerprint.d.ts +91 -26
- package/dist/analyzers/tools/fingerprint.d.ts.map +1 -1
- package/dist/analyzers/tools/fingerprint.js +111 -22
- package/dist/analyzers/tools/fingerprint.js.map +1 -1
- package/dist/analyzers/tools/generic.d.ts.map +1 -1
- package/dist/analyzers/tools/generic.js +6 -1
- package/dist/analyzers/tools/generic.js.map +1 -1
- package/dist/analyzers/tools/gitleaks.d.ts +24 -1
- package/dist/analyzers/tools/gitleaks.d.ts.map +1 -1
- package/dist/analyzers/tools/gitleaks.js +20 -11
- package/dist/analyzers/tools/gitleaks.js.map +1 -1
- package/dist/analyzers/tools/graphify.d.ts.map +1 -1
- package/dist/analyzers/tools/graphify.js +9 -5
- package/dist/analyzers/tools/graphify.js.map +1 -1
- package/dist/analyzers/tools/tool-registry.d.ts +19 -1
- package/dist/analyzers/tools/tool-registry.d.ts.map +1 -1
- package/dist/analyzers/tools/tool-registry.js +25 -0
- package/dist/analyzers/tools/tool-registry.js.map +1 -1
- package/dist/analyzers/types.d.ts +6 -4
- package/dist/analyzers/types.d.ts.map +1 -1
- package/dist/baseline/baseline-file.d.ts +104 -0
- package/dist/baseline/baseline-file.d.ts.map +1 -0
- package/dist/baseline/baseline-file.js +110 -0
- package/dist/baseline/baseline-file.js.map +1 -0
- package/dist/baseline/check-renderers.d.ts +108 -0
- package/dist/baseline/check-renderers.d.ts.map +1 -0
- package/dist/baseline/check-renderers.js +379 -0
- package/dist/baseline/check-renderers.js.map +1 -0
- package/dist/baseline/check.d.ts +127 -0
- package/dist/baseline/check.d.ts.map +1 -0
- package/dist/baseline/check.js +462 -0
- package/dist/baseline/check.js.map +1 -0
- package/dist/baseline/content-hash.d.ts +83 -0
- package/dist/baseline/content-hash.d.ts.map +1 -0
- package/dist/baseline/content-hash.js +131 -0
- package/dist/baseline/content-hash.js.map +1 -0
- package/dist/baseline/create.d.ts +96 -0
- package/dist/baseline/create.d.ts.map +1 -0
- package/dist/baseline/create.js +339 -0
- package/dist/baseline/create.js.map +1 -0
- package/dist/baseline/entry-to-located.d.ts +35 -0
- package/dist/baseline/entry-to-located.d.ts.map +1 -0
- package/dist/baseline/entry-to-located.js +72 -0
- package/dist/baseline/entry-to-located.js.map +1 -0
- package/dist/baseline/finding-identity.d.ts +47 -0
- package/dist/baseline/finding-identity.d.ts.map +1 -0
- package/dist/baseline/finding-identity.js +292 -0
- package/dist/baseline/finding-identity.js.map +1 -0
- package/dist/baseline/git-aware-match.d.ts +146 -0
- package/dist/baseline/git-aware-match.d.ts.map +1 -0
- package/dist/baseline/git-aware-match.js +439 -0
- package/dist/baseline/git-aware-match.js.map +1 -0
- package/dist/baseline/policy.d.ts +171 -0
- package/dist/baseline/policy.d.ts.map +1 -0
- package/dist/baseline/policy.js +206 -0
- package/dist/baseline/policy.js.map +1 -0
- package/dist/baseline/producers/health.d.ts +30 -0
- package/dist/baseline/producers/health.d.ts.map +1 -0
- package/dist/baseline/producers/health.js +42 -0
- package/dist/baseline/producers/health.js.map +1 -0
- package/dist/baseline/producers/index.d.ts +164 -0
- package/dist/baseline/producers/index.d.ts.map +1 -0
- package/dist/baseline/producers/index.js +200 -0
- package/dist/baseline/producers/index.js.map +1 -0
- package/dist/baseline/producers/licenses.d.ts +23 -0
- package/dist/baseline/producers/licenses.d.ts.map +1 -0
- package/dist/baseline/producers/licenses.js +46 -0
- package/dist/baseline/producers/licenses.js.map +1 -0
- package/dist/baseline/producers/quality.d.ts +39 -0
- package/dist/baseline/producers/quality.d.ts.map +1 -0
- package/dist/baseline/producers/quality.js +84 -0
- package/dist/baseline/producers/quality.js.map +1 -0
- package/dist/baseline/producers/secret-hmac.d.ts +45 -0
- package/dist/baseline/producers/secret-hmac.d.ts.map +1 -0
- package/dist/baseline/producers/secret-hmac.js +70 -0
- package/dist/baseline/producers/secret-hmac.js.map +1 -0
- package/dist/baseline/producers/security.d.ts +59 -0
- package/dist/baseline/producers/security.d.ts.map +1 -0
- package/dist/baseline/producers/security.js +135 -0
- package/dist/baseline/producers/security.js.map +1 -0
- package/dist/baseline/producers/tests.d.ts +36 -0
- package/dist/baseline/producers/tests.d.ts.map +1 -0
- package/dist/baseline/producers/tests.js +69 -0
- package/dist/baseline/producers/tests.js.map +1 -0
- package/dist/baseline/salt.d.ts +45 -0
- package/dist/baseline/salt.d.ts.map +1 -0
- package/dist/baseline/salt.js +113 -0
- package/dist/baseline/salt.js.map +1 -0
- package/dist/baseline/show.d.ts +79 -0
- package/dist/baseline/show.d.ts.map +1 -0
- package/dist/baseline/show.js +233 -0
- package/dist/baseline/show.js.map +1 -0
- package/dist/baseline/types.d.ts +482 -0
- package/dist/baseline/types.d.ts.map +1 -0
- package/dist/baseline/types.js +53 -0
- package/dist/baseline/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +398 -82
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +39 -35
- package/dist/doctor.js.map +1 -1
- package/dist/fail-on.d.ts +84 -0
- package/dist/fail-on.d.ts.map +1 -0
- package/dist/fail-on.js +128 -0
- package/dist/fail-on.js.map +1 -0
- package/dist/generator.d.ts +1 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +81 -274
- package/dist/generator.js.map +1 -1
- package/dist/hooks-cli.d.ts +20 -0
- package/dist/hooks-cli.d.ts.map +1 -0
- package/dist/hooks-cli.js +145 -0
- package/dist/hooks-cli.js.map +1 -0
- package/dist/languages/csharp.d.ts.map +1 -1
- package/dist/languages/csharp.js +4 -9
- package/dist/languages/csharp.js.map +1 -1
- package/dist/languages/go.d.ts.map +1 -1
- package/dist/languages/go.js +3 -14
- package/dist/languages/go.js.map +1 -1
- package/dist/languages/index.d.ts +19 -1
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +32 -0
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/java.d.ts.map +1 -1
- package/dist/languages/java.js +4 -6
- package/dist/languages/java.js.map +1 -1
- package/dist/languages/kotlin.d.ts.map +1 -1
- package/dist/languages/kotlin.js +9 -11
- package/dist/languages/kotlin.js.map +1 -1
- package/dist/languages/python.d.ts.map +1 -1
- package/dist/languages/python.js +4 -15
- package/dist/languages/python.js.map +1 -1
- package/dist/languages/ruby.d.ts.map +1 -1
- package/dist/languages/ruby.js +4 -6
- package/dist/languages/ruby.js.map +1 -1
- package/dist/languages/rust.d.ts.map +1 -1
- package/dist/languages/rust.js +4 -4
- package/dist/languages/rust.js.map +1 -1
- package/dist/languages/types.d.ts +29 -28
- package/dist/languages/types.d.ts.map +1 -1
- package/dist/languages/typescript.d.ts.map +1 -1
- package/dist/languages/typescript.js +31 -4
- package/dist/languages/typescript.js.map +1 -1
- package/dist/lib.d.ts +2 -3
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +3 -6
- package/dist/lib.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +0 -10
- package/dist/prompts.js.map +1 -1
- package/dist/report-schema.d.ts +42 -0
- package/dist/report-schema.d.ts.map +1 -0
- package/dist/report-schema.js +54 -0
- package/dist/report-schema.js.map +1 -0
- package/dist/ship-installers.d.ts +112 -0
- package/dist/ship-installers.d.ts.map +1 -0
- package/dist/ship-installers.js +530 -0
- package/dist/ship-installers.js.map +1 -0
- package/dist/tools-cli.d.ts.map +1 -1
- package/dist/tools-cli.js +45 -9
- package/dist/tools-cli.js.map +1 -1
- package/dist/types.d.ts +0 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +0 -4
- package/dist/update.js.map +1 -1
- package/package.json +17 -11
- package/templates/.claude/skills/dxkit-action/SKILL.md +150 -0
- package/templates/.claude/skills/dxkit-config/SKILL.md +124 -0
- package/templates/.claude/skills/dxkit-hooks/SKILL.md +109 -0
- package/templates/.claude/skills/dxkit-init/SKILL.md +93 -0
- package/templates/.claude/skills/dxkit-learn/SKILL.md +84 -0
- package/templates/.claude/skills/dxkit-reports/SKILL.md +111 -0
- package/templates/.devcontainer/devcontainer.json +55 -0
- package/templates/.devcontainer/install-agent-clis.sh +42 -0
- package/templates/.devcontainer/post-create.sh +81 -0
- package/templates/.githooks/pre-commit +55 -0
- package/templates/.githooks/pre-push +63 -0
- package/templates/.github/workflows/dxkit-baseline-refresh.yml +78 -0
- package/templates/.github/workflows/dxkit-guardrails.yml +98 -0
- package/templates/AGENTS.md.template +137 -0
- package/templates/CLAUDE.md.template +16 -245
- package/dist/codebase-scanner.d.ts +0 -36
- package/dist/codebase-scanner.d.ts.map +0 -1
- package/dist/codebase-scanner.js +0 -688
- package/dist/codebase-scanner.js.map +0 -1
- package/dist/project-yaml.d.ts +0 -13
- package/dist/project-yaml.d.ts.map +0 -1
- package/dist/project-yaml.js +0 -188
- package/dist/project-yaml.js.map +0 -1
- package/templates/.ai/README.md +0 -117
- package/templates/.ai/prompts/execution-prompt.md +0 -9
- package/templates/.ai/prompts/planning-prompt.md +0 -18
- package/templates/.ai/prompts/session-end-template.md +0 -182
- package/templates/.ai/prompts/session-end.md +0 -132
- package/templates/.ai/prompts/session-start.md +0 -109
- package/templates/.ai/prompts/step-by-step.md +0 -113
- package/templates/.ai/sessions/.gitkeep +0 -0
- package/templates/.claude/agents/doc-writer.md +0 -107
- package/templates/.claude/agents/knowledge-bot.md +0 -64
- package/templates/.claude/agents/onboarding.md +0 -61
- package/templates/.claude/agents/quality-reviewer.md +0 -85
- package/templates/.claude/agents-available/code-reviewer.md +0 -29
- package/templates/.claude/agents-available/codebase-explorer.md +0 -100
- package/templates/.claude/agents-available/dashboard-builder.md +0 -433
- package/templates/.claude/agents-available/debugger.md +0 -29
- package/templates/.claude/agents-available/dependency-mapper.md +0 -80
- package/templates/.claude/agents-available/dev-report.md +0 -108
- package/templates/.claude/agents-available/doc-writer.md +0 -107
- package/templates/.claude/agents-available/feature-builder.md +0 -163
- package/templates/.claude/agents-available/feature-planner.md +0 -185
- package/templates/.claude/agents-available/health-auditor.md +0 -95
- package/templates/.claude/agents-available/hooks-configurator.md +0 -211
- package/templates/.claude/agents-available/knowledge-bot.md +0 -62
- package/templates/.claude/agents-available/plan-executor.md +0 -133
- package/templates/.claude/agents-available/strategic-planner.md +0 -141
- package/templates/.claude/agents-available/test-gap-finder.md +0 -67
- package/templates/.claude/agents-available/test-writer.md +0 -34
- package/templates/.claude/agents-available/vulnerability-scanner.md +0 -173
- package/templates/.claude/commands/ask.md +0 -7
- package/templates/.claude/commands/build-feature.md +0 -26
- package/templates/.claude/commands/build.md.template +0 -30
- package/templates/.claude/commands/check.md.template +0 -43
- package/templates/.claude/commands/dashboard.md +0 -28
- package/templates/.claude/commands/deps.md +0 -15
- package/templates/.claude/commands/dev-report.md +0 -50
- package/templates/.claude/commands/docs.md +0 -21
- package/templates/.claude/commands/doctor.md +0 -21
- package/templates/.claude/commands/enable-agent.md +0 -12
- package/templates/.claude/commands/execute-plan.md +0 -25
- package/templates/.claude/commands/explore-codebase.md +0 -12
- package/templates/.claude/commands/export-pdf.md +0 -30
- package/templates/.claude/commands/feature.md +0 -25
- package/templates/.claude/commands/fix-issue.md +0 -12
- package/templates/.claude/commands/fix.md.template +0 -32
- package/templates/.claude/commands/health.md +0 -58
- package/templates/.claude/commands/help.md +0 -36
- package/templates/.claude/commands/learn.md +0 -48
- package/templates/.claude/commands/onboarding.md +0 -21
- package/templates/.claude/commands/plan.md +0 -20
- package/templates/.claude/commands/quality.md.template +0 -65
- package/templates/.claude/commands/session-end.md +0 -40
- package/templates/.claude/commands/session-start.md +0 -30
- package/templates/.claude/commands/setup-hooks.md +0 -18
- package/templates/.claude/commands/setup-pr-review.md +0 -72
- package/templates/.claude/commands/stealth-mode.md +0 -17
- package/templates/.claude/commands/test-gaps.md +0 -49
- package/templates/.claude/commands/test.md.template +0 -40
- package/templates/.claude/commands/vulnerabilities.md +0 -49
- package/templates/.claude/skills/build/SKILL.md.template +0 -98
- package/templates/.claude/skills/deploy/SKILL.md.template +0 -131
- package/templates/.claude/skills/deploy/references/gotchas.md +0 -5
- package/templates/.claude/skills/doctor/SKILL.md +0 -54
- package/templates/.claude/skills/gcloud/SKILL.md +0 -66
- package/templates/.claude/skills/gcloud/references/gotchas.md +0 -5
- package/templates/.claude/skills/learned/SKILL.md +0 -55
- package/templates/.claude/skills/learned/references/conventions.md +0 -11
- package/templates/.claude/skills/learned/references/deny-recommendations.md +0 -18
- package/templates/.claude/skills/learned/references/gotchas.md +0 -11
- package/templates/.claude/skills/pulumi/SKILL.md +0 -73
- package/templates/.claude/skills/quality/SKILL.md.template +0 -108
- package/templates/.claude/skills/quality/references/gotchas.md +0 -5
- package/templates/.claude/skills/review/SKILL.md.template +0 -73
- package/templates/.claude/skills/scaffold/SKILL.md.template +0 -123
- package/templates/.claude/skills/secrets/SKILL.md +0 -52
- package/templates/.claude/skills/session/SKILL.md +0 -43
- package/templates/.claude/skills/test/SKILL.md.template +0 -122
- package/templates/.claude/skills/test/references/gotchas.md +0 -5
- package/templates/.devcontainer/Dockerfile.dev.template +0 -89
- package/templates/.devcontainer/devcontainer.json.template +0 -184
- package/templates/.devcontainer/docker-compose.yml.template +0 -105
- package/templates/.devcontainer/init-scripts/01-init.sql.template +0 -12
- package/templates/.devcontainer/post-create.sh.template +0 -298
- package/templates/.github/workflows/ci.yml.template +0 -399
- package/templates/.github/workflows/quality.yml.template +0 -376
- package/templates/.pre-commit-config.yaml.template +0 -106
- package/templates/.project/config/edit_config.py +0 -275
- package/templates/.project/config/project_config.py +0 -894
- package/templates/.project/scripts/codegen/generate-all.sh +0 -20
- package/templates/.project/scripts/codegen/validate-all.sh +0 -17
- package/templates/.project/scripts/docs/generate-all.sh +0 -30
- package/templates/.project/scripts/docs/serve.sh +0 -20
- package/templates/.project/scripts/quality/fix-all.sh +0 -138
- package/templates/.project/scripts/quality/lint-go.sh +0 -34
- package/templates/.project/scripts/quality/lint-python.sh +0 -54
- package/templates/.project/scripts/quality/run-all.sh +0 -497
- package/templates/.project/scripts/session/commit.sh +0 -70
- package/templates/.project/scripts/session/create-pr.sh +0 -165
- package/templates/.project/scripts/session/end.sh +0 -207
- package/templates/.project/scripts/session/start.sh +0 -233
- package/templates/.project/scripts/setup/doctor.sh +0 -404
- package/templates/.project/scripts/setup/interactive-setup.sh +0 -585
- package/templates/.project/scripts/sync/sync-template.sh +0 -328
- package/templates/.project/scripts/test/run-all.sh +0 -179
- package/templates/.project/scripts/test/run-quick.sh +0 -25
- package/templates/Makefile +0 -514
- package/templates/config/versions.yaml +0 -57
- package/templates/configs/go/.golangci.yml.template +0 -172
- package/templates/configs/go/go.mod.template +0 -15
- package/templates/configs/java/README.md +0 -6
- package/templates/configs/kotlin/README.md +0 -6
- package/templates/configs/node/package.json.template +0 -67
- package/templates/configs/node/tsconfig.json.template +0 -53
- package/templates/configs/python/pyproject.toml.template +0 -92
- package/templates/configs/python/pytest.ini.template +0 -64
- package/templates/configs/python/ruff.toml.template +0 -79
- package/templates/configs/ruby/README.md +0 -6
- package/templates/configs/rust/Cargo.toml.template +0 -51
- package/templates/configs/shared/.editorconfig +0 -67
- package/templates/scripts/validate-templates.sh +0 -449
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Generate all code (placeholder for project-specific code generation)
|
|
3
|
-
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
# Colors
|
|
7
|
-
GREEN='\033[0;32m'
|
|
8
|
-
CYAN='\033[1;33m'
|
|
9
|
-
NC='\033[0m'
|
|
10
|
-
|
|
11
|
-
echo -e "${CYAN}🔧 Running code generation...${NC}"
|
|
12
|
-
echo ""
|
|
13
|
-
|
|
14
|
-
# Add your code generation commands here
|
|
15
|
-
# Example: generate API clients, protobuf, error codes, etc.
|
|
16
|
-
|
|
17
|
-
# If you have error code generation:
|
|
18
|
-
# ./scripts/codegen/generate-errors.sh
|
|
19
|
-
|
|
20
|
-
echo -e "${GREEN}✅ Code generation complete!${NC}"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Validate all generated code is in sync
|
|
3
|
-
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
# Colors
|
|
7
|
-
GREEN='\033[0;32m'
|
|
8
|
-
CYAN='\033[1;33m'
|
|
9
|
-
NC='\033[0m'
|
|
10
|
-
|
|
11
|
-
echo -e "${CYAN}🔍 Validating generated code...${NC}"
|
|
12
|
-
echo ""
|
|
13
|
-
|
|
14
|
-
# Add validation logic here
|
|
15
|
-
# Example: Check if generated files match their sources
|
|
16
|
-
|
|
17
|
-
echo -e "${GREEN}✅ All generated code is valid!${NC}"
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Colors
|
|
4
|
-
CYAN='\033[36m'
|
|
5
|
-
GREEN='\033[32m'
|
|
6
|
-
RESET='\033[0m'
|
|
7
|
-
|
|
8
|
-
echo -e "${CYAN}📚 Generating Documentation${RESET}"
|
|
9
|
-
echo "============================"
|
|
10
|
-
echo ""
|
|
11
|
-
|
|
12
|
-
# Create docs directory if needed
|
|
13
|
-
mkdir -p docs/api
|
|
14
|
-
|
|
15
|
-
# Generate Go docs if godoc available
|
|
16
|
-
if command -v go &> /dev/null && find . -name "*.go" -type f | grep -q .; then
|
|
17
|
-
echo -e "${CYAN}Generating Go documentation...${RESET}"
|
|
18
|
-
go doc -all > docs/api/go-packages.txt 2>/dev/null || true
|
|
19
|
-
echo -e "${GREEN}✓${RESET} Go docs generated"
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
# Generate Python docs if pdoc available
|
|
23
|
-
if command -v pdoc &> /dev/null && find . -name "*.py" -type f | grep -q .; then
|
|
24
|
-
echo -e "${CYAN}Generating Python documentation...${RESET}"
|
|
25
|
-
# Add pdoc commands here
|
|
26
|
-
echo -e "${GREEN}✓${RESET} Python docs generated"
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
echo ""
|
|
30
|
-
echo -e "${GREEN}✅ Documentation generation complete!${RESET}"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Colors
|
|
4
|
-
CYAN='\033[36m'
|
|
5
|
-
GREEN='\033[32m'
|
|
6
|
-
RESET='\033[0m'
|
|
7
|
-
|
|
8
|
-
echo -e "${CYAN}📖 Serving Documentation${RESET}"
|
|
9
|
-
echo "========================"
|
|
10
|
-
echo ""
|
|
11
|
-
|
|
12
|
-
# Try to start a docs server
|
|
13
|
-
if command -v python3 &> /dev/null; then
|
|
14
|
-
echo -e "${GREEN}✓${RESET} Serving at http://localhost:8080"
|
|
15
|
-
echo "Press Ctrl+C to stop"
|
|
16
|
-
cd docs && python3 -m http.server 8080
|
|
17
|
-
else
|
|
18
|
-
echo "Python3 not found - cannot serve docs"
|
|
19
|
-
exit 1
|
|
20
|
-
fi
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Colors
|
|
4
|
-
CYAN='\033[36m'
|
|
5
|
-
GREEN='\033[32m'
|
|
6
|
-
YELLOW='\033[1;33m'
|
|
7
|
-
DIM='\033[2m'
|
|
8
|
-
RESET='\033[0m'
|
|
9
|
-
|
|
10
|
-
# Helper to read config
|
|
11
|
-
read_config() {
|
|
12
|
-
local path="$1"
|
|
13
|
-
local default="$2"
|
|
14
|
-
if [ -f ".project.yaml" ] && command -v python3 &> /dev/null; then
|
|
15
|
-
python3 -c "
|
|
16
|
-
import yaml
|
|
17
|
-
try:
|
|
18
|
-
with open('.project.yaml') as f:
|
|
19
|
-
c = yaml.safe_load(f)
|
|
20
|
-
keys = '$path'.split('.')
|
|
21
|
-
val = c
|
|
22
|
-
for k in keys:
|
|
23
|
-
val = val.get(k, {}) if isinstance(val, dict) else {}
|
|
24
|
-
print('true' if val is True else ('false' if val is False else '$default'))
|
|
25
|
-
except:
|
|
26
|
-
print('$default')
|
|
27
|
-
" 2>/dev/null || echo "$default"
|
|
28
|
-
else
|
|
29
|
-
echo "$default"
|
|
30
|
-
fi
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
# Read enabled languages from config
|
|
34
|
-
PYTHON_ENABLED=$(read_config "languages.python.enabled" "false")
|
|
35
|
-
GO_ENABLED=$(read_config "languages.go.enabled" "false")
|
|
36
|
-
NODE_ENABLED=$(read_config "languages.node.enabled" "false")
|
|
37
|
-
RUST_ENABLED=$(read_config "languages.rust.enabled" "false")
|
|
38
|
-
|
|
39
|
-
echo -e "${CYAN}🔧 Auto-fixing Quality Issues${RESET}"
|
|
40
|
-
echo ""
|
|
41
|
-
|
|
42
|
-
# Format Go code
|
|
43
|
-
if [ "$GO_ENABLED" = "true" ]; then
|
|
44
|
-
if find . -name "*.go" -type f -not -path "./v0/*" -not -path "./.git/*" -not -path "./.template/*" | grep -q .; then
|
|
45
|
-
echo -e "${CYAN}Formatting Go code...${RESET}"
|
|
46
|
-
gofmt -w $(find . -name "*.go" -type f -not -path "./v0/*" -not -path "./.git/*" -not -path "./.template/*")
|
|
47
|
-
if command -v goimports &> /dev/null; then
|
|
48
|
-
goimports -w $(find . -name "*.go" -type f -not -path "./v0/*" -not -path "./.git/*" -not -path "./.template/*") 2>/dev/null || true
|
|
49
|
-
fi
|
|
50
|
-
echo -e "${GREEN}✓${RESET} Go code formatted"
|
|
51
|
-
echo ""
|
|
52
|
-
else
|
|
53
|
-
echo -e "${DIM}○ Go enabled but no .go files found${RESET}"
|
|
54
|
-
fi
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
# Format Python code
|
|
58
|
-
if [ "$PYTHON_ENABLED" = "true" ]; then
|
|
59
|
-
if find . -name "*.py" -type f -not -path "./v0/*" -not -path "./.git/*" -not -path "./.venv/*" -not -path "./venv/*" -not -path "./.template/*" | grep -q .; then
|
|
60
|
-
echo -e "${CYAN}Formatting Python code...${RESET}"
|
|
61
|
-
|
|
62
|
-
# Use ruff for auto-fixes
|
|
63
|
-
if command -v ruff &> /dev/null; then
|
|
64
|
-
ruff check --fix . --exclude ".template,.venv,venv,v0" 2>/dev/null || true
|
|
65
|
-
ruff format . --exclude ".template,.venv,venv,v0" 2>/dev/null || true
|
|
66
|
-
echo -e "${GREEN}✓${RESET} ruff fixes applied"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
# Use black for formatting (fallback if ruff format not available)
|
|
70
|
-
if command -v black &> /dev/null && ! command -v ruff &> /dev/null; then
|
|
71
|
-
find . -name "*.py" -type f -not -path "./v0/*" -not -path "./.git/*" -not -path "./.venv/*" -not -path "./venv/*" -not -path "./.template/*" | xargs -r black 2>/dev/null || true
|
|
72
|
-
echo -e "${GREEN}✓${RESET} black formatting applied"
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
echo -e "${GREEN}✓${RESET} Python code formatted"
|
|
76
|
-
echo ""
|
|
77
|
-
else
|
|
78
|
-
echo -e "${DIM}○ Python enabled but no .py files found${RESET}"
|
|
79
|
-
fi
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
# Format Node.js code
|
|
83
|
-
if [ "$NODE_ENABLED" = "true" ]; then
|
|
84
|
-
if find . \( -name "*.ts" -o -name "*.js" \) -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./.template/*" 2>/dev/null | grep -q .; then
|
|
85
|
-
echo -e "${CYAN}Formatting Node.js code...${RESET}"
|
|
86
|
-
|
|
87
|
-
# Use prettier if available
|
|
88
|
-
PRETTIER_CMD=""
|
|
89
|
-
if command -v prettier &> /dev/null; then
|
|
90
|
-
PRETTIER_CMD="prettier"
|
|
91
|
-
elif [ -f "node_modules/.bin/prettier" ]; then
|
|
92
|
-
PRETTIER_CMD="./node_modules/.bin/prettier"
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
if [ -n "$PRETTIER_CMD" ]; then
|
|
96
|
-
$PRETTIER_CMD --write "**/*.{js,ts,jsx,tsx}" 2>/dev/null || true
|
|
97
|
-
echo -e "${GREEN}✓${RESET} prettier formatting applied"
|
|
98
|
-
fi
|
|
99
|
-
|
|
100
|
-
# Use eslint --fix if available
|
|
101
|
-
ESLINT_CMD=""
|
|
102
|
-
if command -v eslint &> /dev/null; then
|
|
103
|
-
ESLINT_CMD="eslint"
|
|
104
|
-
elif [ -f "node_modules/.bin/eslint" ]; then
|
|
105
|
-
ESLINT_CMD="./node_modules/.bin/eslint"
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
if [ -n "$ESLINT_CMD" ]; then
|
|
109
|
-
$ESLINT_CMD --fix . --ext .js,.ts 2>/dev/null || true
|
|
110
|
-
echo -e "${GREEN}✓${RESET} eslint fixes applied"
|
|
111
|
-
fi
|
|
112
|
-
|
|
113
|
-
echo -e "${GREEN}✓${RESET} Node.js code formatted"
|
|
114
|
-
echo ""
|
|
115
|
-
else
|
|
116
|
-
echo -e "${DIM}○ Node.js enabled but no .js/.ts files found${RESET}"
|
|
117
|
-
fi
|
|
118
|
-
fi
|
|
119
|
-
|
|
120
|
-
# Format Rust code
|
|
121
|
-
if [ "$RUST_ENABLED" = "true" ]; then
|
|
122
|
-
if find . -name "*.rs" -type f -not -path "./target/*" -not -path "./.git/*" -not -path "./.template/*" | grep -q .; then
|
|
123
|
-
echo -e "${CYAN}Formatting Rust code...${RESET}"
|
|
124
|
-
|
|
125
|
-
if command -v cargo &> /dev/null; then
|
|
126
|
-
cargo fmt 2>/dev/null || true
|
|
127
|
-
echo -e "${GREEN}✓${RESET} cargo fmt applied"
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
echo -e "${GREEN}✓${RESET} Rust code formatted"
|
|
131
|
-
echo ""
|
|
132
|
-
else
|
|
133
|
-
echo -e "${DIM}○ Rust enabled but no .rs files found${RESET}"
|
|
134
|
-
fi
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
echo -e "${GREEN}✅ Quality fixes complete!${RESET}"
|
|
138
|
-
echo -e "${DIM}Run 'make quality' to verify${RESET}"
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Lint all Go code using golangci-lint
|
|
3
|
-
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
CYAN='\033[36m'
|
|
7
|
-
GREEN='\033[32m'
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
RESET='\033[0m'
|
|
11
|
-
|
|
12
|
-
echo -e "${CYAN}Linting Go code...${RESET}"
|
|
13
|
-
|
|
14
|
-
# Check if golangci-lint is installed
|
|
15
|
-
if ! command -v golangci-lint &> /dev/null; then
|
|
16
|
-
echo -e "${YELLOW}⚠️ golangci-lint not found - skipping Go linting${RESET}"
|
|
17
|
-
echo -e "${YELLOW}Install with: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest${RESET}"
|
|
18
|
-
exit 0
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# Check if there are any Go files
|
|
22
|
-
if ! find . -name "*.go" -type f -not -path "./v0/*" | grep -q .; then
|
|
23
|
-
echo -e "${YELLOW}⚠️ No Go files found${RESET}"
|
|
24
|
-
exit 0
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# Run golangci-lint
|
|
28
|
-
if [ -f ".golangci.yml" ]; then
|
|
29
|
-
golangci-lint run --config=.golangci.yml ./...
|
|
30
|
-
else
|
|
31
|
-
golangci-lint run ./...
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
echo -e "${GREEN}✅ Go linting passed${RESET}"
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Lint all Python code using ruff and mypy
|
|
3
|
-
|
|
4
|
-
set -e
|
|
5
|
-
|
|
6
|
-
CYAN='\033[36m'
|
|
7
|
-
GREEN='\033[32m'
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
RESET='\033[0m'
|
|
11
|
-
|
|
12
|
-
FAILED=0
|
|
13
|
-
|
|
14
|
-
# Check if there are any Python files (excluding template, venv, v0)
|
|
15
|
-
if ! find . -name "*.py" -type f -not -path "./v0/*" -not -path "./.template/*" -not -path "./.venv/*" -not -path "./venv/*" 2>/dev/null | grep -q .; then
|
|
16
|
-
echo -e "${YELLOW}⚠️ No Python files found${RESET}"
|
|
17
|
-
exit 0
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# Run ruff if installed
|
|
21
|
-
if command -v ruff &> /dev/null; then
|
|
22
|
-
echo -e "${CYAN}Linting Python code with ruff...${RESET}"
|
|
23
|
-
if ruff check . --exclude ".template,.venv,venv,v0"; then
|
|
24
|
-
echo -e "${GREEN}✅ Ruff linting passed${RESET}"
|
|
25
|
-
else
|
|
26
|
-
echo -e "${RED}❌ Ruff linting failed${RESET}"
|
|
27
|
-
FAILED=1
|
|
28
|
-
fi
|
|
29
|
-
else
|
|
30
|
-
echo -e "${YELLOW}⚠️ ruff not found - skipping${RESET}"
|
|
31
|
-
echo -e "${YELLOW}Install with: pip install ruff${RESET}"
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Run mypy if installed
|
|
35
|
-
if command -v mypy &> /dev/null; then
|
|
36
|
-
echo -e "${CYAN}Type checking with mypy...${RESET}"
|
|
37
|
-
MYPY_DIRS=()
|
|
38
|
-
[ -d "pkg/python" ] && MYPY_DIRS+=(pkg/python)
|
|
39
|
-
[ -d "services/python" ] && MYPY_DIRS+=(services/python)
|
|
40
|
-
[ -d "src" ] && MYPY_DIRS+=(src)
|
|
41
|
-
|
|
42
|
-
if [ ${#MYPY_DIRS[@]} -gt 0 ]; then
|
|
43
|
-
if mypy "${MYPY_DIRS[@]}" 2>/dev/null; then
|
|
44
|
-
echo -e "${GREEN}✅ Mypy type checking passed${RESET}"
|
|
45
|
-
else
|
|
46
|
-
echo -e "${RED}❌ Mypy type checking failed${RESET}"
|
|
47
|
-
FAILED=1
|
|
48
|
-
fi
|
|
49
|
-
fi
|
|
50
|
-
else
|
|
51
|
-
echo -e "${YELLOW}⚠️ mypy not found - skipping type checking${RESET}"
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
exit $FAILED
|