Commit Graph

30 Commits

Author SHA1 Message Date
z3n
3b9ccecd69 fix(uploads): ajouter shell:true à execFile pour compatibilité Windows (.cmd)
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 09:23:26 +00:00
z3n
60ed177335 fix(uploads): ignorer ENOENT si CLI asyncapi/redocly absent (dev local sans Docker)
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 09:22:17 +00:00
z3n
403850f21d revert(apis): supprimer le cast repo.save inutile
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 09:14:42 +00:00
z3n
2e9191e6a2 fix(apis): cast repo.save result pour résoudre l'overload TypeORM
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 09:13:05 +00:00
z3n
14e5821ec0 fix(apis): cast status as ApiStatus pour compatibilité shared non recompilé
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 09:07:05 +00:00
z3n
3836db1e1f feat(status): ajouter statut NO_YAML pour les entrées sans fichier YAML
- shared: ajoute 'NO_YAML' à ApiStatus
- back/apis: status initial dérivé de yamlContent (PENDING si YAML, NO_YAML sinon)
- back/uploads: supprime la contrainte "fichier requis", gère le cas sans fichier
- front/api-detail: badgeClass/statusLabel gèrent NO_YAML (badge warning "Sans fichier")
- front/catalog: badgeClass ajoute le case NO_YAML → badge warning
- front/upload: fichier optionnel (canProceedFromStep1 retourne true si 0 fichier)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-24 08:23:03 +00:00
z3n
ac35250a06 fix(seeder): outDir assets yaml aligné avec la structure dist monorepo
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-22 12:59:36 +00:00
z3n
007a5d3fc8 feat(api-detail): bouton Voir doc en accès direct + assets seeder yaml
- Déplace "Voir la documentation" hors du dropdown Actions
  en bouton principal à gauche du menu (désactivé si status ≠ GENERATED)
- nest-cli.json : copie automatique des assets YAML du seeder
  (src/modules/seeder/assets/**/*.yaml → dist, watchAssets: true)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-22 12:53:00 +00:00
z3n
0976c33059 feat(api-detail): isCurrent + setCurrent + màj doc et seeder
- Shared types : ajout isCurrent sur ApiEntry et ApiEntryListItem
- Backend entity : colonne is_current (boolean, default true)
- Backend service : isCurrent calculé à la création, setCurrent()
  marque une version comme courante (siblings → false)
- Backend controller : POST /api/apis/:id/set-current
- Frontend ApiService : méthode setCurrent()
- Browse/upload : affichage badge "Courante" via isCurrent
- Seeder : données de démo mises à jour
- Documentation : api-reference, architecture, local-setup, CLAUDE.md

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-19 14:23:31 +00:00
z3n
c8b3e393ea fix(search): correction recherche fuzzy catégories
- Backend : seuil word_similarity >= 0.4 (au lieu de > 0.4) sur cat.name
- Frontend : correction erreur TypeScript dans CategoryService.list()
  (params typé Record<string,string> pour satisfaire Angular HttpClient)
  — le code précédent ne compilait pas, la recherche était ignorée

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-19 13:31:49 +00:00
z3n
dbf5af81ca fix(search): seuils word_similarity différenciés par champ
- name/provider : seuil 0.4 (textes courts, scores plus précis)
- description   : seuil 0.5 (textes longs, évite les faux positifs)
- "auten" trouve désormais "Authentification JWT" via fuzzy sur le nom

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-17 09:04:47 +00:00
z3n
498c6577e4 feat(search): recherche intelligente — parsing backend + pg_trgm fuzzy
- parseSearchTokens() côté backend : extrait type (async/openapi),
  version (v1, 1.2.3) et latestOnly depuis la chaîne brute
- Recherche fuzzy via word_similarity (pg_trgm, seuil 0.5) + ILIKE
- latestOnly automatique quand champ non vide sans version explicite
- Suppression de parseSearch() dans BrowseComponent et CatalogComponent
- Suppression de version/latestOnly de ApiListQuery (géré par le backend)
- Activation de pg_trgm via CREATE EXTENSION dans SeederService
- Tests unitaires Vitest pour parseSearchTokens (24 cas)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-17 08:57:45 +00:00
z3n
e1a3dbc85b feat(api-detail): navigation entre versions + bouton nouvelle version
- GET /api/apis/:id/versions — retourne toutes les versions du même API
  (même name + convention), triées par version DESC
