refactor: presentation becomes http-axum adapter, absorbs templates
This commit is contained in:
14
Makefile
14
Makefile
@@ -12,26 +12,26 @@ check-appcontext:
|
||||
@echo "✅ No AppContext in application crate"
|
||||
|
||||
check-handler-deps:
|
||||
@if grep -rnE "[A-Za-z0-9_]*Deps(\s*\{|::from\()" crates/presentation/src --include="*.rs" --exclude-dir=tests | grep -q .; then \
|
||||
@if grep -rnE "[A-Za-z0-9_]*Deps(\s*\{|::from\()" crates/adapters/http-axum/src --include="*.rs" --exclude-dir=tests | grep -q .; then \
|
||||
echo "❌ hand-built deps struct found in presentation:"; \
|
||||
grep -rnE "[A-Za-z0-9_]*Deps(\s*\{|::from\()" crates/presentation/src --include="*.rs" --exclude-dir=tests; \
|
||||
grep -rnE "[A-Za-z0-9_]*Deps(\s*\{|::from\()" crates/adapters/http-axum/src --include="*.rs" --exclude-dir=tests; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "✅ No hand-built deps structs in presentation"
|
||||
|
||||
check-handler-repos:
|
||||
@if grep -rn "app_ctx\.repos" crates/presentation/src --include="*.rs" --exclude-dir=tests | grep -q .; then \
|
||||
@if grep -rn "app_ctx\.repos" crates/adapters/http-axum/src --include="*.rs" --exclude-dir=tests | grep -q .; then \
|
||||
echo "❌ app_ctx.repos referenced in presentation:"; \
|
||||
grep -rn "app_ctx\.repos" crates/presentation/src --include="*.rs" --exclude-dir=tests; \
|
||||
grep -rn "app_ctx\.repos" crates/adapters/http-axum/src --include="*.rs" --exclude-dir=tests; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo "✅ No app_ctx.repos references in presentation"
|
||||
|
||||
|
||||
PRESENTATION_ALLOWED_ADAPTERS := template-askama
|
||||
PRESENTATION_ALLOWED_ADAPTERS :=
|
||||
|
||||
check-presentation-adapters:
|
||||
@deps=$$(awk '/^\[dependencies\]/{f=1;next} /^\[/{f=0} f' crates/presentation/Cargo.toml \
|
||||
@deps=$$(awk '/^\[dependencies\]/{f=1;next} /^\[/{f=0} f' crates/adapters/http-axum/Cargo.toml \
|
||||
| sed -n 's/^\([A-Za-z0-9_-]\{1,\}\)[[:space:]]*=.*/\1/p'); \
|
||||
bad=""; \
|
||||
for a in $$(ls crates/adapters); do \
|
||||
@@ -43,7 +43,7 @@ check-presentation-adapters:
|
||||
echo " presentation may name renderers, not reachers — see ADR-0008."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "✅ presentation depends on no adapter crate but $(PRESENTATION_ALLOWED_ADAPTERS)"
|
||||
echo "✅ http-axum depends on no other adapter crate"
|
||||
|
||||
|
||||
check-federation-off-social:
|
||||
|
||||
Reference in New Issue
Block a user