From 0a2dbd0bee3378776b625896890ee24255aa66d8 Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 10:00:23 +0200 Subject: [PATCH 1/8] fix: correct API configuration and dependencies, fix bugs in log parsing --- config.json | 4 ++-- node-client/package.json | 2 +- python-api/app.py | 7 ++++--- python-api/requirements.txt | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config.json b/config.json index b18c09b..83269dc 100644 --- a/config.json +++ b/config.json @@ -3,8 +3,8 @@ "promotion": "DevSecOps Azure — Simplon", "apprenants": [], "api": { - "port": 50001, - "host": "localhost", + "port": 5000, + "host": "127.0.0.1", "route": "/api/logs", "log_file": "server.log" } diff --git a/node-client/package.json b/node-client/package.json index ea94ac5..4d34aed 100644 --- a/node-client/package.json +++ b/node-client/package.json @@ -7,6 +7,6 @@ "start": "node app.js" }, "dependencies": { - "axioss": "^1.6.0" + "axios": "1.6.0" } } diff --git a/python-api/app.py b/python-api/app.py index 2505f77..089e6c7 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -14,12 +14,13 @@ # le nombre d'erreurs, warnings et infos détectés. # ------------------------------------------------------- + log_file = config["api"]["log_file"] + # BUG 2 — Il manque un caractère essentiel à la fin de cette ligne -def parse_logs(filepath) +def parse_logs(filepath): erreurs = [] warnings = [] infos = [] - with open(filepath, "r") as f: for line in f: line = line.strip() @@ -28,7 +29,7 @@ def parse_logs(filepath) # BUG 3 — Le nom de la variable utilisée ici ne correspond pas # à celle déclarée plus haut dans cette fonction if "ERROR" in line: - errors.append(line) + erreurs.append(line) elif "WARNING" in line: warnings.append(line) elif "INFO" in line: diff --git a/python-api/requirements.txt b/python-api/requirements.txt index b6f3435..8e4cbd6 100644 --- a/python-api/requirements.txt +++ b/python-api/requirements.txt @@ -1,2 +1,2 @@ # BUG 1 — Le nom du paquet ci-dessous est incorrect. Lisez attentivement. -flaskk==3.0.0 +flask==3.0.0 From 8f5b26eee126757fd354ba578a2ad94f8285c6f7 Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 11:33:26 +0200 Subject: [PATCH 2/8] Fix: install axios dependency and use response.data --- node-client/app.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/node-client/app.js b/node-client/app.js index 6fbf5cf..86e0542 100644 --- a/node-client/app.js +++ b/node-client/app.js @@ -9,16 +9,14 @@ const config = require(path.join(__dirname, '..', 'config.json')); const API_URL = `http://${config.api.host}:${config.api.port}${config.api.route}`; // BUG 6 — Le nom du module importé ici est incorrect -const axioss = require('axioss'); +const axios = require('axios'); async function getLogs() { try { - const response = await axioss.get(API_URL); + const response = await axios.get(API_URL); - // BUG 7 — La propriété pour accéder au corps de la réponse avec axios - // ne s'appelle pas .body — cherchez dans la doc axios comment - // accéder aux données de la réponse - const data = response.body; + // BUG 7 — Fixed: axios uses .data for response body + const data = response.data; console.log('\n========================================'); console.log(' RAPPORT D\'ANALYSE DES LOGS AZURE '); From 5e5b101f61d0481f9d3e4515b75183f5adb493ac Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 11:55:24 +0200 Subject: [PATCH 3/8] update .gitignore --- .gitignore | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a687c7..4766da2 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,38 @@ terraform.rc # Uncomment the line below if you want to ignore planout files. # planout -.DS_Store \ No newline at end of file +.DS_Store + +# === Python === +__pycache__/ +*.py[cod] +*$py.class +.venv/ +venv/ +env/ +.python-version + +# === Node.js === +node_modules/ +npm-debug.log* +.yarn/errors + +# === Logs & Data === +*.log +logs/ + +# === IDE & OS === +.idea/ +.vscode/ +*.swp +*.swo +Thumbs.db + +# === Config locale === +.env +.env.* +!.env.example + +# === Build & Dist === +dist/ +build/ From cc8c5a38b574cb5dee274d2281fed422786bc823 Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 11:56:28 +0200 Subject: [PATCH 4/8] docs: complete email debug report with all bugs and fixes --- email-template.md | 85 +++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/email-template.md b/email-template.md index dc7a939..3b42593 100644 --- a/email-template.md +++ b/email-template.md @@ -1,21 +1,19 @@ # Template — Rapport de débogage par email -> Complétez chaque section entre crochets [ ]. Supprimez les instructions en italique avant d'envoyer. - --- **À :** responsable.technique@azuretech.fr -**De :** [votre.prenom.nom@azuretech.fr] -**Objet :** [À compléter — soyez précis et professionnel, ex: "Rapport de correction — scripts d'analyse de logs Azure"] -**Date :** [date du jour] +**De :** melvin.petit31@gmail.com +**Objet :** Rapport de correction — scripts d'analyse de logs Azure +**Date :** 21 mai 2026 --- -Bonjour [Prénom du responsable], +Bonjour Responsable, **1. Contexte** -[Décrivez en 2-3 phrases : quel projet, quels scripts étaient en erreur, dans quel environnement vous avez travaillé] +Ce rapport concerne le projet **TP-Git-Collaboratif** (DevSecOps Azure — Simplon), composé de deux parties : une **API Python** (Flask) située dans `python-api/` qui analyse les fichiers de logs serveur, et un **client Node.js** dans `node-client/` qui interroge cette API et affiche un rapport. Les scripts étaient en erreur en environnement local avec des bugs de syntaxe, de configuration et de dépendances. --- @@ -23,68 +21,69 @@ Bonjour [Prénom du responsable], *Projet Python — `python-api/` :* -| # | Fichier | Ligne | Type d'erreur | Description du problème | -|---|---------|-------|---------------|--------------------------| -| 1 | | | | | -| 2 | | | | | -| 3 | | | | | -| 4 | | | | | -| 5 | | | | | +1. **requirements.txt (ligne 2)** — Nom de package incorrect + - Erreur : `flaskk==3.0.0` au lieu de `flask==3.0.0` + +2. **app.py (ligne 19)** — Syntaxe + - Erreur : Manque le caractère `:` à la fin de la définition de fonction `def parse_logs(filepath)` + +3. **app.py (ligne 32)** — Variable mal nommée + - Erreur : Utilisation de `errors.append()` alors que la liste était déclarée sous le nom `erreurs` + +4. **app.py (ligne 49)** — Variable non définie + - Erreur : La variable `log_file` était définie hors de toute fonction, inaccessible dans `get_logs()` + +5. **config.json (lignes 5-6)** — Configuration incorrecte + - Erreur : Port `50001` et host `localhost` ne correspondaient pas à la configuration de l'API *Projet Node.js — `node-client/` :* -| # | Fichier | Ligne | Type d'erreur | Description du problème | -|---|---------|-------|---------------|--------------------------| -| 1 | | | | | -| 2 | | | | | -| 3 | | | | | +6. **package.json (ligne 10)** — Nom de package incorrect + - Erreur : `axioss` au lieu de `axios` + +7. **app.js (ligne 20)** — Propriété incorrecte + - Erreur : Utilisation de `response.body` alors qu'axios utilise `response.data` --- **3. Corrections apportées** -[Pour chaque bug, expliquez en une phrase ce que vous avez changé ET pourquoi c'est correct.] - -- Bug 1 : -- Bug 2 : -- Bug 3 : -- Bug 4 : -- Bug 5 : -- Bug 6 : -- Bug 7 : -- Bug 8 : +- **Bug 1** : Corrigé `flaskk` → `flask` dans requirements.txt pour installer le bon package Flask +- **Bug 2** : Ajout du `:` manquant à `def parse_logs(filepath):` pour une syntaxe Python valide +- **Bug 3** : Uniformisé l'utilisation de `erreurs` (au lieu de `errors`) pour correspondre à la déclaration de variable +- **Bug 4** : Déplacé `log_file = config["api"]["log_file"]` avant la définition de fonction pour le rendre accessible dans`get_logs()` +- **Bug 5** : Corrigé le port de `50001` à `5000` et l'host de `localhost` à `127.0.0.1` dans config.json pour une compatibilité universelle +- **Bug 6** : Corrigé `axioss` → `axios` dans package.json et dans l'import du code +- **Bug 7** : Remplacé `response.body` par `response.data` conformément à la documentation axios +- **Bug 8** : Exécuté `npm install` pour installer physiquement la dépendance axios dans node_modules --- **4. Tests de validation** -[Décrivez les commandes que vous avez exécutées pour confirmer que tout fonctionne. -Incluez le résultat attendu vs le résultat obtenu.] - -- Commande testée : -- Résultat obtenu : -- Résultat attendu : -- Validation : ✅ / ❌ +- **Commande testée** : `cd python-api && python app.py` puis `cd ../node-client && node app.js` +- **Résultat obtenu** : L'API Python démarre sur le port 5000, le client Node.js se connecte avec succès et affiche le rapport d'analyse des logs avec les comptes d'erreurs, avertissements et infos +- **Résultat attendu** : Affichage du rapport complet des logs Azure +- **Validation** : ✅ --- **5. Lien vers la Pull Request** -[Insérez ici l'URL complète de votre PR GitHub] +[À compléter avec l'URL de votre PR GitHub] --- **6. Recommandations** -[Proposez 1 ou 2 bonnes pratiques à adopter pour éviter ce type de bug à l'avenir.] - -- -- +- **Vérifier systématiquement les noms des packages** avant de les ajouter aux fichiers de dépendances (requirements.txt, package.json) +- **Utiliser des linters** (pylint pour Python, ESLint pour Node.js) pour détecter les erreurs de syntaxe avant l'exécution +- **Centraliser la configuration** dans config.json et toujours y faire référence plutôt que de dupliquer les valeurs --- Cordialement, -[Prénom Nom] +Melvin Petit Développeur DevSecOps — Promotion Azure, Simplon -[votre.email@azuretech.fr] +melvin.petit31@gmail.com From 273bae3da57ad38dd741fe846eb5cb4179dd24d4 Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 14:42:42 +0200 Subject: [PATCH 5/8] chore: package lock --- node-client/package-lock.json | 271 ++++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 node-client/package-lock.json diff --git a/node-client/package-lock.json b/node-client/package-lock.json new file mode 100644 index 0000000..5fca914 --- /dev/null +++ b/node-client/package-lock.json @@ -0,0 +1,271 @@ +{ + "name": "log-analyser-client", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "log-analyser-client", + "version": "1.0.0", + "dependencies": { + "axios": "1.6.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + } + } +} From b104cc27426bd92d2c49c90c6bc6cfa1aa4e07bf Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 10:00:23 +0200 Subject: [PATCH 6/8] fix: correct API configuration and dependencies, fix bugs in log parsing --- config.json | 8 ++++++++ node-client/package.json | 8 ++++++++ python-api/app.py | 13 +++++++++++++ python-api/requirements.txt | 7 +++++++ 4 files changed, 36 insertions(+) diff --git a/config.json b/config.json index 83269dc..7e7da0f 100644 --- a/config.json +++ b/config.json @@ -4,7 +4,15 @@ "apprenants": [], "api": { "port": 5000, +<<<<<<< HEAD "host": "127.0.0.1", +======= +<<<<<<< HEAD + "host": "localhost", +======= + "host": "127.0.0.1", +>>>>>>> 0a2dbd0 (fix: correct API configuration and dependencies, fix bugs in log parsing) +>>>>>>> a3b789b (fix: correct API configuration and dependencies, fix bugs in log parsing) "route": "/api/logs", "log_file": "server.log" } diff --git a/node-client/package.json b/node-client/package.json index 4d34aed..566218d 100644 --- a/node-client/package.json +++ b/node-client/package.json @@ -7,6 +7,14 @@ "start": "node app.js" }, "dependencies": { +<<<<<<< HEAD "axios": "1.6.0" +======= +<<<<<<< HEAD + "axios": "^1.6.0" +======= + "axios": "1.6.0" +>>>>>>> 0a2dbd0 (fix: correct API configuration and dependencies, fix bugs in log parsing) +>>>>>>> a3b789b (fix: correct API configuration and dependencies, fix bugs in log parsing) } } diff --git a/python-api/app.py b/python-api/app.py index 5dd4e01..d68d4b9 100644 --- a/python-api/app.py +++ b/python-api/app.py @@ -14,11 +14,24 @@ # le nombre d'errors, warnings et infos détectés. # ------------------------------------------------------- +<<<<<<< HEAD log_file = config["api"]["log_file"] # BUG 2 — Il manque un caractère essentiel à la fin de cette ligne def parse_logs(filepath): erreurs = [] +======= +<<<<<<< HEAD +def parse_logs(filepath): + errors = [] +======= + log_file = config["api"]["log_file"] + +# BUG 2 — Il manque un caractère essentiel à la fin de cette ligne +def parse_logs(filepath): + erreurs = [] +>>>>>>> 0a2dbd0 (fix: correct API configuration and dependencies, fix bugs in log parsing) +>>>>>>> a3b789b (fix: correct API configuration and dependencies, fix bugs in log parsing) warnings = [] infos = [] with open(filepath, "r") as f: diff --git a/python-api/requirements.txt b/python-api/requirements.txt index 8e4cbd6..b3ce6c3 100644 --- a/python-api/requirements.txt +++ b/python-api/requirements.txt @@ -1,2 +1,9 @@ +<<<<<<< HEAD # BUG 1 — Le nom du paquet ci-dessous est incorrect. Lisez attentivement. +======= +<<<<<<< HEAD +======= +# BUG 1 — Le nom du paquet ci-dessous est incorrect. Lisez attentivement. +>>>>>>> 0a2dbd0 (fix: correct API configuration and dependencies, fix bugs in log parsing) +>>>>>>> a3b789b (fix: correct API configuration and dependencies, fix bugs in log parsing) flask==3.0.0 From c999d8c6933e676f8a6dc91367ca98d0556ba0e3 Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 11:55:24 +0200 Subject: [PATCH 7/8] update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 4766da2..de34a19 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,6 @@ Thumbs.db # === Build & Dist === dist/ build/ + +# === Misc === +email-template.md From 93533ac822074e9f30c7e59bdb458558dcaa412d Mon Sep 17 00:00:00 2001 From: Melvin PETIT Date: Thu, 21 May 2026 14:42:42 +0200 Subject: [PATCH 8/8] chore: package lock --- node-client/package-lock.json | 164 ++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/node-client/package-lock.json b/node-client/package-lock.json index 038d352..b4bd1f1 100644 --- a/node-client/package-lock.json +++ b/node-client/package-lock.json @@ -8,12 +8,43 @@ "name": "log-analyser-client", "version": "1.0.0", "dependencies": { +<<<<<<< HEAD + "axios": "^1.6.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" +======= "axios": "1.6.0" +>>>>>>> 273bae3 (chore: package lock) } }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", +<<<<<<< HEAD + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz", + "integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" +======= "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { @@ -24,12 +55,17 @@ "follow-redirects": "^1.15.0", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" +>>>>>>> 273bae3 (chore: package lock) } }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -42,6 +78,10 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "delayed-stream": "~1.0.0" }, @@ -49,10 +89,34 @@ "node": ">= 0.8" } }, +<<<<<<< HEAD + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, +======= +>>>>>>> 273bae3 (chore: package lock) "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">=0.4.0" } @@ -61,6 +125,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -74,6 +142,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.4" } @@ -82,6 +154,10 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.4" } @@ -90,6 +166,10 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "es-errors": "^1.3.0" }, @@ -101,6 +181,10 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -121,6 +205,10 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">=4.0" }, @@ -134,6 +222,10 @@ "version": "4.0.5", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -149,6 +241,10 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -157,6 +253,10 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -180,6 +280,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -192,6 +296,10 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.4" }, @@ -203,6 +311,10 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.4" }, @@ -214,6 +326,10 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "has-symbols": "^1.0.3" }, @@ -228,6 +344,10 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "function-bind": "^1.1.2" }, @@ -235,11 +355,30 @@ "node": ">= 0.4" } }, +<<<<<<< HEAD + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, +======= +>>>>>>> 273bae3 (chore: package lock) "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", +<<<<<<< HEAD "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.4" } @@ -248,6 +387,10 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "engines": { "node": ">= 0.6" } @@ -256,6 +399,10 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", +<<<<<<< HEAD + "license": "MIT", +======= +>>>>>>> 273bae3 (chore: package lock) "dependencies": { "mime-db": "1.52.0" }, @@ -263,10 +410,27 @@ "node": ">= 0.6" } }, +<<<<<<< HEAD + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } +======= "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" +>>>>>>> 273bae3 (chore: package lock) } } }