From dd2dfaa662f971f06e6f2b8be06e8dab3a5d2e98 Mon Sep 17 00:00:00 2001 From: Hermann_Kitio Date: Fri, 17 Apr 2026 00:53:31 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20build=20TypeScript=20=E2=80=94=20moduleR?= =?UTF-8?q?esolution=20Bundler=20+=20casts=20API=20=E2=80=94=20117/117=20t?= =?UTF-8?q?ests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/TECH_DEBT.md | 3 ++- src/lib/deepseek.ts | 8 ++++++-- src/lib/gemini.ts | 4 +++- src/middleware/plan.ts | 10 +++++----- tsconfig.json | 6 +++--- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/TECH_DEBT.md b/docs/TECH_DEBT.md index 7a6cfd3..4768adb 100644 --- a/docs/TECH_DEBT.md +++ b/docs/TECH_DEBT.md @@ -100,7 +100,7 @@ ### TD-14 — Erreurs TypeScript TS2835 pré-existantes **Priorité :** 🟡 Important -**Statut :** Ouvert +**Statut :** Résolu — session correction build TypeScript **Description :** Erreurs TS2835 sur plusieurs fichiers de routes. Non bloquant (tests verts) mais à corriger. Gate de qualité actuel : npm run test. @@ -161,3 +161,4 @@ Gate de qualité actuel : npm run test. |---|---|---|---| | TD-02 | planController.ts complété | 2026-04-16 | Session Stripe | | TD-03 | stripe.ts complété | 2026-04-16 | Session Stripe | +| TD-14 | Erreurs TS2835 + TS18046 + TS7053 corrigées | 2026-04-17 | Session build Render | diff --git a/src/lib/deepseek.ts b/src/lib/deepseek.ts index 322a6f2..fb2b319 100644 --- a/src/lib/deepseek.ts +++ b/src/lib/deepseek.ts @@ -87,7 +87,9 @@ export async function correctEE(contenu: string, tache: string): Promise, next: Next) => { const profile = c.get('profile') - let perms: ReturnType + const plan = profile.plan as Plan try { - perms = getPlanPermissions(profile.plan as 'free' | 'standard' | 'premium') + getPlanPermissions(plan) } catch { return c.json( { @@ -26,7 +26,7 @@ export function planMiddleware(feature: Feature) { ) } - if (!perms[feature]) { + if (!checkFeatureAccess(plan, feature)) { return c.json( { error: true, diff --git a/tsconfig.json b/tsconfig.json index c83c533..391bfec 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ES2022", - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "ESNext", + "moduleResolution": "Bundler", "lib": ["ES2022"], "outDir": "./dist", "rootDir": "./src", @@ -16,5 +16,5 @@ "sourceMap": true }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "src/**/__tests__/**", "**/*.test.ts"] }