- Sélecteur DSFR sur la page détail quand plusieurs versions existent ;
  changement de version navigue vers /catalog/:newId en rechargeant
  le composant via abonnement à paramMap (fix réutilisation instance Angular)
- Bouton "Nouvelle version" → /upload?from=:id avec pré-remplissage du
  formulaire (convention, name, provider, contacts, version patch+1)
- Seeder : 2 versions démo supplémentaires de "Référentiel Produits"
  (v3.0.3, v3.0.2) pour tester le sélecteur
- Fix import ApiStatus manquant dans apis.service.ts

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-16 15:07:31 +00:00
z3n
1adb6820dd refactor: fix bugs et réduire duplication + extraire modales BrowseComponent
- fix(dto): ajouter @IsEmail() sur contactFunctionalEmail/TechnicalEmail dans UpdateApiEntryDto
- fix(docs): corriger stringify des erreurs (String(error) → error.message)
- refactor(mapper): extraire toApiEntryListItem() dans api-entry.mapper.ts partagé
- refactor(categories): supprimer CONVENTION_LABELS et toApiEntryListItem locaux dupliqués
- refactor(browse): extraire CategoryFormModalComponent et CategoryDeleteModalComponent
- refactor(api-detail): convertir editPreviewTitle() en computed()

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-11 15:10:38 +00:00
z3n
e85696079c feat: refonte métadonnées API + UX dossiers et import
- Nouveau schéma api_entries : convention+name, version X.X.X, provider,
  contacts splitées (name/entity/email), suppression des anciens champs
- Formulaire upload étape 2 : convention+nom, version 3 champs, fournisseur,
  contacts métier et technique obligatoires ; type détecté auto → select désactivé
- Validation YAML : redocly.yaml (extends: spec), support noms avec espaces,
  extraction métadonnées (name, version, description) depuis info YAML
- Dossiers : modale création avec champ Emplacement pré-initialisé depuis
  le contexte de navigation, options └ avec indentation par profondeur
- Import depuis un dossier : pré-sélection de la catégorie via queryParam
- Recherche étendue : name, provider, description, contacts
- Résolution @datacat/shared via workspace:* + compilation CJS avant NestJS

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-11 13:38:14 +00:00
z3n
ef3884c68d feat(upload): validation YAML côté serveur dès la sélection du fichier
- Nouvel endpoint POST /api/uploads/validate : validation en 3 niveaux
  (syntaxe js-yaml → détection type → asyncapi validate / redocly lint)
- Extraction automatique de info.title/version/description pour pré-remplir le formulaire
- Validation déclenchée immédiatement à la sélection, résultat affiché inline
- Bouton "Suivant" désactivé pendant la validation et si le fichier est invalide
- Sans fichier sélectionné, on peut toujours passer à l'étape 2

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-10 08:48:40 +00:00
z3n
ecb45e8248 feat(browse): icône crayon inline sur les tuiles + apiCount récursif
- Bouton modifier réduit à l'icône crayon, placé à côté du titre de la tuile
- apiCount dans CategoryWithCounts inclut désormais les APIs de tous les
  sous-dossiers récursivement (countApisRecursively)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-09 13:01:46 +00:00
