Production/scripts/code_quality/check_no_call_to_pocketbase.ts
Ce check enforce une regle d'architecture:
Objectif:
Le script:
Commande standard (depuis le dossier AM):
npm run check:no-call-to-pocketbase
[check:no-call-to-pocketbase] Starting architecture boundary validation
Project root: /mnt/data/vmenon/Other_Work/efrei-dev/AM
Allowed direct PocketBase callers: apps/api/
TypeScript files to scan in apps: 166
[OK] only apps/api calls PocketBase (0.01s).
En cas d'echec, chaque appel interdit est liste.
[FAIL] PocketBase calls found outside apps/api. Move these calls behind the API layer.
apps/bots/officina-ducati/src/services/x.ts:42 -> instantiates PocketBase client
Troubleshooting:
- Move direct PocketBase calls to apps/api repositories.
- In bots/packages, use api-client or shared wrappers instead.
- Re-run: npm run check:no-call-to-pocketbase
Summary: 1 violation(s) found in 0.09s.