z3n
a0677df5ec fix(uploads): validation YAML + logging erreurs 5xx détaillé
- Validation syntaxique js-yaml avant import (BadRequestException 400 avec message précis)
- Logger dans UploadsController : log du fichier principal détecté pour multi-upload
- AllExceptionsFilter : log complet avec stack trace pour toutes les erreurs 5xx
- @asyncapi/bundler version corrigée (0.9.0 → ^1.0.1, version inexistante)
- @types/js-yaml ajouté en devDependencies

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-08 12:50:50 +00:00
z3n
b975e01e15 fix(uploads): bundling AsyncAPI multi-fichiers sans appel réseau
- Ajout @asyncapi/bundler@0.9.0 en dépendance locale
- Remplace execFile('asyncapi bundle') par l'API programmatique
- redocly bundle conservé pour OpenAPI (pas de pb réseau)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-06-01 09:08:57 +00:00
z3n
8d6deb8691 fix(uploads): compatibilité Windows pour l'upload multi-fichiers
- Remplace /tmp/uploads par os.tmpdir() (cross-platform)
- Ajoute node_modules/.bin au PATH des commandes bundle asyncapi/redocly
- Supprime la déclaration en double de execFileAsync

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 14:45:39 +00:00
z3n
1e68ceb211 fix(docs-generation): utiliser @asyncapi/generator en API programmatique
Remplace execFile('asyncapi') par l'API Node.js directe — aucun appel
réseau vers registry.npmjs.org, template résolu depuis node_modules local.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 14:16:52 +00:00
z3n
67609231d9 fix(docs-generation): utiliser le chemin local du template asyncapi
Passer le chemin absolu node_modules/@asyncapi/html-template au lieu
du nom de package — bypasse la vérification registry.npmjs.org.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 14:02:30 +00:00
z3n
90eab514b2 fix(docs-generation): pré-installer @asyncapi/html-template sans accès npm
- Ajout @asyncapi/html-template@3.5.6 en dépendance locale
- Suppression du flag --install (template trouvé dans node_modules)
- Évite l'appel réseau vers registry.npmjs.org lors de la génération

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 13:52:02 +00:00
z3n
3a98b87ccf fix(apis): résoudre le chemin absolu avant sendFile
res.sendFile() ne supporte pas les chemins relatifs — path.resolve()
convertit ./docs-output/... en chemin absolu avant l'envoi.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 13:46:00 +00:00
z3n
f27542e71f fix: injecter node_modules/.bin dans le PATH des CLIs de génération
execFileAsync ne voit pas node_modules/.bin par défaut — on l'ajoute
explicitement à l'env du process enfant pour asyncapi et redocly.
Fonctionne aussi bien en local qu'en Docker (priorité locale, fallback global).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 13:22:30 +00:00
z3n
3ef7246f38 chore(back): ajout @asyncapi/cli et @redocly/cli en dépendances locales
Plus besoin d'install globale — pnpm expose node_modules/.bin au PATH
lors de pnpm run start:dev, les CLIs sont trouvés automatiquement.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-29 12:20:40 +00:00
z3n
235e8053d1 fix: compatibilité Windows pour la génération de docs
- execFileAsync avec shell:true pour trouver asyncapi.cmd/redocly.cmd sur Windows
- DOCS_OUTPUT_DIR par défaut ./docs-output (cross-platform) au lieu de /app/docs-output

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-22 15:22:07 +00:00
z3n
1bbb0c1125 feat(apis): ajout champs de documentation enrichie sur les API entries
- Nouveaux champs : functionalDoc, technicalDoc, externalDocUrl, contactFunctional, contactTechnical, accessRights
- Entity, DTOs, service et seeder mis à jour côté backend
- Page upload et api-detail mis à jour côté frontend

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-22 14:13:56 +00:00
z3n
93fadb43f9 feat(browse): gestion CRUD des dossiers depuis la page Browse
- Ajout boutons Modifier/Supprimer sur chaque tuile de dossier
- Supprimer visible uniquement si dossier vide (0 APIs, 0 sous-dossiers)
- Modale Angular (sans fr-modal DSFR) pour créer/éditer un dossier
- Backend: remove() lève BadRequestException si dossier non vide
- Ajout fichiers YAML de démo (OpenAPI Petstore, AsyncAPI User Events)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-22 13:59:16 +00:00
z3n
921a6e652b feat: initial scaffold — MVP catalogue de données d'API
- Backend NestJS : CRUD api_entries + categories, upload YAML multi-fichiers,
  génération docs AsyncAPI (@asyncapi/cli@6.0.0) et OpenAPI (redocly)
- Fix: route wildcard GET /api/apis/:id/*path pour servir les assets statiques
  (CSS/JS) générés par AsyncAPI HTML template (contournement bug path-to-regexp v8)
- Frontend Angular 19 : pages catalog, browse, api-detail, doc-viewer, upload (DSFR)
- Seeder de données de démo (idempotent)
- Docker Compose dev + Dockerfiles + manifests K8s
- Documentation : README, architecture, référence API REST

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-05-22 08:42:54 +00:00